Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758919AbZFAPfm (ORCPT ); Mon, 1 Jun 2009 11:35:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755473AbZFAPdh (ORCPT ); Mon, 1 Jun 2009 11:33:37 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:29936 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755334AbZFAPdg (ORCPT ); Mon, 1 Jun 2009 11:33:36 -0400 X-IronPort-AV: E=Sophos;i="4.41,284,1241409600"; d="scan'208";a="53320442" From: Ian Campbell To: CC: Ian Campbell , FUJITA Tomonori , Jeremy Fitzhardinge , Olaf Kirch , Greg KH , Ingo Molnar Subject: [PATCH 10/11] swiotlb: remove __weak swiotlb_alloc* hooks Date: Mon, 1 Jun 2009 16:33:02 +0100 Message-ID: <1243870383-12954-11-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1243870383-12954-1-git-send-email-ian.campbell@citrix.com> References: <1243870383-12954-1-git-send-email-ian.campbell@citrix.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3238 Lines: 99 There are no current users and the problem these were intended to solve will be solved in a different way. This effectively reverts commit 8c5df16b. Signed-off-by: Ian Campbell Cc: FUJITA Tomonori Cc: Jeremy Fitzhardinge Cc: Olaf Kirch Cc: Greg KH Cc: Ingo Molnar --- arch/x86/kernel/pci-swiotlb.c | 10 ---------- include/linux/swiotlb.h | 3 --- lib/swiotlb.c | 15 +++------------ 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c index fdcc0e2..9640e17 100644 --- a/arch/x86/kernel/pci-swiotlb.c +++ b/arch/x86/kernel/pci-swiotlb.c @@ -13,16 +13,6 @@ int swiotlb __read_mostly; -void * __init swiotlb_alloc_boot(size_t size, unsigned long nslabs) -{ - return alloc_bootmem_low_pages(size); -} - -void *swiotlb_alloc(unsigned order, unsigned long nslabs) -{ - return (void *)__get_free_pages(GFP_DMA | __GFP_NOWARN, order); -} - static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flags) { diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 1b56dbf..b5b2245 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -24,9 +24,6 @@ struct scatterlist; extern void swiotlb_init(void); -extern void *swiotlb_alloc_boot(size_t bytes, unsigned long nslabs); -extern void *swiotlb_alloc(unsigned order, unsigned long nslabs); - extern void *swiotlb_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flags); diff --git a/lib/swiotlb.c b/lib/swiotlb.c index ca8009a..6076bb7 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -114,16 +114,6 @@ setup_io_tlb_npages(char *str) __setup("swiotlb=", setup_io_tlb_npages); /* make io_tlb_overflow tunable too? */ -void * __weak __init swiotlb_alloc_boot(size_t size, unsigned long nslabs) -{ - return alloc_bootmem_low_pages(size); -} - -void * __weak swiotlb_alloc(unsigned order, unsigned long nslabs) -{ - return (void *)__get_free_pages(GFP_DMA | __GFP_NOWARN, order); -} - static dma_addr_t swiotlb_virt_to_dma(struct device *hwdev, volatile void *address) { @@ -177,7 +167,7 @@ swiotlb_init_with_default_size(size_t default_size) /* * Get IO TLB memory from the low pages */ - io_tlb_start = swiotlb_alloc_boot(bytes, io_tlb_nslabs); + io_tlb_start = alloc_bootmem_low_pages(bytes); if (!io_tlb_start) panic("Cannot allocate SWIOTLB buffer"); io_tlb_end = io_tlb_start + bytes; @@ -233,7 +223,8 @@ swiotlb_late_init_with_default_size(size_t default_size) bytes = io_tlb_nslabs << IO_TLB_SHIFT; while ((SLABS_PER_PAGE << order) > IO_TLB_MIN_SLABS) { - io_tlb_start = swiotlb_alloc(order, io_tlb_nslabs); + io_tlb_start = (void *)__get_free_pages(GFP_DMA | __GFP_NOWARN, + order); if (io_tlb_start) break; order--; -- 1.5.6.5 -- 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/