1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
6 #ifndef _LOONGARCH_SETUP_H
7 #define _LOONGARCH_SETUP_H
9 #include <linux/types.h>
10 #include <asm/sections.h>
11 #include <uapi/asm/setup.h>
15 extern unsigned long eentry
;
16 extern unsigned long tlbrentry
;
17 extern char init_command_line
[COMMAND_LINE_SIZE
];
18 extern void tlb_init(int cpu
);
19 extern void cpu_cache_init(void);
20 extern void cache_error_setup(void);
21 extern void per_cpu_trap_init(int cpu
);
22 extern void set_handler(unsigned long offset
, void *addr
, unsigned long len
);
23 extern void set_merr_handler(unsigned long offset
, void *addr
, unsigned long len
);
25 #ifdef CONFIG_RELOCATABLE
32 extern long __la_abs_begin
;
33 extern long __la_abs_end
;
34 extern long __rela_dyn_begin
;
35 extern long __rela_dyn_end
;
38 extern long __relr_dyn_begin
;
39 extern long __relr_dyn_end
;
42 extern unsigned long __init
relocate_kernel(void);
46 static inline unsigned long kaslr_offset(void)
48 return (unsigned long)&_text
- VMLINUX_LOAD_ADDRESS
;
51 #endif /* __SETUP_H */