diff mbox

[16/16] xive: Indirect table entries must have top bits "type" set

Message ID 1478763292-23238-16-git-send-email-benh@kernel.crashing.org
State Superseded
Headers show

Commit Message

Benjamin Herrenschmidt Nov. 10, 2016, 7:34 a.m. UTC
The HW check that the 2 tops bits aren't both clear to differenciate
an unallocated entry from a valid one. So we need to put some value
there.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
---
 hw/xive.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/hw/xive.c b/hw/xive.c
index 37c367e..a8cc2fc 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -1126,7 +1126,9 @@  static bool xive_prealloc_tables(struct xive *x)
 		}
 		memset(page, 0, 0x10000);
 		x->vp_ind_base[i] = ((uint64_t)page) & VSD_ADDRESS_MASK;
+
 		x->vp_ind_base[i] |= SETFIELD(VSD_TSIZE, 0ull, 4);
+		x->vp_ind_base[i] |= SETFIELD(VSD_MODE, 0ull, VSD_MODE_EXCLUSIVE);
 
 		page = local_alloc(x->chip_id, 0x10000, 0x10000);
 		if (!page) {
@@ -1136,6 +1138,7 @@  static bool xive_prealloc_tables(struct xive *x)
 		memset(page, 0, 0x10000);
 		x->eq_ind_base[i] = ((uint64_t)page) & VSD_ADDRESS_MASK;
 		x->eq_ind_base[i] |= SETFIELD(VSD_TSIZE, 0ull, 4);
+		x->eq_ind_base[i] |= SETFIELD(VSD_MODE, 0ull, VSD_MODE_EXCLUSIVE);
 
 #ifdef INDIRECT_IS_LE
 		x->vp_ind_base[i] = cpu_to_le64(x->vp_ind_base[i]);