lkml.org 
[lkml]   [2021]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v2 3/5] driver: hwpf: Add support for Intel to hardware prefetch driver
From
Date
On 11/3/21 10:21 PM, Kohei Tarumizu wrote:
> +enum register_type __init get_register_type(void)
> +{
> + if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
> + return REGISTER_TYPE_NONE;
> +
> + switch (boot_cpu_data.x86_model) {
> + /*
> + * Note: In addition to BROADWELL, NEHALEM and others have same register
> + * specifications as REGISTER_TYPE_BROADWELL. If you want to add support
> + * for these processor, add the target model case here.
> + */
> + case INTEL_FAM6_BROADWELL_X:
> + return REGISTER_TYPE_BROADWELL;
> + default:
> + return REGISTER_TYPE_NONE;
> + }
> +}

Can you do this with a struct and x86_match_cpu() instead?

\
 
 \ /
  Last update: 2021-11-08 02:51    [W:0.179 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site