Skip to content

Commit eefb5f3

Browse files
svancaupalmer-dabbelt
authored andcommitted
riscv: Align on L1_CACHE_BYTES when STRICT_KERNEL_RWX
Allows the sections to be aligned on smaller boundaries and therefore results in a smaller kernel image size. Signed-off-by: Sebastien Van Cauwenberghe <[email protected]> Reviewed-by: Atish Patra <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent f105ea9 commit eefb5f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/riscv/include/asm/set_memory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ bool kernel_page_present(struct page *page);
3232

3333
#endif /* __ASSEMBLY__ */
3434

35-
#ifdef CONFIG_ARCH_HAS_STRICT_KERNEL_RWX
35+
#ifdef CONFIG_STRICT_KERNEL_RWX
3636
#ifdef CONFIG_64BIT
3737
#define SECTION_ALIGN (1 << 21)
3838
#else
3939
#define SECTION_ALIGN (1 << 22)
4040
#endif
41-
#else /* !CONFIG_ARCH_HAS_STRICT_KERNEL_RWX */
41+
#else /* !CONFIG_STRICT_KERNEL_RWX */
4242
#define SECTION_ALIGN L1_CACHE_BYTES
43-
#endif /* CONFIG_ARCH_HAS_STRICT_KERNEL_RWX */
43+
#endif /* CONFIG_STRICT_KERNEL_RWX */
4444

4545
#endif /* _ASM_RISCV_SET_MEMORY_H */

0 commit comments

Comments
 (0)