aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-03-19 14:25:41 -0300
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:41:02 +0200
commit802b8133b4f78c30a2668d142d78861e27c0c6a7 (patch)
tree19d7e0a9ae8046a22e4cb0ce0585299ebb66e7ed /arch
parente7f8b14e028f7a2f9e5c83c17164aeeeb9c61f17 (diff)
x86: schedule work only if keventd is already running
Only call schedule_work if keventd is already running. This is already the way x86_64 does Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/smpboot_32.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index 5cae17f3eb7..255c6f76148 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -708,8 +708,12 @@ static void __cpuinit __smp_prepare_cpu(int cpu)
clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS));
flush_tlb_all();
- schedule_work(&info.task);
- wait_for_completion(&done);
+ if (!keventd_up() || current_is_keventd())
+ info.task.func(&info.task);
+ else {
+ schedule_work(&info.task);
+ wait_for_completion(&done);
+ }
zap_low_mappings();
}