From: tip-bot for Denys Vlasenko <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, m.szyprowski@samsung.com,
dwmw2@infradead.org, ddutile@redhat.com, konrad.wilk@oracle.com,
mingo@kernel.org, dvlasenk@redhat.com,
linux-kernel@vger.kernel.org, hpa@zytor.com, andi@firstfloor.org
Subject: [tip:x86/cleanups] x86: Deinline dma_free_attrs()
Date: Tue, 5 May 2015 12:22:22 -0700 [thread overview]
Message-ID: <tip-f1dc154f82595386cddcc7b980d8760474c3dd2d@git.kernel.org> (raw)
In-Reply-To: <1428926075-28796-3-git-send-email-dvlasenk@redhat.com>
Commit-ID: f1dc154f82595386cddcc7b980d8760474c3dd2d
Gitweb: http://git.kernel.org/tip/f1dc154f82595386cddcc7b980d8760474c3dd2d
Author: Denys Vlasenko <dvlasenk@redhat.com>
AuthorDate: Mon, 13 Apr 2015 13:54:33 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 5 May 2015 20:48:02 +0200
x86: Deinline dma_free_attrs()
Reduces kernel size by 76720 bytes on allyesconfig build:
text data bss dec hex filename
82594029 22255352 20627456 125476837 77a9fe5 vmlinux1
82517277 22255384 20627456 125400117 7797435 vmlinux2
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Don Dutile <ddutile@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/1428926075-28796-3-git-send-email-dvlasenk@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/include/asm/dma-mapping.h | 18 +++---------------
arch/x86/kernel/pci-dma.c | 17 +++++++++++++++++
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index 6339320..1f5b728 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -133,20 +133,8 @@ dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle,
#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *vaddr, dma_addr_t bus,
- struct dma_attrs *attrs)
-{
- struct dma_map_ops *ops = get_dma_ops(dev);
-
- WARN_ON(irqs_disabled()); /* for portability */
-
- if (dma_release_from_coherent(dev, get_order(size), vaddr))
- return;
-
- debug_dma_free_coherent(dev, size, vaddr, bus);
- if (ops->free)
- ops->free(dev, size, vaddr, bus, attrs);
-}
+void dma_free_attrs(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t bus,
+ struct dma_attrs *attrs);
#endif
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index f9f7656..353972c 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -168,6 +168,23 @@ void *dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle,
}
EXPORT_SYMBOL(dma_alloc_attrs);
+void dma_free_attrs(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t bus,
+ struct dma_attrs *attrs)
+{
+ struct dma_map_ops *ops = get_dma_ops(dev);
+
+ WARN_ON(irqs_disabled()); /* for portability */
+
+ if (dma_release_from_coherent(dev, get_order(size), vaddr))
+ return;
+
+ debug_dma_free_coherent(dev, size, vaddr, bus);
+ if (ops->free)
+ ops->free(dev, size, vaddr, bus, attrs);
+}
+EXPORT_SYMBOL(dma_free_attrs);
+
/*
* See <Documentation/x86/x86_64/boot-options.txt> for the iommu kernel
* parameter documentation.
next prev parent reply other threads:[~2015-05-05 19:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 11:54 [PATCH 0/4] deinline some DMA functions Denys Vlasenko
2015-04-13 11:54 ` [PATCH 1/4] x86: deinline dma_alloc_attrs() Denys Vlasenko
2015-05-05 19:22 ` [tip:x86/cleanups] x86: Deinline dma_alloc_attrs() tip-bot for Denys Vlasenko
2015-04-13 11:54 ` [PATCH 2/4] x86: deinline dma_free_attrs() Denys Vlasenko
2015-05-05 19:22 ` tip-bot for Denys Vlasenko [this message]
2015-04-13 11:54 ` [PATCH 3/4] deinline dma_map_single_attrs() Denys Vlasenko
2015-04-13 11:54 ` [PATCH 4/4] deinline dma_unmap_single_attrs() Denys Vlasenko
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-f1dc154f82595386cddcc7b980d8760474c3dd2d@git.kernel.org \
--to=tipbot@zytor.com \
--cc=andi@firstfloor.org \
--cc=ddutile@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mingo@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome