Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4644069iob; Sun, 8 May 2022 20:23:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEYFsuB15w1ZXfq0dFzGfOvg1XH1KZGPTTKsVhSPv/onH6fkMe0sI480LCyzSTu43rf8It X-Received: by 2002:a17:90b:e89:b0:1dc:18dc:26a0 with SMTP id fv9-20020a17090b0e8900b001dc18dc26a0mr23712777pjb.188.1652066599461; Sun, 08 May 2022 20:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652066599; cv=none; d=google.com; s=arc-20160816; b=VHnDEWm+D4OE10mcHtStc+u4bXolt/3TZI6PBcTlqN33b7i5O2Ztad7ozxh4QlUpb2 fXGzdhzbHcFp7dcPFGvjxqrJbgonEqE50BK874zhPcm0/lRO3RgXhBqI7AzEvOHyiOPj MHUKPKahwkM/VNdZbDwVrbPH7kqp0Two76j+ZlkIX4Tcwarg+bkNYfQI5SgR48AjTaUr VWzIS1JKzPYs7rLzf1TAG0k3E6CSFeAIlhWslox5coZ1Aec5jN6huZL27KraKrmWVIPs rz8RXBnNL5Ny8DRFAcdOb5O/uo1s81PGv8MDooJrlNaKSjC3kkg9bumS50/7RlFBgHnc LwQQ== 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=aN1dxbtBNMpIuhGFDt9wyQcCSKMF0SKXz5T3i+iFsFk=; b=TDQHg9QPPZgkzBfpZvp5dRJrCTKUrUVjCH4mfmhJVTEuGGB+JnV6+Q4TPM8qkHgLG5 qv0NBS64rWDzOf5VT1S749bMVHBPbJa4ZAQP6Cro7mgSGzn/O6lQT79Bse5f+GYVAfEk UAIFXm8sv4g7nZHLYLT4nAWw/SQI5kW2nW4PXL00iSHEAcaMOBYE5yEFY0XKgMn/fTOw y/i54r23lS9EhssLsmW13VcBS0IZDnEzYS2iMwheGmudCgObVGC7CauIGpCiBw769OSo aHosUKPYnXYbjCTRHnl/mQlxKIZhHHpY7TIVcV1AlP6a+0a66frtA8jnMkNaXS3IdOW4 dYHA== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i184-20020a6387c1000000b003c6aa1dbd4bsi4071040pge.30.2022.05.08.20.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:23:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1BE5E5A099; Sun, 8 May 2022 20:21:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391862AbiEFMcQ (ORCPT + 99 others); Fri, 6 May 2022 08:32:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1391937AbiEFMbz (ORCPT ); Fri, 6 May 2022 08:31:55 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 47E356A071; Fri, 6 May 2022 05:27:21 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 2BD8B9200B3; Fri, 6 May 2022 14:27:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 2728F92009D; Fri, 6 May 2022 13:27:20 +0100 (BST) Date: Fri, 6 May 2022 13:27:20 +0100 (BST) From: "Maciej W. Rozycki" To: Arnd Bergmann cc: Bjorn Helgaas , Niklas Schnelle , Arnd Bergmann , Greg Kroah-Hartman , Linux Kernel Mailing List , linux-arch , linux-pci , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Michal Simek , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:ALPHA PORT" , "moderated list:ARM PORT" , "open list:IA64 (Itanium) PLATFORM" , "open list:M68K ARCHITECTURE" , "open list:MIPS" , "open list:PARISC ARCHITECTURE" , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" , "open list:RISC-V ARCHITECTURE" , "open list:SUPERH" , "open list:SPARC + UltraSPARC (sparc/sparc64)" Subject: Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary In-Reply-To: Message-ID: References: <20220505161028.GA492600@bhelgaas> 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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, 6 May 2022, Arnd Bergmann wrote: > > If this is PCI/PCIe indeed, then an I/O access is just a different bit > > pattern put on the bus/in the TLP in the address phase. So what is there > > inherent to the s390 architecture that prevents that different bit pattern > > from being used? > > The hardware design for PCI on s390 is very different from any other > architecture, and more abstract. Rather than implementing MMIO register > access as pointer dereference, this is a separate CPU instruction that > takes a device/bar plus offset as arguments rather than a pointer, and > Linux encodes this back into a fake __iomem token. OK, that seems to me like a reasonable and quite a clean design (on the hardware side). So what happens if the instruction is given an I/O rather than memory BAR as the relevant argument? Is the address space indicator bit (bit #0) simply ignored or what? > > But that has nothing to do with the presence or absence of any specific > > processor instructions. It's just a limitation of bus glue. So I guess > > it's just that all PCI/PCIe glue logic implementations for s390 have such > > a limitation, right? > > There are separate instructions for PCI memory and config space, but > no instructions for I/O space, or for non-PCI MMIO that it could be mapped > into. The PCI configuration space was retrofitted into x86 systems (and is accessed in an awkward manner with them), but with a new design such a clean approach is most welcome IMHO. Thank you for your explanation. Maciej