machvec.c

来自「Linux内核源代码 为压缩文件 是<<Linux内核>&gt」· C语言 代码 · 共 56 行

C
56
字号
#include <linux/config.h>#ifdef CONFIG_IA64_GENERIC#include <linux/kernel.h>#include <linux/string.h>#include <asm/page.h>#include <asm/machvec.h>struct ia64_machine_vector ia64_mv;/* * Most platforms use this routine for mapping page frame addresses * into a memory map index. */unsigned longmap_nr_dense (unsigned long addr){	return MAP_NR_DENSE(addr);}static struct ia64_machine_vector *lookup_machvec (const char *name){	extern struct ia64_machine_vector machvec_start[];	extern struct ia64_machine_vector machvec_end[];	struct ia64_machine_vector *mv;	for (mv = machvec_start; mv < machvec_end; ++mv)		if (strcmp (mv->name, name) == 0)			return mv;	return 0;}voidmachvec_init (const char *name){	struct ia64_machine_vector *mv;	mv = lookup_machvec(name);	if (!mv) {		panic("generic kernel failed to find machine vector for platform %s!", name);	}	ia64_mv = *mv;	printk("booting generic kernel on platform %s\n", name);}#endif /* CONFIG_IA64_GENERIC */voidmachvec_noop (void){}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?