Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348819
b: refs/heads/master
c: 0252246
h: refs/heads/master
i:
  348817: 6623b8d
  348815: 929151f
v: v3
  • Loading branch information
Will Deacon authored and Catalin Marinas committed Jan 10, 2013
1 parent 2bee217 commit f641e48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: bdba0051ebcb3c6372f9cc0b2524c47cc6ce46fd
refs/heads/master: 02522463c84748b3b8ad770f9424bcfa70a5b4c4
16 changes: 9 additions & 7 deletions trunk/arch/arm64/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ extern struct page *empty_zero_page;
#define pte_write(pte) (!(pte_val(pte) & PTE_RDONLY))
#define pte_exec(pte) (!(pte_val(pte) & PTE_UXN))

#define pte_present_exec_user(pte) \
((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == \
(PTE_VALID | PTE_USER))
#define pte_present_user(pte) \
((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER))

#define PTE_BIT_FUNC(fn,op) \
static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
Expand All @@ -157,10 +156,13 @@ extern void __sync_icache_dcache(pte_t pteval, unsigned long addr);
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte)
{
if (pte_present_exec_user(pte))
__sync_icache_dcache(pte, addr);
if (!pte_dirty(pte))
pte = pte_wrprotect(pte);
if (pte_present_user(pte)) {
if (pte_exec(pte))
__sync_icache_dcache(pte, addr);
if (!pte_dirty(pte))
pte = pte_wrprotect(pte);
}

set_pte(ptep, pte);
}

Expand Down

0 comments on commit f641e48

Please sign in to comment.