]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/tlb_uv.c
Merge branch 'x86/uv' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux...
[karo-tx-linux.git] / arch / x86 / kernel / tlb_uv.c
index 78422336ddea55fd3719d9f9e11d6d174cd48278..ed0c33761e6d1d75bf0b435c490384e2cd8b31dd 100644 (file)
@@ -305,6 +305,8 @@ const struct cpumask *uv_flush_send_and_wait(int cpu, int this_pnode,
        return NULL;
 }
 
+static DEFINE_PER_CPU(cpumask_var_t, uv_flush_tlb_mask);
+
 /**
  * uv_flush_tlb_others - globally purge translation cache of a virtual
  * address or all TLB's
@@ -334,8 +336,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
                                          struct mm_struct *mm,
                                          unsigned long va, unsigned int cpu)
 {
-       static DEFINE_PER_CPU(cpumask_t, flush_tlb_mask);
-       struct cpumask *flush_mask = &__get_cpu_var(flush_tlb_mask);
+       struct cpumask *flush_mask = __get_cpu_var(uv_flush_tlb_mask);
        int i;
        int bit;
        int pnode;
@@ -830,6 +831,10 @@ static int __init uv_bau_init(void)
        if (!is_uv_system())
                return 0;
 
+       for_each_possible_cpu(cur_cpu)
+               alloc_cpumask_var_node(&per_cpu(uv_flush_tlb_mask, cur_cpu),
+                                      GFP_KERNEL, cpu_to_node(cur_cpu));
+
        uv_bau_retry_limit = 1;
        uv_nshift = uv_hub_info->n_val;
        uv_mmask = (1UL << uv_hub_info->n_val) - 1;