[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 34/77] ppc/xics: An ICS with offset 0 is assumed to be
From: |
Benjamin Herrenschmidt |
Subject: |
[Qemu-ppc] [PATCH 34/77] ppc/xics: An ICS with offset 0 is assumed to be uninitialized |
Date: |
Wed, 11 Nov 2015 11:27:47 +1100 |
This will make life easier for dealing with dynamically configured
ICSes such as PHB3
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
---
include/hw/ppc/xics.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
index 12fc584..51a63cb 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -145,7 +145,7 @@ struct ICSState {
static inline bool ics_valid_irq(ICSState *ics, uint32_t nr)
{
- return (nr >= ics->offset)
+ return (ics->offset != 0) && (nr >= ics->offset)
&& (nr < (ics->offset + ics->nr_irqs));
}
--
2.5.0
- Re: [Qemu-ppc] [PATCH 29/77] ppc/xics: Move SPAPR specific code to a separate file, (continued)
- [Qemu-ppc] [PATCH 35/77] ppc/xics: Move xics_set_nr_irqs() to xics_spapr.c and xics_kvm.c, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 34/77] ppc/xics: An ICS with offset 0 is assumed to be uninitialized,
Benjamin Herrenschmidt <=
- [Qemu-ppc] [PATCH 39/77] ppc/xics: Add xics to the monitor "info pic" command, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 32/77] ppc/xics: Replace "icp" with "xics" in most places, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 27/77] ppc/pnv: Add XSCOM infrastructure, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 40/77] ppc/pnv: Wire up XICS native with PowerNV platform, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 45/77] qdev: Add a hook for a bus to device if it can add devices, Benjamin Herrenschmidt, 2015/11/10