Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4 */
5
6#ifndef _LOONGARCH_SETUP_H
7#define _LOONGARCH_SETUP_H
8
9#include <linux/types.h>
10#include <asm/sections.h>
11#include <uapi/asm/setup.h>
12
13#define VECSIZE 0x200
14
15extern unsigned long eentry;
16extern unsigned long tlbrentry;
17extern char init_command_line[COMMAND_LINE_SIZE];
18extern void tlb_init(int cpu);
19extern void cpu_cache_init(void);
20extern void cache_error_setup(void);
21extern void per_cpu_trap_init(int cpu);
22extern void set_handler(unsigned long offset, void *addr, unsigned long len);
23extern void set_merr_handler(unsigned long offset, void *addr, unsigned long len);
24
25#ifdef CONFIG_RELOCATABLE
26
27struct rela_la_abs {
28 long pc;
29 long symvalue;
30};
31
32extern long __la_abs_begin;
33extern long __la_abs_end;
34extern long __rela_dyn_begin;
35extern long __rela_dyn_end;
36
37#ifdef CONFIG_RELR
38extern long __relr_dyn_begin;
39extern long __relr_dyn_end;
40#endif
41
42extern unsigned long __init relocate_kernel(void);
43
44#endif
45
46static inline unsigned long kaslr_offset(void)
47{
48 return (unsigned long)&_text - VMLINUX_LOAD_ADDRESS;
49}
50
51#endif /* __SETUP_H */