sparseirq: work around compiler optimizing away __weak functions

Impact: fix panic on null pointer with sparseirq

Some GCC versions seem to inline the weak global function,
when that function is empty.

Work it around, by making the functions return a (dummy) integer.

Signed-off-by: Yinghai <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Yinghai Lu
2008-12-26 02:05:47 -08:00
committed by Ingo Molnar
parent 793f7b12a0
commit 13a0c3c269
4 changed files with 17 additions and 11 deletions

View File

@@ -539,13 +539,14 @@ void __init __weak thread_info_cache_init(void)
{
}
void __init __weak arch_early_irq_init(void)
int __init __weak arch_early_irq_init(void)
{
return 0;
}
void __init __weak early_irq_init(void)
int __init __weak early_irq_init(void)
{
arch_early_irq_init();
return arch_early_irq_init();
}
asmlinkage void __init start_kernel(void)