summaryrefslogtreecommitdiff
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@rivosinc.com>2023-04-19 07:47:45 -0700
committerPalmer Dabbelt <palmer@rivosinc.com>2023-04-19 07:47:45 -0700
commit310c33dc7a1278d80ba717b9964bd478d52681e0 (patch)
tree0480d0a0aa1b9c1efa31f498d6227ed2b931aad1 /arch/riscv/include
parent2667e3673f7079cf95d58cf84d7c0b5a455ac68b (diff)
parent559d1e45a16dcf1542e430ea3dce9ab625be98d0 (diff)
downloadlinux-310c33dc7a1278d80ba717b9964bd478d52681e0.tar.gz
Merge patch series "Introduce 64b relocatable kernel"
Alexandre Ghiti <alexghiti@rivosinc.com> says: After multiple attempts, this patchset is now based on the fact that the 64b kernel mapping was moved outside the linear mapping. The first patch allows to build relocatable kernels but is not selected by default. That patch is a requirement for KASLR. The second and third patches take advantage of an already existing powerpc script that checks relocations at compile-time, and uses it for riscv. * b4-shazam-merge: riscv: Use --emit-relocs in order to move .rela.dyn in init riscv: Check relocations at compile time powerpc: Move script to check relocations at compile time in scripts/ riscv: Introduce CONFIG_RELOCATABLE riscv: Move .rela.dyn outside of init to avoid empty relocations riscv: Prepare EFI header for relocatable kernels Link: https://lore.kernel.org/r/20230329045329.64565-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/set_memory.h3
-rw-r--r--arch/riscv/include/asm/topology.h5
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/riscv/include/asm/set_memory.h b/arch/riscv/include/asm/set_memory.h
index a2c14d4b3993..ec11001c3fe0 100644
--- a/arch/riscv/include/asm/set_memory.h
+++ b/arch/riscv/include/asm/set_memory.h
@@ -56,4 +56,7 @@ bool kernel_page_present(struct page *page);
#define SECTION_ALIGN L1_CACHE_BYTES
#endif /* CONFIG_STRICT_KERNEL_RWX */
+#define PECOFF_SECTION_ALIGNMENT 0x1000
+#define PECOFF_FILE_ALIGNMENT 0x200
+
#endif /* _ASM_RISCV_SET_MEMORY_H */
diff --git a/arch/riscv/include/asm/topology.h b/arch/riscv/include/asm/topology.h
index 727e8d163a3b..e316ab3b77f3 100644
--- a/arch/riscv/include/asm/topology.h
+++ b/arch/riscv/include/asm/topology.h
@@ -5,8 +5,8 @@
#include <linux/arch_topology.h>
/* Replace task scheduler's default frequency-invariant accounting */
-#define arch_scale_freq_tick topology_scale_freq_tick
-#define arch_set_freq_scale topology_set_freq_scale
+#define arch_scale_freq_tick topology_scale_freq_tick
+#define arch_set_freq_scale topology_set_freq_scale
#define arch_scale_freq_capacity topology_get_freq_scale
#define arch_scale_freq_invariant topology_scale_freq_invariant
@@ -17,4 +17,5 @@
#define arch_update_cpu_topology topology_update_cpu_topology
#include <asm-generic/topology.h>
+
#endif /* _ASM_RISCV_TOPOLOGY_H */