Message ID | 20230406160548.25721-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1146944vqo; Thu, 6 Apr 2023 09:20:03 -0700 (PDT) X-Google-Smtp-Source: AKy350auvi1K0R65RrSJf1IHBDcyVwINH/0oEMyDsnpaOiMhHrD9h/L6aCS72v+hUUUW/44LnhUP X-Received: by 2002:a17:903:1d1:b0:19e:ecaf:c4b4 with SMTP id e17-20020a17090301d100b0019eecafc4b4mr11148863plh.4.1680798003092; Thu, 06 Apr 2023 09:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680798003; cv=none; d=google.com; s=arc-20160816; b=m2XohUoTHY8OgGgliAExwQbAjXg3zMZUmDCUOAFaZC32BcDoCtRV8bOA4WVN8aWKIH 7E62FKug2hyMRcvmhN2xTH1qfmYHfiTR/YrUsKMXdifMwHr4jpST+NMZIV5mtTEfLTWB sH6kQINQ22G9zA1xN9nzOOE3gVbxKsyOSLR1U9obxrrLGyGnlmUUkomkzkP8a09oEs9J zNWtoQvjQ4VT4K2QHSQNCpbs1dpAnMftgt0PDw4VweTLhd0miFHT6Dd3ZqQehgxJk7RL hvct87L1oUjk/fqDlYTznpNkIXAR2sIrrNkihgMEx6btDXoVlRafOVi5Y6MCo7hIQJa6 n8Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uEPm8dOBZnv4i4WftC68ZDl47ANTw+nTJX9zwRJJnoU=; b=oOcZbo7wvmR09ikCuZlzyOY9GbHprds3jaQTYgu4wWWdXlyklcCPFsDaYEINwPAO/P A6BKIPOjPqyCmwErxg/Bo7WXWN8aF9IKtEumch0j+pfo11pJWlbkhdUcYScxICt1pgpQ YxCPvLikk2Pmv2NFydO0ltM4zTEgeJQI0Cn2XZZTioM5czkveKHEXxJ2MPwgQFy1jHu3 EzH8tVD2/ElTPX9CPiP5GPlrOOQWQTEH6rKUKLCrTc32bYOptKPAjTLimle0IHOywcKH LfIE+hOIJApWHW5wO91u5mIrwpucJ7gaZUpOcYvwgmG5iHCScfwPLiMZ64N0ZDR4luX2 2N4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=XkVcysRn; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg12-20020a170902fb8c00b0019ef86c257asi1926981plb.241.2023.04.06.09.19.50; Thu, 06 Apr 2023 09:20:03 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=XkVcysRn; 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 S239838AbjDFQG2 (ORCPT <rfc822;lkml4gm@gmail.com> + 99 others); Thu, 6 Apr 2023 12:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjDFQG0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 6 Apr 2023 12:06:26 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBA4E9EE8; Thu, 6 Apr 2023 09:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=uEPm8dOBZnv4i4WftC68ZDl47ANTw+nTJX9zwRJJnoU=; b=XkVcysRnaHexPtQQr+vU3HjoDA V70/R60nM8HX/CGVLtWMa4ZCFfNpJEa5zRclK2NwiTYMKu+hrYtnxUg06CxAwIw+BLnvJyFmzDViR rMh10UWLdUPwwdjgiAEmKdTKeAI+bVIxCRc7s7VUi+lgtBc2AR8yOjO0y9j0MhnBEchITnauumCmE PHfKDoFTANve/sYDjO2QA63O80nyVjIVttl5ItkZQ5QYn1m+WpvHDQCmnmj0Zq1Deel85nR4YJKiw eUJ62iv7bCMvD1VAXjAkIztqFbB5pEZBw0ybNvqb5PT/Kr3G2Mv5bQdecHFtCrUY5bAMbq2pw+x0n 9F4hS02Q==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pkS7T-007wQR-0G; Thu, 06 Apr 2023 16:05:51 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Sudip Mukherjee <sudipm.mukherjee@gmail.com>, "Maciej W . Rozycki" <macro@orcam.me.uk>, "David S. Miller" <davem@davemloft.net>, sparclinux@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>, linux-parport@lists.infradead.org Subject: [PATCH] parport_pc: don't allow driver for SPARC32 Date: Thu, 6 Apr 2023 09:05:48 -0700 Message-Id: <20230406160548.25721-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762444446550639681?= X-GMAIL-MSGID: =?utf-8?q?1762444446550639681?= |
Series |
parport_pc: don't allow driver for SPARC32
|
|
Commit Message
Randy Dunlap
April 6, 2023, 4:05 p.m. UTC
arch/sparc/kernel/ebus.o is only built for SPARC64.
ns87303_lock is only built for SPARC64.
arch/sparc/include/asm/parport.h says that it is for sparc64.
Various documentation on the internet says that ebus is for UltraSPARC
systems (64-bit).
Therefore don't allow PARPORT_PC to be built for SPARC32.
Fixes these build errors on SPARC32:
ERROR: modpost: "ebus_dma_irq_enable" [drivers/parport/parport_pc.ko] undefined!
ERROR: modpost: "ebus_dma_unregister" [drivers/parport/parport_pc.ko] undefined!
ERROR: modpost: "ebus_dma_register" [drivers/parport/parport_pc.ko] undefined!
ERROR: modpost: "ns87303_lock" [drivers/parport/parport_pc.ko] undefined!
ERROR: modpost: "ebus_dma_enable" [drivers/parport/parport_pc.ko] undefined!
ERROR: modpost: "ebus_dma_prepare" [drivers/parport/parport_pc.ko] undefined!
ERROR: modpost: "ebus_dma_request" [drivers/parport/parport_pc.ko] undefined!
ERROR: modpost: "ebus_dma_residue" [drivers/parport/parport_pc.ko] undefined!
Fixes: 66bcd06099bb ("parport_pc: Also enable driver for PCI systems")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Maciej W. Rozycki <macro@orcam.me.uk>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-parport@lists.infradead.org
---
drivers/parport/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Apr 06, 2023 at 09:05:48AM -0700, Randy Dunlap wrote: > arch/sparc/kernel/ebus.o is only built for SPARC64. > ns87303_lock is only built for SPARC64. > arch/sparc/include/asm/parport.h says that it is for sparc64. > Various documentation on the internet says that ebus is for UltraSPARC > systems (64-bit). > > Therefore don't allow PARPORT_PC to be built for SPARC32. > > Fixes these build errors on SPARC32: > > ERROR: modpost: "ebus_dma_irq_enable" [drivers/parport/parport_pc.ko] undefined! > ERROR: modpost: "ebus_dma_unregister" [drivers/parport/parport_pc.ko] undefined! > ERROR: modpost: "ebus_dma_register" [drivers/parport/parport_pc.ko] undefined! > ERROR: modpost: "ns87303_lock" [drivers/parport/parport_pc.ko] undefined! > ERROR: modpost: "ebus_dma_enable" [drivers/parport/parport_pc.ko] undefined! > ERROR: modpost: "ebus_dma_prepare" [drivers/parport/parport_pc.ko] undefined! > ERROR: modpost: "ebus_dma_request" [drivers/parport/parport_pc.ko] undefined! > ERROR: modpost: "ebus_dma_residue" [drivers/parport/parport_pc.ko] undefined! > > Fixes: 66bcd06099bb ("parport_pc: Also enable driver for PCI systems") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> > Cc: Maciej W. Rozycki <macro@orcam.me.uk> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: sparclinux@vger.kernel.org > Cc: Sam Ravnborg <sam@ravnborg.org> > Cc: linux-parport@lists.infradead.org Acked-by: Sam Ravnborg <sam@ravnborg.org> > --- > drivers/parport/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -- a/drivers/parport/Kconfig b/drivers/parport/Kconfig > --- a/drivers/parport/Kconfig > +++ b/drivers/parport/Kconfig > @@ -42,7 +42,7 @@ if PARPORT > > config PARPORT_PC > tristate "PC-style hardware" > - depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390) > + depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390 && !SPARC32) > help > You should say Y here if you have a PC-style parallel port. All > IBM PC compatible computers and some Alphas have PC-style
On Thu, 6 Apr 2023, Randy Dunlap wrote: > arch/sparc/kernel/ebus.o is only built for SPARC64. > ns87303_lock is only built for SPARC64. > arch/sparc/include/asm/parport.h says that it is for sparc64. > Various documentation on the internet says that ebus is for UltraSPARC > systems (64-bit). > > Therefore don't allow PARPORT_PC to be built for SPARC32. This looks completely wrong to me, any ordinary PCI parallel port card ought just to work as long as you have PCI (S390 is special I'm told). What needs to be done is AFAICT just making `parport_pc_find_nonpci_ports' in arch/sparc/include/asm/parport.h SPARC64-specific, i.e.: static int parport_pc_find_nonpci_ports(int autoirq, int autodma) { return (IS_ENABLED(CONFIG_SPARC64) && platform_driver_register(&ecpp_driver)); } or suchlike and let the optimiser get rid of all the unwanted unsupported stuff. Maciej
On 4/6/23 12:49, Maciej W. Rozycki wrote: > On Thu, 6 Apr 2023, Randy Dunlap wrote: > >> arch/sparc/kernel/ebus.o is only built for SPARC64. >> ns87303_lock is only built for SPARC64. >> arch/sparc/include/asm/parport.h says that it is for sparc64. >> Various documentation on the internet says that ebus is for UltraSPARC >> systems (64-bit). >> >> Therefore don't allow PARPORT_PC to be built for SPARC32. > > This looks completely wrong to me, any ordinary PCI parallel port card > ought just to work as long as you have PCI (S390 is special I'm told). > What needs to be done is AFAICT just making `parport_pc_find_nonpci_ports' > in arch/sparc/include/asm/parport.h SPARC64-specific, i.e.: > > static int parport_pc_find_nonpci_ports(int autoirq, int autodma) > { > return (IS_ENABLED(CONFIG_SPARC64) && > platform_driver_register(&ecpp_driver)); > } > > or suchlike and let the optimiser get rid of all the unwanted unsupported > stuff. Fine, please go ahead with that solution.
Hi Maciej, On Thu, Apr 06, 2023 at 08:49:50PM +0100, Maciej W. Rozycki wrote: > On Thu, 6 Apr 2023, Randy Dunlap wrote: > > > arch/sparc/kernel/ebus.o is only built for SPARC64. > > ns87303_lock is only built for SPARC64. > > arch/sparc/include/asm/parport.h says that it is for sparc64. > > Various documentation on the internet says that ebus is for UltraSPARC > > systems (64-bit). > > > > Therefore don't allow PARPORT_PC to be built for SPARC32. > > This looks completely wrong to me, any ordinary PCI parallel port card > ought just to work as long as you have PCI (S390 is special I'm told). > What needs to be done is AFAICT just making `parport_pc_find_nonpci_ports' > in arch/sparc/include/asm/parport.h SPARC64-specific, i.e.: > > static int parport_pc_find_nonpci_ports(int autoirq, int autodma) > { > return (IS_ENABLED(CONFIG_SPARC64) && > platform_driver_register(&ecpp_driver)); > } > > or suchlike and let the optimiser get rid of all the unwanted unsupported > stuff. arch/sparc/include/asm/parport.h is sparc64 specific - and it will result in the wrong result if it is pulled in for sparc32 builds. This is what we see today. 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. Hence, my ack on the patch from Randy. Sam
Hi Sam, > > This looks completely wrong to me, any ordinary PCI parallel port card > > ought just to work as long as you have PCI (S390 is special I'm told). > > What needs to be done is AFAICT just making `parport_pc_find_nonpci_ports' > > in arch/sparc/include/asm/parport.h SPARC64-specific, i.e.: > > > > static int parport_pc_find_nonpci_ports(int autoirq, int autodma) > > { > > return (IS_ENABLED(CONFIG_SPARC64) && > > platform_driver_register(&ecpp_driver)); > > } > > > > or suchlike and let the optimiser get rid of all the unwanted unsupported > > stuff. > > arch/sparc/include/asm/parport.h is sparc64 specific - and it will > result in the wrong result if it is pulled in for sparc32 builds. > This is what we see today. > > 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. I don't have a SPARC toolchain handy or I could even try and build it (but I'm sure there are many people around who can do it without bending backwards). NB conversely we have plenty of useless irrelevant stuff presented in configration even if it genuinely makes no sense and won't ever be used for the given platform (e.g. some Intel CPU management stuff shown for RISC-V or even DEC Alpha systems). Maciej
On 4/6/23 14:01, Maciej W. Rozycki wrote: > Hi Sam, > >>> This looks completely wrong to me, any ordinary PCI parallel port card >>> ought just to work as long as you have PCI (S390 is special I'm told). >>> What needs to be done is AFAICT just making `parport_pc_find_nonpci_ports' >>> in arch/sparc/include/asm/parport.h SPARC64-specific, i.e.: >>> >>> static int parport_pc_find_nonpci_ports(int autoirq, int autodma) >>> { >>> return (IS_ENABLED(CONFIG_SPARC64) && >>> platform_driver_register(&ecpp_driver)); >>> } >>> >>> or suchlike and let the optimiser get rid of all the unwanted unsupported >>> stuff. >> >> arch/sparc/include/asm/parport.h is sparc64 specific - and it will >> result in the wrong result if it is pulled in for sparc32 builds. >> This is what we see today. >> >> 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. > > I don't have a SPARC toolchain handy or I could even try and build it > (but I'm sure there are many people around who can do it without bending > backwards). https://mirrors.edge.kernel.org/pub/tools/crosstool/
Hi Maciej, On Thu, Apr 06, 2023 at 10:01:16PM +0100, Maciej W. Rozycki wrote: > Hi Sam, > > > > This looks completely wrong to me, any ordinary PCI parallel port card > > > ought just to work as long as you have PCI (S390 is special I'm told). > > > What needs to be done is AFAICT just making `parport_pc_find_nonpci_ports' > > > in arch/sparc/include/asm/parport.h SPARC64-specific, i.e.: > > > > > > static int parport_pc_find_nonpci_ports(int autoirq, int autodma) > > > { > > > return (IS_ENABLED(CONFIG_SPARC64) && > > > platform_driver_register(&ecpp_driver)); > > > } > > > > > > or suchlike and let the optimiser get rid of all the unwanted unsupported > > > stuff. > > > > arch/sparc/include/asm/parport.h is sparc64 specific - and it will > > result in the wrong result if it is pulled in for sparc32 builds. > > This is what we see today. > > > > 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. Some sparc Ultra have PC style parallel ports - but this is sparc64 machines and they are covered. The sparc32 machines have the parport_sunbpp driver for their parallel port. 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. Sam
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
On 4/7/23 14:01, Maciej W. Rozycki wrote: > 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. > If there are 32-bit Sparc machines with PCI slots, we must not have any users with parallel ports or we should have heard about it IMO. > 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). From my reading, if a Sparc32 machine has a PCI port, it might be able to have a parallel port. However, even with Maciej's suggested code change instead of my patch, the ebus code is not being compiled for Sparc32 -- only for Sparc64, so more changes are needed beyond Maciej's suggestion. But the documentation that I found refers to Ebus on Sparc4 machines. > 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. /me wishes that we had a Sparc maintainer.
On Fri, 7 Apr 2023, Randy Dunlap wrote: > > 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. > > > > If there are 32-bit Sparc machines with PCI slots, we must not have any > users with parallel ports or we should have heard about it IMO. I wouldn't be surprised, parallel ports are not that common nowadays, let alone used. Myself I haven't used a parallel printer for ages now, though I still own a couple of odd other parallel devices, such as a ROM emulator or the firmware download port of an old MIPS development board (actually a regular Super I/O parallel port of said device hijacked by an onboard FPGA for this second purpose if enabled with an onboard rocker switch). That's not the usual stuff people tend to use I suppose. > >> 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. I should have noted this before: ARCH_MIGHT_HAVE_PC_PARPORT is for true ISA or Super I/O parallel ports only. We handle true PCI implementations in a generic platform-agnostic way, as long as the platform implements PCI I/O commands in the host bridge. The latter requirement only excludes a bunch of platforms, most notably S390 and recent 64-bit POWER systems. With Niklas's HAS_IOPORT patches the S390 special case will soon be gone. > > 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). > > >From my reading, if a Sparc32 machine has a PCI port, it might be able to > have a parallel port. However, even with Maciej's suggested code change > instead of my patch, the ebus code is not being compiled for Sparc32 -- only > for Sparc64, so more changes are needed beyond Maciej's suggestion. > > But the documentation that I found refers to Ebus on Sparc4 machines. Well, even though I came across a bunch of SPARC machines in the past I'm not familiar enough with the platform to have an idea what SPARC4 refers to. You can enable CONFIG_PCI for a SPARC32 kernel however, which I infer from there are 32-bit SPARC machines in existence with PCI connectivity. That I find enough for a potential PC-style parallel port configuration with such a system, for as many ports as the availability of slots allows. > > 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. > > /me wishes that we had a Sparc maintainer. What happened to DaveM? In any case after a couple of iterations I have made a succesful build of a 32-bit SPARC toolchain now, which I was able to verify a fix with I have outlined earlier in this thread. Posted as archived at: <https://lore.kernel.org/r/alpine.DEB.2.21.2306182347101.14084@angie.orcam.me.uk/>. Maciej
Hi, On 6/18/23 16:42, Maciej W. Rozycki wrote: > On Fri, 7 Apr 2023, Randy Dunlap wrote: > >> /me wishes that we had a Sparc maintainer. > > What happened to DaveM? I haven't seen him merge any arch/sparc/ patches lately. I have a couple that are still pending. > In any case after a couple of iterations I have made a succesful build of > a 32-bit SPARC toolchain now, which I was able to verify a fix with I have Is your newly built toolchain for riscv hosting? > outlined earlier in this thread. Posted as archived at: > <https://lore.kernel.org/r/alpine.DEB.2.21.2306182347101.14084@angie.orcam.me.uk/>. thanks.
Hi Randy, > > What happened to DaveM? > > I haven't seen him merge any arch/sparc/ patches lately. > I have a couple that are still pending. Oh, I hope he's been doing good then, and it's just a change of life priorities or suchlike. Patch reviews can take a lot of mental effort, and I can't claim I've been as effective as I wished to with stuff that lands on my plate either. > > In any case after a couple of iterations I have made a succesful build of > > a 32-bit SPARC toolchain now, which I was able to verify a fix with I have > > Is your newly built toolchain for riscv hosting? Are you asking whether the SPARC toolchain has been built/installed on a RISC-V system? If so, then no, it hasn't. It runs on POWER9. Maciej
On 6/18/23 18:29, Maciej W. Rozycki wrote: > Hi Randy, > >>> What happened to DaveM? >> >> I haven't seen him merge any arch/sparc/ patches lately. >> I have a couple that are still pending. > > Oh, I hope he's been doing good then, and it's just a change of life > priorities or suchlike. Patch reviews can take a lot of mental effort, > and I can't claim I've been as effective as I wished to with stuff that > lands on my plate either. > >>> In any case after a couple of iterations I have made a succesful build of >>> a 32-bit SPARC toolchain now, which I was able to verify a fix with I have >> >> Is your newly built toolchain for riscv hosting? > > Are you asking whether the SPARC toolchain has been built/installed on a > RISC-V system? If so, then no, it hasn't. It runs on POWER9. Yes, that's what I was asking. So you could have used the compilers that Arnd builds: https://mirrors.edge.kernel.org/pub/tools/crosstool/ Thanks.
From: "Maciej W. Rozycki" <macro@orcam.me.uk> Date: Mon, 19 Jun 2023 02:29:57 +0100 (BST) > Hi Randy, > >> > What happened to DaveM? >> >> I haven't seen him merge any arch/sparc/ patches lately. >> I have a couple that are still pending. > > Oh, I hope he's been doing good then, and it's just a change of life > priorities or suchlike. Patch reviews can take a lot of mental effort, > and I can't claim I've been as effective as I wished to with stuff that > lands on my plate either. I'm good just too busy with networking and real life. Thanks.
Hi Davem, > > > >> > What happened to DaveM? > >> > >> I haven't seen him merge any arch/sparc/ patches lately. > >> I have a couple that are still pending. > > > > Oh, I hope he's been doing good then, and it's just a change of life > > priorities or suchlike. Patch reviews can take a lot of mental effort, > > and I can't claim I've been as effective as I wished to with stuff that > > lands on my plate either. > > I'm good just too busy with networking and real life. Enjoy the real life! Sam
On 6/23/23 10:22, Sam Ravnborg wrote: > Hi Davem, > >>> >>>>> What happened to DaveM? >>>> >>>> I haven't seen him merge any arch/sparc/ patches lately. >>>> I have a couple that are still pending. >>> >>> Oh, I hope he's been doing good then, and it's just a change of life >>> priorities or suchlike. Patch reviews can take a lot of mental effort, >>> and I can't claim I've been as effective as I wished to with stuff that >>> lands on my plate either. >> >> I'm good just too busy with networking and real life. > > > Enjoy the real life! > > Sam I agree with that. :) But is there an alternate route for sparc patches? thanks.
diff -- a/drivers/parport/Kconfig b/drivers/parport/Kconfig --- a/drivers/parport/Kconfig +++ b/drivers/parport/Kconfig @@ -42,7 +42,7 @@ if PARPORT config PARPORT_PC tristate "PC-style hardware" - depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390) + depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390 && !SPARC32) help You should say Y here if you have a PC-style parallel port. All IBM PC compatible computers and some Alphas have PC-style