Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757280AbbEETXO (ORCPT ); Tue, 5 May 2015 15:23:14 -0400 Received: from terminus.zytor.com ([198.137.202.10]:58974 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757260AbbEETXI (ORCPT ); Tue, 5 May 2015 15:23:08 -0400 Date: Tue, 5 May 2015 12:22:22 -0700 From: tip-bot for Denys Vlasenko Message-ID: 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 Reply-To: dwmw2@infradead.org, tglx@linutronix.de, m.szyprowski@samsung.com, ddutile@redhat.com, dvlasenk@redhat.com, mingo@kernel.org, konrad.wilk@oracle.com, linux-kernel@vger.kernel.org, hpa@zytor.com, andi@firstfloor.org In-Reply-To: <1428926075-28796-3-git-send-email-dvlasenk@redhat.com> References: <1428926075-28796-3-git-send-email-dvlasenk@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cleanups] x86: Deinline dma_free_attrs() Git-Commit-ID: f1dc154f82595386cddcc7b980d8760474c3dd2d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3201 Lines: 90 Commit-ID: f1dc154f82595386cddcc7b980d8760474c3dd2d Gitweb: http://git.kernel.org/tip/f1dc154f82595386cddcc7b980d8760474c3dd2d Author: Denys Vlasenko AuthorDate: Mon, 13 Apr 2015 13:54:33 +0200 Committer: Thomas Gleixner 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 Cc: Marek Szyprowski Cc: Konrad Rzeszutek Wilk Cc: David Woodhouse Cc: Don Dutile Cc: Andi Kleen Cc: x86@kernel.org Link: http://lkml.kernel.org/r/1428926075-28796-3-git-send-email-dvlasenk@redhat.com Signed-off-by: Thomas Gleixner --- 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 for the iommu kernel * parameter documentation. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/