public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Christoph Hellwig" <hch@lst.de>
Cc: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"Jens Axboe" <axboe@kernel.dk>, "Ming Lei" <ming.lei@redhat.com>,
	linux-block@vger.kernel.org,
	"linux-mmc @ vger . kernel . org" <linux-mmc@vger.kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Gregory Clement" <gregory.clement@bootlin.com>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>
Subject: Re: mmc vs highmem, was: Re: [PATCH 2/2] blk-mq: ensure a q_usage_counter reference is held when splitting bios
Date: Wed, 24 Jan 2024 13:45:36 +0100	[thread overview]
Message-ID: <6720022a-0ddb-4ed9-9b60-6c994c8c8cea@app.fastmail.com> (raw)
In-Reply-To: <d2289b38-f463-43e6-a60c-486fd479d275@app.fastmail.com>

On Mon, Jan 22, 2024, at 15:57, Arnd Bergmann wrote:
> On Mon, Jan 22, 2024, at 14:39, Christoph Hellwig wrote:
>> On Mon, Jan 22, 2024 at 10:26:30AM +0100, Arnd Bergmann wrote:
>
>> and then kill the bounce setup in
>> mmc.  It turn out in addition to the one legacy ISA SCSI driver and the
>> two parport SCSI driver usb-storage actually also sets this flag,
>> which might be a road blocker, but at this point I'm getting ready
>> to just pull the plug if it doesn't break using embedded platforms
>> using mmc entirely.
>
> Agreed. I've added the maintainers for the Marvell Armada
> platform to Cc, maybe one of them can look into this, see
> the thread at [1] for this. The problem in the mvsdio.c
> is the sg_virt(data->sg) in mvsd_setup_data(), which will
> stop working when the MMC layer stops using bounce buffers
> for highmem pages.

I talked to Linus Walleij about this driver, as he's already
looking at highmem related issues in Arm kernels. Here is
some updated information about what I think is going on:

- The driver is used on kirkwood, dove, armadaxp/370, and
  armada375, but not on armada380 and later, as those use
  sdhci instead.

- Most of the boards with those chips have the sdio controller
  disabled. In particular for the later chips it is only
  enabled in the reference design but not in products like the
  Armada XP based NAS boxes.

- Products that actually use it and have at least 1GB of RAM
  are the Globalscale Mirabox/D3Plug and  Solidrun Cubox.

- All of the machines using this driver have a valid DMA mask
  set, so the BLK_BOUNCE_HIGH hack is never actually active
  here.

- The reason I think the driver still works is that the
  PIO mode using the broken sg_virt() call is only used
  for unaligned data, and all data sent to the controller is
  either fully aligned (mmc block data) or in lowmem (sdio
  data structures filled in the kernel).

- The hack for non-caheline-aligned DMA in commit 3c583f70a8e2
  ("mmc: mvsdio: Work around broken TX DMA") specifically
  mentions small data structures. I wonder if this is instead
  a bug with dma_mapping stack variables or similar instead of
  an actual hardware bug. The only sdio_writesb() I see in the
  mwifiex driver mentioned here is for network data buffers,
  which I think don't ever share cache lines though.

      Arnd

  parent reply	other threads:[~2024-01-24 12:46 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 13:57 ensure q_usage_counter is held over bio splits Christoph Hellwig
2024-01-11 13:57 ` [PATCH 1/2] blk-mq: rename blk_mq_can_use_cached_rq Christoph Hellwig
2024-01-11 13:57 ` [PATCH 2/2] blk-mq: ensure a q_usage_counter reference is held when splitting bios Christoph Hellwig
2024-01-11 16:12   ` Jens Axboe
2024-01-11 16:14     ` Christoph Hellwig
2024-01-11 16:17       ` Jens Axboe
2024-01-11 16:18         ` Christoph Hellwig
2024-01-11 17:10         ` Christoph Hellwig
2024-01-11 17:18           ` Jens Axboe
2024-01-11 17:24             ` Christoph Hellwig
2024-01-11 20:06               ` Jens Axboe
2024-01-12  5:44                 ` Christoph Hellwig
2024-01-12 14:22                   ` Jens Axboe
2024-01-12 14:25                     ` Christoph Hellwig
2024-01-12 16:10                       ` Jens Axboe
2024-01-15 11:20                     ` Ulf Hansson
2024-01-22  7:34                       ` mmc vs highmem, was: " Christoph Hellwig
2024-01-22  9:26                         ` Arnd Bergmann
2024-01-22 13:39                           ` Christoph Hellwig
2024-01-22 14:57                             ` Arnd Bergmann
2024-01-23  9:11                               ` Christoph Hellwig
2024-01-24 11:59                                 ` Arnd Bergmann
2024-01-24 12:33                                   ` Linus Walleij
2024-01-24 12:54                                     ` Arnd Bergmann
2024-01-24 13:16                                       ` Linus Walleij
2024-01-24 14:14                                         ` Arnd Bergmann
2024-01-24 12:45                               ` Arnd Bergmann [this message]
2024-01-24 13:49                           ` Linus Walleij
2024-01-24 16:35                             ` Arnd Bergmann
2024-01-11 22:22   ` Ming Lei
2024-01-12  5:46     ` Christoph Hellwig
2024-01-11 16:03 ` ensure q_usage_counter is held over bio splits Jens Axboe
2024-01-14 14:38 ` (subset) " Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6720022a-0ddb-4ed9-9b60-6c994c8c8cea@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=andrew@lunn.ch \
    --cc=axboe@kernel.dk \
    --cc=gregory.clement@bootlin.com \
    --cc=hch@lst.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox