diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-30 07:38:44 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-04-30 07:38:46 -0400 |
commit | 8fc63658681f32e6e29f6d1138de933d7272e0ec (patch) | |
tree | 495f390750a52cf3739715d3045e178e36fb4bb8 /arch/s390 | |
parent | 484875b11f355b1b54d508a3f4671888f07e643c (diff) |
[S390] vmemmap: use clear_table to initialise page tables.
Always use clear_table to initialise page tables. The overlapping
memcpy is just a leftover of a previous version that wasn't fully
converted to clear_table.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/mm/vmem.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index 35d90a4720fd..3ffc0211dc85 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -77,8 +77,7 @@ static inline pud_t *vmem_pud_alloc(void) | |||
77 | pud = vmem_alloc_pages(2); | 77 | pud = vmem_alloc_pages(2); |
78 | if (!pud) | 78 | if (!pud) |
79 | return NULL; | 79 | return NULL; |
80 | pud_val(*pud) = _REGION3_ENTRY_EMPTY; | 80 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); |
81 | memcpy(pud + 1, pud, (PTRS_PER_PUD - 1)*sizeof(pud_t)); | ||
82 | #endif | 81 | #endif |
83 | return pud; | 82 | return pud; |
84 | } | 83 | } |
@@ -91,7 +90,7 @@ static inline pmd_t *vmem_pmd_alloc(void) | |||
91 | pmd = vmem_alloc_pages(2); | 90 | pmd = vmem_alloc_pages(2); |
92 | if (!pmd) | 91 | if (!pmd) |
93 | return NULL; | 92 | return NULL; |
94 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE*4); | 93 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); |
95 | #endif | 94 | #endif |
96 | return pmd; | 95 | return pmd; |
97 | } | 96 | } |