From: Christoph Hellwig <hch@lst.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Huacai Chen <chenhc@lemote.com>,
linux-scsi@vger.kernel.org, iommu@lists.linux-foundation.org,
stable@vger.kernel.org
Subject: [PATCH 1/3] dma-mapping: always provide dma_get_cache_alignment
Date: Tue, 21 Nov 2017 14:23:37 +0100 [thread overview]
Message-ID: <20171121132339.1702-2-hch@lst.de> (raw)
In-Reply-To: <20171121132339.1702-1-hch@lst.de>
Provide the dummy version of dma_get_cache_alignment that always returns 1
even if CONFIG_HAS_DMA is not set, so that drivers and subsystems can
use it without ifdefs.
Cc: stable@vger.kernel.org
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/linux/dma-mapping.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index e8f8e8fb244d..81ed9b2d84dc 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -704,7 +704,6 @@ static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
return ret;
}
-#ifdef CONFIG_HAS_DMA
static inline int dma_get_cache_alignment(void)
{
#ifdef ARCH_DMA_MINALIGN
@@ -712,7 +711,6 @@ static inline int dma_get_cache_alignment(void)
#endif
return 1;
}
-#endif
/* flags for the coherent memory api */
#define DMA_MEMORY_EXCLUSIVE 0x01
--
2.14.2
next prev parent reply other threads:[~2017-11-21 13:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 13:23 scsi fixes for non cache-coherent architectures (for 4.15 and stable) Christoph Hellwig
2017-11-21 13:23 ` Christoph Hellwig [this message]
[not found] ` <20171121132339.1702-1-hch-jcswGhMUV9g@public.gmane.org>
2017-11-21 13:23 ` [PATCH 2/3] scsi: use dma_get_cache_alignment() as minimum DMA alignment Christoph Hellwig
2017-11-21 13:23 ` [PATCH 3/3] libsas: align sata_device's rps_resp on a cacheline Christoph Hellwig
2017-11-22 4:07 ` scsi fixes for non cache-coherent architectures (for 4.15 and stable) Martin K. Petersen
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=20171121132339.1702-2-hch@lst.de \
--to=hch@lst.de \
--cc=chenhc@lemote.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).