[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191121103732.GA6540@zn.tnic>
Date: Thu, 21 Nov 2019 11:37:32 +0100
From: Borislav Petkov <bp@...en8.de>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
"Luck, Tony" <tony.luck@...el.com>,
Dave Jiang <dave.jiang@...el.com>, dmaengine@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Vinod Koul <vkoul@...nel.org>, Jing Lin <jing.lin@...el.com>,
"Raj, Ashok" <ashok.raj@...el.com>,
"Kumar, Sanjay K" <sanjay.k.kumar@...el.com>,
"Dey, Megha" <megha.dey@...el.com>,
"Pan, Jacob jun" <jacob.jun.pan@...el.com>,
"Liu, Yi L" <yi.l.liu@...el.com>, Jens Axboe <axboe@...nel.dk>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...hat.com>,
Fenghua Yu <fenghua.yu@...el.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH RFC 01/14] x86/asm: add iosubmit_cmds512() based on
movdir64b CPU instruction
On Wed, Nov 20, 2019 at 05:32:51PM -0800, Dan Williams wrote:
> True, but that would be a driver coding mistake flagged by the
> WARN_ON_ONCE, and the failure is static. The driver must check for
> static_cpu_has(X86_FEATURE_MOVDIR64B) once at init,
So if you do that at driver init time, you don't need the static variant
- simply use boot_cpu_has(). But if this function is going to be used on
other platforms, then you need the check in the function and it must be
static_cpu_has() for speed.
The static_cpu_has() thing is a soft-of once check anyway because it
gets patched by alternatives and after that it is 0 overhead.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists