aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/plpar_wrappers.h
diff options
context:
space:
mode:
authorSachin P. Sant <sachinp@in.ibm.com>2007-06-14 15:31:34 +1000
committerPaul Mackerras <paulus@samba.org>2007-06-25 17:03:33 +1000
commitb7abc5c53e3c65b8e931bd96db2d08ba670e111a (patch)
tree73e0a02db68d570e875b57acb3d08e9ae85473ac /arch/powerpc/platforms/pseries/plpar_wrappers.h
parent7ccb4a662462616f6be5053e26b79580e02f1529 (diff)
[POWERPC] Fix Kexec/Kdump for power6
On Power machines supporting VRMA, Kexec/Kdump does not work. VRMA (virtual real-mode area) means that accesses with IR/DR = 0 (i.e. the MMU "off") actually still go through the hash table, using entries put there by the hypervisor. This means that when we clear out the hash table on kexec, we need to make sure these entries are left untouched. This also adds plpar_pte_read_raw() on the lines of plpar_pte_remove_raw(). Signed-off-by : Sachin Sant <sachinp@in.ibm.com> Signed-off-by : Mohan Kumar M <mohan@in.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/plpar_wrappers.h')
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index 2e4d10c9eea..d003c80fa31 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -108,6 +108,21 @@ static inline long plpar_pte_read(unsigned long flags, unsigned long ptex,
return rc;
}
+/* plpar_pte_read_raw can be called in real mode. It calls plpar_hcall_raw */
+static inline long plpar_pte_read_raw(unsigned long flags, unsigned long ptex,
+ unsigned long *old_pteh_ret, unsigned long *old_ptel_ret)
+{
+ long rc;
+ unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
+
+ rc = plpar_hcall_raw(H_READ, retbuf, flags, ptex);
+
+ *old_pteh_ret = retbuf[0];
+ *old_ptel_ret = retbuf[1];
+
+ return rc;
+}
+
static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex,
unsigned long avpn)
{