diff options
Diffstat (limited to 'arch/x86/kernel/tlb_uv.c')
-rw-r--r-- | arch/x86/kernel/tlb_uv.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c index d038b9c45cf8..deb5ebb32c3b 100644 --- a/arch/x86/kernel/tlb_uv.c +++ b/arch/x86/kernel/tlb_uv.c | |||
@@ -275,6 +275,8 @@ const struct cpumask *uv_flush_send_and_wait(int cpu, int this_blade, | |||
275 | return NULL; | 275 | return NULL; |
276 | } | 276 | } |
277 | 277 | ||
278 | static DEFINE_PER_CPU(cpumask_var_t, uv_flush_tlb_mask); | ||
279 | |||
278 | /** | 280 | /** |
279 | * uv_flush_tlb_others - globally purge translation cache of a virtual | 281 | * uv_flush_tlb_others - globally purge translation cache of a virtual |
280 | * address or all TLB's | 282 | * address or all TLB's |
@@ -304,8 +306,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | |||
304 | struct mm_struct *mm, | 306 | struct mm_struct *mm, |
305 | unsigned long va, unsigned int cpu) | 307 | unsigned long va, unsigned int cpu) |
306 | { | 308 | { |
307 | static DEFINE_PER_CPU(cpumask_t, flush_tlb_mask); | 309 | struct cpumask *flush_mask = __get_cpu_var(uv_flush_tlb_mask); |
308 | struct cpumask *flush_mask = &__get_cpu_var(flush_tlb_mask); | ||
309 | int i; | 310 | int i; |
310 | int bit; | 311 | int bit; |
311 | int blade; | 312 | int blade; |
@@ -750,16 +751,21 @@ static int __init uv_bau_init(void) | |||
750 | int node; | 751 | int node; |
751 | int nblades; | 752 | int nblades; |
752 | int last_blade; | 753 | int last_blade; |
753 | int cur_cpu = 0; | 754 | int cur_cpu; |
754 | 755 | ||
755 | if (!is_uv_system()) | 756 | if (!is_uv_system()) |
756 | return 0; | 757 | return 0; |
757 | 758 | ||
759 | for_each_possible_cpu(cur_cpu) | ||
760 | alloc_cpumask_var_node(&per_cpu(uv_flush_tlb_mask, cur_cpu), | ||
761 | GFP_KERNEL, cpu_to_node(cur_cpu)); | ||
762 | |||
758 | uv_bau_retry_limit = 1; | 763 | uv_bau_retry_limit = 1; |
759 | uv_nshift = uv_hub_info->n_val; | 764 | uv_nshift = uv_hub_info->n_val; |
760 | uv_mmask = (1UL << uv_hub_info->n_val) - 1; | 765 | uv_mmask = (1UL << uv_hub_info->n_val) - 1; |
761 | nblades = 0; | 766 | nblades = 0; |
762 | last_blade = -1; | 767 | last_blade = -1; |
768 | cur_cpu = 0; | ||
763 | for_each_online_node(node) { | 769 | for_each_online_node(node) { |
764 | blade = uv_node_to_blade_id(node); | 770 | blade = uv_node_to_blade_id(node); |
765 | if (blade == last_blade) | 771 | if (blade == last_blade) |