diff options
author | Vineet Gupta <vgupta@kernel.org> | 2021-08-12 21:54:43 +0200 |
---|---|---|
committer | Vineet Gupta <vgupta@kernel.org> | 2021-08-26 22:42:42 +0200 |
commit | d9820ff76f95fa26d33e412254a89cd65b23142d (patch) | |
tree | 4f7fcc648a3b08f5533923b05abbd00c29879b6d /arch/arc/mm/init.c | |
parent | ARC: mm: hack to allow 2 level build with 4 level code (diff) | |
download | linux-d9820ff76f95fa26d33e412254a89cd65b23142d.tar.xz linux-d9820ff76f95fa26d33e412254a89cd65b23142d.zip |
ARC: mm: switch pgtable_t back to struct page *
So far ARC pgtable_t has not been struct page based to avoid extra
page_address() calls involved. However the differences are down to
noise and get in the way of using generic code, hence this patch.
This also allows us to reuse generic THP depost/withdraw code.
There's some additional consideration for PGDIR_SHIFT in 4K page config.
Now due to page tables being PAGE_SIZE deep only, the address split
can't be really arbitrary.
Tested-by: kernel test robot <lkp@intel.com>
Suggested-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Diffstat (limited to 'arch/arc/mm/init.c')
-rw-r--r-- | arch/arc/mm/init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index c083bf660cec..46ad9aee7a73 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c @@ -189,6 +189,9 @@ void __init mem_init(void) { memblock_free_all(); highmem_init(); + + BUILD_BUG_ON((PTRS_PER_PGD * sizeof(pgd_t)) > PAGE_SIZE); + BUILD_BUG_ON((PTRS_PER_PTE * sizeof(pte_t)) > PAGE_SIZE); } #ifdef CONFIG_HIGHMEM |