Skip to contentSkip to conversation

hrtimer: fix section mismatch

PATCH In review Randy Dunlap 2 participants 3 messages Jan 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hrtimer: fix section mismatch

From: Randy Dunlap <[email protected]>

Fix section mismatch in hrtimer.c:

WARNING: vmlinux.o(.text+0x50c61): Section mismatch: reference to .init.text: (between 'hrtimer_cpu_notify' and 'down_read_trylock')

Noticed by Johannes Berg and confirmed by Sam Ravnborg.

---
 kernel/hrtimer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/hrtimer.c +1 -1
@@ -1378,7 +1378,7 @@ sys_nanosleep(struct timespec __user *rq
 /*
  * Functions related to boot-time initialization:
  */
-static void __devinit init_hrtimers_cpu(int cpu)
+static void __cpuinit init_hrtimers_cpu(int cpu)
 {
 	struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu);
 	int i;
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Fix section mismatch in hrtimer.c:

WARNING: vmlinux.o(.text+0x50c61): Section mismatch: reference to .init.text: (between 'hrtimer_cpu_notify' and 'down_read_trylock')

Noticed by Johannes Berg and confirmed by Sam Ravnborg.

Quoted 20 lines
---
 kernel/hrtimer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/hrtimer.c +1 -2
@@ -1378,7 +1378,7 @@ sys_nanosleep(struct timespec __user *rq
 /*
  * Functions related to boot-time initialization:
  */
-static void __devinit init_hrtimers_cpu(int cpu)
+static void __cpuinit init_hrtimers_cpu(int cpu)
 {
 	struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu);
 	int i;
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
Quoted 11 lines · Sam Ravnborg
Quoted 9 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Fix section mismatch in hrtimer.c:

WARNING: vmlinux.o(.text+0x50c61): Section mismatch: reference to .init.text: (between 'hrtimer_cpu_notify' and 'down_read_trylock')

Noticed by Johannes Berg and confirmed by Sam Ravnborg.

And looking at bit closer this looks like a 2.6.24 candidate. With:
CONFIG_HOTPLUG=n
CONFIG_HOTPLUG_CPU=y

then we may see a call to init_hrtimers_cpu() from hrtimer_cpu_notify() in the:
case CPU_UP_PREPARE:
case CPU_UP_PREPARE_FROZEN:
cases.

And this will oops.

[It these a cases will be hit I dunno - I just follow the logic of the code here.]

Sam

Quoted 26 lines
Quoted 17 lines
---
 kernel/hrtimer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/hrtimer.c +1 -2
@@ -1378,7 +1378,7 @@ sys_nanosleep(struct timespec __user *rq
 /*
  * Functions related to boot-time initialization:
  */
-static void __devinit init_hrtimers_cpu(int cpu)
+static void __cpuinit init_hrtimers_cpu(int cpu)
 {
 	struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu);
 	int i;
--
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/