aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/mmu.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-05-23 04:24:40 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-05-23 04:24:31 -0400
commitb2fa47e6bf5148aa6dbf22ec79f18141b421eeba (patch)
tree8786785aefa2fbbc33fa590ac4b9a58947c2aac8 /arch/s390/include/asm/mmu.h
parent2d42552d1c1659b014851cf449ad2fe458509128 (diff)
[S390] refactor page table functions for better pgste support
Rework the architecture page table functions to access the bits in the page table extension array (pgste). There are a number of changes: 1) Fix missing pgste update if the attach_count for the mm is <= 1. 2) For every operation that affects the invalid bit in the pte or the rcp byte in the pgste the pcl lock needs to be acquired. The function pgste_get_lock gets the pcl lock and returns the current pgste value for a pte pointer. The function pgste_set_unlock stores the pgste and releases the lock. Between these two calls the bits in the pgste can be shuffled. 3) Define two software bits in the pte _PAGE_SWR and _PAGE_SWC to avoid calling SetPageDirty and SetPageReferenced from pgtable.h. If the host reference backup bit or the host change backup bit has been set the dirty/referenced state is transfered to the pte. The common code will pick up the state from the pte. 4) Add ptep_modify_prot_start and ptep_modify_prot_commit for mprotect. 5) Remove pgd_populate_kernel, pud_populate_kernel, pmd_populate_kernel pgd_clear_kernel, pud_clear_kernel, pmd_clear_kernel and ptep_invalidate. 6) Rename kvm_s390_test_and_clear_page_dirty to ptep_test_and_clear_user_dirty and add ptep_test_and_clear_user_young. 7) Define mm_exclusive() and mm_has_pgste() helper to improve readability. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/mmu.h')
-rw-r--r--arch/s390/include/asm/mmu.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/include/asm/mmu.h b/arch/s390/include/asm/mmu.h
index 818e8298a6bd..82d0847896a0 100644
--- a/arch/s390/include/asm/mmu.h
+++ b/arch/s390/include/asm/mmu.h
@@ -9,8 +9,10 @@ typedef struct {
9 unsigned long asce_bits; 9 unsigned long asce_bits;
10 unsigned long asce_limit; 10 unsigned long asce_limit;
11 unsigned long vdso_base; 11 unsigned long vdso_base;
12 int has_pgste; /* The mmu context has extended page tables */ 12 /* Cloned contexts will be created with extended page tables. */
13 int alloc_pgste; /* cloned contexts will have extended page tables */ 13 unsigned int alloc_pgste:1;
14 /* The mmu context has extended page tables. */
15 unsigned int has_pgste:1;
14} mm_context_t; 16} mm_context_t;
15 17
16#define INIT_MM_CONTEXT(name) \ 18#define INIT_MM_CONTEXT(name) \