aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2009-12-07 06:52:11 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:37 -0500
commit6a985c6194017de2c062916ad1cd00dee0302c40 (patch)
treeea19d62cd639876cc1f63e2963276d4fdf2e95b0 /arch/s390
parenta968cd3ef1d315b8c4c48ea65ab5aac8421c2612 (diff)
[S390] s390: use change recording override for kernel mapping
We dont need the dirty bit if a write access is done via the kernel mapping. In that case SetPageDirty and friends are used anyway, no need to do that a second time. We can use the change-recording overide function for the kernel mapping, if available. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/pgtable.h4
-rw-r--r--arch/s390/mm/vmem.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 60a7b1a1702f..e2fa79cf0614 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -169,12 +169,13 @@ extern unsigned long VMALLOC_START;
169 * STL Segment-Table-Length: Segment-table length (STL+1*16 entries -> up to 2048) 169 * STL Segment-Table-Length: Segment-table length (STL+1*16 entries -> up to 2048)
170 * 170 *
171 * A 64 bit pagetable entry of S390 has following format: 171 * A 64 bit pagetable entry of S390 has following format:
172 * | PFRA |0IP0| OS | 172 * | PFRA |0IPC| OS |
173 * 0000000000111111111122222222223333333333444444444455555555556666 173 * 0000000000111111111122222222223333333333444444444455555555556666
174 * 0123456789012345678901234567890123456789012345678901234567890123 174 * 0123456789012345678901234567890123456789012345678901234567890123
175 * 175 *
176 * I Page-Invalid Bit: Page is not available for address-translation 176 * I Page-Invalid Bit: Page is not available for address-translation
177 * P Page-Protection Bit: Store access not possible for page 177 * P Page-Protection Bit: Store access not possible for page
178 * C Change-bit override: HW is not required to set change bit
178 * 179 *
179 * A 64 bit segmenttable entry of S390 has following format: 180 * A 64 bit segmenttable entry of S390 has following format:
180 * | P-table origin | TT 181 * | P-table origin | TT
@@ -218,6 +219,7 @@ extern unsigned long VMALLOC_START;
218 */ 219 */
219 220
220/* Hardware bits in the page table entry */ 221/* Hardware bits in the page table entry */
222#define _PAGE_CO 0x100 /* HW Change-bit override */
221#define _PAGE_RO 0x200 /* HW read-only bit */ 223#define _PAGE_RO 0x200 /* HW read-only bit */
222#define _PAGE_INVALID 0x400 /* HW invalid bit */ 224#define _PAGE_INVALID 0x400 /* HW invalid bit */
223 225
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 5f91a38d7592..300ab012b0fd 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -70,8 +70,12 @@ static pte_t __ref *vmem_pte_alloc(void)
70 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); 70 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t));
71 if (!pte) 71 if (!pte)
72 return NULL; 72 return NULL;
73 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, 73 if (MACHINE_HAS_HPAGE)
74 PTRS_PER_PTE * sizeof(pte_t)); 74 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO,
75 PTRS_PER_PTE * sizeof(pte_t));
76 else
77 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
78 PTRS_PER_PTE * sizeof(pte_t));
75 return pte; 79 return pte;
76} 80}
77 81
@@ -112,7 +116,8 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
112 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && 116 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
113 (address + HPAGE_SIZE <= start + size) && 117 (address + HPAGE_SIZE <= start + size) &&
114 (address >= HPAGE_SIZE)) { 118 (address >= HPAGE_SIZE)) {
115 pte_val(pte) |= _SEGMENT_ENTRY_LARGE; 119 pte_val(pte) |= _SEGMENT_ENTRY_LARGE |
120 _SEGMENT_ENTRY_CO;
116 pmd_val(*pm_dir) = pte_val(pte); 121 pmd_val(*pm_dir) = pte_val(pte);
117 address += HPAGE_SIZE - PAGE_SIZE; 122 address += HPAGE_SIZE - PAGE_SIZE;
118 continue; 123 continue;