Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1731219iob; Thu, 5 May 2022 07:16:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyod5LPKsvdgn+j5SfPBxD6pPn+gFYuRrKccM/pUt7rCdMWh7CeT7xU4yg1ilB4tr5pojXs X-Received: by 2002:a17:902:82c9:b0:15d:3a76:936f with SMTP id u9-20020a17090282c900b0015d3a76936fmr27256061plz.139.1651760192097; Thu, 05 May 2022 07:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651760192; cv=none; d=google.com; s=arc-20160816; b=sSwIl7zEwtwcbSEI/24WoJ6IPGdShrkpGL/bc1QbYriWWDSozAfAyRqW9r+ruusfLV jM1hPKCIQWyAXY5L5VuryRfaFbv86/BJb3lVm5HVv1nO7B4gcFdFMmPgf+W7Hv/V2hbe rGl+X11uUWYxwz6iMwO4c3soTPVE1uZDnhZmbbUba4zeSNVZWQtlfUWMFhujRdw8qCbv 6yCAV1LQF6srjoQoYYSMYi2ZFt8NodP/jFA7MGUOS4WI0s15cZlC5jWwcT7SZExazPSV WWgt1QeuxEMCiGy1r0dW8LcSjY0Rgf/rRWssQczzCTXStODvbHgCmy3BxefrC4S6o0M/ MlEQ== 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=qiMbbHhmQt82l7x2kFgM5Z5U/EbcQJaDEIII/eOtJeQ=; b=xUjOuAbKI7bGSFSB3iSx1oE6sJrexfZY1qFmFpgFi9PzRwWy8jGm1sMmQFSJdo7k2E uLpoDMHbqRT0P3D6gURG/ZeTkveye6loiH3+Lu2G/s/8hoAa+T1jvYgIqbeGPwMJhFRQ pfjLvnR5tuYibuUc075UJtBycsKnMy6EWi8eX5A6U0ey4tBrnCRN84VEW5zYuPmi4Vsw j/6RQDDMKrfUcRY6NnS5ghXh5Az6qvBYNOhpSLpzCMXjIf4h08L3Fxktjp2KKN3QrwU/ KVQt6qb9kzZvaUTY/q71qgehBRXEZiFYnVuL9nw/SShNa87YWK3ZtbMqaLKiFIGINkkm r85w== 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 f9-20020a655509000000b003c2699c8074si1811956pgr.563.2022.05.05.07.16.04; Thu, 05 May 2022 07:16:31 -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 S1350345AbiEEIt1 (ORCPT + 99 others); Thu, 5 May 2022 04:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241214AbiEEIs5 (ORCPT ); Thu, 5 May 2022 04:48:57 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 30906B93; Thu, 5 May 2022 01:45:15 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 4E39792009C; Thu, 5 May 2022 10:45:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 4A38F92009B; Thu, 5 May 2022 09:45:14 +0100 (BST) Date: Thu, 5 May 2022 09:45:14 +0100 (BST) From: "Maciej W. Rozycki" To: Bjorn Helgaas 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 In-Reply-To: <20220504172201.GA454911@bhelgaas> Message-ID: References: <20220504172201.GA454911@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,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, Bjorn Helgaas wrote: > > 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. Why? If you say configure your Alpha kernel for ALPHA_JENSEN, a pure EISA system, then you won't get PCI support nor any PCI drivers offered even though a generic Alpha kernel will get them all and still run on a Jensen system. I find that no different from our case here. And if we do ever get TURBOchannel Alpha support, then a generic kernel configuration will offer EISA, PCI and TURBOchannel drivers, while you won't be offered TURBOchannel drivers for a PCI system and vice versa. It would make no sense to me. Please mind that the main objective for system-specific configurations is optimisation, including both size and speed, and a part of the solution is discarding stuff that's irrelevant for the respective system. So in our case we do want any port I/O code not to be there at all in compiled code and consequently any driver that absolutely requires port I/O code to work will have to become a useless stub in its compiled form. What would be the point then of having it there in the first place except to spread confusion? Maciej