Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1360387rdb; Fri, 1 Dec 2023 14:17:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpyjHiIWtAkEBM3yw+b1tK1lZcE3cQ2cAcfQ0mzs1nNJ79RUTzrpaZocX5YnFSNLSgJBR8 X-Received: by 2002:a17:902:7483:b0:1cf:ccc3:c9d7 with SMTP id h3-20020a170902748300b001cfccc3c9d7mr183305pll.3.1701469079089; Fri, 01 Dec 2023 14:17:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701469079; cv=none; d=google.com; s=arc-20160816; b=li6R0xVONB8u406rrJ2USBLXhUYo4Omxq3hKSDF+AOoarPJB+vUIEBFxlsquaPHlgo pIRRQAZmIt64Y53n0EaFkTdB0z2kU3ZMq1OAcqiep4aMejGrKnXbgeOPQLE241IUiKOn mu3K8X8fvnqB9PoDC0Lerf3I3Hsw66ds9VU84bKFtiu4HBC3zXB1E6LllLd3y0Z6XCgk vVbYSwOSwDJ0BFfVLjGKXTw2VtgzeCVWXjTsfl5vX+WvG4t1fytBfzAfQsDednC3fGek ehVLexQmIqXpj6cORtTaCGg2hKDsG2T+I4OuAH7BFL43K7j0RovhSnYrHyAHjvSCwldp IruQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=EIRXyofmqrPd13/Ro55ULfkGqrMFOWjZCVCRuGyg6nE=; fh=dTtrAcGs2K0uRyVUqjRkO1Is4PnzkiHWJaMmpc6Zsfo=; b=nLOVtrwiUU6Wslxubj1OoJstr/uiiZKVg/kjgP5GaaB3JXUrO0yYsgMubfFw+p1h0M tOdOAeGn/cWdmWcSk3rIQogDfqQu373PBBsNwJHkzyKFVQu7N62lbnt5M5OAwrclGmL/ J/lofR5kXkiTz86mqPVfNeVb1MrxqPHQ0kUgRrjshvMq1Ui9AN9sDT6wF7XWUdMRFiuJ 8ah1js8e2kxUCXMnv1o3Kx4xHBycpS0m71avY/k7u2VoXiGAm3kUEOc4IwT2myr/V3C3 cQvY63PMcHoF24WRS3yy4MTpKimqLTq1UgtrXCYD3ZLsNA40pOAtxL4j2CzyRY5zDzSi bB1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=wn853AVu; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Fx99YuvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id z6-20020a63d006000000b0057745d87b53si3806204pgf.686.2023.12.01.14.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 14:17:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=wn853AVu; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Fx99YuvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9777880725CA; Fri, 1 Dec 2023 14:17:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231149AbjLAWRk (ORCPT + 99 others); Fri, 1 Dec 2023 17:17:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjLAWRi (ORCPT ); Fri, 1 Dec 2023 17:17:38 -0500 Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91F2D128; Fri, 1 Dec 2023 14:17:44 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id C2DAA2B00432; Fri, 1 Dec 2023 17:17:41 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Fri, 01 Dec 2023 17:17:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1701469061; x=1701476261; bh=EI RXyofmqrPd13/Ro55ULfkGqrMFOWjZCVCRuGyg6nE=; b=wn853AVu8W0Tfbo+jk 1Wf8qs5cSXge4s3U1fwiNaqVoS/OyuETR65p9vOJ7wSizzTgibqq89TwBCuL7ZKo WwIAh7RzCCD7qB98W2cReZCigQaChczVIPXpXFOM6i+5NJi8U1DQOm7UsaiM/xvu Nd6/fN8Tb6ctqkGsXPyCdWSuASzLVAjlEGQolpb8DY03ougAuBSYOVRnGD7wPoNF PZlBZLIHri9uhXACmHbs/w6P90hvgYTL0SkKksJaLKGSsN6KII5d9T3bUgfJDzUw WnyCGa9ByvxnMB8/N/mEPehfjwjOYFnuDWnu0OBDhEPz+komEgwSgXkpGqE8gTKU R/ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701469061; x=1701476261; bh=EIRXyofmqrPd1 3/Ro55ULfkGqrMFOWjZCVCRuGyg6nE=; b=Fx99YuvUsl3WHkepXVbxkX+JvY82g afBWGFEfL4ZhqjVvOErM/ShCsUw2K5NvWGbW9Mq+zBCem+aiuqKUhixiW4T6eZfn w1egZtJC3YPjy4giXM/FNm3m3MZFTvfI8ze6SrvhCqHjJIPUpUVDdrQ79NGZWWai Rnvv4AVlczDYwM+5YNSSshukDQIqaT6pmtGkTFoC2yd/muXmwx33Aqr+XZYaBYwT HZhSrubowpw9AXQDRZNsPUxj2VQnFh7rO6oaHWZUJNBXpOnPsXSvYacaVa6FWmuw HL/W9MTPPwGLJfSj/qHM5Zd1F8vYjt5+dGBITQ0JalJ7xnOC0970yEuOg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiledgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id C65D5B6008D; Fri, 1 Dec 2023 17:17:39 -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: <9ce4e2af-efe9-4049-8b56-60de4a1e942a@app.fastmail.com> In-Reply-To: <65079f6d5f512f9aff003bdfea127b214a9f9290.camel@redhat.com> References: <20231201121622.16343-1-pstanner@redhat.com> <3871b83a-0e80-402e-bbe6-359c17127842@app.fastmail.com> <65079f6d5f512f9aff003bdfea127b214a9f9290.camel@redhat.com> Date: Fri, 01 Dec 2023 23:17:19 +0100 From: "Arnd Bergmann" To: "Philipp Stanner" , "Bjorn Helgaas" , "Andrew Morton" , "Dan Williams" , "Jonathan Cameron" , "Jakub Kicinski" , "Dave Jiang" , "Uladzislau Koshchanka" , "Neil Brown" , "Niklas Schnelle" , "John Sanpe" , "Kent Overstreet" , "Masami Hiramatsu" , "Kees Cook" , "David Gow" , "Yury Norov" , "wuqiang.matt" , "Jason Baron" , "Kefeng Wang" , "Ben Dooks" , "Danilo Krummrich" Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Linux-Arch Subject: Re: [PATCH v2 0/4] Regather scattered PCI-Code Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 pete.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 (pete.vger.email [0.0.0.0]); Fri, 01 Dec 2023 14:17:56 -0800 (PST) On Fri, Dec 1, 2023, at 20:09, Philipp Stanner wrote: > On Fri, 2023-12-01 at 17:27 +0100, Arnd Bergmann wrote: >> On Fri, Dec 1, 2023, at 13:16, Philipp Stanner wrote: >> >> The one special case that I missed the last time is s390, which >> does not use GENERIC_PCI_IOMAP and will just require a separate >> copy of pci_iounmap() to go along with the is custom pci_iomap(). >> >> > The two exceptions are x86 and m68k. The former uses lib/iomap.c >> > through >> > CONFIG_GENERIC_IOMAP, as Arnd pointed out in the previous >> > discussion >> > (thus, CONFIG_GENERIC_IOMAP is not really generic in this regard). >> > >> > So as I see it, only m68k WOULD need its own custom definition of >> > iomem_is_ioport(). But as I understand it it doesn't because it >> > uses the >> > one from asm-generic/pci_iomap.h ?? >> >> At the moment, m68k gets the pci_iounmap() from lib/iomap.c >> if PCI is enabled for coldfire, but that incorrectly calls >> iounmap() on PCI_IO_PA if it gets passed a PIO address. >> >> The version from asm-generic/io.h should fix this. > > So, to be sure: m68k will use the generic iomem_is_ioport() despite > defining its own inb()? It depends, as m68k has two separate asm/io.h implementations: - arch/m68k/include/asm/io_no.h uses the default inb() from asm-generic/io.h, so it should use the asm-generic version of iomem_is_ioport(). - arch/m68k/include/asm/io_mm.h is rather special when it comes to inb()/outb(), but since there is no PCI, I would just use the default iomem_is_ioport() because it doesn't matter as long as there are no callers. If we ever need a working iomem_is_ioport() here, it would need the same special cases as isa_itb(). >> The "#define pci_iomap" can be removed entirely I think. > > I also think it can, because first arch/asm/io.h includes asm- > generic/io.h. > I was just wondering why many other functions in asm-generic/io.h > always define their own names.. > > It's obviously very hard to test which config will break, so I thought > it's better safe than sorry here I'm fairly sure it's not actually needed, but since the entire file does it, there is probably no harm keeping it consistent for the next added function. This is one more thing to maybe clean up eventually in the future, possibly as part of moving the contents of asm-generic/io.h into linux/io.h, which is something I'd like to do now that all architectures finally started using the asm-generic version. Arnd