All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] Allow assembly code to use BIT(), GENMASK(), etc. and clean-up arm64 header
Date: Wed, 5 Jun 2019 08:34:07 +0100	[thread overview]
Message-ID: <20190605073406.geesp3rbrxajmac6@mbp> (raw)
In-Reply-To: <20190527083412.26651-1-yamada.masahiro@socionext.com>

On Mon, May 27, 2019 at 05:34:10PM +0900, Masahiro Yamada wrote:
> Some in-kernel headers use _BITUL() instead of BIT().
> 
>  arch/arm64/include/asm/sysreg.h
>  arch/s390/include/asm/*.h
> 
> I think the reason is because BIT() is currently not available
> in assembly. It hard-codes 1UL, which is not available in assembly.
[...]
> Masahiro Yamada (2):
>   linux/bits.h: make BIT(), GENMASK(), and friends available in assembly
>   arm64: replace _BITUL() with BIT()
> 
>  arch/arm64/include/asm/sysreg.h | 82 ++++++++++++++++-----------------
>  include/linux/bits.h            | 17 ++++---

I'm not sure it's worth the hassle. It's nice to have the same BIT macro
but a quick grep shows arc, arm64, s390 and x86 using _BITUL. Maybe a
tree-wide clean-up would be more appropriate.

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/2] Allow assembly code to use BIT(), GENMASK(), etc. and clean-up arm64 header
Date: Wed, 5 Jun 2019 08:34:07 +0100	[thread overview]
Message-ID: <20190605073406.geesp3rbrxajmac6@mbp> (raw)
In-Reply-To: <20190527083412.26651-1-yamada.masahiro@socionext.com>

On Mon, May 27, 2019 at 05:34:10PM +0900, Masahiro Yamada wrote:
> Some in-kernel headers use _BITUL() instead of BIT().
> 
>  arch/arm64/include/asm/sysreg.h
>  arch/s390/include/asm/*.h
> 
> I think the reason is because BIT() is currently not available
> in assembly. It hard-codes 1UL, which is not available in assembly.
[...]
> Masahiro Yamada (2):
>   linux/bits.h: make BIT(), GENMASK(), and friends available in assembly
>   arm64: replace _BITUL() with BIT()
> 
>  arch/arm64/include/asm/sysreg.h | 82 ++++++++++++++++-----------------
>  include/linux/bits.h            | 17 ++++---

I'm not sure it's worth the hassle. It's nice to have the same BIT macro
but a quick grep shows arc, arm64, s390 and x86 using _BITUL. Maybe a
tree-wide clean-up would be more appropriate.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-06-05  7:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  8:34 [PATCH 0/2] Allow assembly code to use BIT(), GENMASK(), etc. and clean-up arm64 header Masahiro Yamada
2019-05-27  8:34 ` Masahiro Yamada
2019-05-27  8:34 ` [PATCH 1/2] linux/bits.h: make BIT(), GENMASK(), and friends available in assembly Masahiro Yamada
2019-05-27  8:34   ` Masahiro Yamada
2019-06-11 15:47   ` Will Deacon
2019-06-11 15:47     ` Will Deacon
2019-05-27  8:34 ` [PATCH 2/2] arm64: replace _BITUL() with BIT() Masahiro Yamada
2019-05-27  8:34   ` Masahiro Yamada
2019-06-11 15:48   ` Will Deacon
2019-06-11 15:48     ` Will Deacon
2019-06-05  6:19 ` [PATCH 0/2] Allow assembly code to use BIT(), GENMASK(), etc. and clean-up arm64 header Masahiro Yamada
2019-06-05  6:19   ` Masahiro Yamada
2019-06-05  7:34 ` Catalin Marinas [this message]
2019-06-05  7:34   ` Catalin Marinas
2019-06-05  9:01   ` Masahiro Yamada
2019-06-05  9:01     ` Masahiro Yamada
2019-06-11 15:49     ` Will Deacon
2019-06-11 15:49       ` Will Deacon

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=20190605073406.geesp3rbrxajmac6@mbp \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.deacon@arm.com \
    --cc=yamada.masahiro@socionext.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.