aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-11-08 11:21:05 +1100
committerPaul Mackerras <paulus@samba.org>2005-11-08 13:07:50 +1100
commit76c8e25b905f99be5ddbe999597ba7c2c33ec64b (patch)
treec6d13a7064534116ef1c8c22021d8949d32393cc /arch/powerpc
parentb354cab0763080df3735dcd0c64a545f266cc9e2 (diff)
[PATCH] ppc64: Fix the lazy icache/dcache code for non-RAM pages
For some stupid reason I can't explain (brown paper bag is at hand), I removed the check pfn_valid() in the code that does the icache/dcache coherency on POWER4 and later. That causes us to eventually try to access non existing struct page when hashing in IO pages. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/hash_utils_64.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 3d83c3b84f0..22e47487613 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -507,6 +507,9 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap)
{
struct page *page;
+ if (!pfn_valid(pte_pfn(pte)))
+ return pp;
+
page = pte_page(pte);
/* page is dirty */