From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752849AbbLUXvU (ORCPT ); Mon, 21 Dec 2015 18:51:20 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:33131 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752396AbbLUXsM (ORCPT ); Mon, 21 Dec 2015 18:48:12 -0500 From: Al Viro To: linux-kernel@vger.kernel.org Cc: Linus Torvalds Subject: [POC][PATCH 77/83] sparc: switch to get_free_pages() Date: Mon, 21 Dec 2015 23:47:50 +0000 Message-Id: <1450741676-5865-77-git-send-email-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <20151221234615.GW20997@ZenIV.linux.org.uk> References: <20151221234615.GW20997@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro Signed-off-by: Al Viro --- arch/sparc/kernel/irq_64.c | 3 +-- arch/sparc/mm/iommu.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 8858bb0..54a55ce 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c @@ -1019,9 +1019,8 @@ static void __init alloc_one_queue(unsigned long *pa_ptr, unsigned long qmask) { unsigned long size = PAGE_ALIGN(qmask + 1); unsigned long order = get_order(size); - unsigned long p; + void *p = get_free_pages(GFP_KERNEL, order); - p = __get_free_pages(GFP_KERNEL, order); if (!p) { prom_printf("SUN4V: Error, cannot allocate queue.\n"); prom_halt(); diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index f9d30bd..113dabf 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -60,7 +60,7 @@ static void __init sbus_iommu_init(struct platform_device *op) unsigned long *bitmap; unsigned long control; unsigned long base; - unsigned long tmp; + iopte_t *tmp; iommu = kmalloc(sizeof(struct iommu_struct), GFP_KERNEL); if (!iommu) { @@ -91,13 +91,13 @@ static void __init sbus_iommu_init(struct platform_device *op) We need 256K or 512K or 1M or 2M area aligned to its size and current gfp will fortunately give it to us. */ - tmp = __get_free_pages(GFP_KERNEL, IOMMU_ORDER); + tmp = get_free_pages(GFP_KERNEL, IOMMU_ORDER); if (!tmp) { prom_printf("Unable to allocate iommu table [0x%lx]\n", IOMMU_NPTES * sizeof(iopte_t)); prom_halt(); } - iommu->page_table = (iopte_t *)tmp; + iommu->page_table = tmp; /* Initialize new table. */ memset(iommu->page_table, 0, IOMMU_NPTES*sizeof(iopte_t)); -- 2.1.4