|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/HPET: drop .set_affinity hook
commit 5ec93b2f19ff8873fca65d38c1164b0a56d3898b
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jan 22 14:13:35 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jan 22 16:06:22 2026 +0100
x86/HPET: drop .set_affinity hook
No IRQ balancing is supposed to be happening on the broadcast IRQs. The
only entity responsible for fiddling with the CPU affinities is
set_channel_irq_affinity(). They shouldn't even be fiddled with when
offlining a CPU: A CPU going down can't at the same time be idle. Some
properties (->arch.cpu_mask in particular) may transiently reference an
offline CPU, but that'll be adjusted as soon as a channel goes into active
use again.
Along with adjusting fixup_irqs() (in a more general way, i.e. covering all
vectors which are marked in use globally), also adjust section placement of
used_vectors.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/arch/x86/hpet.c | 17 -----------------
xen/arch/x86/irq.c | 12 ++++++++----
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index 65253a3f6c..722a69ab13 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -296,22 +296,6 @@ static int hpet_msi_write(struct hpet_event_channel *ch,
struct msi_msg *msg)
#define hpet_msi_shutdown hpet_msi_mask
-static void cf_check hpet_msi_set_affinity(
- struct irq_desc *desc, const cpumask_t *mask)
-{
- struct hpet_event_channel *ch = desc->action->dev_id;
- struct msi_msg msg = ch->msi.msg;
-
- /* This really is only for dump_irqs(). */
- cpumask_copy(desc->arch.cpu_mask, mask);
-
- msg.dest32 = cpu_mask_to_apicid(mask);
- msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
- msg.address_lo |= MSI_ADDR_DEST_ID(msg.dest32);
- if ( msg.dest32 != ch->msi.msg.dest32 )
- hpet_msi_write(ch, &msg);
-}
-
/*
* IRQ Chip for MSI HPET Devices,
*/
@@ -323,7 +307,6 @@ static hw_irq_controller hpet_msi_type = {
.disable = hpet_msi_mask,
.ack = irq_actor_none,
.end = end_nonmaskable_irq,
- .set_affinity = hpet_msi_set_affinity,
};
static int __hpet_setup_msi_irq(struct irq_desc *desc)
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 7c3d6efd24..cc2934bfca 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -51,7 +51,7 @@ static vmask_t global_used_vector_map;
struct irq_desc __read_mostly *irq_desc = NULL;
-static DECLARE_BITMAP(used_vectors, X86_IDT_VECTORS);
+static DECLARE_BITMAP(used_vectors, X86_IDT_VECTORS) __ro_after_init;
static DEFINE_SPINLOCK(vector_lock);
@@ -2644,13 +2644,17 @@ void fixup_irqs(void)
spin_lock(&desc->lock);
vector = irq_to_vector(irq);
- if ( vector >= FIRST_HIPRIORITY_VECTOR &&
- vector <= LAST_HIPRIORITY_VECTOR &&
- desc->handler == &no_irq_type )
+ if ( (vector >= FIRST_HIPRIORITY_VECTOR &&
+ vector <= LAST_HIPRIORITY_VECTOR &&
+ desc->handler == &no_irq_type) ||
+ test_bit(vector, used_vectors) )
{
/*
* This can in particular happen when parking secondary threads
* during boot and when the serial console wants to use a PCI IRQ.
+ *
+ * Globally used vectors (like the HPET broadcast IRQ ones), need
+ * to be left alone in any event.
*/
spin_unlock(&desc->lock);
continue;
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |