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: <20181015113332.uqnd4kmoabzto5kr@ninjato>
Date:   Mon, 15 Oct 2018 13:33:32 +0200
From:   Wolfram Sang <wsa@...-dreams.de>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     linux-mmc@...r.kernel.org,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] mmc: tmio: simplify the DMA mode test

On Mon, Oct 15, 2018 at 12:36:36AM +0200, Wolfram Sang wrote:
> On Sat, Oct 13, 2018 at 12:03:08AM +0900, Masahiro Yamada wrote:
> > host->chan_{rx,tx} represents the DMA capability of the platform.
> > Even if DMA is supported, there are cases where we want to use PIO,
> > for example, data length is short enough as commit 5f52c3552946
> > ("mmc: tmio: use PIO for short transfers") mentioned.
> > 
> > Regarding the hardware control flow, we are interested in whether DMA
> > is currently enabled or not, instead of whether the platform has the
> > DMA capability.
> > 
> > Hence, the several conditionals in tmio_mmc_core.c end up with
> > checking host->chan_{rx,tx} and !host->force_pio. This is not nice.
> > 
> > Let's flip the flag host->force_pio into host->dma_on.
> > 
> > host->dma_on represents whether the DMA is currently enabled or not.
> > This flag is set false in the beginning of each command, then should
> > be set true by tmio_mmc_start_dma() when the DMA is turned on.
> > 
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> 
> I like it. Much easier to read!
> 
> Reviewed-by: Wolfram Sang <wsa+renesas@...g-engineering.com>

Tested on R-Car H3 ES1.0 and ES2.0, M3N, and H2. No regressions,
especially no performance regressions (since "when to enable DMA" code
was refactored).

Tested-by: Wolfram Sang <wsa+renesas@...g-engineering.com>


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ