Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3559728iob; Sat, 7 May 2022 08:13:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCAuhfCjDS3LqPFmtRKx9blOPqQN6RKZV2B3UJPmw4utfiVnkymjWmUbt2RhlTNcLLdlwa X-Received: by 2002:a17:90b:33ce:b0:1dc:690e:acef with SMTP id lk14-20020a17090b33ce00b001dc690eacefmr17797499pjb.121.1651936431185; Sat, 07 May 2022 08:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651936431; cv=none; d=google.com; s=arc-20160816; b=bDCz04PXXNWDx5MqeAlSW0zTRndaFi6tVLFKsInxRS1X1rck5BvZ3D8gR9FFNInFMg WYDgjk142qdeSteuikmNeeFX3W/nBduWqaKJ6W3xPlpu5z2Dzc9I1NkYEJ+bzZ51Itdl BradWuvKg0KK/uLynGIIUDKzP9UIOKIKB6RDiCQvGPT5vC8AZHYaEPosfhpnoQOxENfI /wzNdCHGL+AIOFE1O3HNZSXYSChD17f1fspKgqnI9g5tvpHBrrjZaAFPVyab1DWeMlQV p6oggr7TMrQIhJzeqYjsC5RGLH28xG3xRYhmzfN/ID1BzZZIOQvFucDhbFBWo+Xec1we OzdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=orY050J9egxL9RDIes6ic/f9Ob5sGK4t7FYr/hXkDSc=; b=SQtz2mOOXeaAyPwNzpIe77kgKYrvpJPaIR9Gn9WlsZg5ZgDdX8nC4A0HG1jfbQUGMw gmlAjr9It+k4MzFDHGzgtj5wbVs71e0qdh2kK07xlplVJ/l/NDN6ae4cYZdw8wyLCOYn QIn+q8h/sy15DXU/8jWLz6t+ldDzn6r7ItW/YnUBa2JXwiWevw0JEhJEKumnaGhUAF+i av2N5bqNzWeVYJ9kPFZRIdEm8S9hbaKS3W3LQEUJ3SiA1kKYGGTr5hwB3JPAWM9FYrDS XuGDortL4W1w2F8aRYhWT4zDfrClw0ZtHe0/H/Pf6ZjhPKzdaJ4X3uEM2uPaEqTTj3ie JeRQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u36-20020a056a0009a400b0050ddae37a02si11215589pfg.253.2022.05.07.08.13.36; Sat, 07 May 2022 08:13:50 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350134AbiEDNGH (ORCPT + 99 others); Wed, 4 May 2022 09:06:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241199AbiEDNGF (ORCPT ); Wed, 4 May 2022 09:06:05 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2837235DE7; Wed, 4 May 2022 06:02:29 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 3B7EF92009C; Wed, 4 May 2022 15:02:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 3198792009B; Wed, 4 May 2022 14:02:28 +0100 (BST) Date: Wed, 4 May 2022 14:02:28 +0100 (BST) From: "Maciej W. Rozycki" To: David Laight cc: 'Linus Walleij' , William Breathitt Gray , Niklas Schnelle , Arnd Bergmann , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , "linux-arch@vger.kernel.org" , "linux-pci@vger.kernel.org" , Arnd Bergmann , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" Subject: RE: [RFC v2 10/39] gpio: add HAS_IOPORT dependencies In-Reply-To: <7bb4d0286f44462581d96320cfe105d6@AcuMS.aculab.com> Message-ID: References: <20220429135108.2781579-1-schnelle@linux.ibm.com> <20220429135108.2781579-19-schnelle@linux.ibm.com> <7bb4d0286f44462581d96320cfe105d6@AcuMS.aculab.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 On Wed, 4 May 2022, David Laight wrote: > > Well, one can implement a pluggable PCI/e expansion card with a PCI-ISA > > bridge on it and a backplane to plug ISA cards into. Without support for > > issuing I/O cycles to PCI from the host however you won't be able to make > > use of the ISA backplane except maybe for some ancient ISA memory cards. > > So logically I think CONFIG_ISA should depend on CONFIG_HAS_IOPORT and > > CONFIG_HAS_IOPORT ought to be selected by platform configurations. > > But generating a PCI(e) I/O cycle doesn't need the cpu to be able to > generate an I/O cycle on its local bus interface. > All that required is for the PCI(e) host bridge to determine that it > needs to relevant kind of cycle on the target bus. > This can easily be based on the physical address. Sure, you can encode address spaces however you like (there are no special machine instructions either for PCI/e configuration space access that I would know of in any CPU architecture), but the host bridge must be willing to issue those PCI/e I/O cycles in the first place (see my other message on POWER9 in this thread). > What you should probably be doing is (outside of 'platform' code) > change the drivers to use ioread8() instead of inb(). > Then adding in the required calls to get the correct 'token' to > pass to ioread8() to perform an I/O cycle on the correct target bus. Yes, probably. > It is really the attachment of the driver that can't succeed, not the > compilation. Except it makes no sense to offer those drivers for platforms known not to provide for port I/O on PCI/e. Maciej