[PATCH v3 6/7] asm-generic: percpu: Add assembly guard

Arnd Bergmann arnd at arndb.de
Mon Sep 15 00:40:35 PDT 2025


On Sun, Sep 14, 2025, at 17:56, Tiwei Bie wrote:
> From: Tiwei Bie <tiwei.btw at antgroup.com>
>
> Currently, asm/percpu.h is directly or indirectly included by
> some assembly files on x86. Some of them (e.g., checksum_32.S)
> are also used on um. But x86 and um provide different versions
> of asm/percpu.h -- um uses asm-generic/percpu.h directly.
>
> When SMP is enabled, asm-generic/percpu.h will introduce C code
> that cannot be assembled. Since asm-generic/percpu.h currently
> is not designed for use in assembly, and these assembly files
> do not actually need asm/percpu.h on um, let's add the assembly
> guard in asm-generic/percpu.h to fix this issue.
>
> Cc: Arnd Bergmann <arnd at arndb.de>
> Cc: linux-arch at vger.kernel.org
> Signed-off-by: Tiwei Bie <tiwei.btw at antgroup.com>

Have you tried if you can remove the percpu.h dependency from
the files that currently include it? In many cases it should
be enough to use percpu-defs.h.

If that doesn't work, I have no objections to this patch either.

Acked-by: Arnd Bergmann <arnd at arndb.de>



More information about the linux-um mailing list