mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Tiezhu Yang <yangtiezhu@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
	loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH] tools/arch/loongarch: Use __SIZEOF_LONG__ to define __BITS_PER_LONG
Date: Tue, 07 Mar 2023 15:51:57 +0800	[thread overview]
Message-ID: <d3e255e4746de44c9903c4433616d44ffcf18d1b.camel@xry111.site> (raw)
In-Reply-To: <1678174741-19219-1-git-send-email-yangtiezhu@loongson.cn>

On Tue, 2023-03-07 at 15:39 +0800, Tiezhu Yang wrote:
> Although __SIZEOF_POINTER__ is equal with _SIZEOF_LONG__ on LoongArch,
> it is better to use __SIZEOF_LONG__ to define __BITS_PER_LONG to keep
> consistent between arch/loongarch/include/uapi/asm/bitsperlong.h and
> tools/arch/loongarch/include/uapi/asm/bitsperlong.h.

I believe we should unify bitsperlong.h for all ports to use
(__SIZEOF_LONG__ * 8).  Now we specify GCC >= 5.1 or Clang (LLVM) >=
11.0.0 in min-tool-version.sh, where __SIZEOF_LONG__ is usable [1].  The
only remaining compiler is ICC, which is deprecated and won't be
supported for building the kernel after 6.3 [2].

[1]:https://gcc.godbolt.org/z/cnvW38vj6
[2]:https://www.phoronix.com/news/Linux-6.3-Drops-Intel-ICC

> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  tools/arch/loongarch/include/uapi/asm/bitsperlong.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/arch/loongarch/include/uapi/asm/bitsperlong.h
> b/tools/arch/loongarch/include/uapi/asm/bitsperlong.h
> index d4e32b3..00b4ba1 100644
> --- a/tools/arch/loongarch/include/uapi/asm/bitsperlong.h
> +++ b/tools/arch/loongarch/include/uapi/asm/bitsperlong.h
> @@ -2,7 +2,7 @@
>  #ifndef __ASM_LOONGARCH_BITSPERLONG_H
>  #define __ASM_LOONGARCH_BITSPERLONG_H
>  
> -#define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8)
> +#define __BITS_PER_LONG (__SIZEOF_LONG__ * 8)
>  
>  #include <asm-generic/bitsperlong.h>
>  

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

      reply	other threads:[~2023-03-07  7:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07  7:39 Tiezhu Yang
2023-03-07  7:51 ` Xi Ruoyao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3e255e4746de44c9903c4433616d44ffcf18d1b.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®