x86/paravirt: Move the pv_irq_ops under the PARAVIRT_XXL umbrella
[linux-block.git] / arch / x86 / kernel / asm-offsets.c
index dcb008c320fe05c2f236993815f18f20ab6e9d5d..28e7572ff74d51f358fcf04b39b66affa6bc7023 100644 (file)
@@ -66,13 +66,12 @@ void common(void) {
 
 #ifdef CONFIG_PARAVIRT
        BLANK();
-       OFFSET(PARAVIRT_PATCH_pv_cpu_ops, paravirt_patch_template, pv_cpu_ops);
-       OFFSET(PARAVIRT_PATCH_pv_irq_ops, paravirt_patch_template, pv_irq_ops);
-       OFFSET(PV_IRQ_irq_disable, pv_irq_ops, irq_disable);
-       OFFSET(PV_IRQ_irq_enable, pv_irq_ops, irq_enable);
-       OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
-       OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0);
-       OFFSET(PV_MMU_read_cr2, pv_mmu_ops, read_cr2);
+#ifdef CONFIG_PARAVIRT_XXL
+       OFFSET(PV_IRQ_irq_disable, paravirt_patch_template, irq.irq_disable);
+       OFFSET(PV_IRQ_irq_enable, paravirt_patch_template, irq.irq_enable);
+       OFFSET(PV_CPU_iret, paravirt_patch_template, cpu.iret);
+#endif
+       OFFSET(PV_MMU_read_cr2, paravirt_patch_template, mmu.read_cr2);
 #endif
 
 #ifdef CONFIG_XEN
@@ -103,4 +102,9 @@ void common(void) {
        OFFSET(CPU_ENTRY_AREA_entry_trampoline, cpu_entry_area, entry_trampoline);
        OFFSET(CPU_ENTRY_AREA_entry_stack, cpu_entry_area, entry_stack_page);
        DEFINE(SIZEOF_entry_stack, sizeof(struct entry_stack));
+       DEFINE(MASK_entry_stack, (~(sizeof(struct entry_stack) - 1)));
+
+       /* Offset for sp0 and sp1 into the tss_struct */
+       OFFSET(TSS_sp0, tss_struct, x86_tss.sp0);
+       OFFSET(TSS_sp1, tss_struct, x86_tss.sp1);
 }