Skip to content

Commit a373a36

Browse files
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 'aea702dde7e9876fb00571a2602f25130847bf0f': 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/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
2 parents d14fa1f + aea702d commit a373a36

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/riscv/include/asm/page.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ typedef struct page *pgtable_t;
8989
#define PTE_FMT "%08lx"
9090
#endif
9191

92-
#ifdef CONFIG_64BIT
92+
#if defined(CONFIG_64BIT) && defined(CONFIG_MMU)
9393
/*
9494
* We override this value as its generic definition uses __pa too early in
9595
* the boot process (before kernel_map.va_pa_offset is set).

arch/riscv/include/asm/pgtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
896896
#define PAGE_SHARED __pgprot(0)
897897
#define PAGE_KERNEL __pgprot(0)
898898
#define swapper_pg_dir NULL
899-
#define TASK_SIZE 0xffffffffUL
899+
#define TASK_SIZE _AC(-1, UL)
900900
#define VMALLOC_START _AC(0, UL)
901901
#define VMALLOC_END TASK_SIZE
902902

arch/riscv/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static void __init setup_bootmem(void)
231231
* In 64-bit, any use of __va/__pa before this point is wrong as we
232232
* did not know the start of DRAM before.
233233
*/
234-
if (IS_ENABLED(CONFIG_64BIT))
234+
if (IS_ENABLED(CONFIG_64BIT) && IS_ENABLED(CONFIG_MMU))
235235
kernel_map.va_pa_offset = PAGE_OFFSET - phys_ram_base;
236236

237237
/*

0 commit comments

Comments
 (0)