]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/x86/kernel/apic/x2apic_uv_x.c
x86: Use this_cpu_ops to optimize code
[mv-sheeva.git] / arch / x86 / kernel / apic / x2apic_uv_x.c
index c1c52c341f40a607be5b252746db31f36b8dc561..26ec9a7c3518267b25d718b22af733ed2eef8b6c 100644 (file)
@@ -118,8 +118,8 @@ static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
                else if (!strcmp(oem_table_id, "UVX"))
                        uv_system_type = UV_X2APIC;
                else if (!strcmp(oem_table_id, "UVH")) {
-                       __get_cpu_var(x2apic_extra_bits) =
-                               nodeid << (uvh_apicid.s.pnode_shift - 1);
+                       __this_cpu_write(x2apic_extra_bits,
+                               nodeid << (uvh_apicid.s.pnode_shift - 1));
                        uv_system_type = UV_NON_UNIQUE_APIC;
                        uv_set_apicid_hibit();
                        return 1;
@@ -284,7 +284,7 @@ static unsigned int x2apic_get_apic_id(unsigned long x)
        unsigned int id;
 
        WARN_ON(preemptible() && num_online_cpus() > 1);
-       id = x | __get_cpu_var(x2apic_extra_bits);
+       id = x | __this_cpu_read(x2apic_extra_bits);
 
        return id;
 }
@@ -376,7 +376,7 @@ struct apic __refdata apic_x2apic_uv_x = {
 
 static __cpuinit void set_x2apic_extra_bits(int pnode)
 {
-       __get_cpu_var(x2apic_extra_bits) = (pnode << 6);
+       __this_cpu_write(x2apic_extra_bits, (pnode << 6));
 }
 
 /*