Commit c9f29549 authored by Christoph Lameter's avatar Christoph Lameter Committed by Rusty Russell

lguest: Use this_cpu_ops

Use this_cpu_ops in a couple of places in lguest.
Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 85c06472
...@@ -824,7 +824,7 @@ static void __init lguest_init_IRQ(void) ...@@ -824,7 +824,7 @@ static void __init lguest_init_IRQ(void)
for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) { for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
/* Some systems map "vectors" to interrupts weirdly. Not us! */ /* 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) if (i != SYSCALL_VECTOR)
set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]); set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]);
} }
......
...@@ -1137,7 +1137,7 @@ void free_guest_pagetable(struct lguest *lg) ...@@ -1137,7 +1137,7 @@ void free_guest_pagetable(struct lguest *lg)
*/ */
void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages) 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; pte_t regs_pte;
#ifdef CONFIG_X86_PAE #ifdef CONFIG_X86_PAE
......
...@@ -90,8 +90,8 @@ static void copy_in_guest_info(struct lg_cpu *cpu, struct lguest_pages *pages) ...@@ -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 * meanwhile). If that's not the case, we pretend everything in the
* Guest has changed. * Guest has changed.
*/ */
if (__get_cpu_var(lg_last_cpu) != cpu || cpu->last_pages != pages) { if (__this_cpu_read(lg_last_cpu) != cpu || cpu->last_pages != pages) {
__get_cpu_var(lg_last_cpu) = cpu; __this_cpu_read(lg_last_cpu) = cpu;
cpu->last_pages = pages; cpu->last_pages = pages;
cpu->changed = CHANGED_ALL; cpu->changed = CHANGED_ALL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment