irq_cfg provides a delivery mode for each interrupt. Use it instead
of the hardcoded APIC_DELIVERY_MODE_FIXED. This allows to compose
messages for NMI delivery mode which is required to implement a HPET-
based NMI watchdog.

No functional change as the default delivery mode is set to
APIC_DELIVERY_MODE_FIXED.

Cc: Andi Kleen <a...@linux.intel.com>
Cc: "Ravi V. Shankar" <ravi.v.shan...@intel.com>
Cc: Stephane Eranian <eran...@google.com>
Cc: io...@lists.linux-foundation.org
Cc: linuxppc-dev@lists.ozlabs.org
Reviewed-by: Tony Luck <tony.l...@intel.com>
Signed-off-by: Ricardo Neri <ricardo.neri-calde...@linux.intel.com>
---
Changes since v6:
 * Reworded changelog as per suggestion from Thomas.

Changes since v5:
 * Introduced this patch

Changes since v4:
 * N/A

Changes since v3:
 * N/A

Changes since v2:
 * N/A

Changes since v1:
 * N/A
---
 arch/x86/kernel/apic/apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 20d9a604da7c..352738238e52 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2562,7 +2562,7 @@ void __irq_msi_compose_msg(struct irq_cfg *cfg, struct 
msi_msg *msg,
        msg->arch_addr_lo.dest_mode_logical = apic->dest_mode_logical;
        msg->arch_addr_lo.destid_0_7 = cfg->dest_apicid & 0xFF;
 
-       msg->arch_data.delivery_mode = APIC_DELIVERY_MODE_FIXED;
+       msg->arch_data.delivery_mode = cfg->delivery_mode;
        msg->arch_data.vector = cfg->vector;
 
        msg->address_hi = X86_MSI_BASE_ADDRESS_HIGH;
-- 
2.25.1

Reply via email to