Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4671389iob; Sun, 8 May 2022 21:24:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztldVnX6UtIgH0nsy2Bg6UPtkmuF7jAdjNUxGocb7MxyN75CNGv4Bd5PaQQyLIsYI+DU/+ X-Received: by 2002:a17:902:da91:b0:15e:b782:c60f with SMTP id j17-20020a170902da9100b0015eb782c60fmr14253326plx.39.1652070242788; Sun, 08 May 2022 21:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652070242; cv=none; d=google.com; s=arc-20160816; b=HOsIoieuNT/Us+gdeM+5un82eWOEz3mvusqXgpaTP10jQLtgcFnvLcMzI7/y3EsylG 5feKRF5I1d6zCozHk4MG3OleYROXua5TWOJaVFDuOVMyOruFRHpK9gLVVgRq1afWIqGr 4xeJmQzMtDr4aRDUAZEAbbzlOmotm3RcRZWari3gNBchNz+3nddyIxLCU1Lj7zm2Nc3v d0p3X7sfetOmeN/PjyIAB+LMNQbJo6nsIaWcFXFehS4ZJf7Tg9PP8H7FTn+qw+UY5kdy w5IzaBw7MwCBaq8XYNfVKl8bMGLwLCC6DuAX4h9DxagPDKI1vI88gic+FMu6duXN4mEr EdFw== 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=YhMWImXCWP/SkC7Zam+Kpp6nS6VMymibQlj0zkVNX94=; b=HuBaqAQb7auTgR5+cTobv/led8swrKixi+7C2oYlte8owierkyM5YV+kYWRLHofpi1 UgyLQn7q4QDKOCgzbiqI0hcm7DWU8mNMYcQz1yWqqhRU3sUhfu0nvTVNXw2tEPamqqnH 0bRL6UdGMY9aNlUbZ+2BtXhCdczAkVAk1LN716i2R0etDpRa1Z2gdHKVPMTuhbLHUepB tikyMxL2tKuOxnxUmhNNEvLaEgye1QX2eCOh3NWIYJAyefRwzhxkxKHSSLZMWp9hFr+o Qhcw4Djb0l8TY/ykK59Xj4tjXXXR7HxHVIktQylvq+x9ZkVwooWp3ehrt1Xj5Y2UmuCL Pwkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xe82v89S; 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 n4-20020a170902e54400b00153b2d1640fsi11813008plf.23.2022.05.08.21.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 21:24:02 -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=Xe82v89S; 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 A77E211AFDD; Sun, 8 May 2022 21:23:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380779AbiEETk0 (ORCPT + 99 others); Thu, 5 May 2022 15:40:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240224AbiEETkY (ORCPT ); Thu, 5 May 2022 15:40:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26D2F5D5F0; Thu, 5 May 2022 12:36:44 -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 D39A2B82F1F; Thu, 5 May 2022 19:36:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4AB0C385A4; Thu, 5 May 2022 19:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651779401; bh=+uQJ0bW0qkeE3SZNF4X5sGRkQWAqu7ah627WCVYDnMM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Xe82v89SdPKM+B5/dZFGrGPugZyd8Avb/4vZXY9KREZS136ih/IfSrULHDoi+fkT0 W2Mai2xTc0+8O0PI8aPHaN0Hu3Yr82+4oGtcpKMXs4y9afvaBKtK815/EZNb1Dz5jC ft4Wkr4TSHHPHmPUhq7/ptofwJqkHLiUqCsaPWKeyZ+tBQQEhMc1aV7g1Yd7OLYgyK weqVcWYsxlHhochBnLnzxpBHe54pjL9Jd8OUN1KK+gfaYHHgshEHKAPRhVc08BnG1s w7LhW2wIcUt+xFe0ha1kJUbnTr/xNw3BFhRwB3XtL/iSQY5PJjtPF31aTih4yZLYip ilp6iHzs2g6Iw== Date: Thu, 5 May 2022 14:36:36 -0500 From: Bjorn Helgaas To: Niklas Schnelle Cc: Arnd Bergmann , Arnd Bergmann , Greg Kroah-Hartman , Linux Kernel Mailing List , linux-arch , linux-pci , "Rafael J. Wysocki" , "open list:ACPI" Subject: Re: [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT Message-ID: <20220505193636.GA509562@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <849f53a613b66991c1661799583714fa1883094c.camel@linux.ibm.com> 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 Thu, May 05, 2022 at 10:20:28AM +0200, Niklas Schnelle wrote: > On Wed, 2022-05-04 at 21:58 +0200, Arnd Bergmann wrote: > > On Wed, May 4, 2022 at 7:53 PM Bjorn Helgaas wrote: > > > On Fri, Apr 29, 2022 at 03:50:00PM +0200, Niklas Schnelle wrote: > > > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > > > > not being declared. As ACPI always uses I/O port access we simply depend > > > > on HAS_IOPORT. > > > > > > CONFIG_ACPI depends on ARCH_SUPPORTS_ACPI, which is only set by arm64, > > > ia64, and x86, all of which support I/O port access. So does this > > > actually solve a problem? I wouldn't think you'd be able to build > > > ACPI on s390 even without this patch. > > > "ACPI always uses I/O port access" is a pretty broad brush, and it > > > would be useful to know specifically what the dependencies are. > > > > > > Many ACPI hardware accesses use acpi_hw_read()/acpi_hw_write(), which > > > use either MMIO or I/O port accesses depending on what the firmware > > > told us. > > > > I think this came from my original prototype of the series where I tested it > > out on arm64 with HAS_IOPORT disabled. I would like to hide the definition > > of inb()/outb() from include/asm-generic/io.h whenever CONFIG_HAS_IOPORT > > is not set, and I was prototyping this on arm64. > > > > There are uses of inb()/outb() in drivers/acpi/ec.c and drivers/acpi/osl.c, > > which in turn are not optional in ACPI, so it seems that those are > > required. > > > > If we want to allow building arm64 without HAS_IOPORT for some reason, > > that means either force-disabling ACPI as well, or changin ACPI to not > > rely on port I/O. I think it's fine to leave that as a problem for whoever > > wants to make HAS_IOPORT optional in the future, and drop the > > dependency here. > > I'll improve the commit message to make the dependency on HAS_IOPORT > more clear. I also agree with Arnd that since all architectures where > ACPI is useful have I/O ports making it work without I/O port access > compiled in is for another day. I don't really see the point of including this patch at all. It doesn't solve any existing problem.