]> err.no Git - linux-2.6/commitdiff
x86: schedule work only if keventd is already running
authorGlauber de Oliveira Costa <gcosta@redhat.com>
Wed, 19 Mar 2008 17:25:41 +0000 (14:25 -0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:02 +0000 (17:41 +0200)
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>
arch/x86/kernel/smpboot_32.c

index 5cae17f3eb75b7acfb2bbea46ee38faa50f4ae33..255c6f7614809b9fd9d7af6fdbbf6372a23fb46c 100644 (file)
@@ -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();
 }