From 6f8ae9bc0628c9e039003a7d572a6f59c835b868 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Fri, 1 Nov 2013 19:07:48 +0800 Subject: hexagon: kernel: remove useless variables 'dn', 'r' and 'err' in time_init_deferred() in "time.c" Remove them, since they are useless. The related warnings (with allmodconfig for v4): CC arch/hexagon/kernel/time.o arch/hexagon/kernel/time.c: In function 'time_init_deferred': arch/hexagon/kernel/time.c:196: warning: unused variable 'err' arch/hexagon/kernel/time.c:195: warning: unused variable 'r' arch/hexagon/kernel/time.c:194: warning: unused variable 'dn' Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/kernel/time.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'arch/hexagon/kernel') diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c index 9903fad997f3..d0c4f5a04b7b 100644 --- a/arch/hexagon/kernel/time.c +++ b/arch/hexagon/kernel/time.c @@ -191,9 +191,6 @@ void __init time_init_deferred(void) { struct resource *resource = NULL; struct clock_event_device *ce_dev = &hexagon_clockevent_dev; - struct device_node *dn; - struct resource r; - int err; ce_dev->cpumask = cpu_all_mask; -- cgit v1.2.3 From 3d298ca1a48fcaba616bf57d3c12a2b0f58a65dc Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Fri, 1 Nov 2013 19:54:17 +0800 Subject: hexagon: kernel: kgdb: include related header for pass compiling. Need include related headers for pass compiling, the related error (with allmodconfig for v4): CC arch/hexagon/kernel/kgdb.o arch/hexagon/kernel/kgdb.c:30: error: invalid use of undefined type 'struct pt_regs' arch/hexagon/kernel/kgdb.c:31: error: invalid use of undefined type 'struct pt_regs' ... arch/hexagon/kernel/kgdb.c:220: error: implicit declaration of function 'local_irq_save' arch/hexagon/kernel/kgdb.c:222: error: implicit declaration of function 'local_irq_restore' ... Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/kernel/kgdb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/hexagon/kernel') diff --git a/arch/hexagon/kernel/kgdb.c b/arch/hexagon/kernel/kgdb.c index 82d5c2593323..038580cc5abf 100644 --- a/arch/hexagon/kernel/kgdb.c +++ b/arch/hexagon/kernel/kgdb.c @@ -18,6 +18,8 @@ * 02110-1301, USA. */ +#include +#include #include #include -- cgit v1.2.3 From 196b933d295975ada570dd8cc6e10b420cc83882 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 19 Nov 2013 11:10:43 +0800 Subject: arch: hexagon: kernel: add export symbol function __delay() Need add __delay() implementation, or can not pass allmodconfig in next-20131118 tree. The related error: CC kernel/locking/spinlock_debug.o kernel/locking/spinlock_debug.c: In function '__spin_lock_debug': kernel/locking/spinlock_debug.c:114:3: error: implicit declaration of function '__delay' [-Werror=implicit-function-declaration] Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/kernel/time.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/hexagon/kernel') diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c index d0c4f5a04b7b..17fbf45bf150 100644 --- a/arch/hexagon/kernel/time.c +++ b/arch/hexagon/kernel/time.c @@ -229,6 +229,15 @@ void __init time_init(void) late_time_init = time_init_deferred; } +void __delay(unsigned long cycles) +{ + unsigned long long start = __vmgettime(); + + while ((__vmgettime() - start) < cycles) + cpu_relax(); +} +EXPORT_SYMBOL(__delay); + /* * This could become parametric or perhaps even computed at run-time, * but for now we take the observed simulator jitter. -- cgit v1.2.3 From b1ddb5cc58dda42db21fc3e1c05bb6c28ac4d978 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Fri, 29 Nov 2013 12:01:37 +0800 Subject: arch: hexagon: kernel: reset.c: use function pointer instead of function for pm_power_off and export it 'pm_power_off' is a function pointer, not a function, so need change its type, and also need export it, or can not pass compiling with allmodconfig. The related error: MODPOST 2879 modules ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined! Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/kernel/reset.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'arch/hexagon/kernel') diff --git a/arch/hexagon/kernel/reset.c b/arch/hexagon/kernel/reset.c index 6aeabc962b3b..76483c10130d 100644 --- a/arch/hexagon/kernel/reset.c +++ b/arch/hexagon/kernel/reset.c @@ -33,6 +33,5 @@ void machine_restart(char *cmd) { } -void pm_power_off(void) -{ -} +void (*pm_power_off)(void) = NULL; +EXPORT_SYMBOL(pm_power_off); -- cgit v1.2.3 From e6d19042176344f22f8de6ea6aa2a84d3f8f8d17 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 3 Dec 2013 20:26:46 +0800 Subject: arch: hexagon: kernel: hexagon_ksyms.c: export related symbols which various modules need Need export all related functions and symbols for various modules with allmodconfig. The related errors: MODPOST 2879 modules ERROR: "__vmyield" [sound/sound_firmware.ko] undefined! ERROR: "__phys_offset" [sound/drivers/snd-dummy.ko] undefined! ERROR: "ioremap_nocache" [drivers/char/ipmi/ipmi_si.ko] undefined! ERROR: "__iounmap" [drivers/char/ipmi/ipmi_si.ko] undefined! ... For including files, need "linux/*" first, then "asm/*". All related included files and symbols need be sorted by alphabetical order. Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/kernel/hexagon_ksyms.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'arch/hexagon/kernel') diff --git a/arch/hexagon/kernel/hexagon_ksyms.c b/arch/hexagon/kernel/hexagon_ksyms.c index 32b1379d6877..c041d8ecb1e2 100644 --- a/arch/hexagon/kernel/hexagon_ksyms.c +++ b/arch/hexagon/kernel/hexagon_ksyms.c @@ -18,23 +18,39 @@ * 02110-1301, USA. */ +#include #include +#include #include +/* Additional functions */ +EXPORT_SYMBOL(__clear_user_hexagon); EXPORT_SYMBOL(__copy_from_user_hexagon); EXPORT_SYMBOL(__copy_to_user_hexagon); +EXPORT_SYMBOL(__iounmap); +EXPORT_SYMBOL(__strnlen_user); EXPORT_SYMBOL(__vmgetie); EXPORT_SYMBOL(__vmsetie); +EXPORT_SYMBOL(__vmyield); +EXPORT_SYMBOL(empty_zero_page); +EXPORT_SYMBOL(ioremap_nocache); EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); +/* Additional variables */ +EXPORT_SYMBOL(__phys_offset); +EXPORT_SYMBOL(_dflt_cache_att); +EXPORT_SYMBOL(bad_dma_address); + #define DECLARE_EXPORT(name) \ extern void name(void); EXPORT_SYMBOL(name) /* Symbols found in libgcc that assorted kernel modules need */ DECLARE_EXPORT(__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes); -DECLARE_EXPORT(__hexagon_divsi3); -DECLARE_EXPORT(__hexagon_modsi3); -DECLARE_EXPORT(__hexagon_udivsi3); -DECLARE_EXPORT(__hexagon_umodsi3); +/* Additional functions */ +DECLARE_EXPORT(__divsi3); +DECLARE_EXPORT(__modsi3); +DECLARE_EXPORT(__udivsi3); +DECLARE_EXPORT(__umodsi3); +DECLARE_EXPORT(csum_tcpudp_magic); -- cgit v1.2.3 From bd09f6061843d5266b0ae7ebc87255bd2ca95a49 Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Thu, 5 Dec 2013 00:12:58 +0800 Subject: smp, hexagon: kill SMP single function call interrupt Commit 9a46ad6d6df3b54 "smp: make smp_call_function_many() use logic similar to smp_call_function_single()" has unified the way to handle single and multiple cross-CPU function calls. Now only one intterupt is needed for architecture specific code to support generic SMP function call interfaces, so kill the redundant single function call interrupt. Cc: Andrew Morton Cc: Shaohua Li Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Steven Rostedt Cc: Jiri Kosina Cc: Richard Kuo Cc: linux-hexagon@vger.kernel.org Signed-off-by: Jiang Liu Signed-off-by: Richard Kuo --- arch/hexagon/kernel/smp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'arch/hexagon/kernel') diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index 9faaa940452b..ff759f26b96a 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c @@ -64,10 +64,6 @@ static inline void __handle_ipi(unsigned long *ops, struct ipi_data *ipi, generic_smp_call_function_interrupt(); break; - case IPI_CALL_FUNC_SINGLE: - generic_smp_call_function_single_interrupt(); - break; - case IPI_CPU_STOP: /* * call vmstop() @@ -248,7 +244,7 @@ void smp_send_stop(void) void arch_send_call_function_single_ipi(int cpu) { - send_ipi(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); + send_ipi(cpumask_of(cpu), IPI_CALL_FUNC); } void arch_send_call_function_ipi_mask(const struct cpumask *mask) -- cgit v1.2.3 From 17ca896dae8272a3dadf6343dca9daa5c2e6ebb5 Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Fri, 6 Dec 2013 16:45:25 -0600 Subject: Hexagon: add screen_info for VGA_CONSOLE Signed-off-by: Richard Kuo --- arch/hexagon/kernel/Makefile | 2 ++ arch/hexagon/kernel/screen_info.c | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 arch/hexagon/kernel/screen_info.c (limited to 'arch/hexagon/kernel') diff --git a/arch/hexagon/kernel/Makefile b/arch/hexagon/kernel/Makefile index 29fc933a7722..009228b8611c 100644 --- a/arch/hexagon/kernel/Makefile +++ b/arch/hexagon/kernel/Makefile @@ -15,3 +15,5 @@ obj-y += vm_vectors.o obj-$(CONFIG_HAS_DMA) += dma.o obj-$(CONFIG_STACKTRACE) += stacktrace.o + +obj-$(CONFIG_VGA_CONSOLE) += screen_info.o diff --git a/arch/hexagon/kernel/screen_info.c b/arch/hexagon/kernel/screen_info.c new file mode 100644 index 000000000000..1e1ceb18bafe --- /dev/null +++ b/arch/hexagon/kernel/screen_info.c @@ -0,0 +1,3 @@ +#include + +struct screen_info screen_info; -- cgit v1.2.3 From 446b6cb8deab01bfa278d42f3bf57ee668cb72c1 Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Thu, 17 Oct 2013 19:41:44 -0500 Subject: Hexagon: set the e_flags in user regset view for core dumps Signed-off-by: Richard Kuo --- arch/hexagon/kernel/ptrace.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/hexagon/kernel') diff --git a/arch/hexagon/kernel/ptrace.c b/arch/hexagon/kernel/ptrace.c index de829eb7f185..390a9ad14ca1 100644 --- a/arch/hexagon/kernel/ptrace.c +++ b/arch/hexagon/kernel/ptrace.c @@ -183,6 +183,7 @@ static const struct user_regset_view hexagon_user_view = { .e_machine = ELF_ARCH, .ei_osabi = ELF_OSABI, .regsets = hexagon_regsets, + .e_flags = ELF_CORE_EFLAGS, .n = ARRAY_SIZE(hexagon_regsets) }; -- cgit v1.2.3