Skip to content

Commit bc5e8e2

Browse files
jgross1bp3tk0v
authored andcommitted
x86/xen: Drop xen_irq_ops
Instead of having a pre-filled array xen_irq_ops for Xen PV paravirt functions, drop the array and assign each element individually. This is in preparation of reducing the paravirt include hell by splitting paravirt.h into multiple more fine grained header files, which will in turn require to split up the pv_ops vector as well. Dropping the pre-filled array makes life easier for objtool to detect missing initializers in multiple pv_ops_ arrays. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Link: https://patch.msgid.link/20260105110520.21356-16-jgross@suse.com
1 parent 574b3eb commit bc5e8e2

2 files changed

Lines changed: 7 additions & 14 deletions

File tree

arch/x86/xen/irq.c

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,14 @@ static void xen_halt(void)
4040
xen_safe_halt();
4141
}
4242

43-
static const typeof(pv_ops) xen_irq_ops __initconst = {
44-
.irq = {
45-
/* Initial interrupt flag handling only called while interrupts off. */
46-
.save_fl = __PV_IS_CALLEE_SAVE(paravirt_ret0),
47-
.irq_disable = __PV_IS_CALLEE_SAVE(paravirt_nop),
48-
.irq_enable = __PV_IS_CALLEE_SAVE(BUG_func),
49-
50-
.safe_halt = xen_safe_halt,
51-
.halt = xen_halt,
52-
},
53-
};
54-
5543
void __init xen_init_irq_ops(void)
5644
{
57-
pv_ops.irq = xen_irq_ops.irq;
45+
/* Initial interrupt flag handling only called while interrupts off. */
46+
pv_ops.irq.save_fl = __PV_IS_CALLEE_SAVE(paravirt_ret0);
47+
pv_ops.irq.irq_disable = __PV_IS_CALLEE_SAVE(paravirt_nop);
48+
pv_ops.irq.irq_enable = __PV_IS_CALLEE_SAVE(BUG_func);
49+
pv_ops.irq.safe_halt = xen_safe_halt;
50+
pv_ops.irq.halt = xen_halt;
51+
5852
x86_init.irqs.intr_init = xen_init_IRQ;
5953
}

tools/objtool/check.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,6 @@ static int init_pv_ops(struct objtool_file *file)
571571
static const char *pv_ops_tables[] = {
572572
"pv_ops",
573573
"xen_cpu_ops",
574-
"xen_irq_ops",
575574
"xen_mmu_ops",
576575
NULL,
577576
};

0 commit comments

Comments
 (0)