android_kernel_xiaomi_sm8350/arch/parisc/kernel
Gautham R Shenoy b282b6f8a8 [PATCH] Change cpu_up and co from __devinit to __cpuinit
Compiling the kernel with CONFIG_HOTPLUG = y and CONFIG_HOTPLUG_CPU = n
with CONFIG_RELOCATABLE = y generates the following modpost warnings

WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141b7d) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141b9c) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.text:__cpu_up
from .text between '_cpu_up' (at offset 0xc0141bd8) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c05) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c26) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c37) and 'cpu_up'

This is because cpu_up, _cpu_up and __cpu_up (in some architectures) are
defined as __devinit
AND
__cpu_up calls some __cpuinit functions.

Since __cpuinit would map to __init with this kind of a configuration,
we get a .text refering .init.data warning.

This patch solves the problem by converting all of __cpu_up, _cpu_up
and cpu_up from __devinit to __cpuinit. The approach is justified since
the callers of cpu_up are either dependent on CONFIG_HOTPLUG_CPU or
are of __init type.

Thus when CONFIG_HOTPLUG_CPU=y, all these cpu up functions would land up
in .text section, and when CONFIG_HOTPLUG_CPU=n, all these functions would
land up in .init section.

Tested on a i386 SMP machine running linux-2.6.20-rc3-mm1.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:20 -08:00
..
asm-offsets.c
binfmt_elf32.c [PATCH] elf: Always define elf_addr_t in linux/elf.h 2006-12-07 08:39:38 -08:00
cache.c [PARISC] Export clear_user_page to modules 2006-10-04 06:51:16 -06:00
drivers.c [PA-RISC] Fix boot breakage 2006-10-07 05:18:15 -06:00
entry.S [PARISC] [BUGFIX] nullify branch delay slot of the jump back to 2006-10-04 06:47:15 -06:00
firmware.c [PARISC] Make firmware calls irqsafe-ish... 2006-10-07 05:21:03 -06:00
hardware.c [PARISC] Add hardware found in the rp8400 2006-10-04 06:49:06 -06:00
head.S Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
hpmc.S
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
inventory.c
irq.c [PARISC] Use set_irq_regs 2006-10-07 05:11:07 -06:00
Makefile
module.c [PATCH] Fix conflict with the is_init identifier on parisc 2006-09-29 09:18:12 -07:00
pa7300lc.c
pacache.S
parisc_ksyms.c [PATCH] remove bogus arch-specific syscall exports 2006-10-11 11:17:07 -07:00
pci-dma.c
pci.c [PA-RISC] Remove warning from pci.c 2006-10-05 01:48:18 +00:00
pdc_chassis.c
pdc_cons.c
perf_asm.S
perf_images.h
perf.c
process.c [PATCH] rename the provided execve functions to kernel_execve 2006-10-02 07:57:23 -07:00
processor.c [PARISC] Prevent processor_probe() from clobbering cpu_data[0] 2006-10-04 06:47:57 -06:00
ptrace.c
real2.S
semaphore.c
setup.c
signal32.c
signal32.h
signal.c [PARISC] Switch is_compat_task to use TIF_32BIT 2006-10-04 06:46:42 -06:00
smp.c [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
sys32.h
sys_parisc32.c [PA-RISC] Fix filldir warnings 2006-10-05 01:48:17 +00:00
sys_parisc.c [PA-RISC] Fix parisc_newuname() 2006-10-05 01:48:18 +00:00
syscall_table.S [PARISC] Allow overriding personality with sys_personality 2006-10-04 06:46:53 -06:00
syscall.S Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
time.c [PARISC] More pt_regs removal 2006-10-07 06:01:11 -06:00
topology.c
traps.c [PARISC] Honour "panic_on_oops" sysctl 2006-10-04 06:51:35 -06:00
unaligned.c
unwind.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
vmlinux.lds.S [PATCH] vmlinux.lds: consolidate initcall sections 2006-10-27 15:34:51 -07:00