Commit 1af26389 authored by Chen Jun's avatar Chen Jun Committed by Zheng Zengkai
Browse files

perf: hisi: Fix read sccl_id and ccl_id error in some platform

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I584X2


CVE: NA

--------------------------------

Some platforms with TSV200 or CORTEX_A55, sccl and ccl are keep in
aff2 if mt.

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 35ba3137
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -434,12 +434,19 @@ static void hisi_read_sccl_and_ccl_id(int *scclp, int *cclp)
	bool mt = mpidr & MPIDR_MT_BITMASK;
	int sccl, ccl;

	if (mt && read_cpuid_part_number() == HISI_CPU_PART_TSV110) {
	if (mt) {
		switch (read_cpuid_part_number()) {
		case HISI_CPU_PART_TSV110:
		case HISI_CPU_PART_TSV200:
		case ARM_CPU_PART_CORTEX_A55:
			sccl = aff2 >> 3;
			ccl = aff2 & 0x7;
	} else if (mt) {
			break;
		default:
			sccl = aff3;
			ccl = aff2;
			break;
		}
	} else {
		sccl = aff2;
		ccl = aff1;