s390: kernel page table allocation.
PATCH 1/1 s390: kernel page table allocation.
From: Heiko Carstens <[email protected]>
[S390] kernel page table allocation.
Don't waste DMA capable pages for identity mapping page tables.
Signed-off-by Heiko Carstens <[email protected]>
Signed-off-by Martin Schwidefsky <[email protected]>
---
arch/s390/mm/init.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/s390/mm/init.c +3 -3
@@ -129,7 +129,7 @@ void __init paging_init(void)/* * pg_table is physical at this point */ - pg_table = (pte_t *)alloc_bootmem_low_pages (PAGE_SIZE ); + pg_table = (pte_t *)alloc_bootmem_pages (PAGE_SIZE ); pg_dir->pgd0 = (_PAGE_TABLE |__pa (pg_table)); pg_dir->pgd1 = (_PAGE_TABLE | (__pa (pg_table)+1024 ));
@@ -219,7 +219,7 @@ void __init paging_init(void)continue ; } - pm_dir = (pmd_t *)alloc_bootmem_low_pages (PAGE_SIZE *4 ); + pm_dir = (pmd_t *)alloc_bootmem_pages (PAGE_SIZE *4 );pgd_populate (&init_mm, pg_dir, pm_dir);for (j =0 ; j <PTRS_PER_PMD ; j++,pm_dir++) {
@@ -228,7 +228,7 @@ void __init paging_init(void)continue ; } - pt_dir = (pte_t *)alloc_bootmem_low_pages (PAGE_SIZE ); + pt_dir = (pte_t *)alloc_bootmem_pages (PAGE_SIZE );pmd_populate_kernel (&init_mm, pm_dir, pt_dir);for (k =0 ; k <PTRS_PER_PTE ; k++,pt_dir++) {
arch/s390/mm/init.c void __init paging_init(void) · line 132
Quoted 2 lines
arch/s390/mm/init.c +1
-1- pg_table = (pte_t *)alloc_bootmem_low_pages (PAGE_SIZE ); + pg_table = (pte_t *)alloc_bootmem_pages (PAGE_SIZE );
Again, no need to cast the alloc_bootmem_pages return value.
Quoted 4 lines · Christoph Hellwig
arch/s390/mm/init.c void __init paging_init(void) · line 132
Quoted 2 lines
arch/s390/mm/init.c +1
-1- pg_table = (pte_t *)alloc_bootmem_low_pages (PAGE_SIZE ); + pg_table = (pte_t *)alloc_bootmem_pages (PAGE_SIZE );Again, no need to cast the
alloc_bootmem_pagesreturn value.
A cleanup of the s390 code in regard to unnecessary casts would make sense I guess..
Signature · 8 lines
blue skies, Martin. Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH "Reality continues to ruin my life." - Calvin.