]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
arch/irq: Make irq_ack_none() mandatory
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 30 May 2024 18:00:45 +0000 (19:00 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 31 May 2024 21:03:30 +0000 (22:03 +0100)
Any non-stub implementation is going to have to do something here.

The related hook irq_end_none() is more complicated and has arch-specific
interactions with irq_ack_none(), so make it optional.

For PPC, introduce a stub irq_ack_none().

For ARM and x86, export the existing {ack,end}_none() helpers, gaining an irq_
prefix for consisntency with everything else in no_irq_type.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/arch/arm/include/asm/irq.h
xen/arch/arm/irq.c
xen/arch/ppc/stubs.c
xen/arch/x86/irq.c
xen/include/xen/irq.h

index 1bae5388878ea2f8ca99b98ecf2258725f5a7446..ec437add0971e3ba747969fe31ebaed14a59e3a2 100644 (file)
@@ -98,6 +98,9 @@ void irq_set_affinity(struct irq_desc *desc, const cpumask_t *mask);
  */
 bool irq_type_set_by_domain(const struct domain *d);
 
+void irq_end_none(struct irq_desc *irq);
+#define irq_end_none irq_end_none
+
 #endif /* _ASM_HW_IRQ_H */
 /*
  * Local variables:
index bcce80a4d624872c1c7047b29fccca2ce2d79211..7138f9e7c283712bdaa4227f2d5f679b2fb49a0b 100644 (file)
@@ -31,12 +31,12 @@ struct irq_guest
     unsigned int virq;
 };
 
-static void ack_none(struct irq_desc *irq)
+void irq_ack_none(struct irq_desc *irq)
 {
     printk("unexpected IRQ trap at irq %02x\n", irq->irq);
 }
 
-static void end_none(struct irq_desc *irq)
+void irq_end_none(struct irq_desc *irq)
 {
     /*
      * Still allow a CPU to end an interrupt if we receive a spurious
@@ -51,8 +51,8 @@ hw_irq_controller no_irq_type = {
     .shutdown = irq_shutdown_none,
     .enable = irq_enable_none,
     .disable = irq_disable_none,
-    .ack = ack_none,
-    .end = end_none
+    .ack = irq_ack_none,
+    .end = irq_end_none
 };
 
 static irq_desc_t irq_desc[NR_IRQS];
index da193839bd094eb186b03995bd50e092be2ebcc8..4e03428e071adef8fc65547b12464c4f7ce2a723 100644 (file)
@@ -134,12 +134,18 @@ void pirq_set_affinity(struct domain *d, int pirq, const cpumask_t *mask)
     BUG_ON("unimplemented");
 }
 
+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)
index c16205a9beb64b7fef00074d5728167d4d1f3281..cfd7a08479d25ca073c58130f4a046c95171306d 100644 (file)
@@ -467,7 +467,7 @@ int __init init_irq_data(void)
     return 0;
 }
 
-static void cf_check ack_none(struct irq_desc *desc)
+void cf_check irq_ack_none(struct irq_desc *desc)
 {
     ack_bad_irq(desc->irq);
 }
@@ -478,7 +478,7 @@ hw_irq_controller no_irq_type = {
     irq_shutdown_none,
     irq_enable_none,
     irq_disable_none,
-    ack_none,
+    irq_ack_none,
 };
 
 static vmask_t *irq_get_used_vector_mask(int irq)
index 89f7a8317a87216609d9c0776983846e5484e19f..8fa8ef2e502dd48cab43e279ced42aa88d6eeda8 100644 (file)
@@ -130,6 +130,12 @@ void cf_check irq_actor_none(struct irq_desc *desc);
 #define irq_disable_none irq_actor_none
 #define irq_enable_none irq_actor_none
 
+/*
+ * irq_ack_none() must be provided by the architecture.
+ * irq_end_none() is optional, and opted into using a define.
+ */
+void cf_check irq_ack_none(struct irq_desc *irq);
+
 /*
  * Per-cpu interrupted context register state - the inner-most interrupt frame
  * on the stack.