lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1428926075-28796-5-git-send-email-dvlasenk@redhat.com>
Date:	Mon, 13 Apr 2015 13:54:35 +0200
From:	Denys Vlasenko <dvlasenk@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	Denys Vlasenko <dvlasenk@...hat.com>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Subject: [PATCH 4/4] deinline dma_unmap_single_attrs()

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@...hat.com>
Cc: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc: linux-kernel@...r.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ