]> Git Repo - J-linux.git/blob - arch/loongarch/include/asm/bootinfo.h
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / arch / loongarch / include / asm / bootinfo.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4  */
5 #ifndef _ASM_BOOTINFO_H
6 #define _ASM_BOOTINFO_H
7
8 #include <linux/types.h>
9 #include <asm/setup.h>
10
11 const char *get_system_type(void);
12
13 extern void init_environ(void);
14 extern void memblock_init(void);
15 extern void platform_init(void);
16 extern int __init init_numa_memory(void);
17
18 struct loongson_board_info {
19         int bios_size;
20         const char *bios_vendor;
21         const char *bios_version;
22         const char *bios_release_date;
23         const char *board_name;
24         const char *board_vendor;
25 };
26
27 #define NR_WORDS DIV_ROUND_UP(NR_CPUS, BITS_PER_LONG)
28
29 /*
30  * The "core" of cores_per_node and cores_per_package stands for a
31  * logical core, which means in a SMT system it stands for a thread.
32  */
33 struct loongson_system_configuration {
34         int nr_cpus;
35         int nr_nodes;
36         int boot_cpu_id;
37         int cores_per_node;
38         int cores_per_package;
39         unsigned long cores_io_master[NR_WORDS];
40         unsigned long suspend_addr;
41         const char *cpuname;
42 };
43
44 extern u64 efi_system_table;
45 extern unsigned long fw_arg0, fw_arg1, fw_arg2;
46 extern struct loongson_board_info b_info;
47 extern struct loongson_system_configuration loongson_sysconf;
48
49 static inline bool io_master(int cpu)
50 {
51         return test_bit(cpu, loongson_sysconf.cores_io_master);
52 }
53
54 #endif /* _ASM_BOOTINFO_H */
This page took 0.030318 seconds and 4 git commands to generate.