Skip to contentSkip to conversation

bounce limit in mmc?

DISCUSSION Christoph Hellwig 3 participants 3 messages Aug 28, 2017 – Sep 27, 2017 1 message not in the archive MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi all, any idea why the mmc driver defaults to bouncing highmem pages if the device doesn't have a DMA mask? highmem is defined different on different architectures or even based on config options, so it seems like a very odd choice.

#1 lore raw

Hi Christoph,

Quoted 4 lines · Christoph Hellwig

Hi all, any idea why the mmc driver defaults to bouncing highmem pages if the device doesn't have a DMA mask? highmem is defined different on different architectures or even based on config options, so it seems like a very odd choice.

Not sure why mmc stack defaults to use BLK_BOUNCE_HIGH as it seems that it has been there when mmc was added into linux.

I *guess* this is a copy-and-paste from other block drivers, especially see drivers/memstick/core/ms_block.c which does actual the same thing.

And that raises another question that if mmc stack doesn't defaults to boucing highmem pages but host drivers don't provide DMA mask either, so what should we use for saftly limiting bouncing for DMA capable?

Quoted 7 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CAG8K7gS7Lo2GL9ve7ze-huTT9ETNQMwdzjM6hb7_f8-GsSEF4A@mail.gmail.com

#3 lore raw
Quoted 3 lines · Avri Altman

better ask the author - (mmc: bounce requests for simple hosts) and (mmc_block: bounce buffer highmem support).

Sorry for the late reply. This got lost in my inbox.

Quoted 15 lines · Shawn Lin
Quoted 14 lines

Hi Christoph,

Quoted 5 lines · Christoph Hellwig

Hi all, any idea why the mmc driver defaults to bouncing highmem pages if the device doesn't have a DMA mask? highmem is defined different on different architectures or even based on config options, so it seems like a very odd choice.

Not sure why mmc stack defaults to use BLK_BOUNCE_HIGH as it seems that it has been there when mmc was added into linux.

Quoted 7 lines
Quoted 7 lines

I *guess* this is a copy-and-paste from other block drivers, especially see drivers/memstick/core/ms_block.c which does actual the same thing.

And that raises another question that if mmc stack doesn't defaults to boucing highmem pages but host drivers don't provide DMA mask either, so what should we use for saftly limiting bouncing for DMA capable?

I'm afraid it's way too long ago, so I don't really remember. git blame seems to suggest it has been there since before I took over though. RMK was the one in charge before me.

The only thing I do remember is that the original bounce stuff was done for the wbsd driver, which is a ISA bus device so it had to work around the limitations of that system.

Regards

Signature · 1 line
Pierre Ossman