mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Christoph Hellwig <hch@lst.de>,
	iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org,
	linux-block@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-scsi@vger.kernel.org, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/12] mmc: reduce use of block bounce buffers
Date: Mon, 16 Apr 2018 11:51:23 +0100	[thread overview]
Message-ID: <2067b808-65b3-e4d9-e376-1062abc1542f@arm.com> (raw)
In-Reply-To: <20180416085032.7367-9-hch@lst.de>

On 16/04/18 09:50, Christoph Hellwig wrote:
> We can rely on the dma-mapping code to handle any DMA limits that is
> bigger than the ISA DMA mask for us (either using an iommu or swiotlb),
> so remove setting the block layer bounce limit for anything but bouncing
> for highmem pages.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/mmc/core/queue.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
> index 56e9a803db21..60a02a763d01 100644
> --- a/drivers/mmc/core/queue.c
> +++ b/drivers/mmc/core/queue.c
> @@ -351,17 +351,14 @@ static const struct blk_mq_ops mmc_mq_ops = {
>   static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
>   {
>   	struct mmc_host *host = card->host;
> -	u64 limit = BLK_BOUNCE_HIGH;
> -
> -	if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask)
> -		limit = (u64)dma_max_pfn(mmc_dev(host)) << PAGE_SHIFT;
>   
>   	blk_queue_flag_set(QUEUE_FLAG_NONROT, mq->queue);
>   	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, mq->queue);
>   	if (mmc_can_erase(card))
>   		mmc_queue_setup_discard(mq->queue, card);
>   
> -	blk_queue_bounce_limit(mq->queue, limit);
> +	if (!mmc_dev(host)->dma_mask || !mmc_dev(host)->dma_mask)

I'm almost surprised that GCC doesn't warn about "x || x", but 
nevertheless I think you've lost a "*" here...

Robin.

> +		blk_queue_bounce_limit(mq->queue, BLK_BOUNCE_HIGH);
>   	blk_queue_max_hw_sectors(mq->queue,
>   		min(host->max_blk_count, host->max_req_size / 512));
>   	blk_queue_max_segments(mq->queue, host->max_segs);
> 

  reply	other threads:[~2018-04-16 10:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16  8:50 remove PCI_DMA_BUS_IS_PHYS Christoph Hellwig
2018-04-16  8:50 ` [PATCH 01/12] iscsi_tcp: don't set a bounce limit Christoph Hellwig
2018-04-19  4:29   ` Martin K. Petersen
2018-04-16  8:50 ` [PATCH 02/12] storsvc: " Christoph Hellwig
2018-04-19  4:29   ` Martin K. Petersen
2018-04-16  8:50 ` [PATCH 03/12] mtip32xx: don't use block layer bounce buffers Christoph Hellwig
2018-04-16  8:50 ` [PATCH 04/12] DAC960: " Christoph Hellwig
2018-04-16  8:50 ` [PATCH 05/12] sata_nv: " Christoph Hellwig
2018-04-16  8:50 ` [PATCH 06/12] memstick: don't call blk_queue_bounce_limit Christoph Hellwig
2018-04-16  8:50 ` [PATCH 07/12] scsi: reduce use of block bounce buffers Christoph Hellwig
2018-04-16  8:50 ` [PATCH 08/12] mmc: " Christoph Hellwig
2018-04-16 10:51   ` Robin Murphy [this message]
2018-04-16  8:50 ` [PATCH 09/12] ide: kill ide_toggle_bounce Christoph Hellwig
2018-04-16  8:50 ` [PATCH 10/12] ide: remove the PCI_DMA_BUS_IS_PHYS check Christoph Hellwig
2018-04-16  8:50 ` [PATCH 11/12] net: remove the PCI_DMA_BUS_IS_PHYS check in illegal_highdma Christoph Hellwig
2018-04-16  8:50 ` [PATCH 12/12] PCI: remove PCI_DMA_BUS_IS_PHYS Christoph Hellwig

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=2067b808-65b3-e4d9-e376-1062abc1542f@arm.com \
    --to=robin.murphy@arm.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=netdev@vger.kernel.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

Powered by JetHome