[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1dbaed5d-fb83-be70-85fc-4b819fa7d47c@xen0n.name>
Date: Wed, 1 Jun 2022 08:41:42 +0800
From: WANG Xuerui <kernel@...0n.name>
To: Arnd Bergmann <arnd@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>
Cc: musl@...ts.openwall.com, WANG Xuerui <kernel@...0n.name>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-arch <linux-arch@...r.kernel.org>,
GNU C Library <libc-alpha@...rceware.org>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Peter Zijlstra <peterz@...radead.org>,
Marc Zyngier <maz@...nel.org>,
Masahiro Yamada <masahiroy@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Jianmin Lv <lvjianmin@...ngson.cn>,
linux-pci <linux-pci@...r.kernel.org>,
Ard Biesheuvel <ardb@...nel.org>,
Huacai Chen <chenhuacai@...ngson.cn>
Subject: Re: [musl] Re: [GIT PULL] asm-generic changes for 5.19
On 6/1/22 04:40, Arnd Bergmann wrote:
> lib/test_printf.c:215: warning: "PTR" redefined
> 215 | #define PTR ((void *)0xffff0123456789abUL)
> |
> In file included from /git/arm-soc/arch/loongarch/include/asm/vdso/vdso.h:9,
> from
> /git/arm-soc/arch/loongarch/include/asm/vdso/gettimeofday.h:13,
> from /git/arm-soc/include/vdso/datapage.h:137,
> from /git/arm-soc/arch/loongarch/include/asm/vdso.h:11,
> from /git/arm-soc/arch/loongarch/include/asm/elf.h:13,
> from /git/arm-soc/include/linux/elf.h:6,
> from /git/arm-soc/include/linux/module.h:19,
> from /git/arm-soc/lib/test_printf.c:10:
> /git/arm-soc/arch/loongarch/include/asm/asm.h:182: note: this is the
> location of the previous definition
> 182 | #define PTR .dword
> |
>
> Not sure what the best fix is for this, maybe the contents of asm/asm.h could
> just be hidden in an "#idef __ASSEMBLER__" check. This can be a follow-up
> patch when the branch is merged.
Ah, the dreaded PTR... This has plagued Loongson users since antiquity
(i.e. the MIPS era).
It must have been the case that the arch/loongarch was based on an
earlier version of arch/mips, that didn't have the commit fa62f39dc7e25
("MIPS: Fix build error due to PTR used in more places"). So the fix
would be simple: just rename the PTR to something else. MIPS changed
that to PTR_WD and maybe we could re-use that name.
But I agree that wrapping the whole asm/asm.h with an #ifdef
__ASSEMBLY__ is very reasonable regardless. Maybe both could be done.
Powered by blists - more mailing lists