[S390] s390: disable change bit override

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 9, 2010 - 11:59 am

Gitweb:     http://git.kernel.org/linus/6af7eea2aee57b869f34eba0a94ef122fe90fbfd
Commit:     6af7eea2aee57b869f34eba0a94ef122fe90fbfd
Parent:     176b1803ce4690d0dd94e16f118dbd14af045034
Author:     Christian Borntraeger <borntraeger@de.ibm.com>
AuthorDate: Fri Apr 9 13:43:01 2010 +0200
Committer:  Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
CommitDate: Fri Apr 9 13:43:02 2010 +0200

    [S390] s390: disable change bit override
    
    commit 6a985c6194017de2c062916ad1cd00dee0302c40
    ([S390] s390: use change recording override for kernel mapping)
    deactivated the change bit recording for the kernel mapping to
    improve the performance. This works most of the time, but there
    are cases (e.g. kernel runs in home space, futex atomic compare xcmg)
    where we modify user memory with the kernel mapping instead of the
    user mapping.
    Instead of fixing these cases, this patch just deactivates change bit
    override to avoid future problems with other kernel code that might
    use the kernel mapping for user memory.
    
    CC: stable@kernel.org
    Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
 arch/s390/mm/vmem.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 8ea3144..90165e7 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -71,12 +71,8 @@ static pte_t __ref *vmem_pte_alloc(void)
 		pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t));
 	if (!pte)
 		return NULL;
-	if (MACHINE_HAS_HPAGE)
-		clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO,
-			    PTRS_PER_PTE * sizeof(pte_t));
-	else
-		clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
-			    PTRS_PER_PTE * sizeof(pte_t));
+	clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
+		    PTRS_PER_PTE * sizeof(pte_t));
 	return pte;
 }
 
@@ -117,8 +113,7 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
 		if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
 		    (address + HPAGE_SIZE <= start + size) &&
 		    (address >= HPAGE_SIZE)) {
-			pte_val(pte) |= _SEGMENT_ENTRY_LARGE |
-					_SEGMENT_ENTRY_CO;
+			pte_val(pte) |= _SEGMENT_ENTRY_LARGE;
 			pmd_val(*pm_dir) = pte_val(pte);
 			address += HPAGE_SIZE - PAGE_SIZE;
 			continue;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[S390] s390: disable change bit override, Linux Kernel Mailing ..., (Fri Apr 9, 11:59 am)