[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v1 07/11] ppc/xics: An ICS with offset 0 is assumed to
From: |
Nikunj A Dadhania |
Subject: |
[Qemu-ppc] [PATCH v1 07/11] ppc/xics: An ICS with offset 0 is assumed to be uninitialized |
Date: |
Thu, 23 Jun 2016 23:17:26 +0530 |
From: Benjamin Herrenschmidt <address@hidden>
This will make life easier for dealing with dynamically configured
ICSes such as PHB3
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: Nikunj A Dadhania <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 be96fd8..3c63c36 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -149,7 +149,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.7.4
- [Qemu-ppc] [PATCH v1 04/11] ppc/xics: Remove unused xics_set_irq_type(), (continued)
[Qemu-ppc] [PATCH v1 07/11] ppc/xics: An ICS with offset 0 is assumed to be uninitialized,
Nikunj A Dadhania <=
[Qemu-ppc] [PATCH v1 08/11] ppc/xics: Use a helper to add a new ICS, Nikunj A Dadhania, 2016/06/23
[Qemu-ppc] [PATCH v1 11/11] ppc/xics: Add xics to the monitor "info pic" command, Nikunj A Dadhania, 2016/06/23
[Qemu-ppc] [PATCH v1 10/11] ppc/xics: Add "native" XICS subclass, Nikunj A Dadhania, 2016/06/23
[Qemu-ppc] [PATCH v1 09/11] ppc/xics: Split ICS into ics-base and ics class, Nikunj A Dadhania, 2016/06/23