diff options
author | David Gibson <dwg@au1.ibm.com> | 2009-12-16 09:29:56 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-17 22:55:44 -0500 |
commit | a1128f8f0ff06ccbea5d6b4a69446b506c57bfbc (patch) | |
tree | b537d9cbe2678b4c6a986d95918c1ca2e4fd1a9c /arch/powerpc/mm | |
parent | c3a66359398028cd8e5f32611950dc7dc32ea2f2 (diff) |
powerpc/mm: Fix stupid bug in subpge protection handling
Commit d28513bc7f675d28b479db666d572e078ecf182d ("Fix bug in pagetable
cache cleanup with CONFIG_PPC_SUBPAGE_PROT"), itself a fix for
breakage caused by an earlier clean up patch of mine, contains a
stupid bug. I changed the parameters of the subpage_protection()
function, but failed to update one of the callers.
This patch fixes it, and replaces a void * with a typed pointer so
that the compiler will warn on such an error in future.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index c7fa4dac2f47..3ecdcec0a39e 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -879,7 +879,7 @@ static inline int subpage_protection(struct mm_struct *mm, unsigned long ea) | |||
879 | */ | 879 | */ |
880 | int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | 880 | int hash_page(unsigned long ea, unsigned long access, unsigned long trap) |
881 | { | 881 | { |
882 | void *pgdir; | 882 | pgd_t *pgdir; |
883 | unsigned long vsid; | 883 | unsigned long vsid; |
884 | struct mm_struct *mm; | 884 | struct mm_struct *mm; |
885 | pte_t *ptep; | 885 | pte_t *ptep; |
@@ -1025,7 +1025,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
1025 | else | 1025 | else |
1026 | #endif /* CONFIG_PPC_HAS_HASH_64K */ | 1026 | #endif /* CONFIG_PPC_HAS_HASH_64K */ |
1027 | { | 1027 | { |
1028 | int spp = subpage_protection(pgdir, ea); | 1028 | int spp = subpage_protection(mm, ea); |
1029 | if (access & spp) | 1029 | if (access & spp) |
1030 | rc = -2; | 1030 | rc = -2; |
1031 | else | 1031 | else |