[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YsVUvK/zQaIW749P@localhost.localdomain>
Date: Wed, 6 Jul 2022 12:24:12 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Mark Hemment <markhemm@...glemail.com>,
Andrew Morton <akpm@...ux-foundation.org>,
the arch/x86 maintainers <x86@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
patrice.chotard@...s.st.com, Mikulas Patocka <mpatocka@...hat.com>,
Lukas Czerner <lczerner@...hat.com>,
Christoph Hellwig <hch@....de>,
"Darrick J. Wong" <djwong@...nel.org>,
Chuck Lever <chuck.lever@...cle.com>,
Hugh Dickins <hughd@...gle.com>, patches@...ts.linux.dev,
Linux-MM <linux-mm@...ck.org>, mm-commits@...r.kernel.org,
Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH -final] x86/clear_user: Make it faster
On Tue, Jul 05, 2022 at 07:01:06PM +0200, Borislav Petkov wrote:
> + asm volatile(
> + "1:\n\t"
> + ALTERNATIVE_3("rep stosb",
> + "call clear_user_erms", ALT_NOT(X86_FEATURE_FSRM),
> + "call clear_user_rep_good", ALT_NOT(X86_FEATURE_ERMS),
> + "call clear_user_original", ALT_NOT(X86_FEATURE_REP_GOOD))
> + "2:\n"
> + _ASM_EXTABLE_UA(1b, 2b)
> + : "+&c" (size), "+&D" (addr), ASM_CALL_CONSTRAINT
> + : "a" (0)
> + /* rep_good clobbers %rdx */
> + : "rdx");
"+c" and "+D" should be enough for 1 instruction assembly?
Powered by blists - more mailing lists