Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7594614rdb; Thu, 4 Jan 2024 01:07:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYOZaMhbToizYTdOtttMXsrdPP9BvgGZIJVAhtMXdd3+c7mTGVgvR/ZU6alZX/xuSufbyh X-Received: by 2002:a17:906:5308:b0:a28:57e2:cb8b with SMTP id h8-20020a170906530800b00a2857e2cb8bmr115805ejo.83.1704359277708; Thu, 04 Jan 2024 01:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704359277; cv=none; d=google.com; s=arc-20160816; b=GKUPHqFOyVUVdDZAR7YPkEmF3ovQMKNAiK63H/8B3XNQURhKBabVfc+K9DTqA4v6vl QFKbVGaTls7JwjUj2NT3Ku0DjFPcatWI6/WOxN9V3p2vKa9STNVeJdQMbdV1cmBP5X4F m/bA76NdPvBd4v+gWbRVggT2/zdAOi+gIbUXaFbLW+r+RslvrjRQoz7lKQoimFr21A1G xIAFq1YlUJiPUb+Zhd8Uzq51fPEofR7g2oQ0SDnueI/0LpyXPWVMoKh5daHKsYXUfhCX EO5Z4bEvNCc4/994Dm3XmdE45BBwvPFbCULJ5t47Au2EFwRfvevWl8IhuSW8uS/tfYIZ nqOw== 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=AV9+NlDdqxnJIfF7GX86YD5vEk8wrfdcMrmMXw4KolgZg3afi3C78UlQy+MPawHjpj MeS1iCdA/OFEEen38hvCPQHw+cAgV5C6kITUj5dhbT6fqnJSlptIlK7agFf+jX5etQEn 6d6gQkNHw+PwLNtwhv3xn5CdPt1YGFVIIgt3W+TawS+q6xul3h4HR3KsTw1nkKmgSkF7 7DrtTvvGLyqJtDoGAvQghJidXeYfZEKn7NZvYTz4q6yAhKL67NWhDzFhdIcqYqkbowPo qif6mNTUnIOriEwXlDYs2Mi6nxnTqt+aqm6dQM+tPBDVvMvGFC2lnmUr2Ndgvybe0A8O i5MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TqBCh0vI; spf=pass (google.com: domain of linux-kernel+bounces-16419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16419-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kb4-20020a170907924400b00a26ab41d1bfsi9360036ejb.120.2024.01.04.01.07.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 01:07:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TqBCh0vI; spf=pass (google.com: domain of linux-kernel+bounces-16419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16419-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 4D3E91F2443D for ; Thu, 4 Jan 2024 09:07:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D51D1208C2; Thu, 4 Jan 2024 09:07:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TqBCh0vI" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 7527E1EA95 for ; Thu, 4 Jan 2024 09:07:27 +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=1704359246; 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=TqBCh0vIW37ieVV9bfde8VaHnc8Vl+Kjr+F0Ls/V5ii3LaoE7nR6MwW2vyYCJ2JQ+4sezz EO+tT9cb66JvqpWL6h7qnIK/D1AYyBkPWTMeNDeEsKbMNSREgcZCbw48XJW7acT0Tz+eLi CE3qoEhFAnE9YcQdrgYvV8zcHtLgopQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-9ukcPC5hOTGL3cORj58ffw-1; Thu, 04 Jan 2024 04:07:25 -0500 X-MC-Unique: 9ukcPC5hOTGL3cORj58ffw-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40d5ac8116fso653835e9.0 for ; Thu, 04 Jan 2024 01:07:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704359244; x=1704964044; 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=Fz2Lm9+PiDZ/wc97aaQmvQtS8QkwRjDLuWGvh3j7tcByh+FTspAX3bILiwhLHpbVrx db/MG3zHUjjkIbR0cpVLvSjHgIwkTK+mPDKwpLEN44J3klbawGRkB7MJfq4rz8cvXVO5 Rt6mzO/L0qhMt0Mta/VwwVQZLOik6t1A2z6n4hiWUDEE88N6WSHzFPFeJrXYJ26PKwJN HBQMymgoE1+7EDRjj2gq4RCo5gKskUxX+AFbJjrnXzFqnlY7F7qP8S6Md4nQKFtvJhVJ qo2AiXW7ImtIE6i82Ggr6kB9FK2ODZ35QvQXdbNUxG0dQD5Qh0Kr60P7WxMPB04DC4pm mRcw== X-Gm-Message-State: AOJu0YwZ2zVEQtBVCC32r0iWS5MB7f5yq/JlV4adlLSqYr0lAieb2zTA p6qSPJQkj0XL5gOTwubMbVa68YI9crRcSKZhSj5oVmO+/7f8L/cy47dThIlP5OrUjqXFOAPWKkr AVirC9PCoqXAnzLoS9ntsK1MsbEceo8Rv X-Received: by 2002:a5d:530b:0:b0:336:7110:38e2 with SMTP id e11-20020a5d530b000000b00336711038e2mr442479wrv.3.1704359244283; Thu, 04 Jan 2024 01:07:24 -0800 (PST) X-Received: by 2002:a5d:530b:0:b0:336:7110:38e2 with SMTP id e11-20020a5d530b000000b00336711038e2mr442456wrv.3.1704359243976; Thu, 04 Jan 2024 01:07:23 -0800 (PST) Received: from pstanner-thinkpadt14sgen1.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id h15-20020a5d430f000000b0033740e109adsm8720864wrq.75.2024.01.04.01.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 01:07:23 -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 2/5] lib: move pci_iomap.c to drivers/pci/ Date: Thu, 4 Jan 2024 10:07:06 +0100 Message-ID: <20240104090708.10571-4-pstanner@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104090708.10571-2-pstanner@redhat.com> References: <20240104090708.10571-2-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