[PATCH 2/2] eal/riscv: add support for zicbop extension
Daniel Gregory
daniel.gregory at bytedance.com
Fri May 31 10:49:51 CEST 2024
On Thu, May 30, 2024 at 06:19:48PM +0100, Daniel Gregory wrote:
> + * The RTE_RISCV_ZICBOP option controls whether we emit them manually for older
> + * compilers that may not have the support to assemble them.
> + */
> static inline void rte_prefetch0(const volatile void *p)
> {
> - RTE_SET_USED(p);
> +#ifndef RTE_RISCV_ZICBOP
> + /* by default __builtin_prefetch prepares for a read */
> + __builtin_prefetch((const void *)p);
This cast causes warnings (which are treated as errors by the 0-day
Robot) due to it discarding the 'volatile' on p.
Removing the volatile from the definition of rte_prefetch0 causes build
failures in some drivers (txgbe_rxtx.c:1809, ixgbe_rxtx.c:2174,
enic_rxtx.c:127, ...).
rte_prefetch0_write takes its argument as 'const void *' and so can use
__builtin_prefetch().
More information about the dev
mailing list