Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp245768iob; Mon, 2 May 2022 18:23:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuvhzPYjAqvJMF6Os+Ea7mkxpHVl5RQ/Z7td/n+68OcGU7sAG2egmv9MI6UlpWggRk0fYG X-Received: by 2002:a63:2b0b:0:b0:39d:890a:ab68 with SMTP id r11-20020a632b0b000000b0039d890aab68mr11788762pgr.247.1651541003348; Mon, 02 May 2022 18:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651541003; cv=none; d=google.com; s=arc-20160816; b=M4dsVbWcRv522VaAGMwbJh0KHTd4xsm8bOHXxExDSBGRbV9jToODdGpnH05POlhG4T yFDDFbJjnI176Ykdb+gsLOc3V8Cekc5kdCLOz9mdsc4Gjx5XG7nzDF9kmq8FbyuhZUc4 HBbihWmIa3u6YYbHmYmrtqqyau6XQvxXWaLAzlOJXqFWidO09Wy/RAgn1cb9uauG/g0h +c3hpumd6JAWm9IOxlnkfMB2jIsizUM6JFK24kixuUIAwQB7o4ILACKFoRzHPKWQDdub 8XS87fBIJEkBTzUqiSpjWKHMrwzoJgYGsbxxMHSK+Ssuetvb5i14gExqQkCrL722Dvr1 Jc4A== 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=bgAV/YyzHYu+EroNyWY5g5aXUhhL5HMbrAm9PqW5BGU=; b=PIhAQEkbbuzJ/IJUcX1iv5iEk9yKxfYcqRpdK/JXJRYQAgrRsAWoLV6PJQz2Jl1bDa HSlMznyWxaI9lYE7eC0M+tg2c5qruGyDgTHAC0qSq8sgLQFVp0R8cOrKYfYgAukQuh6g Odalkbd0nzrkVKs+VSy0xC/B4GIRuFNq6S21KjrjFxAnn0XtalM9McXKySZ0N1Xn9Fh1 Nh1GXHyHl/8u0QwQy0O4TZb/pnnjhmNy2d2CvK2ySJOTIEX03kGChjEyTL8IHnYjxZkM dn+hr03jt4Qq4imsQTgZILM5q9ncnaVILQCDHz2djfs0nWuxGTk6b7auCf3c30tP9Q7i FOtA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l24-20020a637c58000000b0039911b1bf43si15400532pgn.269.2022.05.02.18.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 18:23:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 68A53C47; Mon, 2 May 2022 18:02:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359490AbiEAWvs (ORCPT + 99 others); Sun, 1 May 2022 18:51:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234297AbiEAWvp (ORCPT ); Sun, 1 May 2022 18:51:45 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AF6FB4349C; Sun, 1 May 2022 15:48:10 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id B5CF392009E; Mon, 2 May 2022 00:48:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id A6C2392009D; Sun, 1 May 2022 23:48:09 +0100 (BST) Date: Sun, 1 May 2022 23:48:09 +0100 (BST) From: "Maciej W. Rozycki" To: Niklas Schnelle cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Marc Kleine-Budde , Arnd Bergmann , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Michael Grzeschik , Wolfgang Grandegger , Jesse Brandeburg , Tony Nguyen , Ralf Baechle , "open list:NETWORKING DRIVERS" , "open list:CAN NETWORK DRIVERS" , "moderated list:INTEL ETHERNET DRIVERS" , "open list:AX.25 NETWORK LAYER" Subject: Re: [RFC v2 21/39] net: add HAS_IOPORT dependencies In-Reply-To: <20220429135108.2781579-36-schnelle@linux.ibm.com> Message-ID: References: <20220429135108.2781579-1-schnelle@linux.ibm.com> <20220429135108.2781579-36-schnelle@linux.ibm.com> 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, 29 Apr 2022, Niklas Schnelle wrote: > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > not being declared. We thus need to add HAS_IOPORT as dependency for > those drivers using them. It also turns out that with HAS_IOPORT handled > explicitly HAMRADIO does not need the !S390 dependency and successfully > builds the bpqether driver. [...] > diff --git a/drivers/net/fddi/Kconfig b/drivers/net/fddi/Kconfig > index 846bf41c2717..fa3f1e0fe143 100644 > --- a/drivers/net/fddi/Kconfig > +++ b/drivers/net/fddi/Kconfig > @@ -29,7 +29,7 @@ config DEFZA > > config DEFXX > tristate "Digital DEFTA/DEFEA/DEFPA adapter support" > - depends on FDDI && (PCI || EISA || TC) > + depends on FDDI && (PCI || EISA || TC) && HAS_IOPORT > help > This is support for the DIGITAL series of TURBOchannel (DEFTA), > EISA (DEFEA) and PCI (DEFPA) controllers which can connect you NAK, this has to be sorted out differently (and I think we discussed it before). The driver works just fine with MMIO where available, so if `inb'/`outb' do get removed, then only parts that rely on port I/O need to be disabled. In fact there's already such provision there in drivers/net/fddi/defxx.c for TURBOchannel systems (CONFIG_TC), which have no port I/O space either: #if defined(CONFIG_EISA) || defined(CONFIG_PCI) #define dfx_use_mmio bp->mmio #else #define dfx_use_mmio true #endif so I guess it's just the conditional that will have to be changed to: #ifdef CONFIG_HAS_IOPORT replacing the current explicit bus dependency list. The compiler will then optimise away all the port I/O stuff (though I suspect dummy function declarations may be required for `inb'/`outb', etc.). I can verify a suitable change with a TURBOchannel configuration once the MIPS part has been sorted. Maciej