Skip to content

Commit

Permalink
xive: Indirect table entries must have top bits "type" set
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed Nov 15, 2016
1 parent 6287003 commit 13f77a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hw/xive.c
Expand Up @@ -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) {
Expand All @@ -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]);
Expand Down

0 comments on commit 13f77a3

Please sign in to comment.