[PATCH v1 2/4] net: rtl8169: Fix DMA min aligned compile warning in riscv

Ramon Fried rfried.dev at gmail.com
Sat Jul 22 10:56:21 CEST 2023


On Wed, Jun 21, 2023 at 12:05 PM Minda Chen <minda.chen at starfivetech.com> wrote:
>
> Fix rtl8169 descriptor less the DMA min aligned compile warning
> for RISC-V SoC platform.
>
> Signed-off-by: Minda Chen <minda.chen at starfivetech.com>
> ---
>  drivers/net/rtl8169.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
> index dcba51590d..34e4cff1e9 100644
> --- a/drivers/net/rtl8169.c
> +++ b/drivers/net/rtl8169.c
> @@ -311,10 +311,12 @@ static unsigned char rxdata[RX_BUF_LEN];
>   *
>   * This can be fixed by defining CONFIG_SYS_NONCACHED_MEMORY which will cause
>   * the driver to allocate descriptors from a pool of non-cached memory.
> + *
> + * Hardware maintain D-cache coherency in RISC-V architecture.
>   */
>  #if RTL8169_DESC_SIZE < ARCH_DMA_MINALIGN
>  #if !defined(CONFIG_SYS_NONCACHED_MEMORY) && \
> -       !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_X86)
> +       !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_X86) && !defined(CONFIG_RISCV)
>  #warning cache-line size is larger than descriptor size
>  #endif
>  #endif
> --
> 2.17.1
>
Reviewed-by: Ramon Fried <rfried.dev at gmail.com>


More information about the U-Boot mailing list