csky: Remove pre-processing pte-dirty&young in entry.S
Subsystems (2)
[email protected]
maintainerPATCH 1/1 csky: Remove pre-processing pte-dirty&young in entry.S
From: Guo Ren <[email protected]>
do_page_fault()->
handle_mm_fault()->
__handle_mm_fault()->
handle_pte_fault()The handle_pte_fault() will call pte_mkdirty() and pte_mkyoung() to set up dirty or valid bit in page-table entry. So there is no need to pre-process first-access and first-write in entry.S with assembly code.
Signed-off-by Guo Ren <[email protected]>
--- arch/csky/abiv1/inc/abi/entry.h | 20 -------- arch/csky/abiv2/inc/abi/entry.h | 24 ---------- arch/csky/include/asm/pgtable.h | 10 ++-- arch/csky/kernel/entry.S | 101 ++++++++-------------------------------- 4 files changed, 24 insertions(+), 131 deletions(-)
arch/csky/abiv1/inc/abi/entry.h +0 -20
@@ -126,30 +126,10 @@ .endm /* MMU registers operators. */ -.macro RD_MIR rx - cprcr \rx, cpcr0 -.endm - .macro RD_MEH rx cprcr \rx, cpcr4 .endm -.macro RD_MCIR rx - cprcr \rx, cpcr8 -.endm - -.macro RD_PGDR rx - cprcr \rx, cpcr29 -.endm - -.macro WR_MEH rx - cpwcr \rx, cpcr4 -.endm - -.macro WR_MCIR rx - cpwcr \rx, cpcr8 -.endm - .macro SETUP_MMU rx lrw \rx, PHYS_OFFSET | 0xe cpwcr \rx, cpcr30
arch/csky/abiv2/inc/abi/entry.h +0 -24
@@ -141,34 +141,10 @@ .endm /* MMU registers operators. */ -.macro RD_MIR rx - mfcr \rx, cr<0, 15> -.endm - .macro RD_MEH rx mfcr \rx, cr<4, 15> .endm -.macro RD_MCIR rx - mfcr \rx, cr<8, 15> -.endm - -.macro RD_PGDR rx - mfcr \rx, cr<29, 15> -.endm - -.macro RD_PGDR_K rx - mfcr \rx, cr<28, 15> -.endm - -.macro WR_MEH rx - mtcr \rx, cr<4, 15> -.endm - -.macro WR_MCIR rx - mtcr \rx, cr<8, 15> -.endm - .macro SETUP_MMU rx lrw \rx, PHYS_OFFSET | 0xe mtcr \rx, cr<30, 15>
arch/csky/include/asm/pgtable.h +4 -6
@@ -218,17 +218,15 @@ static inline pte_t pte_mkwrite(pte_t pte)static inline pte_t pte_mkdirty (pte_t pte) { -pte_val (pte) |= _PAGE_MODIFIED; -if (pte_val (pte) & _PAGE_WRITE) -pte_val (pte) |= _PAGE_DIRTY; +pte_val (pte) |= _PAGE_MODIFIED | _PAGE_DIRTY; +return pte; }static inline pte_t pte_mkyoung (pte_t pte) { -pte_val (pte) |= _PAGE_ACCESSED; -if (pte_val (pte) & _PAGE_READ) -pte_val (pte) |= _PAGE_VALID; +pte_val (pte) |= _PAGE_ACCESSED | _PAGE_VALID; +return pte; }
arch/csky/kernel/entry.S +20 -81
128 lines not on this page · raw message
Signature · 1 line
2.7.4