aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2013-06-18 09:38:59 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2013-07-14 19:36:51 -0400
commit078a55fc824c1633b3a507e4ad48b4637c1dfc18 (patch)
treeb7abb8d50bf6e322baaea322e9224d7715b52f5b /arch/mips/kernel/traps.c
parent60ffef065dd40b91f6f76af6c7510ddf23102f54 (diff)
MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code
commit 3747069b25e419f6b51395f48127e9812abc3596 upstream. The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. Note that some harmless section mismatch warnings may result, since notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c) and are flagged as __cpuinit -- so if we remove the __cpuinit from the arch specific callers, we will also get section mismatch warnings. As an intermediate step, we intend to turn the linux/init.h cpuinit related content into no-ops as early as possible, since that will get rid of these warnings. In any case, they are temporary and harmless. Here, we remove all the MIPS __cpuinit from C code and __CPUINIT from asm files. MIPS is interesting in this respect, because there are also uasm users hiding behind their own renamed versions of the __cpuinit macros. [1] https://lkml.org/lkml/2013/5/20/589 [ralf@linux-mips.org: Folded in Paul's followup fix.] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5494/ Patchwork: https://patchwork.linux-mips.org/patch/5495/ Patchwork: https://patchwork.linux-mips.org/patch/5509/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r--arch/mips/kernel/traps.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 0903d70b2cfe..c89568f88bfd 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -90,7 +90,7 @@ void (*board_nmi_handler_setup)(void);
90void (*board_ejtag_handler_setup)(void); 90void (*board_ejtag_handler_setup)(void);
91void (*board_bind_eic_interrupt)(int irq, int regset); 91void (*board_bind_eic_interrupt)(int irq, int regset);
92void (*board_ebase_setup)(void); 92void (*board_ebase_setup)(void);
93void __cpuinitdata(*board_cache_error_setup)(void); 93void(*board_cache_error_setup)(void);
94 94
95static void show_raw_backtrace(unsigned long reg29) 95static void show_raw_backtrace(unsigned long reg29)
96{ 96{
@@ -1682,7 +1682,7 @@ int cp0_compare_irq_shift;
1682int cp0_perfcount_irq; 1682int cp0_perfcount_irq;
1683EXPORT_SYMBOL_GPL(cp0_perfcount_irq); 1683EXPORT_SYMBOL_GPL(cp0_perfcount_irq);
1684 1684
1685static int __cpuinitdata noulri; 1685static int noulri;
1686 1686
1687static int __init ulri_disable(char *s) 1687static int __init ulri_disable(char *s)
1688{ 1688{
@@ -1693,7 +1693,7 @@ static int __init ulri_disable(char *s)
1693} 1693}
1694__setup("noulri", ulri_disable); 1694__setup("noulri", ulri_disable);
1695 1695
1696void __cpuinit per_cpu_trap_init(bool is_boot_cpu) 1696void per_cpu_trap_init(bool is_boot_cpu)
1697{ 1697{
1698 unsigned int cpu = smp_processor_id(); 1698 unsigned int cpu = smp_processor_id();
1699 unsigned int status_set = ST0_CU0; 1699 unsigned int status_set = ST0_CU0;
@@ -1810,7 +1810,7 @@ void __cpuinit per_cpu_trap_init(bool is_boot_cpu)
1810} 1810}
1811 1811
1812/* Install CPU exception handler */ 1812/* Install CPU exception handler */
1813void __cpuinit set_handler(unsigned long offset, void *addr, unsigned long size) 1813void set_handler(unsigned long offset, void *addr, unsigned long size)
1814{ 1814{
1815#ifdef CONFIG_CPU_MICROMIPS 1815#ifdef CONFIG_CPU_MICROMIPS
1816 memcpy((void *)(ebase + offset), ((unsigned char *)addr - 1), size); 1816 memcpy((void *)(ebase + offset), ((unsigned char *)addr - 1), size);
@@ -1820,7 +1820,7 @@ void __cpuinit set_handler(unsigned long offset, void *addr, unsigned long size)
1820 local_flush_icache_range(ebase + offset, ebase + offset + size); 1820 local_flush_icache_range(ebase + offset, ebase + offset + size);
1821} 1821}
1822 1822
1823static char panic_null_cerr[] __cpuinitdata = 1823static char panic_null_cerr[] =
1824 "Trying to set NULL cache error exception handler"; 1824 "Trying to set NULL cache error exception handler";
1825 1825
1826/* 1826/*
@@ -1828,7 +1828,7 @@ static char panic_null_cerr[] __cpuinitdata =
1828 * This is suitable only for the cache error exception which is the only 1828 * This is suitable only for the cache error exception which is the only
1829 * exception handler that is being run uncached. 1829 * exception handler that is being run uncached.
1830 */ 1830 */
1831void __cpuinit set_uncached_handler(unsigned long offset, void *addr, 1831void set_uncached_handler(unsigned long offset, void *addr,
1832 unsigned long size) 1832 unsigned long size)
1833{ 1833{
1834 unsigned long uncached_ebase = CKSEG1ADDR(ebase); 1834 unsigned long uncached_ebase = CKSEG1ADDR(ebase);