Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1511296rdd; Thu, 11 Jan 2024 01:04:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwlLVDVFUKuGJJFqoGwa2F/wTASuxxBzYdmXzST6XqUFe0/VtQD+nLm4vts/4sU5b8z2ve X-Received: by 2002:a2e:9691:0:b0:2cd:39ec:c31d with SMTP id q17-20020a2e9691000000b002cd39ecc31dmr219405lji.46.1704963871310; Thu, 11 Jan 2024 01:04:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704963871; cv=none; d=google.com; s=arc-20160816; b=dhfndSJ8rY0fEH3b02ShemNimAlprn9pKxZGPtZAeGC8IoCVn3m7RJVKwTHG95Fk4q hiP1oTbVmd/b7FFoD8syXASewzvhT1hZrptgtTcAISEhZ7xCsuZlL0LXCaePTBEY9eu2 ewnSMVEG+cdMmdJl4ob+Yq6gtFtichSRG7eD60HTHRBSXTczFU/aCCNILl1TcH0c9vLZ 4VRR2nUgb43HdV3TPfj1d2FZwRdxplJsNvdQQpTxK9GoW+nTfT1Bi/Ht6tkSeWGoOyHq 6YBdgvELO7Se4GKReQGT8KQ9CKz78qvfP9hB+EAxmwp1hvq8EHrjDhZR5taKLHlYZxxJ BVwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Dyerj4wk/ZFwQTySswA1kbRd7v7F1+vxDBdnemG6spU=; fh=C7LQW+4J0BgiMGOKM1Hc288DqCJKKjCWWy6i3V6pGhc=; b=ai9ZMpuiDmtkcmEm8s2Ods0nELgP0xeTjqdjkWyZVqni4vpnM/8WBqaFzVcfQjT81b DJOJjUzjpmbxkhgAnsameamD0twBhZBiAqz+Ci+efHBFxOcdKKwM3K2E9woEFi5FaIra Q+T5BdlBxUvbPYfQz7zlBLEqPEDVjHY15fhVWvGXSzYHr6Hbd75ky2YLkgCAh9uamhui geAI4Io7pZY2HpXW18hE+y5BvDGV9t3qjYo3vlAeBcKlK8hiy5m7llSm8Ym7JMKFczby WajqQYwXL8UZzpf4eXHqv4b6kgu8L3Ug4wewnN2JdBPIeVLNV7bNP9V6JvXfZakmBN6+ 638w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UJyXAHCg; spf=pass (google.com: domain of linux-kernel+bounces-23281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23281-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p15-20020a05640243cf00b005580d1a031asi343354edc.56.2024.01.11.01.04.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 01:04:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UJyXAHCg; spf=pass (google.com: domain of linux-kernel+bounces-23281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23281-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D45BA1F26301 for ; Thu, 11 Jan 2024 09:04:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A203A16409; Thu, 11 Jan 2024 09:01:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UJyXAHCg" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6602116402 for ; Thu, 11 Jan 2024 09:01:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704963707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dyerj4wk/ZFwQTySswA1kbRd7v7F1+vxDBdnemG6spU=; b=UJyXAHCgbjiamozcYARnFHrA8UuJfmRjb5HMbHDnNgiBtfoVD5NNhxBtC/5ZsyUqjWhdGI 2yKUUM7/aChdYGMmBHouy5tNcEMAYomZ0Gza9l/+zCPxa00eKPOD3fFy5VyGkDualV9bv3 wvzZXBFT5MjB5THR/qXyCovVvQcfFrA= Received: from mail-yb1-f198.google.com (mail-yb1-f198.google.com [209.85.219.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-283-t-LrKAIwMRyJkMTwQsFfZg-1; Thu, 11 Jan 2024 04:01:40 -0500 X-MC-Unique: t-LrKAIwMRyJkMTwQsFfZg-1 Received: by mail-yb1-f198.google.com with SMTP id 3f1490d57ef6-dbedac2539dso1107457276.1 for ; Thu, 11 Jan 2024 01:01:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704963700; x=1705568500; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dyerj4wk/ZFwQTySswA1kbRd7v7F1+vxDBdnemG6spU=; b=gL69mWDj8gTxsdebPTiFRGFAMRCaao7RLqTivKLcRga4Xqn2yNI5bTyaZ+wqYDgENp cNt+OZtt1LBtl7Iky06BMJTcKL7y000m5ekvh6gqakYOKqej/a/zU/lypWNOOpY0RhH2 CRl6wbsnqnDBJNftBuxnFKt8EwaVQHOaPEyaF1b7HhiIjH3qsbi9HamDHUYsTJHPMTUq 75NXyUpV/KimM2jHtIsb7lXVQOaD/3MG/f9H5nFmVLmB2BNBQJfjC70a/0VwZCfl0XC5 YeW1w6fUMDJVWTi7f/Ip1kVeYD9zGqpIXUrjKsLwxKOUA5kd0UTR2E94eSAGpeXDYun6 RScw== X-Gm-Message-State: AOJu0Yx992SyjRbxWETMzTq6F5mPmn6e1P/hyK7aAMKolhLM/JAADqHN IKdtZeFeOUh+eQ5W/ml0/pCa1MBuEfs26a1oWwYwijVFnsmBWv5Udol+fd4DymgaECqaYu6Ht4G OVYlu/lS2ritWhtTgoNOD1TC+KtVAJVax X-Received: by 2002:a05:6102:224b:b0:467:cec3:dda5 with SMTP id e11-20020a056102224b00b00467cec3dda5mr1505612vsb.0.1704963369871; Thu, 11 Jan 2024 00:56:09 -0800 (PST) X-Received: by 2002:a05:6102:224b:b0:467:cec3:dda5 with SMTP id e11-20020a056102224b00b00467cec3dda5mr1505588vsb.0.1704963369517; Thu, 11 Jan 2024 00:56:09 -0800 (PST) Received: from pstanner-thinkpadt14sgen1.remote.csb (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id e16-20020a0cd650000000b0067f7d131256sm168341qvj.17.2024.01.11.00.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 00:56:09 -0800 (PST) From: Philipp Stanner To: Bjorn Helgaas , Arnd Bergmann , Johannes Berg , Randy Dunlap , NeilBrown , John Sanpe , Kent Overstreet , Niklas Schnelle , Philipp Stanner , Dave Jiang , Uladzislau Koshchanka , "Masami Hiramatsu (Google)" , David Gow , Kees Cook , Rae Moar , Geert Uytterhoeven , "wuqiang.matt" , Yury Norov , Jason Baron , Thomas Gleixner , Marco Elver , Andrew Morton , Ben Dooks , dakr@redhat.com Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v5 RESEND 2/5] lib: move pci_iomap.c to drivers/pci/ Date: Thu, 11 Jan 2024 09:55:37 +0100 Message-ID: <20240111085540.7740-3-pstanner@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240111085540.7740-1-pstanner@redhat.com> References: <20240111085540.7740-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This file is guarded by an #ifdef CONFIG_PCI. It, consequently, does not belong to lib/ because it is not generic infrastructure. Move the file to drivers/pci/ and implement the necessary changes to Makefiles and Kconfigs. Update MAINTAINERS file. Suggested-by: Danilo Krummrich Signed-off-by: Philipp Stanner Reviewed-by: Arnd Bergmann --- MAINTAINERS | 1 - drivers/pci/Kconfig | 5 +++++ drivers/pci/Makefile | 1 + lib/pci_iomap.c => drivers/pci/iomap.c | 3 --- lib/Kconfig | 3 --- lib/Makefile | 1 - 6 files changed, 6 insertions(+), 8 deletions(-) rename lib/pci_iomap.c => drivers/pci/iomap.c (99%) diff --git a/MAINTAINERS b/MAINTAINERS index edae86acdfdc..efa37ee81d30 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16762,7 +16762,6 @@ F: include/asm-generic/pci* F: include/linux/of_pci.h F: include/linux/pci* F: include/uapi/linux/pci* -F: lib/pci* PCIE DRIVER FOR AMAZON ANNAPURNA LABS M: Jonathan Chocron diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 74147262625b..d35001589d88 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -13,6 +13,11 @@ config FORCE_PCI select HAVE_PCI select PCI +# select this to provide a generic PCI iomap, +# without PCI itself having to be defined +config GENERIC_PCI_IOMAP + bool + menuconfig PCI bool "PCI support" depends on HAVE_PCI diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index cc8b4e01e29d..64dcedccfc87 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -14,6 +14,7 @@ ifdef CONFIG_PCI obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_SYSFS) += slot.o obj-$(CONFIG_ACPI) += pci-acpi.o +obj-$(CONFIG_GENERIC_PCI_IOMAP) += iomap.o endif obj-$(CONFIG_OF) += of.o diff --git a/lib/pci_iomap.c b/drivers/pci/iomap.c similarity index 99% rename from lib/pci_iomap.c rename to drivers/pci/iomap.c index 6e144b017c48..91285fcff1ba 100644 --- a/lib/pci_iomap.c +++ b/drivers/pci/iomap.c @@ -9,7 +9,6 @@ #include -#ifdef CONFIG_PCI /** * pci_iomap_range - create a virtual mapping cookie for a PCI BAR * @dev: PCI device that owns the BAR @@ -178,5 +177,3 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *p) EXPORT_SYMBOL(pci_iounmap); #endif /* ARCH_WANTS_GENERIC_PCI_IOUNMAP */ - -#endif /* CONFIG_PCI */ diff --git a/lib/Kconfig b/lib/Kconfig index 3ea1c830efab..1bf859166ac7 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -70,9 +70,6 @@ source "lib/math/Kconfig" config NO_GENERIC_PCI_IOPORT_MAP bool -config GENERIC_PCI_IOMAP - bool - config GENERIC_IOMAP bool select GENERIC_PCI_IOMAP diff --git a/lib/Makefile b/lib/Makefile index 6b09731d8e61..0800289ec6c5 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -153,7 +153,6 @@ CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any) obj-y += math/ crypto/ obj-$(CONFIG_GENERIC_IOMAP) += iomap.o -obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o -- 2.43.0