Skip to content

Commit 6767df2

Browse files
ctmarinaswilldeacon
authored andcommitted
arm64: Do not mask out PTE_RDONLY in pte_same()
Following commit 73e86cb ("arm64: Move PTE_RDONLY bit handling out of set_pte_at()"), the PTE_RDONLY bit is no longer managed by set_pte_at() but built into the PAGE_* attribute definitions. Consequently, pte_same() must include this bit when checking two PTEs for equality. Remove the arm64-specific pte_same() function, practically reverting commit 747a70e ("arm64: Fix copy-on-write referencing in HugeTLB") Fixes: 73e86cb ("arm64: Move PTE_RDONLY bit handling out of set_pte_at()") Cc: <[email protected]> # 4.14.x- Cc: Will Deacon <[email protected]> Cc: Steve Capper <[email protected]> Reported-by: John Stultz <[email protected]> Signed-off-by: Catalin Marinas <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 1cf45b8 commit 6767df2

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -283,23 +283,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
283283
set_pte(ptep, pte);
284284
}
285285

286-
#define __HAVE_ARCH_PTE_SAME
287-
static inline int pte_same(pte_t pte_a, pte_t pte_b)
288-
{
289-
pteval_t lhs, rhs;
290-
291-
lhs = pte_val(pte_a);
292-
rhs = pte_val(pte_b);
293-
294-
if (pte_present(pte_a))
295-
lhs &= ~PTE_RDONLY;
296-
297-
if (pte_present(pte_b))
298-
rhs &= ~PTE_RDONLY;
299-
300-
return (lhs == rhs);
301-
}
302-
303286
/*
304287
* Huge pte definitions.
305288
*/

0 commit comments

Comments
 (0)