aboutsummaryrefslogtreecommitdiff
path: root/hw/xive.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2019-10-01 09:00:00 +0200
committerOliver O'Halloran <oohall@gmail.com>2019-11-04 10:52:47 +1100
commitca46415e73e5fb7c68904777baf15f45c6240719 (patch)
treeca8c89fcce378ed4c8d1433f25456293a92b1120 /hw/xive.c
parent5d0a4134c1e4dbe118de8b9456079b76091bc44e (diff)
downloadskiboot-ca46415e73e5fb7c68904777baf15f45c6240719.zip
skiboot-ca46415e73e5fb7c68904777baf15f45c6240719.tar.gz
skiboot-ca46415e73e5fb7c68904777baf15f45c6240719.tar.bz2
xive/p9: remove XIVE_INT_SAFETY_GAP
It was used by bringup code only. Using HW interrupt numbers in a high range was a way to check that HW interrupt numbers (OPAL) and logical interrupt numbers (Linux) were not getting mixed in the event queues. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw/xive.c')
-rw-r--r--hw/xive.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/hw/xive.c b/hw/xive.c
index e944e85..bbfe2ec 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -36,7 +36,6 @@
#define XIVE_EXTRA_CHECK_INIT_CACHE
#undef XIVE_CHECK_MISROUTED_IPI
#define XIVE_CHECK_LOCKS
-#define XIVE_INT_SAFETY_GAP 0x1000
#else
#undef XIVE_DEBUG_DUPLICATES
#undef XIVE_PERCPU_LOG
@@ -44,7 +43,6 @@
#undef XIVE_EXTRA_CHECK_INIT_CACHE
#undef XIVE_CHECK_MISROUTED_IPI
#undef XIVE_CHECK_LOCKS
-#define XIVE_INT_SAFETY_GAP 0x10
#endif
/*
@@ -151,6 +149,12 @@
*/
#define MAX_INT_ENTRIES (1 * 1024 * 1024)
+/*
+ * First interrupt number, also the first logical interrupt number
+ * allocated by Linux
+ */
+#define XIVE_INT_FIRST 0x10
+
/* Corresponding direct table sizes */
#define SBE_SIZE (MAX_INT_ENTRIES / 4)
#define IVT_SIZE (MAX_INT_ENTRIES * 8)
@@ -2590,8 +2594,8 @@ static struct xive *init_one_xive(struct dt_node *np)
/* Make sure we never hand out "2" as it's reserved for XICS emulation
* IPI returns. Generally start handing out at 0x10
*/
- if (x->int_ipi_top < XIVE_INT_SAFETY_GAP)
- x->int_ipi_top = XIVE_INT_SAFETY_GAP;
+ if (x->int_ipi_top < XIVE_INT_FIRST)
+ x->int_ipi_top = XIVE_INT_FIRST;
/* Allocate a few bitmaps */
x->eq_map = zalloc(BITMAP_BYTES(MAX_EQ_COUNT >> 3));
@@ -3490,7 +3494,7 @@ static int64_t opal_xive_get_xirr(uint32_t *out_xirr, bool just_poll)
/* XXX Use "p" to select queue */
val = xive_read_eq(xs, just_poll);
- if (val && val < XIVE_INT_SAFETY_GAP)
+ if (val && val < XIVE_INT_FIRST)
xive_cpu_err(c, "Bogus interrupt 0x%x received !\n", val);
/* Convert to magic IPI if needed */