From: "Sachin P. Sant" <sachinp@in.ibm.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: for-2.6.23 branch in powerpc.git created
Date: Fri, 15 Jun 2007 11:02:57 +0530 [thread overview]
Message-ID: <46722489.9090503@in.ibm.com> (raw)
In-Reply-To: <18034.6787.951861.623265@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
Paul Mackerras wrote:
> The patches I put in are listed below. If you have a patch that
> should go in but isn't listed, remind me about it.
Paul, the following patch isn't listed. Please consider for merge.
[PATCH] Fix Kexec/Kdump for power6
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>
Thanks
-Sachin
[-- Attachment #2: kexec-kdump-on-power6 --]
[-- Type: text/plain, Size: 3122 bytes --]
* On Power machines supporting VRMA, Kexec/Kdump does not work.
* Hypervisor stores VRMA mapping used by the OS, in the hpte hash tables.
* Make sure these hpte entries are left untouched.
*
* This patch 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>
---
diff -Naurp old/arch/powerpc/platforms/pseries/lpar.c new/arch/powerpc/platforms/pseries/lpar.c
--- old/arch/powerpc/platforms/pseries/lpar.c 2007-06-05 06:27:25.000000000 +0530
+++ new/arch/powerpc/platforms/pseries/lpar.c 2007-06-07 15:28:07.000000000 +0530
@@ -373,12 +373,23 @@ static void pSeries_lpar_hptab_clear(voi
{
unsigned long size_bytes = 1UL << ppc64_pft_size;
unsigned long hpte_count = size_bytes >> 4;
- unsigned long dummy1, dummy2;
+ unsigned long dummy1, dummy2, dword0;
+ long lpar_rc;
int i;
/* TODO: Use bulk call */
- for (i = 0; i < hpte_count; i++)
- plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2);
+ for (i = 0; i < hpte_count; i++) {
+ /* dont remove HPTEs with VRMA mappings */
+ lpar_rc = plpar_pte_remove_raw(H_ANDCOND, i, HPTE_V_1TB_SEG,
+ &dummy1, &dummy2);
+ if (lpar_rc == H_NOT_FOUND) {
+ lpar_rc = plpar_pte_read_raw(0, i, &dword0, &dummy1);
+ if (!lpar_rc && ((dword0 & HPTE_V_VRMA_MASK)
+ != HPTE_V_VRMA_MASK))
+ /* Can be hpte for 1TB Seg. So remove it */
+ plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2);
+ }
+ }
}
/*
diff -Naurp old/arch/powerpc/platforms/pseries/plpar_wrappers.h new/arch/powerpc/platforms/pseries/plpar_wrappers.h
--- old/arch/powerpc/platforms/pseries/plpar_wrappers.h 2007-06-05 06:27:25.000000000 +0530
+++ new/arch/powerpc/platforms/pseries/plpar_wrappers.h 2007-06-07 15:28:07.000000000 +0530
@@ -108,6 +108,21 @@ static inline long plpar_pte_read(unsign
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)
{
diff -Naurp old/include/asm-powerpc/mmu-hash64.h new/include/asm-powerpc/mmu-hash64.h
--- old/include/asm-powerpc/mmu-hash64.h 2007-06-05 06:27:25.000000000 +0530
+++ new/include/asm-powerpc/mmu-hash64.h 2007-06-07 15:28:46.000000000 +0530
@@ -94,6 +94,9 @@ extern char initial_stab[];
#define HPTE_R_C ASM_CONST(0x0000000000000080)
#define HPTE_R_R ASM_CONST(0x0000000000000100)
+#define HPTE_V_1TB_SEG ASM_CONST(0x4000000000000000)
+#define HPTE_V_VRMA_MASK ASM_CONST(0x4001ffffff000000)
+
/* Values for PP (assumes Ks=0, Kp=1) */
/* pp0 will always be 0 for linux */
#define PP_RWXX 0 /* Supervisor read/write, User none */
next prev parent reply other threads:[~2007-06-15 5:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 4:50 for-2.6.23 branch in powerpc.git created Paul Mackerras
2007-06-15 5:32 ` Sachin P. Sant [this message]
2007-06-15 5:40 ` Michael Neuling
2007-06-15 8:24 ` Li Yang-r58472
2007-06-15 9:12 ` Michael Ellerman
2007-06-15 13:53 ` Olof Johansson
2007-06-19 5:47 ` Paul Mackerras
2007-06-15 16:29 ` Mark A. Greer
2007-06-15 16:54 ` Dave Jiang
2007-06-15 17:27 ` Nathan Lynch
2007-06-15 17:47 ` Guennadi Liakhovetski
2007-06-15 18:12 ` Scott Wood
2007-06-15 18:18 ` Guennadi Liakhovetski
2007-06-15 21:22 ` Scott Wood
2007-06-19 6:30 ` Paul Mackerras
2007-06-19 16:18 ` Scott Wood
2007-06-28 6:35 ` Paul Mackerras
2007-06-28 19:01 ` Guennadi Liakhovetski
2007-06-29 17:35 ` Scott Wood
2007-06-29 19:48 ` Guennadi Liakhovetski
2007-06-15 19:13 ` Milton Miller
2007-06-15 19:36 ` [PATCH] [POWERPC] Add cputable entry for PowerPC 440SPe Rev. B Roland Dreier
2007-06-15 20:44 ` Olof Johansson
2007-06-16 12:37 ` for-2.6.23 branch in powerpc.git created Johannes Berg
2007-06-18 5:07 ` Mohan Kumar M
2007-06-28 6:55 ` Zang Roy-r61911
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46722489.9090503@in.ibm.com \
--to=sachinp@in.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.