Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1330421rwl; Fri, 7 Apr 2023 14:03:58 -0700 (PDT) X-Google-Smtp-Source: AKy350YXNzUk7rww0MEGzlmlprz3bSz9feFMx30NrIW0oJtt8DCzbioPra5BE/QeLheqByeyxxmN X-Received: by 2002:a05:6a20:bc86:b0:d4:220d:a7e7 with SMTP id fx6-20020a056a20bc8600b000d4220da7e7mr2608329pzb.46.1680901438232; Fri, 07 Apr 2023 14:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680901438; cv=none; d=google.com; s=arc-20160816; b=iEf7CYLaEXYEYBIJ6TVH/3FfFCoF2ocD2CTthbpklJ2Kg2PIctQ/J9NzakTDRznYIn p2hZ7RAottuxvPghc0Xrqrj6paDQgW90Cuji2g5Z0KZ8E45EEv/ChtFMDsHydtqe3Vlw nKno/ppyA3X1JfZre17U7CBT2XghMOp7z4iKoPNaUE/PltYETrDs29f3g9gWTmogbHUb uAsS2he7tLt7s+7qczESOman1WRX0UcWIuA+vJNnxO3N8wNvGrpNlPjoIOkLxFADvwZ6 HdJ5v6xmspCwNkIbi/p4XfAP+IFXCNKsz2ySczARFc7SoAzKKI3Uxr4TFD1BZu9SpZy3 jESQ== 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=k8m/awgDkWhsh/obywrujqXdDqgDJLaMFoAuD4TXT+c=; b=n7L3oBCkTIliJJntZN5cCDqlZePYE7QGFGQJ6gF7xrSWoru6FfIMEP9cY/Dn4UHX+u 8Qnv4ICLUyT0UrryzV8C1YXhQ1xKNLVrBdptUqDJszEGcsQ1rd/I51I0FbPRoSY0k/Wv T/e3zmDluE68oBw3z1j3T4GTBXUcd44xhuPxjDVT/m9QjdS+zutIpGLcenQnc54YD7R4 GpLQiRr0EoqJ1y5jhkBqLWR41sHDjhoQa5V3CXmZTO6NjZAbUNXM61Pm2ky2wAX88/4B so9zcfiegPFhPN+OTEwAUpMbnEPRYleyN6e+OUm40Z64AB+QqcEoc+Uxd24JMVVEJqpj dsGQ== 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 c133-20020a624e8b000000b0062a52a1c935si4363270pfb.131.2023.04.07.14.03.45; Fri, 07 Apr 2023 14:03:58 -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 S231343AbjDGVBy (ORCPT + 99 others); Fri, 7 Apr 2023 17:01:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231366AbjDGVBu (ORCPT ); Fri, 7 Apr 2023 17:01:50 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CFEA283FB; Fri, 7 Apr 2023 14:01:40 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id B238E92009C; Fri, 7 Apr 2023 23:01:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id AB65592009B; Fri, 7 Apr 2023 22:01:38 +0100 (BST) Date: Fri, 7 Apr 2023 22:01:38 +0100 (BST) From: "Maciej W. Rozycki" To: Sam Ravnborg cc: Niklas Schnelle , Randy Dunlap , linux-kernel@vger.kernel.org, Sudip Mukherjee , "David S. Miller" , sparclinux@vger.kernel.org, linux-parport@lists.infradead.org Subject: Re: [PATCH] parport_pc: don't allow driver for SPARC32 In-Reply-To: <20230407200313.GA1655046@ravnborg.org> Message-ID: References: <20230406160548.25721-1-rdunlap@infradead.org> <20230406203207.GA1534216@ravnborg.org> <20230407200313.GA1655046@ravnborg.org> 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=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE 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 Fri, 7 Apr 2023, Sam Ravnborg wrote: > > > Randy's suggestion is fine, as we avoid building parport support > > > for sparc32. If someone shows up and need parport support > > > for sparc32 then we could look into how to enable it. > > > Until then, we are better helped avoiding building the driver. > > > > I disagree. Why artificially prevent perfectly good hardware from > > working with a perfectly good driver especially as the fix is just a > > trivial exercise? And I offered a solution. > > There is no sparc32 with a PC style parallel port, so the parport_pc > have no value for a sparc32 machine. There are PC-style PCI (and PCIe) parallel ports in the form of option cards being sold; I have one in my RISC-V machine (and I had to go through the hassle of figuring out why the heck I am not able to select the driver in configuration; a situation analogous to what Randy's change wants to arrange). You can plug one into any machine that has PCI slots and my understanding from Linux Kconfig files is there are such 32-bit SPARC machines in existence or the dependency on PCI wouldn't offer the driver. Otherwise just don't enable CONFIG_PCI for 32-bit SPARC. Apologies if I wasn't clear enough with my reasoning, although I think the lone presence of the PCI dependency in Kconfig ought have to make it clear. > The sparc32 machines have the parport_sunbpp driver for their parallel > port. That's an onboard device or an SBus option card though, right? > An alternative fix, and better I think, would be to audit all archs > and let the relevant ones select ARCH_MIGHT_HAVE_PC_PARPORT, so we > avoided the ugly "|| (PCI && !S390 && !SPARC32)" case for PARPORT_PC. It's only S390 that is special in that it has a limited set of specially crafted PCI options it can ever support (or so I am told; something about the firmware or suchlike). Any other platform that has PCI slots will handle PC-style PCI parallel port option cards just fine, as long as it supports PCI I/O read/write commands (some systems such as POWER9 machines don't; Niklas Schnelle has been recently working on a generic way to exclude drivers for devices that require PCI port I/O from being offered with systems that have no support for PCI port I/O). Let me know if you find anything here unclear or have any other questions or comments. Maciej