[RFC PATCH v2 3/5] driver: hwpf: Add support for Intel to hardware prefetch driver
Dave Hansen
dave.hansen at intel.com
Sun Nov 7 17:51:00 PST 2021
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?
More information about the linux-arm-kernel
mailing list