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

Commit 6c81c32f authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds
Browse files

calibrate_delay() must be __cpuinit



calibrate_delay() must be __cpuinit, not __{dev,}init.

I've verified that this is correct for all users.

While doing the latter, I also did the following cleanups:
- remove pointless additional prototypes in C files
- ensure all users #include <linux/delay.h>

This fixes the following section mismatches with CONFIG_HOTPLUG=n,
CONFIG_HOTPLUG_CPU=y:

WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christian Zankel <chris@zankel.net>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent eb38a996
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -77,10 +77,6 @@ int smp_num_probed; /* Internal processor count */
int smp_num_cpus = 1;		/* Number that came online.  */
EXPORT_SYMBOL(smp_num_cpus);

extern void calibrate_delay(void);



/*
 * Called by both boot and secondaries to move global data into
 *  per-processor storage.
+1 −1
Original line number Diff line number Diff line
@@ -708,7 +708,7 @@ static void __init reserve_dma_coherent(void)
/*
 * calibrate the delay loop
 */
void __init calibrate_delay(void)
void __cpuinit calibrate_delay(void)
{
	loops_per_jiffy = __delay_loops_MHz * (1000000 / HZ);

+0 −1
Original line number Diff line number Diff line
@@ -120,7 +120,6 @@ static volatile unsigned long go[SLAVE + 1];

#define DEBUG_ITC_SYNC	0

extern void __devinit calibrate_delay (void);
extern void start_ap (void);
extern unsigned long ia64_iobase;

+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
EXPORT_SYMBOL(phys_cpu_present_map);
EXPORT_SYMBOL(cpu_online_map);

extern void __init calibrate_delay(void);
extern void cpu_idle(void);

/* Number of TCs (or siblings in Intel speak) per CPU core */
+0 −2
Original line number Diff line number Diff line
@@ -113,8 +113,6 @@ static inline void debug_calc_bogomips(void)
	 * result. We backup/restore the value to avoid affecting the
	 * core cpufreq framework's own calculation.
	 */
	extern void calibrate_delay(void);

	unsigned long save_lpj = loops_per_jiffy;
	calibrate_delay();
	loops_per_jiffy = save_lpj;
Loading