]> www.infradead.org Git - users/willy/linux.git/commit
locking/atomics: build atomic headers as required
authorMark Rutland <mark.rutland@arm.com>
Wed, 5 Dec 2018 00:14:20 +0000 (11:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 10 Dec 2018 08:29:15 +0000 (19:29 +1100)
commit47edb5d5f7a25b39e1161e20a0082eb7b7c52d1e
tree82be02737d2aa4ede7e6820321e484d3fa6391f6
parent99768aa0d8609938a8c48d2c4914ae680bfd2370
locking/atomics: build atomic headers as required

Andrew and Ingo report that the check-atomics.sh script is simply too slow
to run for every kernel build, and it's impractical to make it faster
without rewriting it in something other than shell.

Rather than committing the generated headers, let's regenerate these
as-required for a pristine tree.

That ensures they're always up-to-date, allows them to be built in
parallel, and avoid redundant rebuilds, which is a 2-8s saving per
incremental build.  Since the results are not committed, it's very obvious
that they should not be modified directly.  If we need to generate more
headers in future, it's easy to extend Makefile.genheader to permit this.

I've verified that this works in the cases we previously had issues with
(out-of-tree builds and where scripts have no execute permissions), and
have tested these cases for both x86_64 and arm64.

The diffstat looks nice, at least...

Link: http://lkml.kernel.org/r/20181123153321.8561-1-mark.rutland@arm.com
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Kbuild
Makefile
arch/arm64/include/asm/atomic.h
arch/x86/include/asm/atomic.h
include/asm-generic/atomic-instrumented.h [deleted file]
include/asm-generic/atomic-long.h [deleted file]
include/linux/atomic-fallback.h [deleted file]
include/linux/atomic.h
scripts/Makefile.genheader [new file with mode: 0644]