From nobody Mon Feb 9 03:51:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32F16EB64D8 for ; Sun, 18 Jun 2023 23:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbjFRXAt (ORCPT ); Sun, 18 Jun 2023 19:00:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjFRXAp (ORCPT ); Sun, 18 Jun 2023 19:00: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 4DB4B1BD; Sun, 18 Jun 2023 16:00:44 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id B775F92009C; Mon, 19 Jun 2023 01:00:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id A8A0892009B; Mon, 19 Jun 2023 00:00:40 +0100 (BST) Date: Mon, 19 Jun 2023 00:00:40 +0100 (BST) From: "Maciej W. Rozycki" To: "David S. Miller" cc: Randy Dunlap , Sudip Mukherjee , Sam Ravnborg , sparclinux@vger.kernel.org, linux-parport@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] SPARC: Fix parport_pc support for 32-bit platforms Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For 32-bit SPARC platforms PC-style parallel ports are only available as=20 PCI options. Adjust accordingly, fixing build errors: sparc-linux-gnu-ld: drivers/parport/parport_pc.o: in function `ecpp_remove': parport_pc.c:(.text+0x8f0): undefined reference to `ebus_dma_irq_enable' sparc-linux-gnu-ld: parport_pc.c:(.text+0x8f8): undefined reference to `ebu= s_dma_unregister' sparc-linux-gnu-ld: drivers/parport/parport_pc.o: in function `parport_pc_f= ifo_write_block_dma': parport_pc.c:(.text+0x1430): undefined reference to `ebus_dma_enable' sparc-linux-gnu-ld: parport_pc.c:(.text+0x1444): undefined reference to `eb= us_dma_prepare' sparc-linux-gnu-ld: parport_pc.c:(.text+0x14e4): undefined reference to `eb= us_dma_enable' sparc-linux-gnu-ld: parport_pc.c:(.text+0x14f4): undefined reference to `eb= us_dma_request' sparc-linux-gnu-ld: parport_pc.c:(.text+0x1584): undefined reference to `eb= us_dma_enable' sparc-linux-gnu-ld: parport_pc.c:(.text+0x1594): undefined reference to `eb= us_dma_residue' sparc-linux-gnu-ld: parport_pc.c:(.text+0x1608): undefined reference to `eb= us_dma_enable' sparc-linux-gnu-ld: parport_pc.c:(.text+0x1618): undefined reference to `eb= us_dma_residue' sparc-linux-gnu-ld: drivers/parport/parport_pc.o: in function `ecpp_probe': parport_pc.c:(.text+0x33a0): undefined reference to `ebus_dma_register' sparc-linux-gnu-ld: parport_pc.c:(.text+0x33b8): undefined reference to `eb= us_dma_irq_enable' sparc-linux-gnu-ld: parport_pc.c:(.text+0x34b0): undefined reference to `eb= us_dma_irq_enable' sparc-linux-gnu-ld: parport_pc.c:(.text+0x34bc): undefined reference to `eb= us_dma_unregister' Signed-off-by: Maciej W. Rozycki Fixes: 66bcd06099bb ("parport_pc: Also enable driver for PCI systems") Cc: stable@vger.kernel.org # v5.18+ --- arch/sparc/include/asm/parport.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) linux-sparc32-parport-pc.diff Index: linux-macro/arch/sparc/include/asm/parport.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- linux-macro.orig/arch/sparc/include/asm/parport.h +++ linux-macro/arch/sparc/include/asm/parport.h @@ -19,7 +19,9 @@ * While sparc64 doesn't have an ISA DMA API, we provide something that lo= oks * close enough to make parport_pc happy */ +#ifdef CONFIG_SPARC64 #define HAS_DMA +#endif =20 #ifdef CONFIG_PARPORT_PC_FIFO static DEFINE_SPINLOCK(dma_spin_lock); @@ -249,7 +251,8 @@ static struct platform_driver ecpp_drive =20 static int parport_pc_find_nonpci_ports(int autoirq, int autodma) { - return platform_driver_register(&ecpp_driver); + return (IS_ENABLED(CONFIG_SPARC64) && + platform_driver_register(&ecpp_driver)); } =20 #endif /* !(_ASM_SPARC64_PARPORT_H */