From dc6b8983a50657b2ea1cc03ea1148a543f8fc6c3 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Thu, 22 Dec 2016 14:16:29 +1100 Subject: [PATCH] xive: Mark XIVE owned EQs with a specific flag This will allow us to recognize them later when doing a reset and avoid freeing them Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Stewart Smith --- hw/xive.c | 3 ++- include/xive.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xive.c b/hw/xive.c index 51337c533c85..8358c78740b3 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -632,7 +632,8 @@ static void xive_init_eq(uint32_t vp_blk, uint32_t vp_idx, eq->w7 = SETFIELD(EQ_W7_F0_PRIORITY, 0ul, prio); eieio(); eq->w0 = EQ_W0_VALID | EQ_W0_ENQUEUE | - SETFIELD(EQ_W0_QSIZE, 0ul, EQ_QSIZE_64K); + SETFIELD(EQ_W0_QSIZE, 0ul, EQ_QSIZE_64K) | + EQ_W0_FIRMWARE; #ifdef EQ_ALWAYS_NOTIFY eq->w0 |= EQ_W0_UCOND_NOTIFY; #endif diff --git a/include/xive.h b/include/xive.h index f4e269638d46..7db7ee09832a 100644 --- a/include/xive.h +++ b/include/xive.h @@ -355,6 +355,8 @@ struct xive_eq { #define EQ_W0_ESCALATE_CTL PPC_BIT32(5) #define EQ_W0_END_OF_INTR PPC_BIT32(6) #define EQ_W0_QSIZE PPC_BITMASK32(12,15) +#define EQ_W0_SW0 PPC_BIT32(16) +#define EQ_W0_FIRMWARE EQ_W0_SW0 /* Owned by FW */ #define EQ_QSIZE_4K 0 #define EQ_QSIZE_64K 4 #define EQ_W0_HWDEP PPC_BITMASK32(24,31)