Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1276654rwl; Wed, 5 Apr 2023 14:38:17 -0700 (PDT) X-Google-Smtp-Source: AKy350bSRaE45Np+1+Mrn7GATlzIXzBWFbWvkuNlMOI98dSZ7suisyTLktAstQnIoBcKcHZ4Usmj X-Received: by 2002:a50:ef03:0:b0:502:233e:af49 with SMTP id m3-20020a50ef03000000b00502233eaf49mr3482481eds.4.1680730697030; Wed, 05 Apr 2023 14:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680730697; cv=none; d=google.com; s=arc-20160816; b=aOzr4qoz9S4NihYDRlgDHPj3pGE1UBasKoxJFigErQQCczfdIlj28+ubRzjlqhhByY mWNRUQzSfvRBMFBLttImG8Nz40Muei+C7yVGXD/yY4Xr4CB4qCVIVjhGokNbThPqhyMY nbPmOyZ+PBMhFt9vfJVPmQJ9cSqZhObSN7bZBwdykr7nAqIUzlT6zFRa5fJlhP/5dRiA FqzsRJdmY+PUfO/uqvbW+50HKHA0KftxY1k8H1DtVaNs7BPAAtjo4kU6ayGxOLVx3ULt Tg1LESPMFcMNkF+PYqOaIKBYAbeE7V/qjn9aCyd1NAGbmcU2vdSbMoK6cpM5XVzbcXcc OzVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=nK1+8LpVIvsr7Ny24sOJ0rdDBAV75Ly0ONlMEjHuJlM=; b=R76NmDQerbbNZJBGdCdDPR+eFa7hKI+SP812OpQoc2z7rOUz9RbI0KFtOJkbz//dtA F94yikryzkfZT4CcnMCW1Wjk0K+F4EoI4NsXQBa2nlFD1i/bbdbeB84yn4LqJ6XHpp+p esm/E5+IDL0cap1EejstP2snFY709ogfn0qgD2hu2hqjysF7J2eMf0L6g17ek55gKQsQ WuRjVdVNn/uUElUp31osU4O/9DWtcHIa3+fCa7wzz4eBibqrXvB+U16PK5rmMg+QEQWo Snr/F5qNR90eXFz6nxdnrQt5mCUsqCemqAGSV4f6pxEFk25uIVHOymhy7qX+jGg2VkNp KMrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020a05640214d100b004fd2b59e8c2si2743760edx.549.2023.04.05.14.37.49; Wed, 05 Apr 2023 14:38:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232876AbjDEVgz convert rfc822-to-8bit (ORCPT + 99 others); Wed, 5 Apr 2023 17:36:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232829AbjDEVgy (ORCPT ); Wed, 5 Apr 2023 17:36:54 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2BF95FD3 for ; Wed, 5 Apr 2023 14:36:50 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-68-pbqxvDXyOE-yB95Y9KmqPw-1; Wed, 05 Apr 2023 22:36:46 +0100 X-MC-Unique: pbqxvDXyOE-yB95Y9KmqPw-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 5 Apr 2023 22:36:44 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Wed, 5 Apr 2023 22:36:44 +0100 From: David Laight To: 'Arnd Bergmann' , "H. Peter Anvin" , "Niklas Schnelle" , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , "Geert Uytterhoeven" , Michal Simek , "Thomas Bogendoerfer" , "James E . J . Bottomley" , Helge Deller , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "x86@kernel.org" CC: "linux-m68k@vger.kernel.org" , "linux-ia64@vger.kernel.org" , "Rafael J . Wysocki" , "linux-pci@vger.kernel.org" , "linux-mips@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Linux-Arch , "linux-sh@vger.kernel.org" , Alan Stern , =?iso-8859-1?Q?Uwe_Kleine-K=F6nig?= , "loongarch@lists.linux.dev" , Bjorn Helgaas , "Mauro Carvalho Chehab" , "linux-arm-kernel@lists.infradead.org" , Arnd Bergmann , "linux-parisc@vger.kernel.org" , "Greg Kroah-Hartman" , "linux-kernel@vger.kernel.org" , "linux-alpha@vger.kernel.org" , Johannes Berg , "linuxppc-dev@lists.ozlabs.org" Subject: RE: [PATCH v4] Kconfig: introduce HAS_IOPORT option and select it as necessary Thread-Topic: [PATCH v4] Kconfig: introduce HAS_IOPORT option and select it as necessary Thread-Index: AQHZZ/3AaiQodugroEmdF5H6jyGRq68dOQLw Date: Wed, 5 Apr 2023 21:36:44 +0000 Message-ID: References: <20230323163354.1454196-1-schnelle@linux.ibm.com> <248a41a536d5a3c9e81e8e865b34c5bf74cd36d4.camel@linux.ibm.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 From: Linuxppc-dev Arnd Bergmann > Sent: 05 April 2023 21:32 > > On Wed, Apr 5, 2023, at 22:00, H. Peter Anvin wrote: > > On April 5, 2023 8:12:38 AM PDT, Niklas Schnelle wrote: > >>On Thu, 2023-03-23 at 17:33 +0100, Niklas Schnelle wrote: > >>> We introduce a new HAS_IOPORT Kconfig option to indicate support for I/O > >>> Port access. In a future patch HAS_IOPORT=n will disable compilation of > >>> the I/O accessor functions inb()/outb() and friends on architectures > >>> which can not meaningfully support legacy I/O spaces such as s390. > >>> >> > >>Gentle ping. As far as I can tell this hasn't been picked to any tree > >>sp far but also hasn't seen complains so I'm wondering if I should send > >>a new version of the combined series of this patch plus the added > >>HAS_IOPORT dependencies per subsystem or wait until this is picked up. > > > > You need this on a system supporting not just ISA but also PCI. > > > > Typically on non-x86 architectures this is simply mapped into a memory window. > > I'm pretty confident that the list is correct here, as the HAS_IOPORT > symbol is enabled exactly for the architectures that have a way to > map the I/O space. PCIe generally works fine without I/O space, the > only exception are drivers for devices that were around as early PCI. Isn't there a difference between cpu that have inb()/outb() (probably only x86?) and architectures (well computer designs) that can generate PCI 'I/O' cycles by some means. It isn't even just PCI I/O cycles, I've used an ARM cpu (SA1100) that mapped a chuck of physical address space onto PCMCIA I/O cycles. If the hardware can map a PCI 'IO' bar into normal kernel address space then the bar and accesses can be treated exactly like a memory bar. This probably leaves x86 as the outlier where you need (IIRC) io_readl() and friends that can generate in/out instructions for those accesses. There are also all the x86 ISA devices which need in/out instructions. But (with the likely exception of the UART) they are pretty much platform specific. So, to my mind at least, HAS_IOPORT is just the wrong question. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)