Re: [PATCH] locking/atomics: build atomic headers as required

From: Mark Rutland
Date: Fri Nov 23 2018 - 10:48:44 EST


On Fri, Nov 23, 2018 at 03:33:21PM +0000, Mark Rutland wrote:
> 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.

> The diffstat looks nice, at least...

> include/asm-generic/atomic-instrumented.h | 1787 ----------------------
> include/asm-generic/atomic-long.h | 1012 -------------
> include/linux/atomic-fallback.h | 2294 -----------------------------

As a heads-up, I generated the diff with git format-patch -D, to omit
the preimage for those ~5000 lines being deleted. Unfortunately, git-am
will refuse to apply that, with something like:

| error: removal patch leaves file contents
| error: include/asm-generic/atomic-instrumented.h: patch does not apply

I've pushed the patch to my atomics/regenerate branch [1] for now. I can resend
with the full context (or leaving the stale files for a subsequent deletion),
if that's preferable?

Thanks,
Mark.

[1] git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/regenerate