From 5744c88111f076c98f389eae28ec2ff206ba2e14 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 15 Apr 2011 20:03:17 +0200 Subject: sh: fix SD / MMC configuration dependencies on ecovec Update CONFIG_MMC_TMIO to the new CONFIG_MMC_SDHI symbol and fix MMCIF to also function in modular builds for ecovec. Signed-off-by: Guennadi Liakhovetski Acked-by: Simon Horman Cc: Magnus Damm Signed-off-by: Paul Mundt --- arch/sh/boards/mach-ecovec24/setup.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'arch') diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 86a0d56..bb13d0e 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -482,7 +482,7 @@ static struct i2c_board_info ts_i2c_clients = { .irq = IRQ0, }; -#if defined(CONFIG_MMC_TMIO) || defined(CONFIG_MMC_TMIO_MODULE) +#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) /* SDHI0 */ static void sdhi0_set_pwr(struct platform_device *pdev, int state) { @@ -522,7 +522,7 @@ static struct platform_device sdhi0_device = { }, }; -#if !defined(CONFIG_MMC_SH_MMCIF) +#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) /* SDHI1 */ static void sdhi1_set_pwr(struct platform_device *pdev, int state) { @@ -836,7 +836,7 @@ static struct platform_device vou_device = { }, }; -#if defined(CONFIG_MMC_SH_MMCIF) +#if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) /* SH_MMCIF */ static void mmcif_set_pwr(struct platform_device *pdev, int state) { @@ -898,9 +898,9 @@ static struct platform_device *ecovec_devices[] __initdata = { &ceu0_device, &ceu1_device, &keysc_device, -#if defined(CONFIG_MMC_TMIO) || defined(CONFIG_MMC_TMIO_MODULE) +#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) &sdhi0_device, -#if !defined(CONFIG_MMC_SH_MMCIF) +#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) &sdhi1_device, #endif #else @@ -912,7 +912,7 @@ static struct platform_device *ecovec_devices[] __initdata = { &fsi_device, &irda_device, &vou_device, -#if defined(CONFIG_MMC_SH_MMCIF) +#if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) &sh_mmcif_device, #endif }; @@ -1180,7 +1180,7 @@ static int __init arch_setup(void) gpio_direction_input(GPIO_PTR5); gpio_direction_input(GPIO_PTR6); -#if defined(CONFIG_MMC_TMIO) || defined(CONFIG_MMC_TMIO_MODULE) +#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) /* enable SDHI0 on CN11 (needs DS2.4 set to ON) */ gpio_request(GPIO_FN_SDHI0CD, NULL); gpio_request(GPIO_FN_SDHI0WP, NULL); @@ -1193,7 +1193,7 @@ static int __init arch_setup(void) gpio_request(GPIO_PTB6, NULL); gpio_direction_output(GPIO_PTB6, 0); -#if !defined(CONFIG_MMC_SH_MMCIF) +#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */ gpio_request(GPIO_FN_SDHI1CD, NULL); gpio_request(GPIO_FN_SDHI1WP, NULL); @@ -1284,7 +1284,7 @@ static int __init arch_setup(void) gpio_request(GPIO_PTU5, NULL); gpio_direction_output(GPIO_PTU5, 0); -#if defined(CONFIG_MMC_SH_MMCIF) +#if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) /* enable MMCIF (needs DS2.6,7 set to OFF,ON) */ gpio_request(GPIO_FN_MMC_D7, NULL); gpio_request(GPIO_FN_MMC_D6, NULL); -- cgit v1.1 From 013b19e3aa843e206a47098063258d5cc5c3482e Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 15 Apr 2011 20:04:12 +0200 Subject: sh: update SDHI configuration symbols in defconfigs Signed-off-by: Guennadi Liakhovetski Acked-by: Simon Horman Cc: Magnus Damm Signed-off-by: Paul Mundt --- arch/sh/configs/ecovec24_defconfig | 2 +- arch/sh/configs/sh7757lcr_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig index 8d13e8a..911e30c9 100644 --- a/arch/sh/configs/ecovec24_defconfig +++ b/arch/sh/configs/ecovec24_defconfig @@ -115,7 +115,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_FILE_STORAGE=m CONFIG_MMC=y CONFIG_MMC_SPI=y -CONFIG_MMC_TMIO=y +CONFIG_MMC_SDHI=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_RS5C372=y CONFIG_UIO=y diff --git a/arch/sh/configs/sh7757lcr_defconfig b/arch/sh/configs/sh7757lcr_defconfig index fa0ecf8..33ddb13 100644 --- a/arch/sh/configs/sh7757lcr_defconfig +++ b/arch/sh/configs/sh7757lcr_defconfig @@ -70,7 +70,7 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_MMC=y -CONFIG_MMC_TMIO=y +CONFIG_MMC_SDHI=y CONFIG_MMC_SH_MMCIF=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y -- cgit v1.1 From a375b15164dd9264f724ad941825e52c90145151 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 15 Apr 2011 16:44:27 +0900 Subject: sh: fixup fpu.o compile order arch_ptrace() was modified to reference init_fpu() to fix up xstate initialization, which overlooked the fact that there are configurations that don't enable any of hard FPU support or emulation, resulting in build errors on DSP parts. Given that init_fpu() simply sets up the xstate slab cache and is side-stepped entirely for the DSP case, we can simply always build in the helper and fix up the references. Reported-by: Nobuhiro Iwamatsu Signed-off-by: Kuninori Morimoto Cc: stable@kernel.org Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/sh/kernel/cpu/Makefile b/arch/sh/kernel/cpu/Makefile index d49c213..ae95935 100644 --- a/arch/sh/kernel/cpu/Makefile +++ b/arch/sh/kernel/cpu/Makefile @@ -17,7 +17,5 @@ obj-$(CONFIG_ARCH_SHMOBILE) += shmobile/ obj-$(CONFIG_SH_ADC) += adc.o obj-$(CONFIG_SH_CLK_CPG_LEGACY) += clock-cpg.o -obj-$(CONFIG_SH_FPU) += fpu.o -obj-$(CONFIG_SH_FPU_EMU) += fpu.o -obj-y += irq/ init.o clock.o hwblk.o proc.o +obj-y += irq/ init.o clock.o fpu.o hwblk.o proc.o -- cgit v1.1 From ed170924dd0db14b135a388966e0b6fd5188c3e5 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 18 Apr 2011 11:45:27 +0900 Subject: sh: select IRQ_FORCED_THREADING. With virtual IRQs fixed up with the genirq nothread infrastructure, IRQ threads can be enabled across the board. Signed-off-by: Paul Mundt --- arch/sh/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 4b89da2..dd4bf55 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -21,6 +21,7 @@ config SUPERH select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_GENERIC_HARDIRQS select HAVE_SPARSE_IRQ + select IRQ_FORCED_THREADING select RTC_LIB select GENERIC_ATOMIC64 select GENERIC_IRQ_SHOW -- cgit v1.1 From 3e4cd0737d2e9c3dd52153a23aef1753e3a99fc4 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 15 Apr 2011 18:05:27 +0000 Subject: sh: cosmetic improvement: use an existing pointer Use an existing local variable, instead of calculating the pointer multiple times explicitly. Signed-off-by: Guennadi Liakhovetski Cc: Simon Horman Cc: Magnus Damm Reviewed-by: Simon Horman Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/shmobile/pm_runtime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/sh/kernel/cpu/shmobile/pm_runtime.c b/arch/sh/kernel/cpu/shmobile/pm_runtime.c index 22db127..64c807c 100644 --- a/arch/sh/kernel/cpu/shmobile/pm_runtime.c +++ b/arch/sh/kernel/cpu/shmobile/pm_runtime.c @@ -157,7 +157,7 @@ static int default_platform_runtime_suspend(struct device *dev) might_sleep(); /* catch misconfigured drivers not starting with resume */ - if (test_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags)) { + if (test_bit(PDEV_ARCHDATA_FLAG_INIT, &ad->flags)) { ret = -EINVAL; goto out; } @@ -170,8 +170,8 @@ static int default_platform_runtime_suspend(struct device *dev) /* put device on idle list */ spin_lock_irqsave(&hwblk_lock, flags); - list_add_tail(&pdev->archdata.entry, &hwblk_idle_list); - __set_bit(PDEV_ARCHDATA_FLAG_IDLE, &pdev->archdata.flags); + list_add_tail(&ad->entry, &hwblk_idle_list); + __set_bit(PDEV_ARCHDATA_FLAG_IDLE, &ad->flags); spin_unlock_irqrestore(&hwblk_lock, flags); /* increase idle count */ -- cgit v1.1 From c7434dbf29b4803d1caa0d1267fb6a455494d0d7 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 23 May 2011 14:41:32 +0900 Subject: sh: wire up sys_sendmmsg. Signed-off-by: Paul Mundt --- arch/sh/include/asm/unistd_32.h | 3 ++- arch/sh/include/asm/unistd_64.h | 3 ++- arch/sh/kernel/syscalls_32.S | 1 + arch/sh/kernel/syscalls_64.S | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h index ca7765e..bb7d270 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/asm/unistd_32.h @@ -373,8 +373,9 @@ #define __NR_open_by_handle_at 360 #define __NR_clock_adjtime 361 #define __NR_syncfs 362 +#define __NR_sendmmsg 363 -#define NR_syscalls 363 +#define NR_syscalls 364 #ifdef __KERNEL__ diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h index a694009..46327ce 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/asm/unistd_64.h @@ -394,10 +394,11 @@ #define __NR_open_by_handle_at 371 #define __NR_clock_adjtime 372 #define __NR_syncfs 373 +#define __NR_sendmmsg 374 #ifdef __KERNEL__ -#define NR_syscalls 374 +#define NR_syscalls 375 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S index 030966a..7c486f3 100644 --- a/arch/sh/kernel/syscalls_32.S +++ b/arch/sh/kernel/syscalls_32.S @@ -380,3 +380,4 @@ ENTRY(sys_call_table) .long sys_open_by_handle_at /* 360 */ .long sys_clock_adjtime .long sys_syncfs + .long sys_sendmmsg diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S index ca0a614..ba1a737a 100644 --- a/arch/sh/kernel/syscalls_64.S +++ b/arch/sh/kernel/syscalls_64.S @@ -400,3 +400,4 @@ sys_call_table: .long sys_open_by_handle_at .long sys_clock_adjtime .long sys_syncfs + .long sys_sendmmsg -- cgit v1.1 From d39e17c7f8f8fb4012618d25ddc4436407b174a6 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Thu, 12 May 2011 13:11:11 +0000 Subject: sh: remove warning and warning_symbol from struct stacktrace_ops Both warning and warning_symbol are nowhere used. Let's get rid of them. Signed-off-by: Richard Weinberger Signed-off-by: Paul Mundt --- arch/sh/include/asm/stacktrace.h | 3 --- arch/sh/kernel/dumpstack.c | 15 --------------- arch/sh/kernel/perf_callchain.c | 12 ------------ arch/sh/kernel/stacktrace.c | 13 ------------- arch/sh/oprofile/backtrace.c | 13 ------------- 5 files changed, 56 deletions(-) (limited to 'arch') diff --git a/arch/sh/include/asm/stacktrace.h b/arch/sh/include/asm/stacktrace.h index 7970182..a7e2d4d 100644 --- a/arch/sh/include/asm/stacktrace.h +++ b/arch/sh/include/asm/stacktrace.h @@ -10,9 +10,6 @@ /* Generic stack tracer with callbacks */ struct stacktrace_ops { - void (*warning)(void *data, char *msg); - /* msg must contain %s for the symbol */ - void (*warning_symbol)(void *data, char *msg, unsigned long symbol); void (*address)(void *data, unsigned long address, int reliable); /* On negative return stop dumping */ int (*stack)(void *data, char *name); diff --git a/arch/sh/kernel/dumpstack.c b/arch/sh/kernel/dumpstack.c index 6f5ad15..694158b 100644 --- a/arch/sh/kernel/dumpstack.c +++ b/arch/sh/kernel/dumpstack.c @@ -69,19 +69,6 @@ stack_reader_dump(struct task_struct *task, struct pt_regs *regs, } } -static void -print_trace_warning_symbol(void *data, char *msg, unsigned long symbol) -{ - printk(data); - print_symbol(msg, symbol); - printk("\n"); -} - -static void print_trace_warning(void *data, char *msg) -{ - printk("%s%s\n", (char *)data, msg); -} - static int print_trace_stack(void *data, char *name) { printk("%s <%s> ", (char *)data, name); @@ -98,8 +85,6 @@ static void print_trace_address(void *data, unsigned long addr, int reliable) } static const struct stacktrace_ops print_trace_ops = { - .warning = print_trace_warning, - .warning_symbol = print_trace_warning_symbol, .stack = print_trace_stack, .address = print_trace_address, }; diff --git a/arch/sh/kernel/perf_callchain.c b/arch/sh/kernel/perf_callchain.c index d5ca1ef..cc80b61 100644 --- a/arch/sh/kernel/perf_callchain.c +++ b/arch/sh/kernel/perf_callchain.c @@ -14,16 +14,6 @@ #include #include - -static void callchain_warning(void *data, char *msg) -{ -} - -static void -callchain_warning_symbol(void *data, char *msg, unsigned long symbol) -{ -} - static int callchain_stack(void *data, char *name) { return 0; @@ -38,8 +28,6 @@ static void callchain_address(void *data, unsigned long addr, int reliable) } static const struct stacktrace_ops callchain_ops = { - .warning = callchain_warning, - .warning_symbol = callchain_warning_symbol, .stack = callchain_stack, .address = callchain_address, }; diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c index c2e45c4..bf989e0 100644 --- a/arch/sh/kernel/stacktrace.c +++ b/arch/sh/kernel/stacktrace.c @@ -17,15 +17,6 @@ #include #include -static void save_stack_warning(void *data, char *msg) -{ -} - -static void -save_stack_warning_symbol(void *data, char *msg, unsigned long symbol) -{ -} - static int save_stack_stack(void *data, char *name) { return 0; @@ -51,8 +42,6 @@ static void save_stack_address(void *data, unsigned long addr, int reliable) } static const struct stacktrace_ops save_stack_ops = { - .warning = save_stack_warning, - .warning_symbol = save_stack_warning_symbol, .stack = save_stack_stack, .address = save_stack_address, }; @@ -88,8 +77,6 @@ save_stack_address_nosched(void *data, unsigned long addr, int reliable) } static const struct stacktrace_ops save_stack_ops_nosched = { - .warning = save_stack_warning, - .warning_symbol = save_stack_warning_symbol, .stack = save_stack_stack, .address = save_stack_address_nosched, }; diff --git a/arch/sh/oprofile/backtrace.c b/arch/sh/oprofile/backtrace.c index 37f3a75..9c88dcd 100644 --- a/arch/sh/oprofile/backtrace.c +++ b/arch/sh/oprofile/backtrace.c @@ -23,17 +23,6 @@ #include #include -static void backtrace_warning_symbol(void *data, char *msg, - unsigned long symbol) -{ - /* Ignore warnings */ -} - -static void backtrace_warning(void *data, char *msg) -{ - /* Ignore warnings */ -} - static int backtrace_stack(void *data, char *name) { /* Yes, we want all stacks */ @@ -49,8 +38,6 @@ static void backtrace_address(void *data, unsigned long addr, int reliable) } static struct stacktrace_ops backtrace_ops = { - .warning = backtrace_warning, - .warning_symbol = backtrace_warning_symbol, .stack = backtrace_stack, .address = backtrace_address, }; -- cgit v1.1 From 116ceec20069f5bab507eab817e56a4b60480845 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 13 May 2011 12:17:46 +0000 Subject: SH: SE7751: Fix pcibios_map_platform_irq prototype. Signed-off-by: Ralf Baechle Signed-off-by: Paul Mundt --- arch/sh/drivers/pci/fixups-se7751.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/sh/drivers/pci/fixups-se7751.c b/arch/sh/drivers/pci/fixups-se7751.c index a4c7d3a..fd3e6b0 100644 --- a/arch/sh/drivers/pci/fixups-se7751.c +++ b/arch/sh/drivers/pci/fixups-se7751.c @@ -6,7 +6,7 @@ #include #include "pci-sh4.h" -int __init pcibios_map_platform_irq(u8 slot, u8 pin) +int __init pcibios_map_platform_irq(struct pci_dev *, u8 slot, u8 pin) { switch (slot) { case 0: return 13; -- cgit v1.1 From 78207ffd0e00d39238f0a8a455a31a12659b30b3 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 23 May 2011 17:09:30 +0900 Subject: sh: Ignore R_SH_NONE module relocations. Some modules may end up with R_SH_NONE relocs with the right combination of compiler/kernel config (specifically dwarf unwinder), so simply trap and ignore them instead of letting them get down to the error path. Reported-by: Carmelo AMOROSO Signed-off-by: Paul Mundt --- arch/sh/kernel/module.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c index ae0be69..19b1f88 100644 --- a/arch/sh/kernel/module.c +++ b/arch/sh/kernel/module.c @@ -93,6 +93,8 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, #endif switch (ELF32_R_TYPE(rel[i].r_info)) { + case R_SH_NONE: + break; case R_SH_DIR32: value = get_unaligned(location); value += relocation; -- cgit v1.1