From patchwork Fri Dec 29 08:18:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10136547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A47DE60318 for ; Fri, 29 Dec 2017 08:27:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 920CC2BF45 for ; Fri, 29 Dec 2017 08:27:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86D302C169; Fri, 29 Dec 2017 08:27:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3733E2BF45 for ; Fri, 29 Dec 2017 08:27:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756211AbdL2I1D (ORCPT ); Fri, 29 Dec 2017 03:27:03 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:52186 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756117AbdL2IXb (ORCPT ); Fri, 29 Dec 2017 03:23:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8KpO5Xt8AsLvC7+uYTdlCjY1ufli+t1solsOWE87rJk=; b=dq1JlzyyqjM2/0TkGVlPxJnfn KFqk77wnYEj8Pp66F42erqvQwK+wqHMCFsUfTutNCG3jDgVEaKc0J4JvZJsAjtVXZxGV0erqXfFjS LmCc340dcCKO8c7WvxE7WvoieuJEPOzBO3uLqRZs7WT9RFWqxvulxqH9fxJI8kJ/JW2mG7+5MvPh4 LG1d+YOj+hRqx9hDKJoMhPotuICbU0XH4LWCf4em7fhk5Z6TUdZNwlPbHWAolUs0mXoZzlVOCXqA2 PWdAlZ9fQBriE1o/Hafjtw5Pko/wcJZHYPhF+YE/1+qTRmIo8Fvu73YLU369BFAK3uj2nmv4e+gED lNHNqNGJw==; Received: from 77.117.237.29.wireless.dyn.drei.com ([77.117.237.29] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1eUpwj-0003YB-Kf; Fri, 29 Dec 2017 08:23:18 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, adi-buildroot-devel@lists.sourceforge.net, linux-c6x-dev@linux-c6x.org, linux-cris-kernel@axis.com, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, Michal Simek , linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, patches@groups.riscv.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Guan Xuetao , x86@kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 55/67] ia64: replace ZONE_DMA with ZONE_DMA32 Date: Fri, 29 Dec 2017 09:18:59 +0100 Message-Id: <20171229081911.2802-56-hch@lst.de> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171229081911.2802-1-hch@lst.de> References: <20171229081911.2802-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ia64 uses ZONE_DMA for allocations below 32-bits. These days we name the zone for that ZONE_DMA32, which will allow to use the dma-direct and generic swiotlb code as-is, so rename it. Signed-off-by: Christoph Hellwig --- arch/ia64/Kconfig | 2 +- arch/ia64/kernel/pci-swiotlb.c | 2 +- arch/ia64/mm/contig.c | 4 ++-- arch/ia64/mm/discontig.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 4d18fca885ee..888acdb163cb 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -66,7 +66,7 @@ config 64BIT select ATA_NONSTANDARD if ATA default y -config ZONE_DMA +config ZONE_DMA32 def_bool y depends on !IA64_SGI_SN2 diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c index f1ae873a8c35..4a9a6e58ad6a 100644 --- a/arch/ia64/kernel/pci-swiotlb.c +++ b/arch/ia64/kernel/pci-swiotlb.c @@ -20,7 +20,7 @@ static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size, unsigned long attrs) { if (dev->coherent_dma_mask != DMA_BIT_MASK(64)) - gfp |= GFP_DMA; + gfp |= GFP_DMA32; return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); } diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index 52715a71aede..7d64b30913d1 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c @@ -237,9 +237,9 @@ paging_init (void) unsigned long max_zone_pfns[MAX_NR_ZONES]; memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); -#ifdef CONFIG_ZONE_DMA +#ifdef CONFIG_ZONE_DMA32 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; - max_zone_pfns[ZONE_DMA] = max_dma; + max_zone_pfns[ZONE_DMA32] = max_dma; #endif max_zone_pfns[ZONE_NORMAL] = max_low_pfn; diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 9b2d994cddf6..ac46f0d60b66 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c @@ -38,7 +38,7 @@ struct early_node_data { struct ia64_node_data *node_data; unsigned long pernode_addr; unsigned long pernode_size; -#ifdef CONFIG_ZONE_DMA +#ifdef CONFIG_ZONE_DMA32 unsigned long num_dma_physpages; #endif unsigned long min_pfn; @@ -669,7 +669,7 @@ static __init int count_node_pages(unsigned long start, unsigned long len, int n { unsigned long end = start + len; -#ifdef CONFIG_ZONE_DMA +#ifdef CONFIG_ZONE_DMA32 if (start <= __pa(MAX_DMA_ADDRESS)) mem_data[node].num_dma_physpages += (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT; @@ -724,8 +724,8 @@ void __init paging_init(void) } memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); -#ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA] = max_dma; +#ifdef CONFIG_ZONE_DMA32 + max_zone_pfns[ZONE_DMA32] = max_dma; #endif max_zone_pfns[ZONE_NORMAL] = max_pfn; free_area_init_nodes(max_zone_pfns);