Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp449568ybx; Wed, 30 Oct 2019 18:07:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJOfoWQRQxAImGd1bg1iVpzJ13V3XIyYxyxdN4RYPkn/5FyE2fzHjH7ohpEJtDzFCXMeOi X-Received: by 2002:a50:ec8d:: with SMTP id e13mr3113444edr.54.1572484026112; Wed, 30 Oct 2019 18:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572484026; cv=none; d=google.com; s=arc-20160816; b=j7+/N8fIqpkUyD1vhDplz3mn5Znk3kTiSJgW9oIzfyUumftDycyEXZ1p8pBFlXGk5R u+ZtCom78XBNtxuC/2Nk9q7mAEBegtOi6ws3jXUo0KR8kqU7hjfRud3X9TqQ+0U+fU7d OdAyLE/1dfCSjI7OFVBOlOl7Hq46/qsD3waw/vFD8yOJxW0WWg0uBYH/1RXvB2ESIuRs 97QQ6uq7AhAdrvyPSfGlM8o2Tkgv6ESNCic1PYpHswnWdtPEXI0Dj1OAJ8Ep+6qWbOUo KwoxSqNlxamh9sRvWHwog0EqhTvJJSApStd2eirG6tSEf+T9wo3CWpqUqfNBHIy0RcDY 3QWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DYhACg+zO53SUeLC5iAmeJtmmamitSVr5JjCgBatEmk=; b=p8LE8xnRaTxtUumIl3Y1MMLz/t9BFObgtTIdJtECqVTrUjBXBn10cw/T4mCnSMUvsF PPA59j6QGLcXjveDojaDi9vet+Fqgbgt1cNbUCLdu9kvphaThs/+AJs4sRKAgIA18uPn FH/Y2iICaZd69PoOZkj9pahd5zNov+JL7lvjUYB//++79pzxLRzeKTHPlfhtWZ2qvnIM Cwf7o8obTuogvDXmM3I7qSd/U0rUsQVaJJs8zyZYrFhjHy3EbkzGe64ifxkgH9NvJSJh Rp9IP3T5/yRJ5s+KbsGTiG7vxxHKy8lXuZRcLrgee1+tTchX7tcb9t4g6KGRBT8xVoNA bmeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=Xo2jF187; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16si3011640edc.142.2019.10.30.18.06.42; Wed, 30 Oct 2019 18:07:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=Xo2jF187; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728019AbfJaAcJ (ORCPT + 99 others); Wed, 30 Oct 2019 20:32:09 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51992 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727753AbfJaAcH (ORCPT ); Wed, 30 Oct 2019 20:32:07 -0400 Received: by mail-wm1-f66.google.com with SMTP id q70so4069446wme.1 for ; Wed, 30 Oct 2019 17:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DYhACg+zO53SUeLC5iAmeJtmmamitSVr5JjCgBatEmk=; b=Xo2jF187UE1MGGGjZ8wN0vNAH7wPPEVfI4ZvaURxYjN1pWSFx+8HdyvTcP3FzTn987 08YzzHq6OGkCXz6Im4EZfJbwBJNjKtnt3kBbs0JwsG41sI9SdnEErK9HVKIuV5ytBAAd jnU/gdaLBryLQcmiUDOmHH8SzYQxepk523nE0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DYhACg+zO53SUeLC5iAmeJtmmamitSVr5JjCgBatEmk=; b=MOtuUxeNfopy6SYifbdllJhMzNkB/0KGqAd3eq9Tve5YuQCUoWqukgpXs9FTWmfLAj orgnQZ4CtrdFUBTh3kJ5i7uNmtuMqR8K3ddClfQ6YaqQwJKMXv8zkP98W6zs09bycb6u juoDD+1GB3j/CyZDrUf3J88Dim6sI8WwnxDvliiY/Uij1y4/h+SHiQtsXA9JilZwCKlE pfwOABb7C7E1PGWguTFGNQw+1aqSmtnTNj1ECxAbm1U9yDi0moG66/K5Pve6aRrGPMHK UdWFvuLTK/DLvz2urXKgAcuVIpsZXVsI3Q3DNJ3zzEjSGyZLSIrgB3MoGkWwrlMTLblD WhsQ== X-Gm-Message-State: APjAAAVHNZvcdy8mCGLU2bHPUNSFhj2Lvj1Elb5vQEW1Agaj9/AzzaRM Y0dNHvxA84zVpqP9oQtpy9jaDA== X-Received: by 2002:a05:600c:cd:: with SMTP id u13mr2099609wmm.133.1572481923964; Wed, 30 Oct 2019 17:32:03 -0700 (PDT) Received: from prevas-ravi.prevas.se (ip-5-186-115-54.cgn.fibianet.dk. [5.186.115.54]) by smtp.gmail.com with ESMTPSA id r13sm2357111wra.74.2019.10.30.17.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2019 17:32:03 -0700 (PDT) From: Rasmus Villemoes To: linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Christophe Leroy , Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linux-kernel@vger.kernel.org, Rasmus Villemoes Subject: [RFC PATCH 3/5] powerpc: move pci_iounmap() from iomap.c to pci-common.c Date: Thu, 31 Oct 2019 01:31:52 +0100 Message-Id: <20191031003154.21969-4-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191031003154.21969-1-linux@rasmusvillemoes.dk> References: <20191031003154.21969-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As preparation for making iowrite32 and friends static inlines, move the definition of pci_iounmap() from iomap.c to pci-common.c. This definition of pci_iounmap() is compiled in when !CONFIG_PPC_INDIRECT_PIO && CONFIG_PCI - we're just interchanging which condition is in the Kbuild logic and which is in the .c file. Signed-off-by: Rasmus Villemoes --- arch/powerpc/kernel/iomap.c | 13 ------------- arch/powerpc/kernel/pci-common.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 5ac84efc6ede..b22fa8db5068 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c @@ -182,16 +182,3 @@ void ioport_unmap(void __iomem *addr) } EXPORT_SYMBOL(ioport_map); EXPORT_SYMBOL(ioport_unmap); - -#ifdef CONFIG_PCI -void pci_iounmap(struct pci_dev *dev, void __iomem *addr) -{ - if (isa_vaddr_is_ioport(addr)) - return; - if (pcibios_vaddr_is_ioport(addr)) - return; - iounmap(addr); -} - -EXPORT_SYMBOL(pci_iounmap); -#endif /* CONFIG_PCI */ diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 1c448cf25506..d89a2426b405 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -295,6 +296,18 @@ int pcibios_vaddr_is_ioport(void __iomem *address) return ret; } +#ifndef CONFIG_PPC_INDIRECT_PIO +void pci_iounmap(struct pci_dev *dev, void __iomem *addr) +{ + if (isa_vaddr_is_ioport(addr)) + return; + if (pcibios_vaddr_is_ioport(addr)) + return; + iounmap(addr); +} +EXPORT_SYMBOL(pci_iounmap); +#endif /* CONFIG_PPC_INDIRECT_PIO */ + unsigned long pci_address_to_pio(phys_addr_t address) { struct pci_controller *hose; -- 2.23.0