From: Christoph Hellwig <hch@infradead.org>
To: Huacai Chen <chenhc@lemote.com>
Cc: "James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Fuxin Zhang <zhangfx@lemote.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH 2/2] scsi: Align queue to ARCH_DMA_MINALIGN in non-coherent DMA mode
Date: Mon, 11 Sep 2017 00:39:06 -0700 [thread overview]
Message-ID: <20170911073906.GA7074@infradead.org> (raw)
In-Reply-To: <1504774131-11691-1-git-send-email-chenhc@lemote.com>
> + if (plat_device_is_coherent(dev))
We can't just call platform device code. We'll need a proper
DMA API call for this.
> + blk_queue_dma_alignment(q, 0x04 - 1);
> + else
> + blk_queue_dma_alignment(q, dma_get_cache_alignment() - 1);
Which we already have with dma_get_cache_alignment, except that it
doesn't take a struct device pointer and doesn't call into dma_map
ops. So please add a struct device argument to dma_get_cache_alignment,
and let it call into dma_map_ops where needed.
With that you can replace the above with:
blk_queue_dma_alignment(q,
max(0x04U, dma_get_cache_alignment(dev)) - 1);
next prev parent reply other threads:[~2017-09-11 7:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 8:48 Huacai Chen
2017-09-09 15:47 ` kbuild test robot
2017-09-09 17:08 ` kbuild test robot
2017-09-11 7:39 ` Christoph Hellwig [this message]
2017-09-11 8:41 ` [PATCH 2/2] scsi: Align queue to ARCH_DMA_MINALIGN innon-coherent " 陈华才
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=20170911073906.GA7074@infradead.org \
--to=hch@infradead.org \
--cc=chenhc@lemote.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
--cc=zhangfx@lemote.com \
/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
all inboxes | Powered by JetHome®