All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Christoph Hellwig <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org,
	mingo@kernel.org, hpa@zytor.com, hch@lst.de,
	sfr@canb.auug.org.au
Subject: [tip:x86/dma] swiotlb: Make swiotlb_{alloc,free}_buffer depend on CONFIG_DMA_DIRECT_OPS
Date: Fri, 23 Mar 2018 12:54:47 -0700	[thread overview]
Message-ID: <tip-0803e6051c1562e1525c3e044313390bf8b35c2b@git.kernel.org> (raw)
In-Reply-To: <20180323174930.17767-1-hch@lst.de>

Commit-ID:  0803e6051c1562e1525c3e044313390bf8b35c2b
Gitweb:     https://git.kernel.org/tip/0803e6051c1562e1525c3e044313390bf8b35c2b
Author:     Christoph Hellwig <hch@lst.de>
AuthorDate: Fri, 23 Mar 2018 18:49:30 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 23 Mar 2018 20:15:38 +0100

swiotlb: Make swiotlb_{alloc,free}_buffer depend on CONFIG_DMA_DIRECT_OPS

Otherwise this causes unused symbol warnings for configs that build
swiotlb.c only for use by xen-swiotlb.c and that don't otherwise select
CONFIG_DMA_DIRECT_OPS, which is possible on arm.

Fixes: 16e73adbca76 ("dma/swiotlb: Remove swiotlb_{alloc,free}_coherent()")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: iommu@lists.linux-foundation.org
Cc: konrad.wilk@oracle.com
Link: https://lkml.kernel.org/r/20180323174930.17767-1-hch@lst.de
---
 lib/swiotlb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 15954b86f09e..47aeb04c1997 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -692,6 +692,7 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr,
 	}
 }
 
+#ifdef CONFIG_DMA_DIRECT_OPS
 static inline bool dma_coherent_ok(struct device *dev, dma_addr_t addr,
 		size_t size)
 {
@@ -763,6 +764,7 @@ static bool swiotlb_free_buffer(struct device *dev, size_t size,
 				 DMA_ATTR_SKIP_CPU_SYNC);
 	return true;
 }
+#endif
 
 static void
 swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir,

      parent reply	other threads:[~2018-03-23 19:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 17:49 [PATCH] swiotlb: swiotlb_{alloc, free}_buffer should depend on CONFIG_DMA_DIRECT_OPS Christoph Hellwig
2018-03-23 17:49 ` [PATCH] swiotlb: swiotlb_{alloc,free}_buffer " Christoph Hellwig
     [not found] ` <20180323174930.17767-1-hch-jcswGhMUV9g@public.gmane.org>
2018-03-23 18:57   ` Konrad Rzeszutek Wilk
2018-03-23 18:57     ` Konrad Rzeszutek Wilk
2018-03-23 19:41     ` Thomas Gleixner
     [not found]     ` <20180323185707.GD25533-he5eyhs8q0BAdwtm4QZOy9BPR1lH4CV8@public.gmane.org>
2018-03-24 17:03       ` Christoph Hellwig
2018-03-24 17:03         ` Christoph Hellwig
     [not found]         ` <20180324170351.GA511-jcswGhMUV9g@public.gmane.org>
2018-03-24 20:05           ` Konrad Rzeszutek Wilk
2018-03-24 20:05             ` Konrad Rzeszutek Wilk
     [not found]             ` <20180324200545.GC23658-he5eyhs8q0BAdwtm4QZOy9BPR1lH4CV8@public.gmane.org>
2018-03-26 13:42               ` Christoph Hellwig
2018-03-26 13:42                 ` Christoph Hellwig
2018-03-23 19:54 ` tip-bot for Christoph Hellwig [this message]

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=tip-0803e6051c1562e1525c3e044313390bf8b35c2b@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.