Commit a373a36f authored by Palmer Dabbelt's avatar Palmer Dabbelt

Merge patch the fixes from "riscv: 64-bit NOMMU fixes and enhancements"

These two patches are fixes that the feature depends on, but they also
fix generic issues.  So I'm picking them up for fixes as well as
for-next.

* commit 'aea702dd':
  riscv: Fix loading 64-bit NOMMU kernels past the start of RAM
  riscv: Fix TASK_SIZE on 64-bit NOMMU

Link: https://lore.kernel.org/r/20240227003630.3634533-1-samuel.holland@sifive.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parents d14fa1fc aea702dd
...@@ -89,7 +89,7 @@ typedef struct page *pgtable_t; ...@@ -89,7 +89,7 @@ typedef struct page *pgtable_t;
#define PTE_FMT "%08lx" #define PTE_FMT "%08lx"
#endif #endif
#ifdef CONFIG_64BIT #if defined(CONFIG_64BIT) && defined(CONFIG_MMU)
/* /*
* We override this value as its generic definition uses __pa too early in * We override this value as its generic definition uses __pa too early in
* the boot process (before kernel_map.va_pa_offset is set). * the boot process (before kernel_map.va_pa_offset is set).
......
...@@ -896,7 +896,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) ...@@ -896,7 +896,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
#define PAGE_SHARED __pgprot(0) #define PAGE_SHARED __pgprot(0)
#define PAGE_KERNEL __pgprot(0) #define PAGE_KERNEL __pgprot(0)
#define swapper_pg_dir NULL #define swapper_pg_dir NULL
#define TASK_SIZE 0xffffffffUL #define TASK_SIZE _AC(-1, UL)
#define VMALLOC_START _AC(0, UL) #define VMALLOC_START _AC(0, UL)
#define VMALLOC_END TASK_SIZE #define VMALLOC_END TASK_SIZE
......
...@@ -231,7 +231,7 @@ static void __init setup_bootmem(void) ...@@ -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 * In 64-bit, any use of __va/__pa before this point is wrong as we
* did not know the start of DRAM before. * 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; kernel_map.va_pa_offset = PAGE_OFFSET - phys_ram_base;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment