lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWnd8BOLVXpAy8CoFqKzYhp+vj6un=w7Umpo6OQ=Nxqng@mail.gmail.com>
Date: Tue, 30 Jul 2024 10:25:16 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Witold Sadowski <wsadowski@...vell.com>
Cc: linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org, 
	devicetree@...r.kernel.org, broonie@...nel.org, robh@...nel.org, 
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org, pthombar@...ence.com
Subject: Re: [PATCH v11 4/9] spi: cadence: Add Marvell SDMA operations

Hi Witold,

On Wed, Jul 24, 2024 at 5:48 PM Witold Sadowski <wsadowski@...vell.com> wrote:
> In Marvell xSPI implementation any access to SDMA register will result
> in 8 byte SPI data transfer. Reading less data(eg. 1B) will result in
> losing remaining bytes. To avoid that read/write 8 bytes into temporary
> buffer, and read/write whole temporary buffer into SDMA.
>
> Signed-off-by: Witold Sadowski <wsadowski@...vell.com>

Thanks for your patch, which is now commit 75128e2a14a9f443
("spi: cadence: Add Marvell SDMA operations") in linux-next/master
next-20240730 spi/for-next

> --- a/drivers/spi/spi-cadence-xspi.c
> +++ b/drivers/spi/spi-cadence-xspi.c
> @@ -310,6 +310,7 @@ struct cdns_xspi_dev {
>         u8 hw_num_banks;
>
>         const struct cdns_xspi_driver_data *driver_data;
> +       void (*sdma_handler)(struct cdns_xspi_dev *cdns_xspi);
>  };
>
>  static void cdns_xspi_reset_dll(struct cdns_xspi_dev *cdns_xspi)
> @@ -515,6 +516,78 @@ static void cdns_xspi_sdma_handle(struct cdns_xspi_dev *cdns_xspi)
>         }
>  }
>
> +static void m_ioreadq(void __iomem  *addr, void *buf, int len)
> +{
> +       if (IS_ALIGNED((long)buf, 8) && len >= 8) {
> +               u64 full_ops = len / 8;
> +               u64 *buffer = buf;
> +
> +               len -= full_ops * 8;
> +               buf += full_ops * 8;
> +
> +               do {
> +                       u64 b = readq(addr);

noreply@...erman.id.au reports build failures on 32-bit (e.g. [1]):

drivers/spi/spi-cadence-xspi.c:612:33: error: implicit declaration of
function 'readq'; did you mean 'readb'?
[-Werror=implicit-function-declaration]
drivers/spi/spi-cadence-xspi.c:638:25: error: implicit declaration of
function 'writeq'; did you mean 'writel'?
[-Werror=implicit-function-declaration]


readq() and writeq() are not available on 32-bit platforms, so this
driver has to
depend on 64BIT (for compile-testing).

> +                       *buffer++ = b;
> +               } while (--full_ops);
> +       }

[1] http://kisskb.ellerman.id.au/kisskb/buildresult/15210014/

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ