From 4877b60cdf3f32281af0a241c7514167e1a0cd01 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Thu, 13 Mar 2014 21:27:12 +0800 Subject: arch/unicore32/kernel/ksyms.c: remove several undefined exported symbols For 'csum_partial_copy_nocheck()', it has default definition in 'asm-generic'. For '__raw_reads?()' and '__raw_writes?()' are used by the drivers which no relationship with allmodconfig for unicode32, the related modules are: drivers/mmc/host/omap.c drivers/mtd/nand/atmel_nand.c drivers/mtd/nand/pxa3xx_nand.c drivers/usb/gadget/at91_udc.c Others are only within some architectures (not kernel wide). The related error with allmodconfig for unicode32: CC arch/unicore32/kernel/ksyms.o arch/unicore32/kernel/ksyms.c:29: error: ._backtrace. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:29: error: type defaults to .nt. in declaration of ._backtrace. arch/unicore32/kernel/ksyms.c:38: error: .sum_partial_copy_nocheck. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:38: error: type defaults to .nt. in declaration of .sum_partial_copy_nocheck. arch/unicore32/kernel/ksyms.c:39: error: ._csum_ipv6_magic. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:39: error: type defaults to .nt. in declaration of ._csum_ipv6_magic. arch/unicore32/kernel/ksyms.c:43: error: ._raw_readsb. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:43: error: type defaults to .nt. in declaration of ._raw_readsb. arch/unicore32/kernel/ksyms.c:46: error: ._raw_readsw. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:46: error: type defaults to .nt. in declaration of ._raw_readsw. arch/unicore32/kernel/ksyms.c:49: error: ._raw_readsl. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:49: error: type defaults to .nt. in declaration of ._raw_readsl. arch/unicore32/kernel/ksyms.c:52: error: ._raw_writesb. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:52: error: type defaults to .nt. in declaration of ._raw_writesb. arch/unicore32/kernel/ksyms.c:55: error: ._raw_writesw. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:55: error: type defaults to .nt. in declaration of ._raw_writesw. arch/unicore32/kernel/ksyms.c:58: error: ._raw_writesl. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:58: error: type defaults to .nt. in declaration of ._raw_writesl. arch/unicore32/kernel/ksyms.c:79: error: ._get_user_1. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:79: error: type defaults to .nt. in declaration of ._get_user_1. arch/unicore32/kernel/ksyms.c:80: error: ._get_user_2. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:80: error: type defaults to .nt. in declaration of ._get_user_2. arch/unicore32/kernel/ksyms.c:81: error: ._get_user_4. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:81: error: type defaults to .nt. in declaration of ._get_user_4. arch/unicore32/kernel/ksyms.c:83: error: ._put_user_1. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:83: error: type defaults to .nt. in declaration of ._put_user_1. arch/unicore32/kernel/ksyms.c:84: error: ._put_user_2. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:84: error: type defaults to .nt. in declaration of ._put_user_2. arch/unicore32/kernel/ksyms.c:85: error: ._put_user_4. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:85: error: type defaults to .nt. in declaration of ._put_user_4. arch/unicore32/kernel/ksyms.c:86: error: ._put_user_8. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:86: error: type defaults to .nt. in declaration of ._put_user_8. Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/kernel/ksyms.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c index d285d71cbe3..63afc7f5da2 100644 --- a/arch/unicore32/kernel/ksyms.c +++ b/arch/unicore32/kernel/ksyms.c @@ -26,8 +26,6 @@ EXPORT_SYMBOL(find_next_zero_bit); EXPORT_SYMBOL(find_next_bit); -EXPORT_SYMBOL(__backtrace); - /* platform dependent support */ EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__const_udelay); @@ -35,28 +33,6 @@ EXPORT_SYMBOL(__const_udelay); /* networking */ EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial_copy_from_user); -EXPORT_SYMBOL(csum_partial_copy_nocheck); -EXPORT_SYMBOL(__csum_ipv6_magic); - - /* io */ -#ifndef __raw_readsb -EXPORT_SYMBOL(__raw_readsb); -#endif -#ifndef __raw_readsw -EXPORT_SYMBOL(__raw_readsw); -#endif -#ifndef __raw_readsl -EXPORT_SYMBOL(__raw_readsl); -#endif -#ifndef __raw_writesb -EXPORT_SYMBOL(__raw_writesb); -#endif -#ifndef __raw_writesw -EXPORT_SYMBOL(__raw_writesw); -#endif -#ifndef __raw_writesl -EXPORT_SYMBOL(__raw_writesl); -#endif /* string / mem functions */ EXPORT_SYMBOL(strchr); @@ -76,15 +52,6 @@ EXPORT_SYMBOL(__copy_from_user); EXPORT_SYMBOL(__copy_to_user); EXPORT_SYMBOL(__clear_user); -EXPORT_SYMBOL(__get_user_1); -EXPORT_SYMBOL(__get_user_2); -EXPORT_SYMBOL(__get_user_4); - -EXPORT_SYMBOL(__put_user_1); -EXPORT_SYMBOL(__put_user_2); -EXPORT_SYMBOL(__put_user_4); -EXPORT_SYMBOL(__put_user_8); - EXPORT_SYMBOL(__ashldi3); EXPORT_SYMBOL(__ashrdi3); EXPORT_SYMBOL(__divsi3); -- cgit v1.2.3-70-g09d2 From df8e4c7d8d756d93da676b532c39f8d1d9ceab77 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Fri, 14 Mar 2014 08:49:27 +0800 Subject: arch/unicore32/kernel/module.c: use __vmalloc_node_range() instead of __vmalloc_area() __vmalloc_area() has already been removed from upstream kernel, need use __vmalloc_node_range() instead of. The related commit: "d0a2126 mm: unify module_alloc code for vmalloc". The related error (allmodconfig for unicore32): CC arch/unicore32/kernel/module.o arch/unicore32/kernel/module.c: In function 'module_alloc' : arch/unicore32/kernel/module.c:34: error: implicit declaration of function '__vmalloc_area' arch/unicore32/kernel/module.c:34: warning: return makes pointer from integer without a cast make[1]: *** [arch/unicore32/kernel/module.o] Error 1 make: *** [arch/unicore32/kernel] Error 2 Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/kernel/module.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/unicore32/kernel/module.c b/arch/unicore32/kernel/module.c index 16bd1495b93..dc41f6dfedb 100644 --- a/arch/unicore32/kernel/module.c +++ b/arch/unicore32/kernel/module.c @@ -24,14 +24,9 @@ void *module_alloc(unsigned long size) { - struct vm_struct *area; - - size = PAGE_ALIGN(size); - area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); - if (!area) - return NULL; - - return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC); + return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, + GFP_KERNEL, PAGE_KERNEL_EXEC, NUMA_NO_NODE, + __builtin_return_address(0)); } int -- cgit v1.2.3-70-g09d2 From db7ef289a2f6a4a72c7715076dfd44e9f393b29c Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Fri, 14 Mar 2014 09:19:39 +0800 Subject: arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros Add readl() and writel() for 'PM_' macros, just like another areas have done within unicored32, or will cause compiling issue. The related error (allmodconfig for unicored32): CC arch/unicore32/kernel/clock.o arch/unicore32/kernel/clock.c: In function 'clk_set_rate': arch/unicore32/kernel/clock.c:182: warning: initialization makes integer from pointer without a cast arch/unicore32/kernel/clock.c:204: error: lvalue required as left operand of assignment arch/unicore32/kernel/clock.c:206: error: lvalue required as left operand of assignment arch/unicore32/kernel/clock.c:207: error: invalid operands to binary & (have 'void *' and 'long unsigned int') make[1]: *** [arch/unicore32/kernel/clock.o] Error 1 make: *** [arch/unicore32/kernel] Error 2 Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/kernel/clock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/unicore32/kernel/clock.c b/arch/unicore32/kernel/clock.c index 18d4563e6fa..b1ca775f6f6 100644 --- a/arch/unicore32/kernel/clock.c +++ b/arch/unicore32/kernel/clock.c @@ -179,7 +179,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate) } #ifdef CONFIG_CPU_FREQ if (clk == &clk_mclk_clk) { - u32 pll_rate, divstatus = PM_DIVSTATUS; + u32 pll_rate, divstatus = readl(PM_DIVSTATUS); int ret, i; /* lookup mclk_clk_table */ @@ -201,10 +201,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate) / (((divstatus & 0x0000f000) >> 12) + 1); /* set pll sys cfg reg. */ - PM_PLLSYSCFG = pll_rate; + writel(pll_rate, PM_PLLSYSCFG); - PM_PMCR = PM_PMCR_CFBSYS; - while ((PM_PLLDFCDONE & PM_PLLDFCDONE_SYSDFC) + writel(PM_PMCR_CFBSYS, PM_PMCR); + while ((readl(PM_PLLDFCDONE) & PM_PLLDFCDONE_SYSDFC) != PM_PLLDFCDONE_SYSDFC) udelay(100); /* about 1ms */ -- cgit v1.2.3-70-g09d2 From 1ff38c56cbd095c4c0dfa581a859ba3557830f78 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Mon, 24 Mar 2014 20:17:44 +0800 Subject: arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling error Need include "asm/pgtable.h" to include "asm-generic/pgtable-nopmd.h", so can let 'pmd_t' defined. The related error with allmodconfig: CC arch/unicore32/mm/alignment.o In file included from arch/unicore32/mm/alignment.c:24: arch/unicore32/include/asm/tlbflush.h:135: error: expected .). before .*. token arch/unicore32/include/asm/tlbflush.h:154: error: expected .). before .*. token In file included from arch/unicore32/mm/alignment.c:27: arch/unicore32/mm/mm.h:15: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token arch/unicore32/mm/mm.h:20: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token arch/unicore32/mm/mm.h:25: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token make[1]: *** [arch/unicore32/mm/alignment.o] Error 1 make: *** [arch/unicore32/mm] Error 2 Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/mm/alignment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/unicore32/mm/alignment.c b/arch/unicore32/mm/alignment.c index de7dc5fdd58..24e836023e6 100644 --- a/arch/unicore32/mm/alignment.c +++ b/arch/unicore32/mm/alignment.c @@ -21,6 +21,7 @@ #include #include +#include #include #include -- cgit v1.2.3-70-g09d2 From 1febf615142bc319f2e3bfa612094186cb1d32c9 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Mon, 24 Mar 2014 20:54:11 +0800 Subject: arch/unicore32/include/asm/ptrace.h: add generic definition for profile_pc() Add generic definition just like another architectures have done, or can not pass compiling with allmodconfig, the related error: CC kernel/profile.o kernel/profile.c: In function 'profile_tick': kernel/profile.c:419: error: implicit declaration of function 'profile_pc' make[1]: *** [kernel/profile.o] Error 1 make: *** [kernel] Error 2 Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/include/asm/ptrace.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/unicore32/include/asm/ptrace.h b/arch/unicore32/include/asm/ptrace.h index 9df53d991c7..02bf5a415bf 100644 --- a/arch/unicore32/include/asm/ptrace.h +++ b/arch/unicore32/include/asm/ptrace.h @@ -55,6 +55,7 @@ static inline int valid_user_regs(struct pt_regs *regs) #define instruction_pointer(regs) ((regs)->UCreg_pc) #define user_stack_pointer(regs) ((regs)->UCreg_sp) +#define profile_pc(regs) instruction_pointer(regs) #endif /* __ASSEMBLY__ */ #endif -- cgit v1.2.3-70-g09d2 From 312c6df40354e81d052d96c9d0c68cca82a65053 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sat, 3 May 2014 09:06:28 +0800 Subject: arch/unicore32/include/asm/io.h: add readl_relaxed() generic definition Need generic definition for readl_relaxed(), like other architectures have done. Or can not pass compiling with allmodconfig, the related error: CC [M] drivers/message/fusion/mptbase.o drivers/message/fusion/mptbase.c: In function 'mpt_send_handshake_request': drivers/message/fusion/mptbase.c:1224: error: implicit declaration of function 'readl_relaxed' Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/include/asm/io.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/unicore32/include/asm/io.h b/arch/unicore32/include/asm/io.h index 39decb6e6f5..d6920301465 100644 --- a/arch/unicore32/include/asm/io.h +++ b/arch/unicore32/include/asm/io.h @@ -39,6 +39,10 @@ extern void __uc32_iounmap(volatile void __iomem *addr); #define ioremap_nocache(cookie, size) __uc32_ioremap(cookie, size) #define iounmap(cookie) __uc32_iounmap(cookie) +#define readb_relaxed readb +#define readw_relaxed readw +#define readl_relaxed readl + #define HAVE_ARCH_PIO_SIZE #define PIO_OFFSET (unsigned int)(PCI_IOBASE) #define PIO_MASK (unsigned int)(IO_SPACE_LIMIT) -- cgit v1.2.3-70-g09d2 From c863810cefc7ffd782e5648a21bfb36a32c8b081 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sat, 3 May 2014 13:07:57 +0800 Subject: drivers/rtc/rtc-puv3.c: use dev_dbg() instead of dev_debug() for typo issue It is only a typo issue, the related commit: "1fbc4c4 drivers/rtc/rtc-puv3.c: use dev_dbg() instead of pr_debug()" The related error (unicore32 with allmodconfig): CC [M] drivers/rtc/rtc-puv3.o drivers/rtc/rtc-puv3.c: In function 'puv3_rtc_setpie': drivers/rtc/rtc-puv3.c:74: error: implicit declaration of function 'dev_debug' Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- drivers/rtc/rtc-puv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index 1ecfe3bd92a..c56310e970e 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c @@ -71,7 +71,7 @@ static int puv3_rtc_setpie(struct device *dev, int enabled) { unsigned int tmp; - dev_debug(dev, "%s: pie=%d\n", __func__, enabled); + dev_dbg(dev, "%s: pie=%d\n", __func__, enabled); spin_lock_irq(&puv3_rtc_pie_lock); tmp = readl(RTC_RTSR) & ~RTC_RTSR_HZE; -- cgit v1.2.3-70-g09d2 From 73fa540618d8b1f8c2266934f23bd84bb9e28d9e Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sat, 3 May 2014 13:09:02 +0800 Subject: drivers/rtc/rtc-puv3.c: remove "&dev->" for typo issue MIME-Version: 1.0 It is only a typo issue, the related commit: "1fbc4c4 drivers/rtc/rtc-puv3.c: use dev_dbg() instead of pr_debug()" The related error (for unicore32 with allmodconfig): CC [M] drivers/rtc/rtc-puv3.o drivers/rtc/rtc-puv3.c: In function 'puv3_rtc_setalarm': drivers/rtc/rtc-puv3.c:143: error: 'struct device' has no member named 'dev' Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- drivers/rtc/rtc-puv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index c56310e970e..1cff2a21db6 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c @@ -140,7 +140,7 @@ static int puv3_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) rtc_tm_to_time(tm, &rtcalarm_count); writel(rtcalarm_count, RTC_RTAR); - puv3_rtc_setaie(&dev->dev, alrm->enabled); + puv3_rtc_setaie(dev, alrm->enabled); if (alrm->enabled) enable_irq_wake(puv3_rtc_alarmno); -- cgit v1.2.3-70-g09d2 From 5a5ffc991edaf5d1c24a01db62c3d203df53dec7 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 21 May 2014 08:57:53 +0800 Subject: arch/unicore32/kernel/ksyms.c: remove 2 export symbols to avoid compiling failure 'csum_partial' and 'csum_partial_copy_from_user' have already been exported in "lib/", so need not export them again, or it will cause compiling error. The related error (with allmodconfig under unicore32): LD vmlinux.o lib/built-in.o:(___ksymtab+csum_partial+0x0): multiple definition of `__ksymtab_csum_partial' arch/unicore32/kernel/built-in.o:(___ksymtab+csum_partial+0x0): first defined here lib/built-in.o:(___ksymtab+csum_partial_copy_from_user+0x0): multiple definition of `__ksymtab_csum_partial_copy_from_user' arch/unicore32/kernel/built-in.o:(___ksymtab+csum_partial_copy_from_user+0x0): first defined here make: *** [vmlinux] Error 1 Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/kernel/ksyms.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c index 63afc7f5da2..bc061407f6e 100644 --- a/arch/unicore32/kernel/ksyms.c +++ b/arch/unicore32/kernel/ksyms.c @@ -30,10 +30,6 @@ EXPORT_SYMBOL(find_next_bit); EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__const_udelay); - /* networking */ -EXPORT_SYMBOL(csum_partial); -EXPORT_SYMBOL(csum_partial_copy_from_user); - /* string / mem functions */ EXPORT_SYMBOL(strchr); EXPORT_SYMBOL(strrchr); -- cgit v1.2.3-70-g09d2 From 8065042279df8e53c31e555b1330a2f05f1655b3 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 21 May 2014 09:37:08 +0800 Subject: arch: unicore32: kernel: ksyms: remove 'bswapsi2' and 'muldi3' to avoid compiling failure After check the code, 'bswapsi2' and 'muldi3' are useless for unicore32, so can remove them to avoid compiling failure. The related error (with allmodconfig under unicore32): LD init/built-in.o arch/unicore32/kernel/built-in.o:(___ksymtab+__muldi3+0x0): undefined reference to `__muldi3' arch/unicore32/kernel/built-in.o:(___ksymtab+__bswapsi2+0x0): undefined reference to `__bswapsi2' Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/kernel/ksyms.c | 2 -- arch/unicore32/kernel/ksyms.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c index bc061407f6e..e78911aefb1 100644 --- a/arch/unicore32/kernel/ksyms.c +++ b/arch/unicore32/kernel/ksyms.c @@ -53,9 +53,7 @@ EXPORT_SYMBOL(__ashrdi3); EXPORT_SYMBOL(__divsi3); EXPORT_SYMBOL(__lshrdi3); EXPORT_SYMBOL(__modsi3); -EXPORT_SYMBOL(__muldi3); EXPORT_SYMBOL(__ucmpdi2); EXPORT_SYMBOL(__udivsi3); EXPORT_SYMBOL(__umodsi3); -EXPORT_SYMBOL(__bswapsi2); diff --git a/arch/unicore32/kernel/ksyms.h b/arch/unicore32/kernel/ksyms.h index 185cdc712d0..31472ad9467 100644 --- a/arch/unicore32/kernel/ksyms.h +++ b/arch/unicore32/kernel/ksyms.h @@ -8,8 +8,6 @@ extern void __ashrdi3(void); extern void __divsi3(void); extern void __lshrdi3(void); extern void __modsi3(void); -extern void __muldi3(void); extern void __ucmpdi2(void); extern void __udivsi3(void); extern void __umodsi3(void); -extern void __bswapsi2(void); -- cgit v1.2.3-70-g09d2 From 8902b10787c5a6e939c7adfe908c72404196052a Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Fri, 9 May 2014 09:19:39 +0800 Subject: drivers: scsi: mvsas: fix compiling issue by adding 'MVS_' for "enum pci_interrupt_cause" The direct cause is IRQ_SPI is already defined as a macro in unicore32 architecture (also, blackfin and mips architectures define it). The related error (unicore32 with allmodconfig) CC [M] drivers/scsi/mvsas/mv_94xx.o In file included from drivers/scsi/mvsas/mv_94xx.c:27: drivers/scsi/mvsas/mv_94xx.h:176: error: expected identifier before numeric constant And IRQ_SAS_A and IRQ_SAS_B are used as 'u32' (although "enum pci_interrupt_cause" is not used directly, now). All together, need add 'MVS_' for "enum pci_interrupt_cause". Signed-off-by: Chen Gang Reviewed-by: Christoph Hellwig Reviewed-by: Xuetao Guan Signed-off-by: Xuetao Guan --- drivers/scsi/mvsas/mv_94xx.c | 10 ++++---- drivers/scsi/mvsas/mv_94xx.h | 58 ++++++++++++++++++++++---------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c index 1e4479f3331..9270d15ff1a 100644 --- a/drivers/scsi/mvsas/mv_94xx.c +++ b/drivers/scsi/mvsas/mv_94xx.c @@ -564,7 +564,7 @@ static void mvs_94xx_interrupt_enable(struct mvs_info *mvi) u32 tmp; tmp = mr32(MVS_GBL_CTL); - tmp |= (IRQ_SAS_A | IRQ_SAS_B); + tmp |= (MVS_IRQ_SAS_A | MVS_IRQ_SAS_B); mw32(MVS_GBL_INT_STAT, tmp); writel(tmp, regs + 0x0C); writel(tmp, regs + 0x10); @@ -580,7 +580,7 @@ static void mvs_94xx_interrupt_disable(struct mvs_info *mvi) tmp = mr32(MVS_GBL_CTL); - tmp &= ~(IRQ_SAS_A | IRQ_SAS_B); + tmp &= ~(MVS_IRQ_SAS_A | MVS_IRQ_SAS_B); mw32(MVS_GBL_INT_STAT, tmp); writel(tmp, regs + 0x0C); writel(tmp, regs + 0x10); @@ -596,7 +596,7 @@ static u32 mvs_94xx_isr_status(struct mvs_info *mvi, int irq) if (!(mvi->flags & MVF_FLAG_SOC)) { stat = mr32(MVS_GBL_INT_STAT); - if (!(stat & (IRQ_SAS_A | IRQ_SAS_B))) + if (!(stat & (MVS_IRQ_SAS_A | MVS_IRQ_SAS_B))) return 0; } return stat; @@ -606,8 +606,8 @@ static irqreturn_t mvs_94xx_isr(struct mvs_info *mvi, int irq, u32 stat) { void __iomem *regs = mvi->regs; - if (((stat & IRQ_SAS_A) && mvi->id == 0) || - ((stat & IRQ_SAS_B) && mvi->id == 1)) { + if (((stat & MVS_IRQ_SAS_A) && mvi->id == 0) || + ((stat & MVS_IRQ_SAS_B) && mvi->id == 1)) { mw32_f(MVS_INT_STAT, CINT_DONE); spin_lock(&mvi->lock); diff --git a/drivers/scsi/mvsas/mv_94xx.h b/drivers/scsi/mvsas/mv_94xx.h index 487aa6f9741..14e197497b4 100644 --- a/drivers/scsi/mvsas/mv_94xx.h +++ b/drivers/scsi/mvsas/mv_94xx.h @@ -150,35 +150,35 @@ enum chip_register_bits { enum pci_interrupt_cause { /* MAIN_IRQ_CAUSE (R10200) Bits*/ - IRQ_COM_IN_I2O_IOP0 = (1 << 0), - IRQ_COM_IN_I2O_IOP1 = (1 << 1), - IRQ_COM_IN_I2O_IOP2 = (1 << 2), - IRQ_COM_IN_I2O_IOP3 = (1 << 3), - IRQ_COM_OUT_I2O_HOS0 = (1 << 4), - IRQ_COM_OUT_I2O_HOS1 = (1 << 5), - IRQ_COM_OUT_I2O_HOS2 = (1 << 6), - IRQ_COM_OUT_I2O_HOS3 = (1 << 7), - IRQ_PCIF_TO_CPU_DRBL0 = (1 << 8), - IRQ_PCIF_TO_CPU_DRBL1 = (1 << 9), - IRQ_PCIF_TO_CPU_DRBL2 = (1 << 10), - IRQ_PCIF_TO_CPU_DRBL3 = (1 << 11), - IRQ_PCIF_DRBL0 = (1 << 12), - IRQ_PCIF_DRBL1 = (1 << 13), - IRQ_PCIF_DRBL2 = (1 << 14), - IRQ_PCIF_DRBL3 = (1 << 15), - IRQ_XOR_A = (1 << 16), - IRQ_XOR_B = (1 << 17), - IRQ_SAS_A = (1 << 18), - IRQ_SAS_B = (1 << 19), - IRQ_CPU_CNTRL = (1 << 20), - IRQ_GPIO = (1 << 21), - IRQ_UART = (1 << 22), - IRQ_SPI = (1 << 23), - IRQ_I2C = (1 << 24), - IRQ_SGPIO = (1 << 25), - IRQ_COM_ERR = (1 << 29), - IRQ_I2O_ERR = (1 << 30), - IRQ_PCIE_ERR = (1 << 31), + MVS_IRQ_COM_IN_I2O_IOP0 = (1 << 0), + MVS_IRQ_COM_IN_I2O_IOP1 = (1 << 1), + MVS_IRQ_COM_IN_I2O_IOP2 = (1 << 2), + MVS_IRQ_COM_IN_I2O_IOP3 = (1 << 3), + MVS_IRQ_COM_OUT_I2O_HOS0 = (1 << 4), + MVS_IRQ_COM_OUT_I2O_HOS1 = (1 << 5), + MVS_IRQ_COM_OUT_I2O_HOS2 = (1 << 6), + MVS_IRQ_COM_OUT_I2O_HOS3 = (1 << 7), + MVS_IRQ_PCIF_TO_CPU_DRBL0 = (1 << 8), + MVS_IRQ_PCIF_TO_CPU_DRBL1 = (1 << 9), + MVS_IRQ_PCIF_TO_CPU_DRBL2 = (1 << 10), + MVS_IRQ_PCIF_TO_CPU_DRBL3 = (1 << 11), + MVS_IRQ_PCIF_DRBL0 = (1 << 12), + MVS_IRQ_PCIF_DRBL1 = (1 << 13), + MVS_IRQ_PCIF_DRBL2 = (1 << 14), + MVS_IRQ_PCIF_DRBL3 = (1 << 15), + MVS_IRQ_XOR_A = (1 << 16), + MVS_IRQ_XOR_B = (1 << 17), + MVS_IRQ_SAS_A = (1 << 18), + MVS_IRQ_SAS_B = (1 << 19), + MVS_IRQ_CPU_CNTRL = (1 << 20), + MVS_IRQ_GPIO = (1 << 21), + MVS_IRQ_UART = (1 << 22), + MVS_IRQ_SPI = (1 << 23), + MVS_IRQ_I2C = (1 << 24), + MVS_IRQ_SGPIO = (1 << 25), + MVS_IRQ_COM_ERR = (1 << 29), + MVS_IRQ_I2O_ERR = (1 << 30), + MVS_IRQ_PCIE_ERR = (1 << 31), }; union reg_phy_cfg { -- cgit v1.2.3-70-g09d2 From f80561e4d1f95c5e0b8fe4782fcd53618d80a959 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Thu, 22 May 2014 07:08:23 +0800 Subject: arch/unicore32/kernel/setup.c: add generic 'screen_info' to avoid compiling failure Add generic 'screen_info' just like another architectures have done (e.g. tile, sh, score, ia64, hexagon, and cris). The related error (with allmodconfig under unicore32): LD init/built-in.o drivers/built-in.o: In function `vgacon_save_screen': powercap_sys.c:(.text+0x21788): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_resize': powercap_sys.c:(.text+0x21b54): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_switch': powercap_sys.c:(.text+0x21cb4): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_init': powercap_sys.c:(.text+0x2296c): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_startup': powercap_sys.c:(.text+0x22e80): undefined reference to `screen_info' Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/kernel/setup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/unicore32/kernel/setup.c b/arch/unicore32/kernel/setup.c index 87adbf5ebfe..3fa317f9612 100644 --- a/arch/unicore32/kernel/setup.c +++ b/arch/unicore32/kernel/setup.c @@ -53,6 +53,10 @@ struct stack { static struct stack stacks[NR_CPUS]; +#ifdef CONFIG_VGA_CONSOLE +struct screen_info screen_info; +#endif + char elf_platform[ELF_PLATFORM_SIZE]; EXPORT_SYMBOL(elf_platform); -- cgit v1.2.3-70-g09d2 From aaad61838242469b0f9724a6057ea74ab4e87369 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 15 Apr 2014 09:49:48 +0800 Subject: unicore32: include: asm: add missing ')' for PAGE_* macros in pgtable.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Missing related ')', the related compiling error: CC [M] drivers/gpu/drm/udl/udl_fb.o drivers/gpu/drm/udl/udl_fb.c: In function ‘udl_fb_mmapÂ’: drivers/gpu/drm/udl/udl_fb.c:273: error: expected ‘)Â’ before ‘returnÂ’ drivers/gpu/drm/udl/udl_fb.c:281: error: expected expression before ‘}Â’ token make[4]: *** [drivers/gpu/drm/udl/udl_fb.o] Error 1 make[3]: *** [drivers/gpu/drm/udl] Error 2 make[2]: *** [drivers/gpu/drm] Error 2 make[1]: *** [drivers/gpu] Error 2 make: *** [drivers] Error 2 Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/include/asm/pgtable.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/unicore32/include/asm/pgtable.h b/arch/unicore32/include/asm/pgtable.h index 233c25880df..ed6f7d000fb 100644 --- a/arch/unicore32/include/asm/pgtable.h +++ b/arch/unicore32/include/asm/pgtable.h @@ -87,16 +87,16 @@ extern pgprot_t pgprot_kernel; #define PAGE_NONE pgprot_user #define PAGE_SHARED __pgprot(pgprot_val(pgprot_user | PTE_READ \ - | PTE_WRITE) + | PTE_WRITE)) #define PAGE_SHARED_EXEC __pgprot(pgprot_val(pgprot_user | PTE_READ \ | PTE_WRITE \ - | PTE_EXEC) + | PTE_EXEC)) #define PAGE_COPY __pgprot(pgprot_val(pgprot_user | PTE_READ) #define PAGE_COPY_EXEC __pgprot(pgprot_val(pgprot_user | PTE_READ \ - | PTE_EXEC) -#define PAGE_READONLY __pgprot(pgprot_val(pgprot_user | PTE_READ) + | PTE_EXEC)) +#define PAGE_READONLY __pgprot(pgprot_val(pgprot_user | PTE_READ)) #define PAGE_READONLY_EXEC __pgprot(pgprot_val(pgprot_user | PTE_READ \ - | PTE_EXEC) + | PTE_EXEC)) #define PAGE_KERNEL pgprot_kernel #define PAGE_KERNEL_EXEC __pgprot(pgprot_val(pgprot_kernel | PTE_EXEC)) -- cgit v1.2.3-70-g09d2 From 8a016596a56282f1414cf90e575040cffdabe68e Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 15 Apr 2014 09:21:30 +0800 Subject: arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit unicore32 supports STRICT_DEVMEM, so it needs devmem_is_allowed(), like some of other architectures have done (e.g. arm, powerpc, x86 ...). The related error with allmodconfig: CC drivers/char/mem.o drivers/char/mem.c: In function ‘range_is_allowed’: drivers/char/mem.c:69: error: implicit declaration of function ‘devmem_is_allowed’ make[2]: *** [drivers/char/mem.o] Error 1 make[1]: *** [drivers/char] Error 2 make: *** [drivers] Error 2 Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/include/asm/io.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/unicore32/include/asm/io.h b/arch/unicore32/include/asm/io.h index d6920301465..cb1d8fd2b16 100644 --- a/arch/unicore32/include/asm/io.h +++ b/arch/unicore32/include/asm/io.h @@ -48,5 +48,28 @@ extern void __uc32_iounmap(volatile void __iomem *addr); #define PIO_MASK (unsigned int)(IO_SPACE_LIMIT) #define PIO_RESERVED (PIO_OFFSET + PIO_MASK + 1) +#ifdef CONFIG_STRICT_DEVMEM + +#include +#include + +/* + * devmem_is_allowed() checks to see if /dev/mem access to a certain + * address is valid. The argument is a physical page number. + * We mimic x86 here by disallowing access to system RAM as well as + * device-exclusive MMIO regions. This effectively disable read()/write() + * on /dev/mem. + */ +static inline int devmem_is_allowed(unsigned long pfn) +{ + if (iomem_is_exclusive(pfn << PAGE_SHIFT)) + return 0; + if (!page_is_ram(pfn)) + return 1; + return 0; +} + +#endif /* CONFIG_STRICT_DEVMEM */ + #endif /* __KERNEL__ */ #endif /* __UNICORE_IO_H__ */ -- cgit v1.2.3-70-g09d2 From 40ad2a6741452ae63907a9779e534f4a9d26d1bd Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 27 May 2014 08:03:19 +0800 Subject: arch: unicore32: ksyms: export additional find_first_*() to avoid compiling failure Some modules need find_first_bit() and find_first_zero_bit(), so export them. The related error (with allmodconfig under unicore32): MODPOST 4039 modules ERROR: "find_first_bit" [sound/soc/codecs/snd-soc-uda1380.ko] undefined! ERROR: "find_first_zero_bit" [net/sctp/sctp.ko] undefined! ... Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/kernel/ksyms.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c index e78911aefb1..0323528a80f 100644 --- a/arch/unicore32/kernel/ksyms.c +++ b/arch/unicore32/kernel/ksyms.c @@ -23,6 +23,8 @@ #include "ksyms.h" +EXPORT_SYMBOL(find_first_bit); +EXPORT_SYMBOL(find_first_zero_bit); EXPORT_SYMBOL(find_next_zero_bit); EXPORT_SYMBOL(find_next_bit); -- cgit v1.2.3-70-g09d2 From 3420d49dd3f22a3342bec16dc0bd2b64eaf061a5 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 27 May 2014 08:04:24 +0800 Subject: arch: unicore32: ksyms: export 'pm_power_off' to avoid compiling failure. Two driver modules need 'pm_power_off', so export it. The related error (with allmodconfig under unicore32): MODPOST 4039 modules ERROR: "pm_power_off" [drivers/mfd/retu-mfd.ko] undefined! ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined! Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c index 778ebba8082..b008e996146 100644 --- a/arch/unicore32/kernel/process.c +++ b/arch/unicore32/kernel/process.c @@ -60,6 +60,7 @@ void machine_halt(void) * Function pointers to optional machine specific functions */ void (*pm_power_off)(void) = NULL; +EXPORT_SYMBOL(pm_power_off); void machine_power_off(void) { -- cgit v1.2.3-70-g09d2 From 92543fd756cca554a37e343616a212c435168967 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 27 May 2014 08:08:06 +0800 Subject: arch: unicore32: ksyms: export '__cpuc_coherent_kern_range' to avoid compiling failure flush_icache_range() is '__cpuc_coherent_kern_range' under unicore32, and lkdtm.ko needs it. At present, '__cpuc_coherent_kern_range' is still used by unicore32, so export it to avoid compiling failure. The related error (with allmodconfig under unicore32): ERROR: "__cpuc_coherent_kern_range" [drivers/misc/lkdtm.ko] undefined! Signed-off-by: Chen Gang Acked-by: Xuetao Guan Signed-off-by: Xuetao Guan --- arch/unicore32/mm/proc-syms.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/unicore32/mm/proc-syms.c b/arch/unicore32/mm/proc-syms.c index f30071e3665..21c00fc85c9 100644 --- a/arch/unicore32/mm/proc-syms.c +++ b/arch/unicore32/mm/proc-syms.c @@ -19,5 +19,7 @@ EXPORT_SYMBOL(cpu_dcache_clean_area); EXPORT_SYMBOL(cpu_set_pte); +EXPORT_SYMBOL(__cpuc_coherent_kern_range); + EXPORT_SYMBOL(__cpuc_dma_flush_range); EXPORT_SYMBOL(__cpuc_dma_clean_range); -- cgit v1.2.3-70-g09d2 From ceebf4d5016bd1182b214eafd46ebd24d6cdf668 Mon Sep 17 00:00:00 2001 From: Guan Xuetao Date: Tue, 27 May 2014 07:53:10 +0800 Subject: UniCore32: Change git tree location information in MAINTAINERS UniCore32 git repo has moved to github. Branch 'unicore32' is used for prepared patches, and automatically merged to linux-next. Branch 'unicore32-working' is used for development. Signed-off-by: Guan Xuetao --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e36d18d8f0e..ddf53ff8405 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6960,7 +6960,7 @@ PKUNITY SOC DRIVERS M: Guan Xuetao W: http://mprc.pku.edu.cn/~guanxuetao/linux S: Maintained -T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.git +T: git git://github.com/gxt/linux.git F: drivers/input/serio/i8042-unicore32io.h F: drivers/i2c/busses/i2c-puv3.c F: drivers/video/fb-puv3.c @@ -9277,7 +9277,7 @@ UNICORE32 ARCHITECTURE: M: Guan Xuetao W: http://mprc.pku.edu.cn/~guanxuetao/linux S: Maintained -T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.git +T: git git://github.com/gxt/linux.git F: arch/unicore32/ UNIFDEF -- cgit v1.2.3-70-g09d2 From d670878e2c9adb86b37e42b0937b2d4825bd2b39 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 3 Jun 2014 11:30:03 -0700 Subject: unicore32: Remove ARCH_HAS_CPUFREQ config option This config exists entirely to hide the cpufreq menu from the kernel configuration unless a platform has selected it. Nothing is actually built if this config is 'Y' and it just leads to more patches that add a select under a platform Kconfig so that some other CPUfreq option can be chosen. Let's remove the option so that we can always enable CPUfreq drivers on unicore32 platforms. Cc: Viresh Kumar Signed-off-by: Stephen Boyd Reviewed-by: Viresh Kumar Signed-off-by: Xuetao Guan --- arch/unicore32/Kconfig | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index aafad6fa166..928237a7b9c 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -51,9 +51,6 @@ config ARCH_HAS_ILOG2_U32 config ARCH_HAS_ILOG2_U64 bool -config ARCH_HAS_CPUFREQ - bool - config GENERIC_HWEIGHT def_bool y @@ -87,7 +84,6 @@ config ARCH_PUV3 select GENERIC_CLOCKEVENTS select HAVE_CLK select ARCH_REQUIRE_GPIOLIB - select ARCH_HAS_CPUFREQ # CONFIGs for ARCH_PUV3 @@ -198,9 +194,7 @@ menu "Power management options" source "kernel/power/Kconfig" -if ARCH_HAS_CPUFREQ source "drivers/cpufreq/Kconfig" -endif config ARCH_SUSPEND_POSSIBLE def_bool y if !ARCH_FPGA -- cgit v1.2.3-70-g09d2