diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2024-04-23 10:33:04 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2024-04-23 10:33:04 +0200 |
commit | 499fa83eeeb4569a698dc9e1fa68d99e610d7b76 (patch) | |
tree | 872a12249c7cf5b8a9d6c8cd69cf7cf85cea2524 | |
parent | 4744b2a3c1dc631b3304373e186eb187058e856d (diff) | |
parent | a373a36fb6b024ac1d87fc04c97c75621b574c30 (diff) | |
download | renesas-drivers-499fa83eeeb4569a698dc9e1fa68d99e610d7b76.tar.gz |
Merge remote-tracking branch 'riscv/fixes' into renesas-drivers
Notice: this object is not reachable from any branch.
Notice: this object is not reachable from any branch.
-rw-r--r-- | arch/riscv/include/asm/page.h | 2 | ||||
-rw-r--r-- | arch/riscv/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/riscv/mm/init.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h index 2947423b5082e9..115ac98b8d729d 100644 --- a/arch/riscv/include/asm/page.h +++ b/arch/riscv/include/asm/page.h @@ -89,7 +89,7 @@ typedef struct page *pgtable_t; #define PTE_FMT "%08lx" #endif -#ifdef CONFIG_64BIT +#if defined(CONFIG_64BIT) && defined(CONFIG_MMU) /* * We override this value as its generic definition uses __pa too early in * the boot process (before kernel_map.va_pa_offset is set). diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 9f8ea0e33eb104..6afd6bb4882eb2 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -896,7 +896,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) #define PAGE_SHARED __pgprot(0) #define PAGE_KERNEL __pgprot(0) #define swapper_pg_dir NULL -#define TASK_SIZE 0xffffffffUL +#define TASK_SIZE _AC(-1, UL) #define VMALLOC_START _AC(0, UL) #define VMALLOC_END TASK_SIZE diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index fe8e159394d8ee..9687618432031f 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -231,7 +231,7 @@ static void __init setup_bootmem(void) * In 64-bit, any use of __va/__pa before this point is wrong as we * did not know the start of DRAM before. */ - if (IS_ENABLED(CONFIG_64BIT)) + if (IS_ENABLED(CONFIG_64BIT) && IS_ENABLED(CONFIG_MMU)) kernel_map.va_pa_offset = PAGE_OFFSET - phys_ram_base; /* |