Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6028147pxb; Mon, 14 Feb 2022 13:28:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFHDkAV/ZL4cTKkBVbu8JxGlCggUvr1Zq7m0ftI3zx3Y0qtED5TrPLMst3ykA7k0TQuV05 X-Received: by 2002:a65:4b8f:: with SMTP id t15mr869292pgq.140.1644874127402; Mon, 14 Feb 2022 13:28:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644874127; cv=none; d=google.com; s=arc-20160816; b=SqJttgq3jKiaxT/Lj3cZdSAS3vyP4VXDCEuSAyYQL4QfXJLo9/M83sypqAUHDmnEyh NFpMUTjRVwlTx+Jz0UP2zPhAAYhY13Fjk5kWNPoU6dHyaHGAhiOQtz4V+YsHpQHlPScN lIvDeMZ5vkI8zc4aNfpiE10Elv4+EsRjlwjVcMVhWRL5UUsKrTK7+L3r6roIzQrwlRym xGWm7oskXqPK4gLUSYR7tpC+qA/NxqRvLwuitTnR82m0G9076UOhR/HSycn9kd1SLYli 2CT3jgTj0m71ipzdh0+4HfcMPf/wLqno5I67839/xy9O/IfKqYv3PjBHw1mGAYb/1UdU gyUQ== 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=WhP8OxdojLFqcvd5kg+CidZV+6AY/lviDkR1eWeaODQ=; b=Yd1PgpYVp5ydkCui04UZ3c2FU4P5rSzmpqaEX9qSdjUDvQYRp7YDhToW9oBDJkqrud s/hTAVFim6FkMxnjCriAJT6YkZwBN6MUHHIwB8R5M81rfWZDMnRRpAh5boyi0ficMPBE DzD/XE/bcvI5f2hOpE6Bs1gHIgod2Zrkwipm262EcR2azphXlF8Ofll/BJIS/98WzntO +W1q0xgxvWlf/WRXTucix0lJntqPe6Zb5KaIJc/XJv8Lf7iYovQuASnUVgmynZZ8cCzt sTP9LmLw7D9l/u+RRx4GvgdSG/RpNYvCFkmqLsocy41CzR46faIAPKTOF5kO1IWqz6b2 51qg== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y1si12331041pll.463.2022.02.14.13.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:28:47 -0800 (PST) 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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AE1F415DDCA; Mon, 14 Feb 2022 12:48:01 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229470AbiBNUpt (ORCPT + 99 others); Mon, 14 Feb 2022 15:45:49 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:37990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbiBNUp3 (ORCPT ); Mon, 14 Feb 2022 15:45:29 -0500 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2851524287C; Mon, 14 Feb 2022 12:42:47 -0800 (PST) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 2C98292009E; Mon, 14 Feb 2022 21:42:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 221CC92009D; Mon, 14 Feb 2022 20:42:05 +0000 (GMT) Date: Mon, 14 Feb 2022 20:42:05 +0000 (GMT) From: "Maciej W. Rozycki" To: Niklas Schnelle cc: Geert Uytterhoeven , Sudip Mukherjee , Catalin Marinas , Will Deacon , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Alexander Gordeev , Sven Schnelle , Jeff Dike , Richard Weinberger , Anton Ivanov , Chris Zankel , Max Filippov , linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] parport_pc: Also enable driver for PCI systems In-Reply-To: <624931c5da90387324a97be57745b13af4738bda.camel@linux.ibm.com> Message-ID: References: <624931c5da90387324a97be57745b13af4738bda.camel@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 Mon, 14 Feb 2022, Niklas Schnelle wrote: > > While older versions of the driver did have to be explicitly configured > > for MMIO rather than port I/O, a feature added with commit e89a2cfb7d7b > > ("[TC] defxx: TURBOchannel support"), the driver has been improved with > > commit 795e272e5474 ("FDDI: defxx: Implement dynamic CSR I/O address space > > selection") and the selection of the I/O space to use now fully automatic. > > Very interesting and thanks for the input! On s390 we really only have > very few different PCI devices and I can only test another hand full > with my private x86 and ARM systems. Note that for TURBOchannel support, which is likewise MMIO only, the driver has this: #if defined(CONFIG_EISA) || defined(CONFIG_PCI) #define dfx_use_mmio bp->mmio #else #define dfx_use_mmio true #endif so if your proposal to add HAS_IOPORT goes forward it'll be enough if we update the condition to: #if defined(CONFIG_HAS_IOPORT) or maybe even rewrite the entire piece as: #define dfx_use_mmio (!IS_ENABLED(CONFIG_HAS_IOPORT) || bp->mmio) and all the port I/O stuff will be optimised away by the compiler. The only part of the driver that actually cannot do without port I/O is EISA support, which uses the EISA slot port I/O space for BAR accesses even if the actual CSR block has been set up to be decoded in the MMIO space. > > Then what about the other FDDI driver there, SKFP? It's not marked as > > LEGACY_PCI, although it's not selectable anyway due to the dependency of > > FDDI on LEGACY_PCI. > > > > Niklas, what was the criterion for placing the LEGACY_PCI dependency? > > Hmm, honestly I haven't really worked on this recently. There were some > open questions from Bjorn towards Arnd and I was waiting for his reply > but I guess he missed those. I think what you noticed was the main > problem, there wasn't really a clear set of criteria for LEGACY_PCI and > even for HAS_IOPORT we missed some uses if they were not compiled on > s390's allyesconfig due to other dependencies. A dynamic boolean variable might be good having for platforms which may or may not have PCI port I/O available depending on the specific system model in addition to a compile-time constant of HAS_IOPORT. I looked into it briefly in the context of the POWER9 system when I got it back in 2020, but figured out it wasn't straightforward enough and decided I could not afford the time for a proper investigation. > > Also do you plan to post an updated series anytime soon? I'm asking > > because like with the m68k port also the MIPS one needs a more finegrained > > approach and I suspect there may be other corner cases and I'd rather look > > at the most recent version of your series. Otherwise I'll have a look > > through your original submission, but it may have to wait until the next > > weekend due to my other commitments. > > That sounds like you do see a need for something like HAS_IOPORT too, > correct? Maybe with some input what you need and possibly stripping the > LEGACY_PCI option it might make sense to do a new version. Rather than > possibly getting in your way could directly work in your input. Yes, it does seem to me like a good direction, but will surely require some coordination from platform and driver maintainers, as it's not always easy for someone not familiar with a specific piece what the context is (such as with the defxx driver as I noted above). Maciej