|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/riscv: add helper to check APLIC MSI mode
commit 1fb096f29834b085b4274a6ff0ccd2c9f62389da
Author: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
AuthorDate: Tue Nov 24 08:30:57 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Nov 24 08:30:57 2026 +0100
xen/riscv: add helper to check APLIC MSI mode
Use convenient helper instead of open-coding the things.
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Reviewed-by: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/riscv/aplic.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/xen/arch/riscv/aplic.c b/xen/arch/riscv/aplic.c
index 17c96177a3..79bbc0e864 100644
--- a/xen/arch/riscv/aplic.c
+++ b/xen/arch/riscv/aplic.c
@@ -38,6 +38,11 @@ static struct intc_info __ro_after_init aplic_info = {
.hw_variant = INTC_APLIC,
};
+static bool aplic_msi_mode(void)
+{
+ return readl(&aplic.regs->domaincfg) & APLIC_DOMAINCFG_DM;
+}
+
static void __init aplic_init_hw_interrupts(void)
{
unsigned int i;
@@ -130,7 +135,7 @@ static void cf_check aplic_irq_enable(struct irq_desc *desc)
* If APLIC without MSI interrupts is required in the future,
* this function will need to be updated accordingly.
*/
- ASSERT(readl(&aplic.regs->domaincfg) & APLIC_DOMAINCFG_DM);
+ ASSERT(aplic_msi_mode());
ASSERT(spin_is_locked(&desc->lock));
@@ -161,7 +166,7 @@ static void cf_check aplic_irq_disable(struct irq_desc
*desc)
* If APLIC without MSI interrupts is required in the future,
* this function will need to be updated accordingly.
*/
- ASSERT(readl(&aplic.regs->domaincfg) & APLIC_DOMAINCFG_DM);
+ ASSERT(aplic_msi_mode());
ASSERT(spin_is_locked(&desc->lock));
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |