]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
lguest: Use this_cpu_ops
authorChristoph Lameter <cl@linux.com>
Tue, 30 Nov 2010 19:07:21 +0000 (13:07 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 20 Jan 2011 11:07:29 +0000 (21:37 +1030)
Use this_cpu_ops in a couple of places in lguest.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
arch/x86/lguest/boot.c
drivers/lguest/page_tables.c
drivers/lguest/x86/core.c

index 4996cf5f73a07db446c2fe3e1c9fe7070662b741..2902ee234614a1789e3fba5293a3e0d79dd0f3bd 100644 (file)
@@ -824,7 +824,7 @@ static void __init lguest_init_IRQ(void)
 
        for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
                /* Some systems map "vectors" to interrupts weirdly.  Not us! */
-               __get_cpu_var(vector_irq)[i] = i - FIRST_EXTERNAL_VECTOR;
+               __this_cpu_write(vector_irq[i]) = i - FIRST_EXTERNAL_VECTOR;
                if (i != SYSCALL_VECTOR)
                        set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]);
        }
index 04b22128a47421cac65a6dd73480ee56c87ded1d..d21578ee95dec6f4b07a05b9ff70aa07e64ecada 100644 (file)
@@ -1137,7 +1137,7 @@ void free_guest_pagetable(struct lguest *lg)
  */
 void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages)
 {
-       pte_t *switcher_pte_page = __get_cpu_var(switcher_pte_pages);
+       pte_t *switcher_pte_page = __this_cpu_read(switcher_pte_pages);
        pte_t regs_pte;
 
 #ifdef CONFIG_X86_PAE
index b4eb675a807e6c71f021de8c84133bd6c26bc50b..bd4b5910473b508692489b1d6bdcc5a403b69b35 100644 (file)
@@ -90,8 +90,8 @@ static void copy_in_guest_info(struct lg_cpu *cpu, struct lguest_pages *pages)
         * meanwhile).  If that's not the case, we pretend everything in the
         * Guest has changed.
         */
-       if (__get_cpu_var(lg_last_cpu) != cpu || cpu->last_pages != pages) {
-               __get_cpu_var(lg_last_cpu) = cpu;
+       if (__this_cpu_read(lg_last_cpu) != cpu || cpu->last_pages != pages) {
+               __this_cpu_read(lg_last_cpu) = cpu;
                cpu->last_pages = pages;
                cpu->changed = CHANGED_ALL;
        }