Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / loongarch / include / asm / setup.h
blob3c2fb16b11b649cdfc895c9051d471307c9ca0ce
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4 */
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>
13 #define VECSIZE 0x200
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
27 struct rela_la_abs {
28 long pc;
29 long symvalue;
32 extern long __la_abs_begin;
33 extern long __la_abs_end;
34 extern long __rela_dyn_begin;
35 extern long __rela_dyn_end;
37 #ifdef CONFIG_RELR
38 extern long __relr_dyn_begin;
39 extern long __relr_dyn_end;
40 #endif
42 extern unsigned long __init relocate_kernel(void);
44 #endif
46 static inline unsigned long kaslr_offset(void)
48 return (unsigned long)&_text - VMLINUX_LOAD_ADDRESS;
51 #endif /* __SETUP_H */