Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1465804iob; Thu, 5 May 2022 01:44:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2sgHb+OJP5PVC/P41ioAUvFBjyT8F1TOHSP+SXmMJqKV0VsL1IvY6FwdfHrM8r524p5Cw X-Received: by 2002:a17:903:230e:b0:15e:d0a1:922f with SMTP id d14-20020a170903230e00b0015ed0a1922fmr5232307plh.75.1651740242929; Thu, 05 May 2022 01:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651740242; cv=none; d=google.com; s=arc-20160816; b=yvPzW81TMkNvoG90pYsWjvlqIvQNNt/tQfGCnmpdKyARVzKe/FJl4QXJRdQm+Xsuok rlS0nMw4QJjxTGHVTBgimNemEUFmC7oA4JUhll8PIGqPLa3c9PtdS0As3YEmJV9MCDxi 6pCB7YD0yngFDpqar8ME5b/WoTC0WTYytHDp4cjVS5gz2NvD6I8Sg3O+nhy3PALgtj9P HObJIMboExzqwFfTB/rLJhs9olfoS9WQxiZ7so7SM6dwMufrq6Sbiq/M9ZLt/CL9ra6Z Euh74dbL0NM1IS0Erayz0NU0PlY19fj2V8n3vV8ovWgbNpFayf0R3/I05LZRFT3u2a7c Vjrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=gEsr3UltkyQR0qCdCCngQ/oIwoAJd4B79sJ0myqbKOI=; b=KXWAA0HAIgHPA7noDwym6ka7LreYlD+AFMe+qqHHgLXrUXU6bn3Ic34/pZzoDMy2Pn sfWSM2iX6kc+3aI4SiAIaYa4OoXD+QWEEpx7GCydLqqMK7vJCxH08cOziVv0izT5yFxm F5yBjdpz0AmLR4nPZQVSbIJgoqKTLkswWBvyAT4MZnjSEZZ+axdaZTReUAuENV+GHlw7 L9XgNoAQy8haAMyvTWGeGluBlkSfEgKaEYrX5TF7FXr7CFoh9q5LbU02KPxXdYJWO7h0 NVax4dADcLRo2abNZWYRwI9rvKIpM4gI85GXhSVA2CbUdABYgFmvOyYMlLLaAEJ6WGi7 J8Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JfwHZ5SO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a170902ed8300b0015b0d64802dsi1171872plj.68.2022.05.05.01.43.46; Thu, 05 May 2022 01:44:02 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JfwHZ5SO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376333AbiEDSGj (ORCPT + 99 others); Wed, 4 May 2022 14:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359845AbiEDSGN (ORCPT ); Wed, 4 May 2022 14:06:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D051F50453; Wed, 4 May 2022 10:22:06 -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 8BC6CB8279D; Wed, 4 May 2022 17:22:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9272C385A5; Wed, 4 May 2022 17:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651684924; bh=7ebi4yCgI8D7GOL1tZDTxmOW2rgVmfcl5Te5keZEMNU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=JfwHZ5SOCyIL8P/OP1RJofkC9XAomZekXM4qGdrXC5F2aPwsjJp7se1LV9ou9hNg4 4RCEWR+VpxXCfohJ0xC9VpOyUDih3avDDkGqjtM0UfT6QCb5LEMx7+mNUWhqw1LRFr mxiYwNx4tsZ3TJmett6XaF+dRwVbvmTBj3LOu3bgPGz1Xy4Pn8KTUmyB1zQ6/GVfw/ PcxBW90bAJYgLMdCVEINGl+WrO6UpvanuOeTW30/73DKgxHOK5azQnDeS6BYB9PNXx eUpeQ4wQcOKt/jwspavfT1+dDqKe4zFl0CYVjtE1WlVET9oTaQV913dMk6mqwxgUtM rw/Hsz2jFhhmw== Date: Wed, 4 May 2022 12:22:01 -0500 From: Bjorn Helgaas To: "Maciej W. Rozycki" Cc: Arnd Bergmann , Niklas Schnelle , Arnd Bergmann , Greg Kroah-Hartman , Linux Kernel Mailing List , linux-arch , linux-pci , Dominik Brodowski Subject: Re: [RFC v2 25/39] pcmcia: add HAS_IOPORT dependencies Message-ID: <20220504172201.GA454911@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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, May 04, 2022 at 03:24:39PM +0100, Maciej W. Rozycki wrote: > On Wed, 4 May 2022, Arnd Bergmann wrote: > > > > POWER9 is another architecture with no port I/O space[1]: > > > > POWER9 is just an implementation of the power architecture > > that has a particular PCI host bridge. I would assume that > > arch/powerpc/ would continue to set HAS_IOPORT because > > it knows how to access I/O ports at compile-time. > > Well, yes, except I would expect POWER9_CPU (and any higher versions we > eventually get) to clear HAS_IOPORT. Generic configurations (GENERIC_CPU) > would set HAS_IOPORT of course, as would any lower architecture variants > that do or may support port I/O (it's not clear to me if there are any > that do not). Ideally a generic configuration would not issue accesses to > random MMIO locations for port I/O accesses via `inb'/`outb', etc. for > systems that do not support port I/O (which it now does, or at least used > to until recently). It would seem weird to me that a module would build and run on a generic kernel running on POWER9 (with some safe way of handling inb/outb that don't actually work), but not on a kernel built specifically for POWER9_CPU. It sounds like inb/outb in a generic kernel on POWER9 may not currently do something sensible, but that's fixable, e.g., make inb() return 0xff and outb() a no-op. I would naively expect the same behavior in a POWER9_CPU kernel. Bjorn