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') 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') 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 d811d8cc549fcb4b5f19f4daeb0d08b57aa15627 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Fri, 1 Nov 2013 19:55:38 +0800 Subject: hexagon: include: asm: kgdb: extend DBG_MAX_REG_NUM for "cs0/1" Need extend maximized number for "cs0/1", the related warning (with allmodconfig for v4): arch/hexagon/kernel/kgdb.c:79: warning: excess elements in array initializer arch/hexagon/kernel/kgdb.c:79: warning: (near initialization for 'dbg_reg_def') arch/hexagon/kernel/kgdb.c:80: warning: excess elements in array initializer arch/hexagon/kernel/kgdb.c:80: warning: (near initialization for 'dbg_reg_def') Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/kgdb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/hexagon/include/asm/kgdb.h b/arch/hexagon/include/asm/kgdb.h index 32a6fb66944a..ccd3ac336b24 100644 --- a/arch/hexagon/include/asm/kgdb.h +++ b/arch/hexagon/include/asm/kgdb.h @@ -34,10 +34,11 @@ static inline void arch_kgdb_breakpoint(void) * 32 gpr + sa0/1 + lc0/1 + m0/1 + gp + ugp + pred + pc = 42 total. * vm regs = psp+elr+est+badva = 4 * syscall+restart = 2 more - * so 48 = 42 +4 + 2 + * also add cs0/1 = 2 + * so 48 = 42 + 4 + 2 + 2 */ #define DBG_USER_REGS 42 -#define DBG_MAX_REG_NUM (DBG_USER_REGS + 6) +#define DBG_MAX_REG_NUM (DBG_USER_REGS + 8) #define NUMREGBYTES (DBG_MAX_REG_NUM*4) #endif /* __HEXAGON_KGDB_H__ */ -- 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/include/asm/delay.h | 1 + arch/hexagon/kernel/time.c | 9 +++++++++ 2 files changed, 10 insertions(+) (limited to 'arch') diff --git a/arch/hexagon/include/asm/delay.h b/arch/hexagon/include/asm/delay.h index 53079719d667..8933b9b1a3bf 100644 --- a/arch/hexagon/include/asm/delay.h +++ b/arch/hexagon/include/asm/delay.h @@ -21,6 +21,7 @@ #include +extern void __delay(unsigned long cycles); extern void __udelay(unsigned long usecs); #define udelay(usecs) __udelay((usecs)) 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 568210f042dc143c93851a3a5bb2f854916396c9 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 19 Nov 2013 12:57:27 +0800 Subject: arch: hexagon: Kconfig: add HAVE_DMA_ATTR in Kconfig and remove "linux/dma-mapping.h" from "asm/dma-mapping.h" When HAS_DMA, and also need use generic implementation, HAVE_DMA_ATTR must be enabled, or can not pass compiling with allmodconfig, the related error: CC [M] drivers/ata/libata-core.o drivers/ata/libata-core.c: In function 'ata_sg_clean': drivers/ata/libata-core.c:4598:3: error: implicit declaration of function 'dma_unmap_sg' [-Werror=implicit-function-declaration] drivers/ata/libata-core.c: In function 'ata_sg_setup': drivers/ata/libata-core.c:4708:2: error: implicit declaration of function 'dma_map_sg' [-Werror=implicit-function-declaration] "linux/dma-mapping.h" will include "asm/dma-mapping.h", so need remove "linux/dma-mapping.h" from "asm/dma-mapping.h", Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/Kconfig | 1 + arch/hexagon/include/asm/dma-mapping.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 09df2608f40a..fbc5c78c9ac7 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -28,6 +28,7 @@ config HEXAGON select GENERIC_CLOCKEVENTS_BROADCAST select MODULES_USE_ELF_RELA select GENERIC_CPU_DEVICES + select HAVE_DMA_ATTRS ---help--- Qualcomm Hexagon is a processor architecture designed for high performance and low power across a wide variety of applications. diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index 85e9935660cb..16965427f6b4 100644 --- a/arch/hexagon/include/asm/dma-mapping.h +++ b/arch/hexagon/include/asm/dma-mapping.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From 6becd400f8450062b891dee7e68b14f203e792a5 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Thu, 28 Nov 2013 16:51:45 +0800 Subject: arch: hexagon: include: asm: add prefix "hvm[ci]_" for all enum members in "hexagon_vm.h" Append "hvmc_" or "hvmi_" to all related enum members (which are too common to make conflict with another sub-systems). The related error with allmodconfig: CC [M] drivers/md/raid1.o drivers/md/raid1.c:1440:13: error: 'status' redeclared as different kind of symbol arch/hexagon/include/asm/hexagon_vm.h:76:2: note: previous definition of 'status' was here Also use 'affinity' instead of 'locdis' for __vmintop_affinity(). Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/hexagon_vm.h | 72 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'arch') diff --git a/arch/hexagon/include/asm/hexagon_vm.h b/arch/hexagon/include/asm/hexagon_vm.h index 67bb6d6f3337..1f6918b428de 100644 --- a/arch/hexagon/include/asm/hexagon_vm.h +++ b/arch/hexagon/include/asm/hexagon_vm.h @@ -55,27 +55,27 @@ #ifndef __ASSEMBLY__ enum VM_CACHE_OPS { - ickill, - dckill, - l2kill, - dccleaninva, - icinva, - idsync, - fetch_cfg + hvmc_ickill, + hvmc_dckill, + hvmc_l2kill, + hvmc_dccleaninva, + hvmc_icinva, + hvmc_idsync, + hvmc_fetch_cfg }; enum VM_INT_OPS { - nop, - globen, - globdis, - locen, - locdis, - affinity, - get, - peek, - status, - post, - clear + hvmi_nop, + hvmi_globen, + hvmi_globdis, + hvmi_locen, + hvmi_locdis, + hvmi_affinity, + hvmi_get, + hvmi_peek, + hvmi_status, + hvmi_post, + hvmi_clear }; extern void _K_VM_event_vector(void); @@ -98,95 +98,95 @@ long __vmvpid(void); static inline long __vmcache_ickill(void) { - return __vmcache(ickill, 0, 0); + return __vmcache(hvmc_ickill, 0, 0); } static inline long __vmcache_dckill(void) { - return __vmcache(dckill, 0, 0); + return __vmcache(hvmc_dckill, 0, 0); } static inline long __vmcache_l2kill(void) { - return __vmcache(l2kill, 0, 0); + return __vmcache(hvmc_l2kill, 0, 0); } static inline long __vmcache_dccleaninva(unsigned long addr, unsigned long len) { - return __vmcache(dccleaninva, addr, len); + return __vmcache(hvmc_dccleaninva, addr, len); } static inline long __vmcache_icinva(unsigned long addr, unsigned long len) { - return __vmcache(icinva, addr, len); + return __vmcache(hvmc_icinva, addr, len); } static inline long __vmcache_idsync(unsigned long addr, unsigned long len) { - return __vmcache(idsync, addr, len); + return __vmcache(hvmc_idsync, addr, len); } static inline long __vmcache_fetch_cfg(unsigned long val) { - return __vmcache(fetch_cfg, val, 0); + return __vmcache(hvmc_fetch_cfg, val, 0); } /* interrupt operations */ static inline long __vmintop_nop(void) { - return __vmintop(nop, 0, 0, 0, 0); + return __vmintop(hvmi_nop, 0, 0, 0, 0); } static inline long __vmintop_globen(long i) { - return __vmintop(globen, i, 0, 0, 0); + return __vmintop(hvmi_globen, i, 0, 0, 0); } static inline long __vmintop_globdis(long i) { - return __vmintop(globdis, i, 0, 0, 0); + return __vmintop(hvmi_globdis, i, 0, 0, 0); } static inline long __vmintop_locen(long i) { - return __vmintop(locen, i, 0, 0, 0); + return __vmintop(hvmi_locen, i, 0, 0, 0); } static inline long __vmintop_locdis(long i) { - return __vmintop(locdis, i, 0, 0, 0); + return __vmintop(hvmi_locdis, i, 0, 0, 0); } static inline long __vmintop_affinity(long i, long cpu) { - return __vmintop(locdis, i, cpu, 0, 0); + return __vmintop(hvmi_affinity, i, cpu, 0, 0); } static inline long __vmintop_get(void) { - return __vmintop(get, 0, 0, 0, 0); + return __vmintop(hvmi_get, 0, 0, 0, 0); } static inline long __vmintop_peek(void) { - return __vmintop(peek, 0, 0, 0, 0); + return __vmintop(hvmi_peek, 0, 0, 0, 0); } static inline long __vmintop_status(long i) { - return __vmintop(status, i, 0, 0, 0); + return __vmintop(hvmi_status, i, 0, 0, 0); } static inline long __vmintop_post(long i) { - return __vmintop(post, i, 0, 0, 0); + return __vmintop(hvmi_post, i, 0, 0, 0); } static inline long __vmintop_clear(long i) { - return __vmintop(clear, i, 0, 0, 0); + return __vmintop(hvmi_clear, i, 0, 0, 0); } #else /* Only assembly code should reference these */ -- cgit v1.2.3 From 8d7e6a1dbecd58157d952707c9ad6846b96c7d45 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 27 Nov 2013 13:28:36 +0800 Subject: arch: hexagon: include: uapi: asm: setup.h add swith macro __KERNEL__ Define dummy '__init' instead of include "linux/init.h" if !__KERNEL__, or can not pass checking. The related error (with allmodconfig under hexagon): CHECK include/asm (34 files) usr/include/asm/setup.h:22: included file 'linux/init.h' is not exported Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/include/uapi/asm/setup.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch') diff --git a/arch/hexagon/include/uapi/asm/setup.h b/arch/hexagon/include/uapi/asm/setup.h index e48285e4af96..7e3952d6221c 100644 --- a/arch/hexagon/include/uapi/asm/setup.h +++ b/arch/hexagon/include/uapi/asm/setup.h @@ -19,7 +19,12 @@ #ifndef _ASM_SETUP_H #define _ASM_SETUP_H +#ifdef __KERNEL__ #include +#else +#define __init +#endif + #include extern char external_cmdline_buffer; -- cgit v1.2.3 From 27932f6ea10d786d100b8d2df20bece3e04d974d Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 26 Nov 2013 12:09:43 +0800 Subject: arch: hexagon: include: asm: Kbuild: add generic "serial.h" in Kbuild Add "serial.h" in Kbuild, or can not pass compiling with allmodconfig, the related error: CC [M] drivers/staging/speakup/speakup_acntpc.o In file included from drivers/staging/speakup/speakup_acntpc.c:33:0: drivers/staging/speakup/serialio.h:7:24: fatal error: asm/serial.h: No such file or directory Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 38ca45d3df1e..f6377a8f83d9 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild @@ -39,6 +39,7 @@ generic-y += scatterlist.h generic-y += sections.h generic-y += segment.h generic-y += sembuf.h +generic-y += serial.h generic-y += shmbuf.h generic-y += shmparam.h generic-y += siginfo.h -- cgit v1.2.3 From 07d592b0947316612fde7dafe0e452b56de394e5 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 19 Nov 2013 13:17:21 +0800 Subject: arch: hexagon: include: asm: add "vga.h" in Kbuild Need include generic "vga.h", or can not pass compiling with allmodconfig, the related error: CC [M] drivers/gpu/drm/drm_irq.o In file included from include/linux/vgaarb.h:34:0, from drivers/gpu/drm/drm_irq.c:42: include/video/vga.h:22:21: fatal error: asm/vga.h: No such file or directory Also move "preempt.h" upper to match sort order. Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/Kbuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index f6377a8f83d9..511a436feb7e 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild @@ -33,6 +33,7 @@ generic-y += pci.h generic-y += percpu.h generic-y += poll.h generic-y += posix_types.h +generic-y += preempt.h generic-y += resource.h generic-y += rwsem.h generic-y += scatterlist.h @@ -55,5 +56,5 @@ generic-y += trace_clock.h generic-y += types.h generic-y += ucontext.h generic-y += unaligned.h +generic-y += vga.h generic-y += xor.h -generic-y += preempt.h -- 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') 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') 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 5e78a264f8b366ab133e249ffbb6a5c8cb5bd8b9 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 26 Nov 2013 12:07:40 +0800 Subject: arch: hexagon: include: asm: add generic macro 'mmiowb' in "io.h" Need dumy mmiowb(), or can not pass compiling, the related error with allmodconfig: CC [M] drivers/mmc/host/sdhci.o drivers/mmc/host/sdhci.c: In function 'sdhci_request': drivers/mmc/host/sdhci.c:1409:2: error: implicit declaration of function 'mmiowb' [-Werror=implicit-function-declaration] Signed-off-by: Chen Gang Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/io.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h index 1b7698e19139..70298996e9b2 100644 --- a/arch/hexagon/include/asm/io.h +++ b/arch/hexagon/include/asm/io.h @@ -189,6 +189,8 @@ static inline void writel(u32 data, volatile void __iomem *addr) #define writew_relaxed __raw_writew #define writel_relaxed __raw_writel +#define mmiowb() + /* * Need an mtype somewhere in here, for cache type deals? * This is probably too long for an inline. -- 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/include/asm/smp.h | 1 - arch/hexagon/kernel/smp.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/hexagon/include/asm/smp.h b/arch/hexagon/include/asm/smp.h index 2b9b974e0952..ca171c13891d 100644 --- a/arch/hexagon/include/asm/smp.h +++ b/arch/hexagon/include/asm/smp.h @@ -29,7 +29,6 @@ enum ipi_message_type { IPI_NOP = 0, IPI_RESCHEDULE = 1, IPI_CALL_FUNC, - IPI_CALL_FUNC_SINGLE, IPI_CPU_STOP, IPI_TIMER, }; 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 0d82674b811084110bd80dd260d477a5a0b85d79 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Thu, 5 Dec 2013 21:13:25 -0500 Subject: hexagon: correct type on pgd copy swapper_pg_dir is an array of pgd_t, not pgd_t*. This has no actual effect since sizeof(pgd_t) == sizeof(pgd_t*), but unconfuses tools that check types. Signed-off-by: Ilia Mirkin Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/pgalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon/include/asm/pgalloc.h index 4c9d382d7798..77da3b0ae3c2 100644 --- a/arch/hexagon/include/asm/pgalloc.h +++ b/arch/hexagon/include/asm/pgalloc.h @@ -45,7 +45,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) * map with a copy of the kernel's persistent map. */ - memcpy(pgd, swapper_pg_dir, PTRS_PER_PGD*sizeof(pgd_t *)); + memcpy(pgd, swapper_pg_dir, PTRS_PER_PGD*sizeof(pgd_t)); mm->context.generation = kmap_generation; /* Physical version is what is passed to virtual machine on switch */ -- 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') 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 b10fa7b62d4201602dac45290b43defd4a980a12 Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Mon, 25 Nov 2013 13:49:26 -0600 Subject: Hexagon: fix atomic_set Normal writes in our our architecture don't invalidate lock reservations. Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/atomic.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/hexagon/include/asm/atomic.h b/arch/hexagon/include/asm/atomic.h index 7aae4cb2a29a..17dc63780c06 100644 --- a/arch/hexagon/include/asm/atomic.h +++ b/arch/hexagon/include/asm/atomic.h @@ -26,7 +26,20 @@ #include #define ATOMIC_INIT(i) { (i) } -#define atomic_set(v, i) ((v)->counter = (i)) + +/* Normal writes in our arch don't clear lock reservations */ + +static inline void atomic_set(atomic_t *v, int new) +{ + asm volatile( + "1: r6 = memw_locked(%0);\n" + " memw_locked(%0,p0) = %1;\n" + " if (!P0) jump 1b;\n" + : + : "r" (&v->counter), "r" (new) + : "memory", "p0", "r6" + ); +} /** * atomic_read - reads a word, atomically -- 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') 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 From efaa5cbdca8bdba0dadde8b36cf027bd19f52cc4 Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Mon, 12 Aug 2013 13:13:00 -0500 Subject: Hexagon: set ELF_EXEC_PAGESIZE to PAGE_SIZE Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index e1b933a0e121..d8b83cbc5ada 100644 --- a/arch/hexagon/include/asm/elf.h +++ b/arch/hexagon/include/asm/elf.h @@ -202,7 +202,7 @@ do { \ #define CORE_DUMP_USE_REGSET /* Hrm is this going to cause problems for changing PAGE_SIZE? */ -#define ELF_EXEC_PAGESIZE 4096 +#define ELF_EXEC_PAGESIZE PAGE_SIZE /* * This is the location that an ET_DYN program is loaded if exec'ed. Typical -- cgit v1.2.3 From 93f9d110b2edf0cb48b8be9c5d9bde7719667a58 Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Mon, 30 Dec 2013 14:21:12 -0600 Subject: Hexagon: remove SP macro The SP/r29 macro wasn't used anywhere else and was causing conflicts with another module, so just remove it. Signed-off-by: Richard Kuo --- arch/hexagon/include/uapi/asm/registers.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/hexagon/include/uapi/asm/registers.h b/arch/hexagon/include/uapi/asm/registers.h index 487d6ceca5e7..e7be31840a90 100644 --- a/arch/hexagon/include/uapi/asm/registers.h +++ b/arch/hexagon/include/uapi/asm/registers.h @@ -6,8 +6,6 @@ #ifndef _ASM_REGISTERS_H #define _ASM_REGISTERS_H -#define SP r29 - #ifndef __ASSEMBLY__ /* See kernel/entry.S for further documentation. */ @@ -215,7 +213,7 @@ struct pt_regs { #define pt_clr_singlestep(regs) ((regs)->hvmer.vmest &= ~(1<SP = (sp);\ + pt_psp(regs) = (regs)->r29 = (sp);\ } while (0) #define pt_set_kmode(regs) \ -- cgit v1.2.3 From a9a44fdf329668125042055c569656aa83d8cccb Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Thu, 2 Jan 2014 17:17:17 -0600 Subject: Hexagon: update CR year for elf.h Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index d8b83cbc5ada..80311e7b8ca6 100644 --- a/arch/hexagon/include/asm/elf.h +++ b/arch/hexagon/include/asm/elf.h @@ -1,7 +1,7 @@ /* * ELF definitions for the Hexagon architecture * - * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. + * Copyright (c) 2010-2013, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and -- cgit v1.2.3