arch/loongarch/include/asm/bootinfo.h

Source file repositories/reference/linux-study-clean/arch/loongarch/include/asm/bootinfo.h

File Facts

System
Linux kernel
Corpus path
arch/loongarch/include/asm/bootinfo.h
Extension
.h
Size
1311 bytes
Lines
55
Domain
Architecture Layer
Bucket
arch/loongarch
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

struct loongson_board_info {
	int bios_size;
	const char *bios_vendor;
	const char *bios_version;
	const char *bios_release_date;
	const char *board_name;
	const char *board_vendor;
};

#define NR_WORDS DIV_ROUND_UP(NR_CPUS, BITS_PER_LONG)

/*
 * The "core" of cores_per_node and cores_per_package stands for a
 * logical core, which means in a SMT system it stands for a thread.
 */
struct loongson_system_configuration {
	int nr_cpus;
	int nr_nodes;
	int boot_cpu_id;
	int cores_per_node;
	int cores_per_package;
	unsigned long cores_io_master[NR_WORDS];
	unsigned long suspend_addr;
	const char *cpuname;
};

extern u64 efi_system_table;
extern unsigned long fw_arg0, fw_arg1, fw_arg2;
extern struct loongson_board_info b_info;
extern struct loongson_system_configuration loongson_sysconf;

static inline bool io_master(int cpu)
{
	return test_bit(cpu, loongson_sysconf.cores_io_master);
}

#endif /* _ASM_BOOTINFO_H */

Annotation

Implementation Notes