Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201189
b: refs/heads/master
c: ca91e6c
h: refs/heads/master
i:
  201187: 7a698ee
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Jul 22, 2010
1 parent 5884b03 commit ff6fc5e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1623e7eb280f853f60338c7bb68bd3f3a970205
refs/heads/master: ca91e6c09d656c6deb1f2bc5d57186c718106aa5
9 changes: 0 additions & 9 deletions trunk/arch/powerpc/mm/hash_low_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ _GLOBAL(__hash_page_4K)
std r8,STK_PARM(r8)(r1)
std r9,STK_PARM(r9)(r1)

/* Add _PAGE_PRESENT to access */
ori r4,r4,_PAGE_PRESENT

/* Save non-volatile registers.
* r31 will hold "old PTE"
* r30 is "new PTE"
Expand Down Expand Up @@ -347,9 +344,6 @@ _GLOBAL(__hash_page_4K)
std r8,STK_PARM(r8)(r1)
std r9,STK_PARM(r9)(r1)

/* Add _PAGE_PRESENT to access */
ori r4,r4,_PAGE_PRESENT

/* Save non-volatile registers.
* r31 will hold "old PTE"
* r30 is "new PTE"
Expand Down Expand Up @@ -687,9 +681,6 @@ _GLOBAL(__hash_page_64K)
std r8,STK_PARM(r8)(r1)
std r9,STK_PARM(r9)(r1)

/* Add _PAGE_PRESENT to access */
ori r4,r4,_PAGE_PRESENT

/* Save non-volatile registers.
* r31 will hold "old PTE"
* r30 is "new PTE"
Expand Down
19 changes: 11 additions & 8 deletions trunk/arch/powerpc/mm/hash_utils_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,17 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
return 1;
}

/* Add _PAGE_PRESENT to the required access perm */
access |= _PAGE_PRESENT;

/* Pre-check access permissions (will be re-checked atomically
* in __hash_page_XX but this pre-check is a fast path
*/
if (access & ~pte_val(*ptep)) {
DBG_LOW(" no access !\n");
return 1;
}

#ifdef CONFIG_HUGETLB_PAGE
if (hugeshift)
return __hash_page_huge(ea, access, vsid, ptep, trap, local,
Expand All @@ -967,14 +978,6 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
DBG_LOW(" i-pte: %016lx %016lx\n", pte_val(*ptep),
pte_val(*(ptep + PTRS_PER_PTE)));
#endif
/* Pre-check access permissions (will be re-checked atomically
* in __hash_page_XX but this pre-check is a fast path
*/
if (access & ~pte_val(*ptep)) {
DBG_LOW(" no access !\n");
return 1;
}

/* Do actual hashing */
#ifdef CONFIG_PPC_64K_PAGES
/* If _PAGE_4K_PFN is set, make sure this is a 4k segment */
Expand Down

0 comments on commit ff6fc5e

Please sign in to comment.