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

Conor Dooley conor.dooley at microchip.com
Mon Feb 12 00:03:44 PST 2024


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 at google.com>

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@google.com/

Cheers,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240212/fc7487ad/attachment.sig>


More information about the linux-riscv mailing list