Re: [PATCH v6 2/9] asm/rwonce: Introduce [READ|WRITE]_ONCE() support for __int128

From: Jason Gunthorpe
Date: Wed Oct 16 2024 - 09:08:31 EST


On Wed, Oct 16, 2024 at 05:17:49AM +0000, Suravee Suthikulpanit wrote:
> From: Uros Bizjak <ubizjak@xxxxxxxxx>
>
> Currently, [READ|WRITE]_ONCE() do not support variable of type __int128.
> Re-define "__dword_type" from type "long long" to __int128 if supported.
>
> Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
> ---
> include/asm-generic/rwonce.h | 2 +-
> include/linux/compiler_types.h | 8 +++++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)

I guess it makes sense that the "strong prevailing wind" would apply
to 2x u64 reads as well as 2x u32 reads. Though use with caution..

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason