Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 514a20a5 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Linus Torvalds
Browse files

cpu: fix section mismatch warnings in *cpu_down



Fix following warnings:
WARNING: vmlinux.o(.text+0x75c8d): Section mismatch in reference from the function take_cpu_down() to the variable .cpuinit.data:cpu_chain
WARNING: vmlinux.o(.text+0x75d2a): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain
WARNING: vmlinux.o(.text+0x75d4d): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain
WARNING: vmlinux.o(.text+0x75de4): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain
WARNING: vmlinux.o(.text+0x75e33): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain

cpu_down is only used from code surrounded by HOTPLUG_CPU so any references to
__cpuinit is OK.

Add a few __ref to tech modpost to ignore the references.

This is just papering over the fact that the cpu hotplug code is fragile with
respect to use of HOTPLUG_CPU and in many cases rely on __cpuinit to get rid
of code when HOTPLUG_CPU is not enabled.  For now this is the least invasive
change.

Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9647155f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ struct take_cpu_down_param {
};

/* Take this CPU down. */
static int take_cpu_down(void *_param)
static int __ref take_cpu_down(void *_param)
{
	struct take_cpu_down_param *param = _param;
	int err;
@@ -199,7 +199,7 @@ static int take_cpu_down(void *_param)
}

/* Requires cpu_add_remove_lock to be held */
static int _cpu_down(unsigned int cpu, int tasks_frozen)
static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
{
	int err, nr_calls = 0;
	struct task_struct *p;
@@ -274,7 +274,7 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen)
	return err;
}

int cpu_down(unsigned int cpu)
int __ref cpu_down(unsigned int cpu)
{
	int err = 0;