riscv: Introduce huge page support for 32/64bit kernel
This patch implements both 4MB huge page support for 32bit kernel and 2MB/1GB huge pages support for 64bit kernel. Signed-off-by: Alexandre Ghiti <alex@ghiti.fr> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
This commit is contained in:

committed by
Paul Walmsley

parent
3876d4a38a
commit
9e953cda5c
@@ -113,7 +113,6 @@ static inline void pmd_clear(pmd_t *pmdp)
|
||||
set_pmd(pmdp, __pmd(0));
|
||||
}
|
||||
|
||||
|
||||
static inline pgd_t pfn_pgd(unsigned long pfn, pgprot_t prot)
|
||||
{
|
||||
return __pgd((pfn << _PAGE_PFN_SHIFT) | pgprot_val(prot));
|
||||
@@ -250,6 +249,11 @@ static inline pte_t pte_mkspecial(pte_t pte)
|
||||
return __pte(pte_val(pte) | _PAGE_SPECIAL);
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkhuge(pte_t pte)
|
||||
{
|
||||
return pte;
|
||||
}
|
||||
|
||||
/* Modify page protection bits */
|
||||
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
||||
{
|
||||
@@ -409,7 +413,7 @@ static inline void pgtable_cache_init(void)
|
||||
#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE)
|
||||
|
||||
/*
|
||||
* Task size is 0x40000000000 for RV64 or 0xb800000 for RV32.
|
||||
* Task size is 0x4000000000 for RV64 or 0xb800000 for RV32.
|
||||
* Note that PGDIR_SIZE must evenly divide TASK_SIZE.
|
||||
*/
|
||||
#ifdef CONFIG_64BIT
|
||||
|
Reference in New Issue
Block a user