Re: [PATCH v3 3/7] riscv: Delete asm/compat.h

From: Arnd Bergmann
Date: Sun Aug 05 2018 - 17:29:34 EST


On Fri, Aug 3, 2018 at 9:39 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Thu, Aug 02, 2018 at 06:26:58PM -0700, Palmer Dabbelt wrote:
>> I thought we were using this to make uname print "riscv64" (or "riscv32")
>> instead of just "riscv"? Is there another mechanism to do that?
>
> That is set in the UTS_MACHINE variable in arch/riscv/Makefile
> and doesn't involve compat.h at all except when actually implementing
> 32-bit compat on 64 bit, which RISC-V doesn't (at least yet).

Note that the logic was also wrong, if we had an implementation of
CONFIG_COMPAT for arch/riscv, it would always result in the
"riscv64" string for both PER_LINUX and PER_LINUX32, when
it should be "riscv32" for the PER_LINUX32 personaliy.

Arnd