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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/kgdb.h b/arch/hexagon/include/asm/kgdb.h index 32a6fb6..ccd3ac3 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.1 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 + 1 file changed, 1 insertion(+) (limited to 'arch/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/delay.h b/arch/hexagon/include/asm/delay.h index 5307971..8933b9b1 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)) -- cgit v1.1 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/include/asm/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index 85e9935..1696542 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.1 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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/hexagon_vm.h b/arch/hexagon/include/asm/hexagon_vm.h index 67bb6d6..1f6918b 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.1 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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 38ca45d..f6377a8f 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.1 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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index f6377a8f..511a436 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.1 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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h index 1b7698e..7029899 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.1 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 - 1 file changed, 1 deletion(-) (limited to 'arch/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/smp.h b/arch/hexagon/include/asm/smp.h index 2b9b974..ca171c1 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, }; -- cgit v1.1 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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon/include/asm/pgalloc.h index 4c9d382..77da3b0 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.1 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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/atomic.h b/arch/hexagon/include/asm/atomic.h index 7aae4cb..17dc637 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.1 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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index e1b933a..d8b83cb 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.1 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/hexagon/include/asm') diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index d8b83cb..80311e7 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.1