Commit e16a5040 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: Fix up iseries updatepp, from Ben Herrenschmidt

From: anton@samba.org

Fix up iseries updatepp, from Ben Herrenschmidt
parent d1310da2
...@@ -109,6 +109,12 @@ static long iSeries_hpte_remove(unsigned long hpte_group) ...@@ -109,6 +109,12 @@ static long iSeries_hpte_remove(unsigned long hpte_group)
return -1; return -1;
} }
/*
* 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, static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
unsigned long va, int large, int local) unsigned long va, int large, int local)
{ {
...@@ -117,7 +123,7 @@ static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, ...@@ -117,7 +123,7 @@ static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
HvCallHpt_get(&hpte, slot); HvCallHpt_get(&hpte, slot);
if ((hpte.dw0.dw0.avpn == avpn) && (hpte.dw0.dw0.v)) { if ((hpte.dw0.dw0.avpn == avpn) && (hpte.dw0.dw0.v)) {
HvCallHpt_setPp(slot, newpp); HvCallHpt_setPp(slot, (newpp & 0x3) | ((newpp & 0x4) << 1));
return 0; return 0;
} }
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment