/* The HyperVisor expects the "flags" argument in this form: bits 0..59 : reserved bit 60 : N bits 61..63 : PP2,PP1,PP0  */
static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, unsigned long va, int psize, int ssize, int local)
/* The HyperVisor expects the "flags" argument in this form: bits 0..59 : reserved bit 60 : N bits 61..63 : PP2,PP1,PP0  */
static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, unsigned long va, int psize, int ssize, int local)
{
	struct hash_pte hpte;
	unsigned long want_v;
	iSeries_hlock(slot);
	HvCallHpt_get(&hpte, slot);
	want_v = hpte_encode_v(va, MMU_PAGE_4K, MMU_SEGSIZE_256M);
	if (HPTE_V_COMPARE(hpte.v, want_v) && (hpte.v & HPTE_V_VALID)) {
		HvCallHpt_setPp(slot, (newpp & 0x3) | ((newpp & 0x4) << 1));
		iSeries_hunlock(slot);
		return 0;
	}
	iSeries_hunlock(slot);
	return -1;
}