Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4732916iob; Sun, 8 May 2022 23:37:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwejwoomAekhM0cDT2CK89Eve2o0IBBPeWBux9JCahop8fyoirrpEcFBzeNAvHtn2x9+j+ X-Received: by 2002:a17:902:74c2:b0:15e:cc96:74fa with SMTP id f2-20020a17090274c200b0015ecc9674famr14621549plt.86.1652078242339; Sun, 08 May 2022 23:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652078242; cv=none; d=google.com; s=arc-20160816; b=mxST/G48DHhQ04pPiVngdiFLvOGx97wdShNAhOMJfdgTDhHFPfWyxrTH7tXaYAz2yF JNYpf25+X+9fkur9pBFDmgNavZj2MkohRH3Ghr4q0MP3IKHnoWnY9KwSMErP6xXOMgKG OYGQ3Wnk0vhYVyitaGUC4b4kZ0q28mmi0jXJ5/j2rmwz59Hg/yZ2ZLsXF+VqEIlGDUyY AiNg87B7lLLfEjX6geBtZ1xB7fqdV75UotXmfwiMCLZ8JPh79mNQ5K+QtG65DPtNsBeT //ZRS5AsiwxvFV20ZeYjn6HzZpjjOVN7Z3Pht3w3OufkjN5+6ZUQ4YOJ6wTE/WhuEsmk Ys0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RLz3iSUC7l/YfCCcJngq912nVbcnSJbahBRUhKwZxLU=; b=TbVOYEfvxo+ckomdIEe1yn4zitVsEPE6SlUazTlDBvGoH1HZjakEjUzYM3Le5YFb0m AODMs8I28XlhXxG2Th0xFe+IaXyh6qP5XCTlCt1q0Dk2pmgoL/jfaZZnuzEjaYqlU6Al 9jH7PMgS1GjOnxBIReFxiVsg+OgCz2zFeQQziouenttVAM6nVvfjgFmtbK6kWIw+xvSo asvqNP3QP3RiRIeWOQh3yXMEtPU/tSQIbxG3Uh4p8ZxstPK2fY5Pr1qY74pP0Otde+Yr miKktKJBpZDmwOSURlyHb4TJ+74IwSdcsITBT01Tt6QKs5Ng/uAGWKkPZazKlkzeaMsL PWLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=alicQ+Hf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lx10-20020a17090b4b0a00b001d27a7d1737si17281736pjb.1.2022.05.08.23.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:37:22 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=alicQ+Hf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9C83F1796D4; Sun, 8 May 2022 23:33:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392194AbiEFM6T (ORCPT + 99 others); Fri, 6 May 2022 08:58:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392173AbiEFM6A (ORCPT ); Fri, 6 May 2022 08:58:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A4B3606C3; Fri, 6 May 2022 05:54:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B1EB3B8350D; Fri, 6 May 2022 12:54:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6736FC385C0; Fri, 6 May 2022 12:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651841648; bh=YEsptMS5NZ5sU5R8sBoFFmT8HhhJmSMOqqqMD1wS+1Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=alicQ+HfzBRpAkO4B96ZoI58feV30vwikm/SJGBtuePZM0wfyrCA+j9vGNYsOCzoo HP/4IJb9wWEnTHbo9/27qz1+kGraLpz6DXj61WtLS1JeZqg546So3OIWfjv3BbABpV 8dQUZ6ELhNVBSLsA390sbMzGuZMUij6tnXvZEXj4WfMWsq7AU0N7RHHCSWZaOfNg1L M/C9dzbWlAmjAIW5r+qqkvwipyU1At3FZ+hwk5GIWHPOdlH3+dt+Jqf3arEnPHd8Hc FOmJ1tfP+Djie6UmpJK4r2UngjgPTwpiLnjtpMMaN0N0MgVh+7XIR4gMMh9OB4ZWnh NQ7q+PXPPTZTw== Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-2f7ca2ce255so80026007b3.7; Fri, 06 May 2022 05:54:08 -0700 (PDT) X-Gm-Message-State: AOAM530XRFkVTU53dh/Xqfh6fB+5JBeiq+bqnJ9Tx1SDjl8DTLQxcQCh 6vpcEal1iz2dkLJ0OTBfBCvuWUa6+WVCt1brahc= X-Received: by 2002:a81:9213:0:b0:2f6:eaae:d22f with SMTP id j19-20020a819213000000b002f6eaaed22fmr2535695ywg.249.1651841647017; Fri, 06 May 2022 05:54:07 -0700 (PDT) MIME-Version: 1.0 References: <20220505161028.GA492600@bhelgaas> In-Reply-To: From: Arnd Bergmann Date: Fri, 6 May 2022 14:53:49 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary To: "Maciej W. Rozycki" 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)" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 6, 2022 at 2:27 PM Maciej W. Rozycki wrote: > > 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? Not sure. My best guess is that it would actually work as you'd expect, but is deliberately left out of the architecture specification so they don't have to to validate the correctness. Note that only a small number of PCIe cards are actually supported by IBM, and I think the firmware only passes devices to the OS if they are whitelisted. Arnd