Skip to content

Commit

Permalink
[SPARC64]: Fix stack overflow checking in modular non-SMP kernels.
Browse files Browse the repository at this point in the history
The sparc64 kernel's EXPORT_SYMBOL(_mcount) is inside an
#ifdef CONFIG_SMP. This breaks modules in non-SMP kernels
built with stack overflow checking (CONFIG_STACK_DEBUG=y),
as modules_install reports:

WARNING: /lib/modules/2.6.17/kernel/drivers/ide/ide-cd.ko needs unknown symbol _mcount

Trivially fixed by moving EXPORT_SYMBOL(_mcount) outside of
the #ifdef CONFIG_SMP.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mikael Pettersson authored and David S. Miller committed Jul 6, 2006
1 parent 7233589 commit 37e64e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/sparc64/kernel/sparc64_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,18 @@ EXPORT_SYMBOL(__write_lock);
EXPORT_SYMBOL(__write_unlock);
EXPORT_SYMBOL(__write_trylock);

#if defined(CONFIG_MCOUNT)
extern void _mcount(void);
EXPORT_SYMBOL(_mcount);
#endif

/* CPU online map and active count. */
EXPORT_SYMBOL(cpu_online_map);
EXPORT_SYMBOL(phys_cpu_present_map);

EXPORT_SYMBOL(smp_call_function);
#endif /* CONFIG_SMP */

#if defined(CONFIG_MCOUNT)
extern void _mcount(void);
EXPORT_SYMBOL(_mcount);
#endif

EXPORT_SYMBOL(sparc64_get_clock_tick);

/* semaphores */
Expand Down

0 comments on commit 37e64e5

Please sign in to comment.