diff options
Diffstat (limited to 'arch/x86/machine/pmap.c')
-rw-r--r-- | arch/x86/machine/pmap.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c index 4a8c437a..673c6794 100644 --- a/arch/x86/machine/pmap.c +++ b/arch/x86/machine/pmap.c @@ -195,6 +195,7 @@ struct pmap_update_data { } __aligned(CPU_L1_SIZE); static struct pmap_update_data pmap_update_data[MAX_CPUS]; +static int pmap_allow_remote_updates __read_mostly; /* * Global list of physical maps. @@ -707,7 +708,7 @@ pmap_update(struct pmap *pmap, unsigned long start, unsigned long end) pmap_assert_range(pmap, start, end); - if (cpu_count() == 1) { + if (!pmap_allow_remote_updates) { pmap_update_local(pmap, start, end); return; } @@ -875,6 +876,15 @@ pmap_setup(void) pmap_ready = 1; } +void __init +pmap_mp_setup(void) +{ + if (cpu_count() == 1) + return; + + pmap_allow_remote_updates = 1; +} + int pmap_create(struct pmap **pmapp) { |