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

!8831 Add support for Hygon model 7h processors

parents f97cbc1f a5efd418
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ static u64 l3_thread_slice_mask(u64 config)

	if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON &&
	    boot_cpu_data.x86 == 0x18) {
		if (boot_cpu_data.x86_model == 0x6)
		if (boot_cpu_data.x86_model >= 0x6 && boot_cpu_data.x86_model <= 0xf)
			return ((config & HYGON_L3_SLICE_MASK) ? : HYGON_L3_SLICE_MASK) |
			       ((config & HYGON_L3_THREAD_MASK) ? : HYGON_L3_THREAD_MASK);
		else
@@ -282,7 +282,8 @@ amd_f17h_uncore_is_visible(struct kobject *kobj, struct attribute *attr, int i)
static umode_t
hygon_f18h_m6h_uncore_is_visible(struct kobject *kobj, struct attribute *attr, int i)
{
	return boot_cpu_data.x86 == 0x18 && boot_cpu_data.x86_model == 0x6 ?
	return boot_cpu_data.x86 == 0x18 &&
	       boot_cpu_data.x86_model >= 0x6 && boot_cpu_data.x86_model <= 0xf ?
	       attr->mode : 0;
}

@@ -755,7 +756,7 @@ static int __init amd_uncore_init(void)
			   boot_cpu_data.x86 == 0x18) {
			*l3_attr++ = &format_attr_event8.attr;
			*l3_attr++ = &format_attr_umask8.attr;
			if (boot_cpu_data.x86_model == 0x6) {
			if (boot_cpu_data.x86_model >= 0x6 && boot_cpu_data.x86_model <= 0xf) {
				*l3_attr++ = &format_attr_threadmask32.attr;
				amd_llc_pmu.attr_update = hygon_uncore_l3_attr_update;
			} else {
+2 −0
Original line number Diff line number Diff line
@@ -286,6 +286,7 @@ static int get_df_register(struct pci_dev *misc, u8 func, int offset, u32 *value
				device = PCI_DEVICE_ID_HYGON_18H_M04H_DF_F1;
			break;
		case 0x6:
		case 0x7:
			device = PCI_DEVICE_ID_HYGON_18H_M05H_DF_F1;
			break;
		default:
@@ -294,6 +295,7 @@ static int get_df_register(struct pci_dev *misc, u8 func, int offset, u32 *value
	} else if (func == 5) {
		switch (boot_cpu_data.x86_model) {
		case 0x6:
		case 0x7:
			device = PCI_DEVICE_ID_HYGON_18H_M06H_DF_F5;
			break;
		default:
+5 −0
Original line number Diff line number Diff line
@@ -3786,6 +3786,11 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
			fam_type = &family_types[F18_M06H_CPUS];
			pvt->ops = &family_types[F18_M06H_CPUS].ops;
			break;
		} else if (pvt->model == 0x7) {
			fam_type = &family_types[F18_M06H_CPUS];
			pvt->ops = &family_types[F18_M06H_CPUS].ops;
			family_types[F18_M06H_CPUS].ctl_name = "F18h_M07h";
			break;
		}
		fam_type	= &family_types[F17_CPUS];
		pvt->ops	= &family_types[F17_CPUS].ops;