lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 7 Nov 2021 17:51:00 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     Kohei Tarumizu <tarumizu.kohei@...itsu.com>,
        catalin.marinas@....com, will@...nel.org, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
        x86@...nel.org, hpa@...or.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 3/5] driver: hwpf: Add support for Intel to
 hardware prefetch driver

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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ