lkml.org 
[lkml]   [2014]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC Patch Part1 V1 15/30] x86, irq: update high address field when updating affinity for MSI IRQ
Date
If x2apic is enabled, the MSI high address field should also be aslo
updated when setting affinity for MSI IRQ, otherwise the MSI IRQ may
target wrong APIC IDs.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
arch/x86/kernel/apic/io_apic.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8d6e4c7e7011..b74ec1183d34 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3073,6 +3073,10 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force)

__get_cached_msi_msg(data->msi_desc, &msg);

+ msg.address_hi = MSI_ADDR_BASE_HI;
+ if (x2apic_enabled())
+ msg.address_hi |= MSI_ADDR_EXT_DEST_ID(dest);
+
msg.data &= ~MSI_DATA_VECTOR_MASK;
msg.data |= MSI_DATA_VECTOR(cfg->vector);
msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
--
1.7.10.4


\
 
 \ /
  Last update: 2014-05-16 10:41    [W:0.177 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site