Unverified Commit b6dee15b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4292 powerpc: Add PVN support for HeXin C2000 processor

Merge Pull Request from: @byterzj 
 
HeXin Tech Co. has applied for a new PVN from the OpenPower Community
for its new processor C2000. The OpenPower has assigned a new PVN
and this newly assigned PVN is 0x0066, add pvr register related
support for this PVN.

https://gitee.com/openeuler/kernel/issues/I8ZMAY

This patch include:
backport PVN form mainline

Test:
no functional modifications involved 
 
Link:https://gitee.com/openeuler/kernel/pulls/4292

 

Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents ec607b43 28cf2c9c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1361,6 +1361,7 @@
#define PVR_POWER8E	0x004B
#define PVR_POWER8NVL	0x004C
#define PVR_POWER8	0x004D
#define PVR_HX_C2000	0x0066
#define PVR_POWER9	0x004E
#define PVR_POWER10	0x0080
#define PVR_BE		0x0070
+15 −0
Original line number Diff line number Diff line
@@ -238,6 +238,21 @@ static struct cpu_spec cpu_specs[] __initdata = {
		.machine_check_early	= __machine_check_early_realmode_p8,
		.platform		= "power8",
	},
	{	/* 2.07-compliant processor, HeXin C2000 processor */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00660000,
		.cpu_name		= "HX-C2000",
		.cpu_features		= CPU_FTRS_POWER8,
		.cpu_user_features	= COMMON_USER_POWER8,
		.cpu_user_features2	= COMMON_USER2_POWER8,
		.mmu_features		= MMU_FTRS_POWER8,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.cpu_setup		= __setup_cpu_power8,
		.cpu_restore		= __restore_cpu_power8,
		.machine_check_early	= __machine_check_early_realmode_p8,
		.platform		= "power8",
	},
	{	/* 3.00-compliant processor, i.e. Power9 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000005,
+1 −0
Original line number Diff line number Diff line
@@ -604,6 +604,7 @@ static void kvmppc_set_pvr_pr(struct kvm_vcpu *vcpu, u32 pvr)
	case PVR_POWER8:
	case PVR_POWER8E:
	case PVR_POWER8NVL:
	case PVR_HX_C2000:
	case PVR_POWER9:
		vcpu->arch.hflags |= BOOK3S_HFLAG_MULTI_PGSIZE |
			BOOK3S_HFLAG_NEW_TLBIE;
+2 −1
Original line number Diff line number Diff line
@@ -89,7 +89,8 @@ static int __init scan_pkey_feature(void)
			unsigned long pvr = mfspr(SPRN_PVR);

			if (PVR_VER(pvr) == PVR_POWER8 || PVR_VER(pvr) == PVR_POWER8E ||
			    PVR_VER(pvr) == PVR_POWER8NVL || PVR_VER(pvr) == PVR_POWER9)
			    PVR_VER(pvr) == PVR_POWER8NVL || PVR_VER(pvr) == PVR_POWER9 ||
			    PVR_VER(pvr) == PVR_HX_C2000)
				pkeys_total = 32;
		}
	}
+2 −1
Original line number Diff line number Diff line
@@ -425,7 +425,8 @@ static int subcore_init(void)

	if (pvr_ver != PVR_POWER8 &&
	    pvr_ver != PVR_POWER8E &&
	    pvr_ver != PVR_POWER8NVL)
	    pvr_ver != PVR_POWER8NVL &&
	    pvr_ver != PVR_HX_C2000)
		return 0;

	/*
Loading