Re: [PATCH] riscv/fence: Consolidate fence definitions and define __{mb,rmb,wmb}

From: Conor Dooley
Date: Mon Feb 12 2024 - 03:05:17 EST


On Fri, Feb 09, 2024 at 12:50:48PM +0000, Eric Chan wrote:
> Disparate fence implementations are consolidated into fence.h.
>
> Introduce __{mb,rmb,wmb}, and rely on the generic definitions
> for {mb,rmb,wmb}. A first consequence is that __{mb,rmb,wmb}
> map to a compiler barrier on !SMP (while their definition remains
> unchanged on SMP).
>
> Introduce RISCV_FULL_BARRIER and use in arch_atomic* function.
> like RISCV_ACQUIRE_BARRIER and RISCV_RELEASE_BARRIER, The fence
> instruction can be eliminated When SMP is not in use.
>
> Also clean up the warning with scripts/checkpatch.pl.
>
> Signed-off-by: Eric Chan <ericchancf@xxxxxxxxxx>

In all configs:
../arch/riscv/include/asm/fence.h:7:10: error: expected expression before '__asm__'
https://patchwork.kernel.org/project/linux-riscv/patch/20240209125048.4078639-1-ericchancf@xxxxxxxxxx/

Cheers,
Conor.

Attachment: signature.asc
Description: PGP signature