lkml.org 
[lkml]   [2015]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] deinline dma_unmap_single_attrs()
Date
Reduces kernel size by 26947 bytes on allyesconfig build:

text data bss dec hex filename
82474018 22255384 20627456 125356858 778cb3a vmlinux3
82447071 22255384 20627456 125329911 77861f7 vmlinux4

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org
---
include/asm-generic/dma-mapping-common.h | 16 ++++------------
kernel/dma-mapping-common.c | 14 ++++++++++++++
2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h
index 688f86b..0684d9c 100644
--- a/include/asm-generic/dma-mapping-common.h
+++ b/include/asm-generic/dma-mapping-common.h
@@ -12,18 +12,10 @@ dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr,
enum dma_data_direction dir,
struct dma_attrs *attrs);

-static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr,
- size_t size,
- enum dma_data_direction dir,
- struct dma_attrs *attrs)
-{
- struct dma_map_ops *ops = get_dma_ops(dev);
-
- BUG_ON(!valid_dma_direction(dir));
- if (ops->unmap_page)
- ops->unmap_page(dev, addr, size, dir, attrs);
- debug_dma_unmap_page(dev, addr, size, dir, true);
-}
+void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr,
+ size_t size,
+ enum dma_data_direction dir,
+ struct dma_attrs *attrs);

static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir,
diff --git a/kernel/dma-mapping-common.c b/kernel/dma-mapping-common.c
index 17457a4..75e514e 100644
--- a/kernel/dma-mapping-common.c
+++ b/kernel/dma-mapping-common.c
@@ -31,3 +31,17 @@ dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr,
return addr;
}
EXPORT_SYMBOL(dma_map_single_attrs);
+
+void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr,
+ size_t size,
+ enum dma_data_direction dir,
+ struct dma_attrs *attrs)
+{
+ struct dma_map_ops *ops = get_dma_ops(dev);
+
+ BUG_ON(!valid_dma_direction(dir));
+ if (ops->unmap_page)
+ ops->unmap_page(dev, addr, size, dir, attrs);
+ debug_dma_unmap_page(dev, addr, size, dir, true);
+}
+EXPORT_SYMBOL(dma_unmap_single_attrs);
--
1.8.1.4


\
 
 \ /
  Last update: 2015-04-13 14:21    [W:0.047 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site