From nobody Thu Dec 18 18:00:48 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B6B3C2BB3F for ; Mon, 20 Nov 2023 22:00:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232483AbjKTWAT (ORCPT ); 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-Google-Smtp-Source: AGHT+IHCIi4ZtnWPYH5Nbuh+PP3GwGRiVhr5nrSG3asXMxcfimwvOxj/XDAQGiRIbPn9EQ4+9RYwPg== 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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =3D> drivers/pci/iomap.c | 3 --- lib/Kconfig | 3 --- lib/Makefile | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) rename lib/pci_iomap.c =3D> 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 =20 +config GENERIC_PCI_IOMAP + bool + source "drivers/pci/pcie/Kconfig" =20 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) +=3D xen-pcifront.o obj-$(CONFIG_VGA_ARB) +=3D vgaarb.o obj-$(CONFIG_PCI_DOE) +=3D doe.o obj-$(CONFIG_PCI_DYNAMIC_OF_NODES) +=3D of_property.o +obj-$(CONFIG_GENERIC_PCI_IOMAP) +=3D iomap.o =20 # Endpoint library must be initialized before its users obj-$(CONFIG_PCI_ENDPOINT) +=3D 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 @@ =20 #include =20 -#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); =20 #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 =20 -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 +=3D $(call cc-option, -femit-struc= t-debug-detailed=3Dany) obj-y +=3D math/ crypto/ =20 obj-$(CONFIG_GENERIC_IOMAP) +=3D iomap.o -obj-$(CONFIG_GENERIC_PCI_IOMAP) +=3D pci_iomap.o obj-$(CONFIG_HAS_IOMEM) +=3D iomap_copy.o devres.o obj-$(CONFIG_CHECK_SIGNATURE) +=3D check_signature.o obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) +=3D locking-selftest.o --=20 2.41.0