mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
powerpc/mm: Fix stupid bug in subpge protection handling
Commit d28513bc7f
("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>
This commit is contained in:
parent
c3a6635939
commit
a1128f8f0f
1 changed files with 2 additions and 2 deletions
|
@ -879,7 +879,7 @@ static inline int subpage_protection(struct mm_struct *mm, unsigned long ea)
|
||||||
*/
|
*/
|
||||||
int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
|
int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
|
||||||
{
|
{
|
||||||
void *pgdir;
|
pgd_t *pgdir;
|
||||||
unsigned long vsid;
|
unsigned long vsid;
|
||||||
struct mm_struct *mm;
|
struct mm_struct *mm;
|
||||||
pte_t *ptep;
|
pte_t *ptep;
|
||||||
|
@ -1025,7 +1025,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
|
||||||
else
|
else
|
||||||
#endif /* CONFIG_PPC_HAS_HASH_64K */
|
#endif /* CONFIG_PPC_HAS_HASH_64K */
|
||||||
{
|
{
|
||||||
int spp = subpage_protection(pgdir, ea);
|
int spp = subpage_protection(mm, ea);
|
||||||
if (access & spp)
|
if (access & spp)
|
||||||
rc = -2;
|
rc = -2;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue