From: Andrew Cooper <andrew.cooper3@citrix.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Joerg Roedel <joro@8bytes.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
David Woodhouse <dwmw2@infradead.org>,
Lu Baolu <baolu.lu@linux.intel.com>, <iommu@lists.linux.dev>,
<x86@vger.kernel.org>
Subject: x86/apic: Further apic::delivery_mode cleanup
Date: Tue, 21 Nov 2023 12:18:49 +0000 [thread overview]
Message-ID: <20231121121849.1441264-1-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <20231121120411.GDZVycu2OPzz8Jqq4Z@fat_crate.local>
Fold the APIC_DELIVERY_MODE_FIXED constant in more cases now that the apic
field has disappeared.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Joerg Roedel <joro@8bytes.org>
CC: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
CC: Will Deacon <will@kernel.org>
CC: Robin Murphy <robin.murphy@arm.com>
CC: David Woodhouse <dwmw2@infradead.org>
CC: Lu Baolu <baolu.lu@linux.intel.com>
CC: iommu@lists.linux.dev
CC: linux-kernel@vger.kernel.org
CC: x86@vger.kernel.org
Does this want a fixes tag? If so,
Fixes: b5148dfe66f5 ("x86/apic: Drop apic::delivery_mode")
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 95bd7c25ba6f..542b823f9827 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -3311,7 +3311,7 @@ static void irq_remapping_prepare_irte(struct amd_ir_data *data,
data->irq_2_irte.devid = devid;
data->irq_2_irte.index = index + sub_handle;
- iommu->irte_ops->prepare(data->entry, apic->delivery_mode,
+ iommu->irte_ops->prepare(data->entry, APIC_DELIVERY_MODE_FIXED,
apic->dest_mode_logical, irq_cfg->vector,
irq_cfg->dest_apicid, devid);
@@ -3588,7 +3588,7 @@ int amd_iommu_deactivate_guest_mode(void *data)
entry->lo.fields_remap.valid = valid;
entry->lo.fields_remap.dm = apic->dest_mode_logical;
- entry->lo.fields_remap.int_type = apic->delivery_mode;
+ entry->lo.fields_remap.int_type = APIC_DELIVERY_MODE_FIXED;
entry->hi.fields.vector = cfg->vector;
entry->lo.fields_remap.destination =
APICID_TO_IRTE_DEST_LO(cfg->dest_apicid);
diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
index 29b9e55dcf26..566297bc87dd 100644
--- a/drivers/iommu/intel/irq_remapping.c
+++ b/drivers/iommu/intel/irq_remapping.c
@@ -1112,7 +1112,7 @@ static void prepare_irte(struct irte *irte, int vector, unsigned int dest)
* irq migration in the presence of interrupt-remapping.
*/
irte->trigger_mode = 0;
- irte->dlvry_mode = apic->delivery_mode;
+ irte->dlvry_mode = APIC_DELIVERY_MODE_FIXED;
irte->vector = vector;
irte->dest_id = IRTE_DEST(dest);
irte->redir_hint = 1;
next prev parent reply other threads:[~2023-11-21 12:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 12:26 [PATCH 0/3] x86/apic: Misc pruning Andrew Cooper
2023-11-02 12:26 ` [PATCH 1/3] x86/apic: Drop apic::delivery_mode Andrew Cooper
2023-11-03 20:15 ` Steve Wahl
2023-11-04 19:13 ` Thomas Gleixner
2023-11-21 8:43 ` [tip: x86/apic] " tip-bot2 for Andrew Cooper
2023-11-21 12:04 ` Borislav Petkov
2023-11-21 12:18 ` Andrew Cooper [this message]
2023-11-21 12:30 ` [PATCH RESEND] x86/apic: Further apic::delivery_mode cleanup Andrew Cooper
2023-11-21 18:04 ` [tip: x86/apic] x86/apic: Drop apic::delivery_mode tip-bot2 for Andrew Cooper
2023-11-02 12:26 ` [PATCH 2/3] x86/apic: Drop enum apic_delivery_modes Andrew Cooper
2023-11-03 20:15 ` Steve Wahl
2023-11-21 8:43 ` [tip: x86/apic] " tip-bot2 for Andrew Cooper
2023-11-21 18:04 ` tip-bot2 for Andrew Cooper
2023-11-02 12:26 ` [PATCH 3/3] x86/apic: Drop struct local_apic Andrew Cooper
2023-11-03 20:16 ` Steve Wahl
2023-11-14 11:32 ` Ilpo Järvinen
2023-11-21 8:43 ` [tip: x86/apic] " tip-bot2 for Andrew Cooper
2023-11-21 18:04 ` tip-bot2 for Andrew Cooper
2023-11-03 19:58 ` Notes on BAD_APICID, Was: [PATCH 0/3] x86/apic: Misc pruning Andrew Cooper
2023-11-04 19:15 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231121121849.1441264-1-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.org \
--cc=x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®