Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96529
b: refs/heads/master
c: 61165d7
h: refs/heads/master
i:
  96527: a375be3
v: v3
  • Loading branch information
Hugh Dickins authored and Ingo Molnar committed May 13, 2008
1 parent 4b2be30 commit 0c6d2ed
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1dbd6608191cff854ab467e9880b7aeb2385ca39
refs/heads/master: 61165d7a035f6571c7576e7f51e7230157724c8d
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ native_smp_call_function_mask(cpumask_t mask,
wmb();

/* Send a message to other CPUs */
if (cpus_equal(mask, allbutself))
if (cpus_equal(mask, allbutself) &&
cpus_equal(cpu_online_map, cpu_callout_map))
send_IPI_allbutself(CALL_FUNCTION_VECTOR);
else
send_IPI_mask(mask, CALL_FUNCTION_VECTOR);
Expand Down
24 changes: 17 additions & 7 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void *x86_bios_cpu_apicid_early_ptr;

#ifdef CONFIG_X86_32
u8 apicid_2_node[MAX_APICID];
static int low_mappings;
#endif

/* State of each CPU */
Expand Down Expand Up @@ -326,6 +327,12 @@ static void __cpuinit start_secondary(void *unused)
enable_8259A_irq(0);
}

#ifdef CONFIG_X86_32
while (low_mappings)
cpu_relax();
__flush_tlb_all();
#endif

/* This must be done before setting cpu_online_map */
set_cpu_sibling_map(raw_smp_processor_id());
wmb();
Expand Down Expand Up @@ -1040,14 +1047,20 @@ int __cpuinit native_cpu_up(unsigned int cpu)
#ifdef CONFIG_X86_32
/* init low mem mapping */
clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY,
min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
flush_tlb_all();
#endif
low_mappings = 1;

err = do_boot_cpu(apicid, cpu);
if (err < 0) {

zap_low_mappings();
low_mappings = 0;
#else
err = do_boot_cpu(apicid, cpu);
#endif
if (err) {
Dprintk("do_boot_cpu failed %d\n", err);
return err;
return -EIO;
}

/*
Expand Down Expand Up @@ -1259,9 +1272,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
setup_ioapic_dest();
#endif
check_nmi_watchdog();
#ifdef CONFIG_X86_32
zap_low_mappings();
#endif
}

#ifdef CONFIG_HOTPLUG_CPU
Expand Down
12 changes: 1 addition & 11 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,6 @@ void zap_low_mappings(void)
{
int i;

save_pg_dir();

/*
* Zap initial low-memory mappings.
*
Expand Down Expand Up @@ -663,16 +661,8 @@ void __init mem_init(void)
test_wp_bit();

cpa_init();

/*
* Subtle. SMP is doing it's boot stuff late (because it has to
* fork idle threads) - but it also needs low mappings for the
* protected-mode entry to work. We zap these entries only after
* the WP-bit has been tested.
*/
#ifndef CONFIG_SMP
save_pg_dir();
zap_low_mappings();
#endif
}

#ifdef CONFIG_MEMORY_HOTPLUG
Expand Down

0 comments on commit 0c6d2ed

Please sign in to comment.