The kaslr_offset() function is a simple accessor that returns
kernel_map.virt_offset. This commit change also ensures that kaslr_offset()
is consistently available across various kernel configurations without
requiring explicit linkage to mm/init.c.
Signed-off-by: Austin Kim <austin.kim@lge.com>
Link: https://patch.msgid.link/aYwJ76yHaMbbQVJA@adminpc-PowerEdge-R7525
Signed-off-by: Paul Walmsley <pjw@kernel.org>
#define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x))
-unsigned long kaslr_offset(void);
+static inline unsigned long kaslr_offset(void)
+{
+ return kernel_map.virt_offset;
+}
static __always_inline void *pfn_to_kaddr(unsigned long pfn)
{
return 0;
}
early_param("nokaslr", print_nokaslr);
-
-unsigned long kaslr_offset(void)
-{
- return kernel_map.virt_offset;
-}
#endif
asmlinkage void __init setup_vm(uintptr_t dtb_pa)