Re: [PATCH v4 17/24] crypto: x86/poly - load based on CPU features

From: Jason A. Donenfeld
Date: Wed Nov 16 2022 - 06:31:26 EST


On Tue, Nov 15, 2022 at 10:13:35PM -0600, Robert Elliott wrote:
> +static const struct x86_cpu_id module_cpu_ids[] = {
> + X86_MATCH_FEATURE(X86_FEATURE_ANY, NULL),
> + {}
> +};
> +MODULE_DEVICE_TABLE(x86cpu, module_cpu_ids);
> +
> static int __init poly1305_simd_mod_init(void)
> {
> + if (!x86_match_cpu(module_cpu_ids))
> + return -ENODEV;

What exactly does this accomplish? Isn't this just a no-op?

Jason