Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2543769rdb; Mon, 20 Nov 2023 14:03:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRarhWEVIrdtQdU9PMniSt3LLL4v90vXaKPoxF1dyNMDklrcvIwd7CoeJvx7xJ8uxEWfZW X-Received: by 2002:a05:6871:538a:b0:1d6:57f0:7237 with SMTP id hy10-20020a056871538a00b001d657f07237mr439332oac.17.1700517839257; Mon, 20 Nov 2023 14:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700517839; cv=none; d=google.com; s=arc-20160816; b=Bt97mRld6lWHmFMfDtgNY1nxwtOQh+5O0f5YLc03eZS4kRSJCVHGcNaoK7Vhun7wV9 nG8IwCgn9x20+bKd/4/QXb6o6be4HgC9NtNPsg6HD04FzrtD7K+MBD7gR/cYHha5mxBR qLw4lLUS7JJ5wany0Yf5FDdHUSFTttvVBAs6LSDGVOwvnqxsqRdcMKyvQSqdFCf7/mDl +FuICDaDIxhU2bEclh2IOqubAruGbtrGBJn7JlBnlqZMFWabAqg5XNlpJ0ZX8yqeW4GO jb60fHt6Jw19cS6am5uADUWR5XHGbGZcKwMKIdEAeYuAHLH73ie+Z5GnwyOCQNJpcRiu HE1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5YknJrzt+mUcfRZD9fsxvrl+TzKmo/BIC31FKbthLKE=; fh=4e9Il1/dFG1ajfZVSmV/OVGdRFpa2hnKkWO9W1DQTFE=; b=ICej8jrrQVlcN8vNMWwTWhIPVZj0GW7AG9shrkkZxOOwamQ/r39ckZ8HLbST02viXP ah0SqVTGfYzGBrkMoU0lFWus7Oj0wkdRTFUPO1sjJ7/j+tiXLS/Vsy6HN3I2ZoZdra7s +eB9KaXC+Y+qjFFExAXnV+Y1qffFLjBfGJ5LbEtLaM8siU5L2kdJ5wUBTQ1pb6J49m3z GRzarJ1wmKKTLwSKOjrqdq91SGt8104r8JDuAq5SVJtFw2ZLPvya3vtcWGIG87aova5p +FiqmAyQwzL0fMv/ClvFMERsOyahjw4uMoxVYsZRbMKbO6RuCrs2xiaSCUMPg1RXY9EH 5F2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g39P4wAX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o18-20020a9d5c12000000b006c4e299ef32si3183715otk.107.2023.11.20.14.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 14:03:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g39P4wAX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C784B8084893; Mon, 20 Nov 2023 14:00:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232453AbjKTWAT (ORCPT + 99 others); Mon, 20 Nov 2023 17:00:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232003AbjKTWAP (ORCPT ); Mon, 20 Nov 2023 17:00:15 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEBABC7 for ; Mon, 20 Nov 2023 14:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700517610; 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=5YknJrzt+mUcfRZD9fsxvrl+TzKmo/BIC31FKbthLKE=; b=g39P4wAXaqLdR++0cEPeKAVGHR6HhGaHz5p1cWabykc1HCiN0HOZ7yVrZGS+GHYV2o4Cke 4yJzmblnZUVTFyibFHmYlJR1VJBCv9d6sbCGQsY4CBlrGYH8UZkcCq/EB52sGoMcQYhUrW fn5M9FUTrudBsqyZQBtMuY8QL+I3d0k= Received: from mail-oa1-f69.google.com (mail-oa1-f69.google.com [209.85.160.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-hYtjXP6RPCODIAcWWYxrtg-1; Mon, 20 Nov 2023 17:00:09 -0500 X-MC-Unique: hYtjXP6RPCODIAcWWYxrtg-1 Received: by mail-oa1-f69.google.com with SMTP id 586e51a60fabf-1f93a01ef88so461184fac.1 for ; Mon, 20 Nov 2023 14:00:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700517608; x=1701122408; 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=5YknJrzt+mUcfRZD9fsxvrl+TzKmo/BIC31FKbthLKE=; b=Ww0m/fSbnY7AlFe6Ca/eE6f7s2jt7iclNgJJ2AoRe+D//S7GdSlDrtkVbAYN7V/EtC 42SF/P5FMdIHllcNJ5lw3aq/pOoVhA8nSnqIBkUN6Gf2t1gqaSfKpeoD1LYw/ryUpGUM bzGkTNzvIjFF1G0z3L5CBv+QZLi/slZ9nyVibrSbrOGA6g3mLjFOSO01G8FE739Yg723 zNPJ/fyb079m+KndchJI9aUH0LwSkBLvi9hSzUQRHmYvrWEpsj3c+483BfXK7ACylVoW 0p3D6BCx7m+t1PehLAeGluUgeMvhJmRqZVAovCWM8rdDxsOMPlcUPCs/lsAij9Na/7Ld lC0A== X-Gm-Message-State: AOJu0YzkFA6prAE4JlzgELeIIVSSrBUzZv3tSB0PsDuSK6+DagiQ6DKr XDIvlgNhuQyRjb12gxp16eITVbU8revZ174KtiWwc5+/2hsDExuTD52sCcYGI58qsd+JrFzedyF bRJQpeFJarL6P8sP7ZROAqgxx X-Received: by 2002:a05:6358:199b:b0:16d:abd9:f29e with SMTP id v27-20020a056358199b00b0016dabd9f29emr6547707rwn.2.1700517608425; Mon, 20 Nov 2023 14:00:08 -0800 (PST) X-Received: by 2002:a05:6358:199b:b0:16d:abd9:f29e with SMTP id v27-20020a056358199b00b0016dabd9f29emr6547661rwn.2.1700517608043; Mon, 20 Nov 2023 14:00:08 -0800 (PST) Received: from pstanner-thinkpadt14sgen1.remote.csb ([2001:9e8:32dd:2700:227b:d2ff:fe26:2a7a]) by smtp.gmail.com with ESMTPSA id 3-20020ad45ba3000000b00677fb918337sm2762398qvq.53.2023.11.20.14.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 14:00:07 -0800 (PST) From: Philipp Stanner To: Bjorn Helgaas , Arnd Bergmann , Andrew Morton , Randy Dunlap , Jason Gunthorpe , Eric Auger , Kent Overstreet , Niklas Schnelle , NeilBrown , Philipp Stanner , John Sanpe , Dave Jiang , Yury Norov , Kees Cook , "Masami Hiramatsu (Google)" , David Gow , Herbert Xu , Thomas Gleixner , "wuqiang.matt" , Jason Baron , Ben Dooks , Danilo Krummrich Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ Date: Mon, 20 Nov 2023 22:59:43 +0100 Message-ID: <20231120215945.52027-3-pstanner@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231120215945.52027-2-pstanner@redhat.com> References: <20231120215945.52027-2-pstanner@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 14:00:23 -0800 (PST) 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. Suggested-by: Danilo Krummrich Signed-off-by: Philipp Stanner --- drivers/pci/Kconfig | 3 +++ drivers/pci/Makefile | 1 + lib/pci_iomap.c => drivers/pci/iomap.c | 3 --- lib/Kconfig | 3 --- lib/Makefile | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) rename lib/pci_iomap.c => drivers/pci/iomap.c (99%) diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 74147262625b..b54cacbc1160 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -34,6 +34,9 @@ config PCI_DOMAINS_GENERIC config PCI_SYSCALL bool +config GENERIC_PCI_IOMAP + bool + source "drivers/pci/pcie/Kconfig" config PCI_MSI diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index cc8b4e01e29d..d6d0abfe59e2 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -33,6 +33,7 @@ obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o obj-$(CONFIG_VGA_ARB) += vgaarb.o obj-$(CONFIG_PCI_DOE) += doe.o obj-$(CONFIG_PCI_DYNAMIC_OF_NODES) += of_property.o +obj-$(CONFIG_GENERIC_PCI_IOMAP) += iomap.o # Endpoint library must be initialized before its users obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ 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 ce39ce9f3526..0a9d503ba533 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 @@ -176,5 +175,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.41.0