]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/kernel/process.c
x86: delete __cpuinit usage from all x86 files
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Tue, 18 Jun 2013 22:23:59 +0000 (18:23 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 14 Jul 2013 23:36:56 +0000 (19:36 -0400)
commit148f9bb87745ed45f7a11b2cbd3bc0f017d5d257
tree88a21d992eae94a05cc30ddbc2c71465701ec3aa
parent70e2a7bf23a0c412b908ba260e790a4f51c9f2b0
x86: delete __cpuinit usage from all x86 files

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/x86 uses of the __cpuinit macros from
all C files.  x86 only had the one __CPUINIT used in assembly files,
and it wasn't paired off with a .previous or a __FINIT, so we can
delete it directly w/o any corresponding additional change there.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
71 files changed:
arch/x86/include/asm/cpu.h
arch/x86/include/asm/microcode.h
arch/x86/include/asm/microcode_amd.h
arch/x86/include/asm/microcode_intel.h
arch/x86/include/asm/mmconfig.h
arch/x86/include/asm/mpspec.h
arch/x86/include/asm/numa.h
arch/x86/include/asm/processor.h
arch/x86/include/asm/prom.h
arch/x86/include/asm/smp.h
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/apic_numachip.c
arch/x86/kernel/apic/es7000_32.c
arch/x86/kernel/apic/numaq_32.c
arch/x86/kernel/apic/x2apic_cluster.c
arch/x86/kernel/apic/x2apic_uv_x.c
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/centaur.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/cyrix.c
arch/x86/kernel/cpu/hypervisor.c
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/intel_cacheinfo.c
arch/x86/kernel/cpu/mcheck/mce.c
arch/x86/kernel/cpu/mcheck/mce_amd.c
arch/x86/kernel/cpu/mcheck/therm_throt.c
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/cpu/perf_event_amd_ibs.c
arch/x86/kernel/cpu/perf_event_amd_uncore.c
arch/x86/kernel/cpu/perf_event_intel_uncore.c
arch/x86/kernel/cpu/rdrand.c
arch/x86/kernel/cpu/scattered.c
arch/x86/kernel/cpu/topology.c
arch/x86/kernel/cpu/transmeta.c
arch/x86/kernel/cpu/umc.c
arch/x86/kernel/cpu/vmware.c
arch/x86/kernel/cpuid.c
arch/x86/kernel/devicetree.c
arch/x86/kernel/head_32.S
arch/x86/kernel/i387.c
arch/x86/kernel/irq_32.c
arch/x86/kernel/kvm.c
arch/x86/kernel/kvmclock.c
arch/x86/kernel/microcode_amd_early.c
arch/x86/kernel/microcode_core.c
arch/x86/kernel/microcode_core_early.c
arch/x86/kernel/microcode_intel_early.c
arch/x86/kernel/mmconf-fam10h_64.c
arch/x86/kernel/msr.c
arch/x86/kernel/process.c
arch/x86/kernel/setup.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/tboot.c
arch/x86/kernel/tsc.c
arch/x86/kernel/tsc_sync.c
arch/x86/kernel/vsyscall_64.c
arch/x86/kernel/x86_init.c
arch/x86/kernel/xsave.c
arch/x86/mm/mmio-mod.c
arch/x86/mm/numa.c
arch/x86/mm/numa_emulation.c
arch/x86/mm/setup_nx.c
arch/x86/pci/amd_bus.c
arch/x86/platform/ce4100/ce4100.c
arch/x86/platform/mrst/mrst.c
arch/x86/xen/enlighten.c
arch/x86/xen/setup.c
arch/x86/xen/smp.c
arch/x86/xen/spinlock.c
arch/x86/xen/xen-ops.h