[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] mwait-idle: add support for AMD processors
>>> On 25.02.19 at 21:23, <Brian.Woods@xxxxxxx> wrote: > Newer AMD processors (F17h) have mwait support. Add some checks to make > sure vendor specific code is run correctly and some infrastructure to > facilitate adding AMD processors. Both my Fam15 and my Fam10 system have CPUID[1].ECX[3] set - why the reference to Fam17 here? > @@ -1115,6 +1122,9 @@ static void __init sklh_idle_state_table_update(void) > */ > static void __init mwait_idle_state_table_update(void) > { > + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) > + return; Please use != INTEL here. > @@ -1126,13 +1136,24 @@ static void __init mwait_idle_state_table_update(void) > case 0x5e: /* SKL-H */ > sklh_idle_state_table_update(); > break; > - } > + } > } > > static int __init mwait_idle_probe(void) > { > unsigned int eax, ebx, ecx; > - const struct x86_cpu_id *id = x86_match_cpu(intel_idle_ids); > + const struct x86_cpu_id *id; > + > + switch (boot_cpu_data.x86_vendor) { > + case X86_VENDOR_INTEL: > + id = x86_match_cpu(intel_idle_ids); > + break; > + case X86_VENDOR_AMD: > + id = x86_match_cpu(amd_idle_ids); > + break; > + default: > + id = NULL; > + } Missing break statement again, but perhaps even better here to drop the default: and make NULL the variable's initializer. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |