diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-06-17 15:43:14 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-07-14 19:36:52 -0400 |
commit | 2066aadd53c563445039d6490b685783816270ec (patch) | |
tree | 72a69dee0008e429e62a80b8fad91faf1296737b | |
parent | 8bd26e3a7e49af2697449bbcb7187a39dc85d672 (diff) |
sparc: delete __cpuinit/__CPUINIT usage from all users
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)
are flagged as __cpuinit -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings. In any case, they are temporary and harmless.
This removes all the arch/sparc uses of the __cpuinit macros from
C files and removes __CPUINIT from assembly files. Note that even
though arch/sparc/kernel/trampoline_64.S has instances of ".previous"
in it, they are all paired off against explicit ".section" directives,
and not implicitly paired with __CPUINIT (unlike mips and arm were).
[1] https://lkml.org/lkml/2013/5/20/589
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | arch/sparc/kernel/ds.c | 11 | ||||
-rw-r--r-- | arch/sparc/kernel/entry.h | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/hvtramp.S | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/leon_smp.c | 10 | ||||
-rw-r--r-- | arch/sparc/kernel/mdesc.c | 34 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_32.c | 20 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 9 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4d_smp.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4m_smp.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/sysfs.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/trampoline_32.S | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/trampoline_64.S | 2 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/mm/srmmu.c | 12 |
15 files changed, 60 insertions, 67 deletions
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 11d460f6f9cc..62d6b153ffa2 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
@@ -528,10 +528,8 @@ static void dr_cpu_mark(struct ds_data *resp, int cpu, int ncpus, | |||
528 | } | 528 | } |
529 | } | 529 | } |
530 | 530 | ||
531 | static int __cpuinit dr_cpu_configure(struct ds_info *dp, | 531 | static int dr_cpu_configure(struct ds_info *dp, struct ds_cap_state *cp, |
532 | struct ds_cap_state *cp, | 532 | u64 req_num, cpumask_t *mask) |
533 | u64 req_num, | ||
534 | cpumask_t *mask) | ||
535 | { | 533 | { |
536 | struct ds_data *resp; | 534 | struct ds_data *resp; |
537 | int resp_len, ncpus, cpu; | 535 | int resp_len, ncpus, cpu; |
@@ -627,9 +625,8 @@ static int dr_cpu_unconfigure(struct ds_info *dp, | |||
627 | return 0; | 625 | return 0; |
628 | } | 626 | } |
629 | 627 | ||
630 | static void __cpuinit dr_cpu_data(struct ds_info *dp, | 628 | static void dr_cpu_data(struct ds_info *dp, struct ds_cap_state *cp, void *buf, |
631 | struct ds_cap_state *cp, | 629 | int len) |
632 | void *buf, int len) | ||
633 | { | 630 | { |
634 | struct ds_data *data = buf; | 631 | struct ds_data *data = buf; |
635 | struct dr_cpu_tag *tag = (struct dr_cpu_tag *) (data + 1); | 632 | struct dr_cpu_tag *tag = (struct dr_cpu_tag *) (data + 1); |
diff --git a/arch/sparc/kernel/entry.h b/arch/sparc/kernel/entry.h index cc3c5cb47cda..9c179fbfb219 100644 --- a/arch/sparc/kernel/entry.h +++ b/arch/sparc/kernel/entry.h | |||
@@ -250,7 +250,7 @@ extern struct ino_bucket *ivector_table; | |||
250 | extern unsigned long ivector_table_pa; | 250 | extern unsigned long ivector_table_pa; |
251 | 251 | ||
252 | extern void init_irqwork_curcpu(void); | 252 | extern void init_irqwork_curcpu(void); |
253 | extern void __cpuinit sun4v_register_mondo_queues(int this_cpu); | 253 | extern void sun4v_register_mondo_queues(int this_cpu); |
254 | 254 | ||
255 | #endif /* CONFIG_SPARC32 */ | 255 | #endif /* CONFIG_SPARC32 */ |
256 | #endif /* _ENTRY_H */ | 256 | #endif /* _ENTRY_H */ |
diff --git a/arch/sparc/kernel/hvtramp.S b/arch/sparc/kernel/hvtramp.S index 605c960b2fa6..4eb1a5a1d544 100644 --- a/arch/sparc/kernel/hvtramp.S +++ b/arch/sparc/kernel/hvtramp.S | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <asm/asi.h> | 16 | #include <asm/asi.h> |
17 | #include <asm/pil.h> | 17 | #include <asm/pil.h> |
18 | 18 | ||
19 | __CPUINIT | ||
20 | .align 8 | 19 | .align 8 |
21 | .globl hv_cpu_startup, hv_cpu_startup_end | 20 | .globl hv_cpu_startup, hv_cpu_startup_end |
22 | 21 | ||
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 9bcbbe2c4e7e..d4840cec2c55 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -835,7 +835,8 @@ void notrace init_irqwork_curcpu(void) | |||
835 | * Therefore you cannot make any OBP calls, not even prom_printf, | 835 | * Therefore you cannot make any OBP calls, not even prom_printf, |
836 | * from these two routines. | 836 | * from these two routines. |
837 | */ | 837 | */ |
838 | static void __cpuinit notrace register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask) | 838 | static void notrace register_one_mondo(unsigned long paddr, unsigned long type, |
839 | unsigned long qmask) | ||
839 | { | 840 | { |
840 | unsigned long num_entries = (qmask + 1) / 64; | 841 | unsigned long num_entries = (qmask + 1) / 64; |
841 | unsigned long status; | 842 | unsigned long status; |
@@ -848,7 +849,7 @@ static void __cpuinit notrace register_one_mondo(unsigned long paddr, unsigned l | |||
848 | } | 849 | } |
849 | } | 850 | } |
850 | 851 | ||
851 | void __cpuinit notrace sun4v_register_mondo_queues(int this_cpu) | 852 | void notrace sun4v_register_mondo_queues(int this_cpu) |
852 | { | 853 | { |
853 | struct trap_per_cpu *tb = &trap_block[this_cpu]; | 854 | struct trap_per_cpu *tb = &trap_block[this_cpu]; |
854 | 855 | ||
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index d7aa524b7283..6edf955f987c 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -54,7 +54,7 @@ extern ctxd_t *srmmu_ctx_table_phys; | |||
54 | static int smp_processors_ready; | 54 | static int smp_processors_ready; |
55 | extern volatile unsigned long cpu_callin_map[NR_CPUS]; | 55 | extern volatile unsigned long cpu_callin_map[NR_CPUS]; |
56 | extern cpumask_t smp_commenced_mask; | 56 | extern cpumask_t smp_commenced_mask; |
57 | void __cpuinit leon_configure_cache_smp(void); | 57 | void leon_configure_cache_smp(void); |
58 | static void leon_ipi_init(void); | 58 | static void leon_ipi_init(void); |
59 | 59 | ||
60 | /* IRQ number of LEON IPIs */ | 60 | /* IRQ number of LEON IPIs */ |
@@ -69,12 +69,12 @@ static inline unsigned long do_swap(volatile unsigned long *ptr, | |||
69 | return val; | 69 | return val; |
70 | } | 70 | } |
71 | 71 | ||
72 | void __cpuinit leon_cpu_pre_starting(void *arg) | 72 | void leon_cpu_pre_starting(void *arg) |
73 | { | 73 | { |
74 | leon_configure_cache_smp(); | 74 | leon_configure_cache_smp(); |
75 | } | 75 | } |
76 | 76 | ||
77 | void __cpuinit leon_cpu_pre_online(void *arg) | 77 | void leon_cpu_pre_online(void *arg) |
78 | { | 78 | { |
79 | int cpuid = hard_smp_processor_id(); | 79 | int cpuid = hard_smp_processor_id(); |
80 | 80 | ||
@@ -106,7 +106,7 @@ void __cpuinit leon_cpu_pre_online(void *arg) | |||
106 | 106 | ||
107 | extern struct linux_prom_registers smp_penguin_ctable; | 107 | extern struct linux_prom_registers smp_penguin_ctable; |
108 | 108 | ||
109 | void __cpuinit leon_configure_cache_smp(void) | 109 | void leon_configure_cache_smp(void) |
110 | { | 110 | { |
111 | unsigned long cfg = sparc_leon3_get_dcachecfg(); | 111 | unsigned long cfg = sparc_leon3_get_dcachecfg(); |
112 | int me = smp_processor_id(); | 112 | int me = smp_processor_id(); |
@@ -186,7 +186,7 @@ void __init leon_boot_cpus(void) | |||
186 | 186 | ||
187 | } | 187 | } |
188 | 188 | ||
189 | int __cpuinit leon_boot_one_cpu(int i, struct task_struct *idle) | 189 | int leon_boot_one_cpu(int i, struct task_struct *idle) |
190 | { | 190 | { |
191 | int timeout; | 191 | int timeout; |
192 | 192 | ||
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 831c001604e8..b90bf23e3aab 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
@@ -571,9 +571,7 @@ static void __init report_platform_properties(void) | |||
571 | mdesc_release(hp); | 571 | mdesc_release(hp); |
572 | } | 572 | } |
573 | 573 | ||
574 | static void __cpuinit fill_in_one_cache(cpuinfo_sparc *c, | 574 | static void fill_in_one_cache(cpuinfo_sparc *c, struct mdesc_handle *hp, u64 mp) |
575 | struct mdesc_handle *hp, | ||
576 | u64 mp) | ||
577 | { | 575 | { |
578 | const u64 *level = mdesc_get_property(hp, mp, "level", NULL); | 576 | const u64 *level = mdesc_get_property(hp, mp, "level", NULL); |
579 | const u64 *size = mdesc_get_property(hp, mp, "size", NULL); | 577 | const u64 *size = mdesc_get_property(hp, mp, "size", NULL); |
@@ -616,7 +614,7 @@ static void __cpuinit fill_in_one_cache(cpuinfo_sparc *c, | |||
616 | } | 614 | } |
617 | } | 615 | } |
618 | 616 | ||
619 | static void __cpuinit mark_core_ids(struct mdesc_handle *hp, u64 mp, int core_id) | 617 | static void mark_core_ids(struct mdesc_handle *hp, u64 mp, int core_id) |
620 | { | 618 | { |
621 | u64 a; | 619 | u64 a; |
622 | 620 | ||
@@ -649,7 +647,7 @@ static void __cpuinit mark_core_ids(struct mdesc_handle *hp, u64 mp, int core_id | |||
649 | } | 647 | } |
650 | } | 648 | } |
651 | 649 | ||
652 | static void __cpuinit set_core_ids(struct mdesc_handle *hp) | 650 | static void set_core_ids(struct mdesc_handle *hp) |
653 | { | 651 | { |
654 | int idx; | 652 | int idx; |
655 | u64 mp; | 653 | u64 mp; |
@@ -674,7 +672,7 @@ static void __cpuinit set_core_ids(struct mdesc_handle *hp) | |||
674 | } | 672 | } |
675 | } | 673 | } |
676 | 674 | ||
677 | static void __cpuinit mark_proc_ids(struct mdesc_handle *hp, u64 mp, int proc_id) | 675 | static void mark_proc_ids(struct mdesc_handle *hp, u64 mp, int proc_id) |
678 | { | 676 | { |
679 | u64 a; | 677 | u64 a; |
680 | 678 | ||
@@ -693,7 +691,7 @@ static void __cpuinit mark_proc_ids(struct mdesc_handle *hp, u64 mp, int proc_id | |||
693 | } | 691 | } |
694 | } | 692 | } |
695 | 693 | ||
696 | static void __cpuinit __set_proc_ids(struct mdesc_handle *hp, const char *exec_unit_name) | 694 | static void __set_proc_ids(struct mdesc_handle *hp, const char *exec_unit_name) |
697 | { | 695 | { |
698 | int idx; | 696 | int idx; |
699 | u64 mp; | 697 | u64 mp; |
@@ -714,14 +712,14 @@ static void __cpuinit __set_proc_ids(struct mdesc_handle *hp, const char *exec_u | |||
714 | } | 712 | } |
715 | } | 713 | } |
716 | 714 | ||
717 | static void __cpuinit set_proc_ids(struct mdesc_handle *hp) | 715 | static void set_proc_ids(struct mdesc_handle *hp) |
718 | { | 716 | { |
719 | __set_proc_ids(hp, "exec_unit"); | 717 | __set_proc_ids(hp, "exec_unit"); |
720 | __set_proc_ids(hp, "exec-unit"); | 718 | __set_proc_ids(hp, "exec-unit"); |
721 | } | 719 | } |
722 | 720 | ||
723 | static void __cpuinit get_one_mondo_bits(const u64 *p, unsigned int *mask, | 721 | static void get_one_mondo_bits(const u64 *p, unsigned int *mask, |
724 | unsigned long def, unsigned long max) | 722 | unsigned long def, unsigned long max) |
725 | { | 723 | { |
726 | u64 val; | 724 | u64 val; |
727 | 725 | ||
@@ -742,8 +740,8 @@ use_default: | |||
742 | *mask = ((1U << def) * 64U) - 1U; | 740 | *mask = ((1U << def) * 64U) - 1U; |
743 | } | 741 | } |
744 | 742 | ||
745 | static void __cpuinit get_mondo_data(struct mdesc_handle *hp, u64 mp, | 743 | static void get_mondo_data(struct mdesc_handle *hp, u64 mp, |
746 | struct trap_per_cpu *tb) | 744 | struct trap_per_cpu *tb) |
747 | { | 745 | { |
748 | static int printed; | 746 | static int printed; |
749 | const u64 *val; | 747 | const u64 *val; |
@@ -769,7 +767,7 @@ static void __cpuinit get_mondo_data(struct mdesc_handle *hp, u64 mp, | |||
769 | } | 767 | } |
770 | } | 768 | } |
771 | 769 | ||
772 | static void * __cpuinit mdesc_iterate_over_cpus(void *(*func)(struct mdesc_handle *, u64, int, void *), void *arg, cpumask_t *mask) | 770 | static void *mdesc_iterate_over_cpus(void *(*func)(struct mdesc_handle *, u64, int, void *), void *arg, cpumask_t *mask) |
773 | { | 771 | { |
774 | struct mdesc_handle *hp = mdesc_grab(); | 772 | struct mdesc_handle *hp = mdesc_grab(); |
775 | void *ret = NULL; | 773 | void *ret = NULL; |
@@ -799,7 +797,8 @@ out: | |||
799 | return ret; | 797 | return ret; |
800 | } | 798 | } |
801 | 799 | ||
802 | static void * __cpuinit record_one_cpu(struct mdesc_handle *hp, u64 mp, int cpuid, void *arg) | 800 | static void *record_one_cpu(struct mdesc_handle *hp, u64 mp, int cpuid, |
801 | void *arg) | ||
803 | { | 802 | { |
804 | ncpus_probed++; | 803 | ncpus_probed++; |
805 | #ifdef CONFIG_SMP | 804 | #ifdef CONFIG_SMP |
@@ -808,7 +807,7 @@ static void * __cpuinit record_one_cpu(struct mdesc_handle *hp, u64 mp, int cpui | |||
808 | return NULL; | 807 | return NULL; |
809 | } | 808 | } |
810 | 809 | ||
811 | void __cpuinit mdesc_populate_present_mask(cpumask_t *mask) | 810 | void mdesc_populate_present_mask(cpumask_t *mask) |
812 | { | 811 | { |
813 | if (tlb_type != hypervisor) | 812 | if (tlb_type != hypervisor) |
814 | return; | 813 | return; |
@@ -841,7 +840,8 @@ void __init mdesc_get_page_sizes(cpumask_t *mask, unsigned long *pgsz_mask) | |||
841 | mdesc_iterate_over_cpus(check_one_pgsz, pgsz_mask, mask); | 840 | mdesc_iterate_over_cpus(check_one_pgsz, pgsz_mask, mask); |
842 | } | 841 | } |
843 | 842 | ||
844 | static void * __cpuinit fill_in_one_cpu(struct mdesc_handle *hp, u64 mp, int cpuid, void *arg) | 843 | static void *fill_in_one_cpu(struct mdesc_handle *hp, u64 mp, int cpuid, |
844 | void *arg) | ||
845 | { | 845 | { |
846 | const u64 *cfreq = mdesc_get_property(hp, mp, "clock-frequency", NULL); | 846 | const u64 *cfreq = mdesc_get_property(hp, mp, "clock-frequency", NULL); |
847 | struct trap_per_cpu *tb; | 847 | struct trap_per_cpu *tb; |
@@ -890,7 +890,7 @@ static void * __cpuinit fill_in_one_cpu(struct mdesc_handle *hp, u64 mp, int cpu | |||
890 | return NULL; | 890 | return NULL; |
891 | } | 891 | } |
892 | 892 | ||
893 | void __cpuinit mdesc_fill_in_cpu_data(cpumask_t *mask) | 893 | void mdesc_fill_in_cpu_data(cpumask_t *mask) |
894 | { | 894 | { |
895 | struct mdesc_handle *hp; | 895 | struct mdesc_handle *hp; |
896 | 896 | ||
diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c index e3f2b81c23f1..a102bfba6ea8 100644 --- a/arch/sparc/kernel/smp_32.c +++ b/arch/sparc/kernel/smp_32.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include "kernel.h" | 39 | #include "kernel.h" |
40 | #include "irq.h" | 40 | #include "irq.h" |
41 | 41 | ||
42 | volatile unsigned long cpu_callin_map[NR_CPUS] __cpuinitdata = {0,}; | 42 | volatile unsigned long cpu_callin_map[NR_CPUS] = {0,}; |
43 | 43 | ||
44 | cpumask_t smp_commenced_mask = CPU_MASK_NONE; | 44 | cpumask_t smp_commenced_mask = CPU_MASK_NONE; |
45 | 45 | ||
@@ -53,7 +53,7 @@ const struct sparc32_ipi_ops *sparc32_ipi_ops; | |||
53 | * instruction which is much better... | 53 | * instruction which is much better... |
54 | */ | 54 | */ |
55 | 55 | ||
56 | void __cpuinit smp_store_cpu_info(int id) | 56 | void smp_store_cpu_info(int id) |
57 | { | 57 | { |
58 | int cpu_node; | 58 | int cpu_node; |
59 | int mid; | 59 | int mid; |
@@ -120,7 +120,7 @@ void cpu_panic(void) | |||
120 | panic("SMP bolixed\n"); | 120 | panic("SMP bolixed\n"); |
121 | } | 121 | } |
122 | 122 | ||
123 | struct linux_prom_registers smp_penguin_ctable __cpuinitdata = { 0 }; | 123 | struct linux_prom_registers smp_penguin_ctable = { 0 }; |
124 | 124 | ||
125 | void smp_send_reschedule(int cpu) | 125 | void smp_send_reschedule(int cpu) |
126 | { | 126 | { |
@@ -259,10 +259,10 @@ void __init smp_prepare_boot_cpu(void) | |||
259 | set_cpu_possible(cpuid, true); | 259 | set_cpu_possible(cpuid, true); |
260 | } | 260 | } |
261 | 261 | ||
262 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | 262 | int __cpu_up(unsigned int cpu, struct task_struct *tidle) |
263 | { | 263 | { |
264 | extern int __cpuinit smp4m_boot_one_cpu(int, struct task_struct *); | 264 | extern int smp4m_boot_one_cpu(int, struct task_struct *); |
265 | extern int __cpuinit smp4d_boot_one_cpu(int, struct task_struct *); | 265 | extern int smp4d_boot_one_cpu(int, struct task_struct *); |
266 | int ret=0; | 266 | int ret=0; |
267 | 267 | ||
268 | switch(sparc_cpu_model) { | 268 | switch(sparc_cpu_model) { |
@@ -297,7 +297,7 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
297 | return ret; | 297 | return ret; |
298 | } | 298 | } |
299 | 299 | ||
300 | void __cpuinit arch_cpu_pre_starting(void *arg) | 300 | void arch_cpu_pre_starting(void *arg) |
301 | { | 301 | { |
302 | local_ops->cache_all(); | 302 | local_ops->cache_all(); |
303 | local_ops->tlb_all(); | 303 | local_ops->tlb_all(); |
@@ -317,7 +317,7 @@ void __cpuinit arch_cpu_pre_starting(void *arg) | |||
317 | } | 317 | } |
318 | } | 318 | } |
319 | 319 | ||
320 | void __cpuinit arch_cpu_pre_online(void *arg) | 320 | void arch_cpu_pre_online(void *arg) |
321 | { | 321 | { |
322 | unsigned int cpuid = hard_smp_processor_id(); | 322 | unsigned int cpuid = hard_smp_processor_id(); |
323 | 323 | ||
@@ -344,7 +344,7 @@ void __cpuinit arch_cpu_pre_online(void *arg) | |||
344 | } | 344 | } |
345 | } | 345 | } |
346 | 346 | ||
347 | void __cpuinit sparc_start_secondary(void *arg) | 347 | void sparc_start_secondary(void *arg) |
348 | { | 348 | { |
349 | unsigned int cpu; | 349 | unsigned int cpu; |
350 | 350 | ||
@@ -375,7 +375,7 @@ void __cpuinit sparc_start_secondary(void *arg) | |||
375 | BUG(); | 375 | BUG(); |
376 | } | 376 | } |
377 | 377 | ||
378 | void __cpuinit smp_callin(void) | 378 | void smp_callin(void) |
379 | { | 379 | { |
380 | sparc_start_secondary(NULL); | 380 | sparc_start_secondary(NULL); |
381 | } | 381 | } |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 77539eda928c..e142545244f2 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -87,7 +87,7 @@ extern void setup_sparc64_timer(void); | |||
87 | 87 | ||
88 | static volatile unsigned long callin_flag = 0; | 88 | static volatile unsigned long callin_flag = 0; |
89 | 89 | ||
90 | void __cpuinit smp_callin(void) | 90 | void smp_callin(void) |
91 | { | 91 | { |
92 | int cpuid = hard_smp_processor_id(); | 92 | int cpuid = hard_smp_processor_id(); |
93 | 93 | ||
@@ -281,7 +281,8 @@ static unsigned long kimage_addr_to_ra(void *p) | |||
281 | return kern_base + (val - KERNBASE); | 281 | return kern_base + (val - KERNBASE); |
282 | } | 282 | } |
283 | 283 | ||
284 | static void __cpuinit ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg, void **descrp) | 284 | static void ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg, |
285 | void **descrp) | ||
285 | { | 286 | { |
286 | extern unsigned long sparc64_ttable_tl0; | 287 | extern unsigned long sparc64_ttable_tl0; |
287 | extern unsigned long kern_locked_tte_data; | 288 | extern unsigned long kern_locked_tte_data; |
@@ -342,7 +343,7 @@ extern unsigned long sparc64_cpu_startup; | |||
342 | */ | 343 | */ |
343 | static struct thread_info *cpu_new_thread = NULL; | 344 | static struct thread_info *cpu_new_thread = NULL; |
344 | 345 | ||
345 | static int __cpuinit smp_boot_one_cpu(unsigned int cpu, struct task_struct *idle) | 346 | static int smp_boot_one_cpu(unsigned int cpu, struct task_struct *idle) |
346 | { | 347 | { |
347 | unsigned long entry = | 348 | unsigned long entry = |
348 | (unsigned long)(&sparc64_cpu_startup); | 349 | (unsigned long)(&sparc64_cpu_startup); |
@@ -1266,7 +1267,7 @@ void smp_fill_in_sib_core_maps(void) | |||
1266 | } | 1267 | } |
1267 | } | 1268 | } |
1268 | 1269 | ||
1269 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | 1270 | int __cpu_up(unsigned int cpu, struct task_struct *tidle) |
1270 | { | 1271 | { |
1271 | int ret = smp_boot_one_cpu(cpu, tidle); | 1272 | int ret = smp_boot_one_cpu(cpu, tidle); |
1272 | 1273 | ||
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index c9eb82f23d92..d5c319553fd0 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -50,7 +50,7 @@ static inline void show_leds(int cpuid) | |||
50 | "i" (ASI_M_CTL)); | 50 | "i" (ASI_M_CTL)); |
51 | } | 51 | } |
52 | 52 | ||
53 | void __cpuinit sun4d_cpu_pre_starting(void *arg) | 53 | void sun4d_cpu_pre_starting(void *arg) |
54 | { | 54 | { |
55 | int cpuid = hard_smp_processor_id(); | 55 | int cpuid = hard_smp_processor_id(); |
56 | 56 | ||
@@ -62,7 +62,7 @@ void __cpuinit sun4d_cpu_pre_starting(void *arg) | |||
62 | cc_set_imsk((cc_get_imsk() & ~0x8000) | 0x4000); | 62 | cc_set_imsk((cc_get_imsk() & ~0x8000) | 0x4000); |
63 | } | 63 | } |
64 | 64 | ||
65 | void __cpuinit sun4d_cpu_pre_online(void *arg) | 65 | void sun4d_cpu_pre_online(void *arg) |
66 | { | 66 | { |
67 | unsigned long flags; | 67 | unsigned long flags; |
68 | int cpuid; | 68 | int cpuid; |
@@ -118,7 +118,7 @@ void __init smp4d_boot_cpus(void) | |||
118 | local_ops->cache_all(); | 118 | local_ops->cache_all(); |
119 | } | 119 | } |
120 | 120 | ||
121 | int __cpuinit smp4d_boot_one_cpu(int i, struct task_struct *idle) | 121 | int smp4d_boot_one_cpu(int i, struct task_struct *idle) |
122 | { | 122 | { |
123 | unsigned long *entry = &sun4d_cpu_startup; | 123 | unsigned long *entry = &sun4d_cpu_startup; |
124 | int timeout; | 124 | int timeout; |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 8a65f158153d..d3408e72d20c 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -34,11 +34,11 @@ swap_ulong(volatile unsigned long *ptr, unsigned long val) | |||
34 | return val; | 34 | return val; |
35 | } | 35 | } |
36 | 36 | ||
37 | void __cpuinit sun4m_cpu_pre_starting(void *arg) | 37 | void sun4m_cpu_pre_starting(void *arg) |
38 | { | 38 | { |
39 | } | 39 | } |
40 | 40 | ||
41 | void __cpuinit sun4m_cpu_pre_online(void *arg) | 41 | void sun4m_cpu_pre_online(void *arg) |
42 | { | 42 | { |
43 | int cpuid = hard_smp_processor_id(); | 43 | int cpuid = hard_smp_processor_id(); |
44 | 44 | ||
@@ -75,7 +75,7 @@ void __init smp4m_boot_cpus(void) | |||
75 | local_ops->cache_all(); | 75 | local_ops->cache_all(); |
76 | } | 76 | } |
77 | 77 | ||
78 | int __cpuinit smp4m_boot_one_cpu(int i, struct task_struct *idle) | 78 | int smp4m_boot_one_cpu(int i, struct task_struct *idle) |
79 | { | 79 | { |
80 | unsigned long *entry = &sun4m_cpu_startup; | 80 | unsigned long *entry = &sun4m_cpu_startup; |
81 | int timeout; | 81 | int timeout; |
diff --git a/arch/sparc/kernel/sysfs.c b/arch/sparc/kernel/sysfs.c index 654e8aad3bbe..c21c673e5f7c 100644 --- a/arch/sparc/kernel/sysfs.c +++ b/arch/sparc/kernel/sysfs.c | |||
@@ -246,7 +246,7 @@ static void unregister_cpu_online(unsigned int cpu) | |||
246 | } | 246 | } |
247 | #endif | 247 | #endif |
248 | 248 | ||
249 | static int __cpuinit sysfs_cpu_notify(struct notifier_block *self, | 249 | static int sysfs_cpu_notify(struct notifier_block *self, |
250 | unsigned long action, void *hcpu) | 250 | unsigned long action, void *hcpu) |
251 | { | 251 | { |
252 | unsigned int cpu = (unsigned int)(long)hcpu; | 252 | unsigned int cpu = (unsigned int)(long)hcpu; |
@@ -266,7 +266,7 @@ static int __cpuinit sysfs_cpu_notify(struct notifier_block *self, | |||
266 | return NOTIFY_OK; | 266 | return NOTIFY_OK; |
267 | } | 267 | } |
268 | 268 | ||
269 | static struct notifier_block __cpuinitdata sysfs_cpu_nb = { | 269 | static struct notifier_block sysfs_cpu_nb = { |
270 | .notifier_call = sysfs_cpu_notify, | 270 | .notifier_call = sysfs_cpu_notify, |
271 | }; | 271 | }; |
272 | 272 | ||
diff --git a/arch/sparc/kernel/trampoline_32.S b/arch/sparc/kernel/trampoline_32.S index 6cdb08cdabf0..76dcbd3c988a 100644 --- a/arch/sparc/kernel/trampoline_32.S +++ b/arch/sparc/kernel/trampoline_32.S | |||
@@ -18,7 +18,6 @@ | |||
18 | .globl sun4m_cpu_startup | 18 | .globl sun4m_cpu_startup |
19 | .globl sun4d_cpu_startup | 19 | .globl sun4d_cpu_startup |
20 | 20 | ||
21 | __CPUINIT | ||
22 | .align 4 | 21 | .align 4 |
23 | 22 | ||
24 | /* When we start up a cpu for the first time it enters this routine. | 23 | /* When we start up a cpu for the first time it enters this routine. |
@@ -94,7 +93,6 @@ smp_panic: | |||
94 | /* CPUID in bootbus can be found at PA 0xff0140000 */ | 93 | /* CPUID in bootbus can be found at PA 0xff0140000 */ |
95 | #define SUN4D_BOOTBUS_CPUID 0xf0140000 | 94 | #define SUN4D_BOOTBUS_CPUID 0xf0140000 |
96 | 95 | ||
97 | __CPUINIT | ||
98 | .align 4 | 96 | .align 4 |
99 | 97 | ||
100 | sun4d_cpu_startup: | 98 | sun4d_cpu_startup: |
@@ -146,7 +144,6 @@ sun4d_cpu_startup: | |||
146 | 144 | ||
147 | b,a smp_panic | 145 | b,a smp_panic |
148 | 146 | ||
149 | __CPUINIT | ||
150 | .align 4 | 147 | .align 4 |
151 | .global leon_smp_cpu_startup, smp_penguin_ctable | 148 | .global leon_smp_cpu_startup, smp_penguin_ctable |
152 | 149 | ||
diff --git a/arch/sparc/kernel/trampoline_64.S b/arch/sparc/kernel/trampoline_64.S index 2e973a26fbda..e0b1e13a0736 100644 --- a/arch/sparc/kernel/trampoline_64.S +++ b/arch/sparc/kernel/trampoline_64.S | |||
@@ -32,13 +32,11 @@ itlb_load: | |||
32 | dtlb_load: | 32 | dtlb_load: |
33 | .asciz "SUNW,dtlb-load" | 33 | .asciz "SUNW,dtlb-load" |
34 | 34 | ||
35 | /* XXX __cpuinit this thing XXX */ | ||
36 | #define TRAMP_STACK_SIZE 1024 | 35 | #define TRAMP_STACK_SIZE 1024 |
37 | .align 16 | 36 | .align 16 |
38 | tramp_stack: | 37 | tramp_stack: |
39 | .skip TRAMP_STACK_SIZE | 38 | .skip TRAMP_STACK_SIZE |
40 | 39 | ||
41 | __CPUINIT | ||
42 | .align 8 | 40 | .align 8 |
43 | .globl sparc64_cpu_startup, sparc64_cpu_startup_end | 41 | .globl sparc64_cpu_startup, sparc64_cpu_startup_end |
44 | sparc64_cpu_startup: | 42 | sparc64_cpu_startup: |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index a9c42a7ffb6a..ed82edad1a39 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -1694,7 +1694,7 @@ static void __init sun4v_ktsb_init(void) | |||
1694 | #endif | 1694 | #endif |
1695 | } | 1695 | } |
1696 | 1696 | ||
1697 | void __cpuinit sun4v_ktsb_register(void) | 1697 | void sun4v_ktsb_register(void) |
1698 | { | 1698 | { |
1699 | unsigned long pa, ret; | 1699 | unsigned long pa, ret; |
1700 | 1700 | ||
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 036c2797dece..5d721df48a72 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -858,7 +858,7 @@ static void __init map_kernel(void) | |||
858 | } | 858 | } |
859 | } | 859 | } |
860 | 860 | ||
861 | void (*poke_srmmu)(void) __cpuinitdata = NULL; | 861 | void (*poke_srmmu)(void) = NULL; |
862 | 862 | ||
863 | extern unsigned long bootmem_init(unsigned long *pages_avail); | 863 | extern unsigned long bootmem_init(unsigned long *pages_avail); |
864 | 864 | ||
@@ -1055,7 +1055,7 @@ static void __init init_vac_layout(void) | |||
1055 | (int)vac_cache_size, (int)vac_line_size); | 1055 | (int)vac_cache_size, (int)vac_line_size); |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | static void __cpuinit poke_hypersparc(void) | 1058 | static void poke_hypersparc(void) |
1059 | { | 1059 | { |
1060 | volatile unsigned long clear; | 1060 | volatile unsigned long clear; |
1061 | unsigned long mreg = srmmu_get_mmureg(); | 1061 | unsigned long mreg = srmmu_get_mmureg(); |
@@ -1107,7 +1107,7 @@ static void __init init_hypersparc(void) | |||
1107 | hypersparc_setup_blockops(); | 1107 | hypersparc_setup_blockops(); |
1108 | } | 1108 | } |
1109 | 1109 | ||
1110 | static void __cpuinit poke_swift(void) | 1110 | static void poke_swift(void) |
1111 | { | 1111 | { |
1112 | unsigned long mreg; | 1112 | unsigned long mreg; |
1113 | 1113 | ||
@@ -1287,7 +1287,7 @@ static void turbosparc_flush_tlb_page(struct vm_area_struct *vma, unsigned long | |||
1287 | } | 1287 | } |
1288 | 1288 | ||
1289 | 1289 | ||
1290 | static void __cpuinit poke_turbosparc(void) | 1290 | static void poke_turbosparc(void) |
1291 | { | 1291 | { |
1292 | unsigned long mreg = srmmu_get_mmureg(); | 1292 | unsigned long mreg = srmmu_get_mmureg(); |
1293 | unsigned long ccreg; | 1293 | unsigned long ccreg; |
@@ -1350,7 +1350,7 @@ static void __init init_turbosparc(void) | |||
1350 | poke_srmmu = poke_turbosparc; | 1350 | poke_srmmu = poke_turbosparc; |
1351 | } | 1351 | } |
1352 | 1352 | ||
1353 | static void __cpuinit poke_tsunami(void) | 1353 | static void poke_tsunami(void) |
1354 | { | 1354 | { |
1355 | unsigned long mreg = srmmu_get_mmureg(); | 1355 | unsigned long mreg = srmmu_get_mmureg(); |
1356 | 1356 | ||
@@ -1391,7 +1391,7 @@ static void __init init_tsunami(void) | |||
1391 | tsunami_setup_blockops(); | 1391 | tsunami_setup_blockops(); |
1392 | } | 1392 | } |
1393 | 1393 | ||
1394 | static void __cpuinit poke_viking(void) | 1394 | static void poke_viking(void) |
1395 | { | 1395 | { |
1396 | unsigned long mreg = srmmu_get_mmureg(); | 1396 | unsigned long mreg = srmmu_get_mmureg(); |
1397 | static int smp_catch; | 1397 | static int smp_catch; |