Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp431613rdf; Tue, 21 Nov 2023 06:42:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGtGpVXg2df4LJv5rMyIawot6Qe3YXkK+vuX+Mah3UjwMxioctm8UWhSQLjY3YVU2H52g8 X-Received: by 2002:a17:902:bc46:b0:1cf:6de1:699c with SMTP id t6-20020a170902bc4600b001cf6de1699cmr1848909plz.53.1700577726858; Tue, 21 Nov 2023 06:42:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700577726; cv=none; d=google.com; s=arc-20160816; b=PY58jrHNzQ6adxmRqO/NuPFv/jWI5pn0UcLCxFlnQvolDV47in4SzppOsdvkYZcRss 7PZ43iabscZbf9xpPX4+XE+CVz3cbOl7x5PP4lw21pj5x4c+1HNEWpDrpx8bEOrzN8Du hSqLLv64VEx7TWjlwzIqUCG0pMdh8F6vy+Vnjaoa6l0bCHABaulW8eD9K4wXJVahZtvz OpE0Lxc/4kXdXqP8WCS3Bf9Hfe/sp48Svll8Ao9zaP0SsnV4/ZkQT57e6zTBq6eV9B8w B1yen41V0ccgaZEcT3PB1TH05O+t6574+U4Al/+yxue8KrBad3pWjYGpXEymKl+UFbEB 6HBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature; bh=0ljSHC4qGu2PNOUZolZ5vWmK57qTWvQazCsIgXtph1s=; fh=84EnaAUACVtiQIBVEUv8V/+moi6opmgSt0fDKpyYDB4=; b=eqyXyfQ1aJi0yUJfCCn5vHm2/S06lCyNPUGIVupLoyvotHeuOJfY/BgTG4WyE394qF 3ssn/T9vMbOSU/d1GuVGn8daPzQ6CulDo4cKTx1OfErYCAJVLdfGBKzGVih8oVuG7tjb iYkP31F9ffYTLF21iQwNtpAKvZHe5YZfNKTg7eWHrwwzeROsIyl7oIstgjs94d2I0Ysp 5l0SoL4XU8AgxoZxNqfhj5mtJmISqNiH2zslWQC2pH5jWX4xwU8+mpddLcPUYmFc+stN PKhqMnr0x/6WTmOKaLaVaaGyw8rLz0/AOMqaYu4YSLDTaN+s0HqDx1Ktcg+ln0sgoB5j BRQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CgL2ucQd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j8-20020a170903024800b001c0727658c3si11079593plh.259.2023.11.21.06.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 06:42:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CgL2ucQd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CEAA080BE0A4; Tue, 21 Nov 2023 06:42:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234723AbjKUOlx (ORCPT + 99 others); Tue, 21 Nov 2023 09:41:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234359AbjKUOlu (ORCPT ); Tue, 21 Nov 2023 09:41:50 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01DDA113 for ; Tue, 21 Nov 2023 06:41:47 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 789C1C433CB; Tue, 21 Nov 2023 14:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700577706; bh=C7C7k7MQyKejZFr0pldTQeSMPk6gsd2UxQYtxinu5pw=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=CgL2ucQdy94yOgeIDAUwoCO7aWp99U7UxUB44vIJ3zoQMnIR3udHQhZIN5sXyibxH czAz+Vx7RKPr3AxsKhd//nrVd+r4N6i7ApCx4lYT3p9DQ1FAkUO2nrLt1C0OvO9hu0 GyxDqgbOTvqZ+c7ie+Cpemx6xHP6JTyW3ruN+ht4bp54BYF69fMaDHagP5C+KWqEZR 2GijwYoxOkrfOh8SuugWFy/NFjq/L/cG2cnPsXdIiJTdRvS4sgOyqNK92uVAfKrcXW /1IJfJPYZxTj5HxtbY5vKw7lmpV/AzMLvdDw7rTTx/pSoeXW8MDSz83AYujBr+LtqC MPuYqOIGMysAw== Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 51B9927C0060; Tue, 21 Nov 2023 09:41:44 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Tue, 21 Nov 2023 09:41:44 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegledgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugeskhgvrhhnvghlrdhorhhgqeenucggtf frrghtthgvrhhnpedvtddtffejfeeggefgleefgfeghfehfeefffetgffgleegudevveet hfefjeevkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrrhhnugdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidquddvkeehudej tddvgedqvdekjedttddvieegqdgrrhhnugeppehkvghrnhgvlhdrohhrghesrghrnhgusg druggv X-ME-Proxy: Feedback-ID: i36794607:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D1C33B60089; Tue, 21 Nov 2023 09:41:41 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1178-geeaf0069a7-fm-20231114.001-geeaf0069 MIME-Version: 1.0 Message-Id: <5bd85a64-5161-4312-831d-cba420e20bfb@app.fastmail.com> In-Reply-To: <9a5f21b69709121c8b342bb44e0b7f83deacd10d.camel@redhat.com> References: <20231120215945.52027-2-pstanner@redhat.com> <20231120215945.52027-6-pstanner@redhat.com> <9a5f21b69709121c8b342bb44e0b7f83deacd10d.camel@redhat.com> Date: Tue, 21 Nov 2023 15:41:21 +0100 From: "Arnd Bergmann" To: "Philipp Stanner" , "Bjorn Helgaas" , "Andrew Morton" , "Randy Dunlap" , "Jason Gunthorpe" , "Eric Auger" , "Kent Overstreet" , "Niklas Schnelle" , "Neil Brown" , "John Sanpe" , "Dave Jiang" , "Yury Norov" , "Kees Cook" , "Masami Hiramatsu" , "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: Re: [PATCH 4/4] lib/iomap.c: improve comment about pci anomaly Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 06:42:03 -0800 (PST) On Tue, Nov 21, 2023, at 15:38, Philipp Stanner wrote: > On Tue, 2023-11-21 at 11:03 +0100, Arnd Bergmann wrote: >> On Mon, Nov 20, 2023, at 22:59, Philipp Stanner wrote: =20 >> We should be able to define a generic version like >>=20 >> void pci_iounmap(struct pci_dev *dev, void __iomem * addr) >> { >> #ifdef CONFIG_HAS_IOPORT >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (iomem_is_ioport(addr)) { >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ioport_unmap(addr); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 return; >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> #endif >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 iounmap(addr) >> } > > And where would you like such a function to reside? > drivers/pci/iomap.c? Yes, I think that would be the logical place. It could also be an inline function but that's not great on architectures that don't also have iomem_is_ioport() inline. Arnd