risc v 支持64bit

从下面的代码看,risc v 也支持64bit,不像arm 分成arm和arm64两个目录,也就是risc 一个目录
同时支持64bit和32bit,无法兼容的部分用defined(CONFIG_64BIT) 和 defined(CONFIG_32BIT)
来区分.
static void print_mmu(struct seq_file *f, const char *mmu_type)
{
#if defined(CONFIG_32BIT)
	if (strcmp(mmu_type, "riscv,sv32") != 0)
		return;
#elif defined(CONFIG_64BIT)
	if (strcmp(mmu_type, "riscv,sv39") != 0 &&
	    strcmp(mmu_type, "riscv,sv48") != 0)
		return;
#endif

	seq_printf(f, "mmu\t\t: %s\n", mmu_type+6);
}

猜你喜欢

转载自blog.csdn.net/tiantao2012/article/details/109527635
今日推荐