[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] arch/irq: Centralise no_irq_type
commit 03147e6837ff045dbc328be876b9600f7040c771 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Thu May 30 18:58:18 2024 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri May 31 22:03:30 2024 +0100 arch/irq: Centralise no_irq_type Having no_irq_type defined per arch, but using common callbacks is a mess, and is particualrly hard to bootstrap a new architecture with. Now that the ack()/end() hooks have been exported suitably, move the definition of no_irq_type into common/irq.c, and make it const too for good measure. No functional change, but a whole lot less tangled. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Julien Grall <jgrall@xxxxxxxxxx> Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> --- xen/arch/arm/irq.c | 10 ---------- xen/arch/ppc/stubs.c | 9 --------- xen/arch/x86/irq.c | 9 --------- xen/common/irq.c | 13 +++++++++++++ xen/include/xen/irq.h | 2 +- 5 files changed, 14 insertions(+), 29 deletions(-) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index 7138f9e7c2..e5fb26a3de 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -45,16 +45,6 @@ void irq_end_none(struct irq_desc *irq) gic_hw_ops->gic_host_irq_type->end(irq); } -hw_irq_controller no_irq_type = { - .typename = "none", - .startup = irq_startup_none, - .shutdown = irq_shutdown_none, - .enable = irq_enable_none, - .disable = irq_disable_none, - .ack = irq_ack_none, - .end = irq_end_none -}; - static irq_desc_t irq_desc[NR_IRQS]; static DEFINE_PER_CPU(irq_desc_t[NR_LOCAL_IRQS], local_irq_desc); diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index 4e03428e07..923f0e7b20 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -139,15 +139,6 @@ void irq_ack_none(struct irq_desc *desc) BUG_ON("unimplemented"); } -hw_irq_controller no_irq_type = { - .typename = "none", - .startup = irq_startup_none, - .shutdown = irq_shutdown_none, - .enable = irq_enable_none, - .disable = irq_disable_none, - .ack = irq_ack_none, -}; - int arch_init_one_irq_desc(struct irq_desc *desc) { BUG_ON("unimplemented"); diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index cfd7a08479..e36e06deaa 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -472,15 +472,6 @@ void cf_check irq_ack_none(struct irq_desc *desc) ack_bad_irq(desc->irq); } -hw_irq_controller no_irq_type = { - "none", - irq_startup_none, - irq_shutdown_none, - irq_enable_none, - irq_disable_none, - irq_ack_none, -}; - static vmask_t *irq_get_used_vector_mask(int irq) { vmask_t *ret = NULL; diff --git a/xen/common/irq.c b/xen/common/irq.c index 7225b46374..29729349a6 100644 --- a/xen/common/irq.c +++ b/xen/common/irq.c @@ -3,6 +3,19 @@ DEFINE_PER_CPU(const struct cpu_user_regs *, irq_regs); +const hw_irq_controller no_irq_type = { + .typename = "none", + .startup = irq_startup_none, + .shutdown = irq_shutdown_none, + .enable = irq_enable_none, + .disable = irq_disable_none, + .ack = irq_ack_none, + +#ifdef irq_end_none /* Hook is optional per arch */ + .end = irq_end_none, +#endif +}; + int init_one_irq_desc(struct irq_desc *desc) { int err; diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 8fa8ef2e50..adf33547d2 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -122,7 +122,7 @@ extern int request_irq(unsigned int irq, unsigned int irqflags, void (*handler)(int irq, void *dev_id), const char *devname, void *dev_id); -extern hw_irq_controller no_irq_type; +extern const hw_irq_controller no_irq_type; void cf_check no_action(int cpl, void *dev_id); unsigned int cf_check irq_startup_none(struct irq_desc *desc); void cf_check irq_actor_none(struct irq_desc *desc); -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |