[PATCH 03/17] um: don't generate asm/bpf_perf_event.h

Stephen Rothwell sfr at canb.auug.org.au
Fri Jul 5 05:26:16 PDT 2024


Hi Arnd,

On Thu,  4 Jul 2024 16:35:57 +0200 Arnd Bergmann <arnd at kernel.org> wrote:
>
> From: Arnd Bergmann <arnd at arndb.de>
> 
> If we start validating the existence of the asm-generic side of
> generated headers, this one causes a warning:
> 
> make[3]: *** No rule to make target 'arch/um/include/generated/asm/bpf_perf_event.h', needed by 'all'.  Stop.
> 
> The problem is that the asm-generic header only exists for the uapi
> variant, but arch/um has no uapi headers and instead uses the x86
> userspace API.
> 
> Add a custom file with an explicit redirect to avoid this.
> 
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> ---
>  arch/um/include/asm/Kbuild           | 1 -
>  arch/um/include/asm/bpf_perf_event.h | 3 +++
>  2 files changed, 3 insertions(+), 1 deletion(-)
>  create mode 100644 arch/um/include/asm/bpf_perf_event.h
> 
> diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild
> index 6fe34779291a..6c583040537c 100644
> --- a/arch/um/include/asm/Kbuild
> +++ b/arch/um/include/asm/Kbuild
> @@ -1,5 +1,4 @@
>  # SPDX-License-Identifier: GPL-2.0
> -generic-y += bpf_perf_event.h
>  generic-y += bug.h
>  generic-y += compat.h
>  generic-y += current.h
> diff --git a/arch/um/include/asm/bpf_perf_event.h b/arch/um/include/asm/bpf_perf_event.h
> new file mode 100644
> index 000000000000..0a30420c83de
> --- /dev/null
> +++ b/arch/um/include/asm/bpf_perf_event.h
> @@ -0,0 +1,3 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#include <asm-generic/bpf_perf_event.h>

Just wondering if that file should have some explanatory comment in it
to prevent it being cleaned up in a few years ... or at least to
explain why it causes the above error when removed.

-- 
Cheers,
Stephen Rothwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240705/d2263f63/attachment.sig>


More information about the linux-riscv mailing list