From patchwork Fri Feb 23 19:36:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg via B4 Relay X-Patchwork-Id: 205626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp804315dyb; Fri, 23 Feb 2024 11:38:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXYwAEISMzXnC1vyzL1kPqOXcNGr7DPfNficpEwhDPzCirJUjMeKGbY/GE8Fv+jQp8sZ02c5MHi3iOED9e9gDsBELYpPg== X-Google-Smtp-Source: AGHT+IGhx/WhkIGRemD65gnpY9lLgyYWQhh4ozQ11Ev2yg51oxs9dwFkWPW4ul/vze1FGioTEPrz X-Received: by 2002:a05:6808:90c:b0:3c0:4477:deab with SMTP id w12-20020a056808090c00b003c04477deabmr700038oih.51.1708717080685; Fri, 23 Feb 2024 11:38:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708717080; cv=pass; d=google.com; s=arc-20160816; b=YMTOYg2FNN8EISMRqVavrtVRcE6LrPF3hCEUYV8m7FPx8a21+WzdtTcmUyV1tzaJF6 CynpcXog2jsy6NZOaxxpdzMDdLUpgnOBQwxk3hJ1Ccb3BINeJVYGtwlmvv6T52BTU6M0 8/c3vM2PDhZKtHK54o2UNcBptA2n5iwf5bLUQGQBUIRLUVbc5rrVq7wf4DMr3Z3qK65S 5fPW0+o5bfaaNX1hYWIgkB/xw0afcWo5HEZ+xYdyg94zrVDS0TY0+9u/1UO55w3MK6A7 gHnhhz6TjGK0Pej7JV2Wpav1gD6m1HKQNgVXYHypnm3et0E1+FzWwCLqhMPIW8ByWMvu pyLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=NAb6fy9qFmKZNv0ceM0ydA/nVXBH5BJh5KrbvQNL/Cw=; fh=CL4VwMdqDkOjIVq5vfpiK/zgFazi/Qclr+95A1i2dPU=; b=FOzlr9jrNh53l9rFigPGFQqUCMwzupr6sgmeuj/oYJz87MIXQmWRMr0iiVztZhY73w aloCZzoVJhM2PyD3mF4ZRFvNvJKY5gpg6RTv9NBLb6XylU0OKLoYnE3biMRI0MKVTO2F wcxNZOKfyPb2RqvjM/SuxUhQCulbVu822srCRExVOP7dcPGYLypBfZYXbAvKQWcY5gCX DU+pf3conXVFRTHnyldnn+JulfAaloR6LAPPujXImNhE8YOCN268JDMiHghlAZRBcxG/ ngGfmcPxCcMiRxtg10NMlFswptpqEk6JVCBkOxY75Or511ei1HrFQBVqPNsSoQOcfdp9 TaXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VSsEw+jr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79032-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79032-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q10-20020ad4574a000000b0068fac99707fsi5904089qvx.546.2024.02.23.11.38.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 11:38:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79032-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VSsEw+jr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79032-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79032-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 767191C22EFC for ; Fri, 23 Feb 2024 19:38:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2D021474A6; Fri, 23 Feb 2024 19:37:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VSsEw+jr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F22B71420B7; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; cv=none; b=oSHNmq9jvd8QxPobC1T6h/bYrKvbQR9rSnsYf0Yzyje9F8mhuqEv3yRKU5GxbVdoVKQhDwkzATYzGjxbYL/UmfEWWekI4AMaMKNCrWIXDmr6smBeYSYfRXKk0LrQSCHfcvMm+t1xpT3RMtNsHZAAj5hqBUiOjxcRHiPkU0aexA8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; c=relaxed/simple; bh=Y3ySrz1oDy2VdIWP8KqhKgzBK85YCNmxVjOAZb69QGc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TI1zR55euTlkFo8igFXo9ndTGItIZezNFGQHs6niFhSRr4Z1gvD32ntyoXtmirPhJnWVOf5bpgIO64qosiFfWr0WBD10s7K0BIw2RJUzsDlhRPZbioivH/BwKYQmtCog4D2OoITlB/QSxw6458cCsIGywZ73ctY17EYFLQMtIWU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VSsEw+jr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id A7DCCC433C7; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708717024; bh=Y3ySrz1oDy2VdIWP8KqhKgzBK85YCNmxVjOAZb69QGc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=VSsEw+jrZDzhkgMEgV4+Gcw+7KVsCDNEEs5P/s4HAxxTLlfStp2dMMzF/BPKpUAJx T/y7YvdsGkPPc24f4WYTDeCkhr2nTTqfvAlXNEu1XHUEPpvly5EyN+sN//UPv6P/h5 moSUCzwrbkKhT1wjbScM7tZm/4UkT4hzXEuavhLmxFP2fd6VGKjh8GA98b3YfqSXKC ZgbHObR1Hq6ozJzRwifjPNf4CXcBAXJGvurwpzCmKnN94HquXGzs1xk3W5NUxdeS59 rSjWSpfqKID5LGZc2Ky7CuTKWHjzPFDohYsXeF6LP/djX8P6ZuCwx+M1nc9ZJst4P0 SGCYhCUeOzlyw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A932C54E49; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) From: Sam Ravnborg via B4 Relay Date: Fri, 23 Feb 2024 20:36:47 +0100 Subject: [PATCH 1/6] sparc32: Use generic cmpdi2/ucmpdi2 variants Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240223-sam-fix-sparc32-all-builds-v1-1-5c60fd5c9250@ravnborg.org> References: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> In-Reply-To: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> To: Miquel Raynal , "Maciej W. Rozycki" Cc: sparclinux@vger.kernel.org, linux-parport@lists.infradead.org, "David S. Miller" , Andreas Larsson , Randy Dunlap , Arnd Bergmann , linux-kernel@vger.kernel.org, Sam Ravnborg X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708717023; l=3407; i=sam@ravnborg.org; s=20230107; h=from:subject:message-id; bh=29TdsRP/R2LmI+LIbEQqDi2Bdx01Dq7gEBtiS6nu5bo=; =?utf-8?q?b=3DEZRSjOFa3fv5?= =?utf-8?q?8gfK6zprK0eC07yJzc8FhmSdLTMB2lUFaZrffJQk4aajMyG/Syy5Fsvf8tIGe0Dj?= ZlaRS+PXAJ24fFkMWQugmp4S2FzISQY22UdAByym++h54YDBEtT4 X-Developer-Key: i=sam@ravnborg.org; a=ed25519; pk=R0+pqV7BRYOAeOIGkyOrSNke7arx5y3LkEuNi37YEyU= X-Endpoint-Received: by B4 Relay for sam@ravnborg.org/20230107 with auth_id=22 X-Original-From: Sam Ravnborg Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791719721637212419 X-GMAIL-MSGID: 1791719721637212419 From: Sam Ravnborg Use the generic variants - the implementation is the same. As a nice side-effect fix the following warnings: cmpdi2.c: warning: no previous prototype for '__cmpdi2' [-Wmissing-prototypes] ucmpdi2.c: warning: no previous prototype for '__ucmpdi2' [-Wmissing-prototypes] Signed-off-by: Sam Ravnborg Cc: "David S. Miller" Cc: Andreas Larsson Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested --- arch/sparc/Kconfig | 2 ++ arch/sparc/lib/Makefile | 4 ++-- arch/sparc/lib/cmpdi2.c | 28 ---------------------------- arch/sparc/lib/ucmpdi2.c | 20 -------------------- 4 files changed, 4 insertions(+), 50 deletions(-) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index b087d4fe00af..734f23daecca 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -57,6 +57,8 @@ config SPARC32 select CLZ_TAB select DMA_DIRECT_REMAP select GENERIC_ATOMIC64 + select GENERIC_LIB_CMPDI2 + select GENERIC_LIB_UCMPDI2 select HAVE_UID16 select LOCK_MM_AND_FIND_VMA select OLD_SIGACTION diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile index 59669ebddd4e..ee5091dd67ed 100644 --- a/arch/sparc/lib/Makefile +++ b/arch/sparc/lib/Makefile @@ -14,7 +14,7 @@ lib-$(CONFIG_SPARC32) += divdi3.o udivdi3.o lib-$(CONFIG_SPARC32) += copy_user.o locks.o lib-$(CONFIG_SPARC64) += atomic_64.o lib-$(CONFIG_SPARC32) += lshrdi3.o ashldi3.o -lib-$(CONFIG_SPARC32) += muldi3.o bitext.o cmpdi2.o +lib-$(CONFIG_SPARC32) += muldi3.o bitext.o lib-$(CONFIG_SPARC64) += multi3.o lib-$(CONFIG_SPARC64) += fls.o lib-$(CONFIG_SPARC64) += fls64.o @@ -51,5 +51,5 @@ lib-$(CONFIG_SPARC64) += copy_in_user.o memmove.o lib-$(CONFIG_SPARC64) += mcount.o ipcsum.o xor.o hweight.o ffs.o obj-$(CONFIG_SPARC64) += iomap.o -obj-$(CONFIG_SPARC32) += atomic32.o ucmpdi2.o +obj-$(CONFIG_SPARC32) += atomic32.o obj-$(CONFIG_SPARC64) += PeeCeeI.o diff --git a/arch/sparc/lib/cmpdi2.c b/arch/sparc/lib/cmpdi2.c deleted file mode 100644 index 333367fe7353..000000000000 --- a/arch/sparc/lib/cmpdi2.c +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include - -#include "libgcc.h" - -word_type __cmpdi2(long long a, long long b) -{ - const DWunion au = { - .ll = a - }; - const DWunion bu = { - .ll = b - }; - - if (au.s.high < bu.s.high) - return 0; - else if (au.s.high > bu.s.high) - return 2; - - if ((unsigned int) au.s.low < (unsigned int) bu.s.low) - return 0; - else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) - return 2; - - return 1; -} - -EXPORT_SYMBOL(__cmpdi2); diff --git a/arch/sparc/lib/ucmpdi2.c b/arch/sparc/lib/ucmpdi2.c deleted file mode 100644 index 82c1cccb1264..000000000000 --- a/arch/sparc/lib/ucmpdi2.c +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include -#include "libgcc.h" - -word_type __ucmpdi2(unsigned long long a, unsigned long long b) -{ - const DWunion au = {.ll = a}; - const DWunion bu = {.ll = b}; - - if ((unsigned int) au.s.high < (unsigned int) bu.s.high) - return 0; - else if ((unsigned int) au.s.high > (unsigned int) bu.s.high) - return 2; - if ((unsigned int) au.s.low < (unsigned int) bu.s.low) - return 0; - else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) - return 2; - return 1; -} -EXPORT_SYMBOL(__ucmpdi2); From patchwork Fri Feb 23 19:36:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg via B4 Relay X-Patchwork-Id: 205629 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp804397dyb; Fri, 23 Feb 2024 11:38:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU5O5ZNXh0wxUXAbH6KTGsFnT7Q4Z4tZ2UBhaMZI1sIS55wfO9Od6g60RKNIDdvxQjf0gnlPw+aR10b77hd9zfCXhxipA== X-Google-Smtp-Source: AGHT+IEKHucDvnrwW53goqhrQ8kA9tLU3k4YuU0Aza/DO0pF9zWGta6nfrXwFNPekvO+5IhN+psl X-Received: by 2002:a05:6512:2012:b0:512:e00b:9120 with SMTP id a18-20020a056512201200b00512e00b9120mr439341lfb.32.1708717091143; Fri, 23 Feb 2024 11:38:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708717091; cv=pass; d=google.com; s=arc-20160816; b=isLwECJnW62QuWPJikfp7SRM3gXcFoJAOdIAkLgCMJY87Pbeyfl8EKe4SqjbBsOoYj WHSwPsaZzGTiyPKb1+Uj7VnbciIY41q3wzP/tNoxG7nypRnMHCeBnUGGCrgo1B8WAFZt 1Xbg3vskuih7EkwZfJ/AgQLAaZ3accyVxDGm6wkyYOCloIwAW7uspUikaMUrlac0Awuy vE7rKckuv+ygIfk9inPYOppa/llXPqNJ7KPG7FwT7PcNLvzVYZ2X59P4FAKN/5NK+Euv M3O5ohvpSwQ0TxRjLI6B0F9Lo7Wn8Ke8C1CTrGzrlO7I9J2S0trHB4sLVuPOJwQRE4Ci m+Og== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=OJuvKQ8YIEWatkHI81gnvc+Z1IPqDHZ8AMv6FJnXjho=; fh=CL4VwMdqDkOjIVq5vfpiK/zgFazi/Qclr+95A1i2dPU=; b=W/oaVpcqJZAzUEeDf+OazucK+CqtR7kE8A59HeC1PzgCIzG9txsTROcCmkIDjFHsro g5ftJY4fW6cAiDzkw+eJz6s0XgoLkahD0pJxaFMfJFf4I3AiWeZVpS3oLqgc0Lq6QKA0 xqMIX/URrfl5HcXzizMal69atw2qH4uJPdnPPBTFenBKlwvKUxera7r4Rv97xsMziJ+o H8fYmuaYAOgc5Qh6Ba0C2WLLpABjc6X7H4rz2Q7r7I5vGrZmNgNbjmsW7XJRssG7I83+ Fu51+aVrlVE8x4EAVLbcgYY9QZaDhNXd03VdW7ADjLGxphEjQPMEf2e5MxEzTMNojuZD p+zg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qyWv7HLw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79034-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79034-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 29-20020a508e1d000000b005654d6a248asi1235862edw.85.2024.02.23.11.38.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 11:38:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79034-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qyWv7HLw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79034-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79034-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 14FA21F23607 for ; Fri, 23 Feb 2024 19:38:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45634148312; Fri, 23 Feb 2024 19:37:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qyWv7HLw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A1791448DD; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; cv=none; b=XYbxQaUYvUlqXbEQSSii4Y1ynKPeMhwEQiJx/r/TOV6gfQnzpdbRlgWI8KT7RTM0Q7zBDKSdAcZj4j7y4uBECcqragwXvirN6gJvFzTTFMIqDU/FL7rjz3xzFe8x8b6paoF/1D4KG/7LSAMhpcPf94AG0V3hR7kAm4J4t/ljObY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; c=relaxed/simple; bh=we3L75CQ79HHxOvSb1ZZJI5S6/Ad+/lQv5goB0IX45s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I1u0oDx70yT5Z/P/M8yPiD9B09WmsJTGThIps0DXh+uQND3wvnS4Zku15mdVjDvZsQfUeJuqFEgOT5ENd25E8cig1Y/LBwaj+fTzaqMirr2oL5nP2LRWU3+hXCPek5/uDYY4BvBeKV607WHQ32+aPwz5kw1NcC1ewitdkJdwhOM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qyWv7HLw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id BE9B1C43394; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708717024; bh=we3L75CQ79HHxOvSb1ZZJI5S6/Ad+/lQv5goB0IX45s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=qyWv7HLwUdJobDp+rcgORDpNZbn/BnrOtGZ6ogh6/kR+HAygNGI1dAu/Mz84iLcEz wRWaojWZQrnVGD53lJEe4/cxKeRf57Y8SuQ+CTMeds03vs945ZAEJ7apsPLrEzCJHa itb/qvDY93DOS18oZDoBWFBMBLaKGkzU/VHAchZq9ymmZ86S84XCTVhGCFnaRBNTJe xY8cOzxDlrMkKVHz/cjOaNPogl7jTN7eF5UoAgojRBldvtcicudC9/++VboDhuTdwl Vv06E+qNkuWNu6SCXsbZiPbeterlwWd0KIEuw+dhhDaLPPFHcs3xG+DTgWThv1yrur 6RHd+SekPft1g== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0803C54798; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) From: Sam Ravnborg via B4 Relay Date: Fri, 23 Feb 2024 20:36:48 +0100 Subject: [PATCH 2/6] sparc32: Fix build with trapbase Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240223-sam-fix-sparc32-all-builds-v1-2-5c60fd5c9250@ravnborg.org> References: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> In-Reply-To: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> To: Miquel Raynal , "Maciej W. Rozycki" Cc: sparclinux@vger.kernel.org, linux-parport@lists.infradead.org, "David S. Miller" , Andreas Larsson , Randy Dunlap , Arnd Bergmann , linux-kernel@vger.kernel.org, Sam Ravnborg X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708717023; l=4694; i=sam@ravnborg.org; s=20230107; h=from:subject:message-id; bh=ZFfHXtKyLf8xDM6mY7aG00HWuxPLFS499lQmLEdt+Es=; =?utf-8?q?b=3DPc7hW34245wR?= =?utf-8?q?Lxl7Y/2gnc2urS4zef2lni6AkzWyk2fehxpPdPJSehnCfeZ6zvi2vOxP8eEv8OQI?= 8ZBP7NUTCWw17kwSaTtMcu0xbiUBk8WF4LjqybQlHUQkxTTesgdM X-Developer-Key: i=sam@ravnborg.org; a=ed25519; pk=R0+pqV7BRYOAeOIGkyOrSNke7arx5y3LkEuNi37YEyU= X-Endpoint-Received: by B4 Relay for sam@ravnborg.org/20230107 with auth_id=22 X-Original-From: Sam Ravnborg Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791719732684246502 X-GMAIL-MSGID: 1791719732684246502 From: Sam Ravnborg Fix the following build errors: irq_32.c:258:7: error: array subscript [16, 79] is outside array bounds of 'struct tt_entry[1] irq_32.c:271:14: error: assignment to 'struct tt_entry *' from incompatible pointer type 'struct tt_entry (*)[] trapbase is a pointer to an array of tt_entry, but the code declared it as a pointer so the compiler see a single entry and not an array. Fix this by modifyinf the declaration to be an array, and modify all users to take the address of the first member. Signed-off-by: Sam Ravnborg Cc: Andreas Larsson Cc: "David S. Miller" Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested --- arch/sparc/kernel/irq_32.c | 6 +++--- arch/sparc/kernel/kernel.h | 8 ++++---- arch/sparc/kernel/kgdb_32.c | 4 ++-- arch/sparc/kernel/leon_smp.c | 6 +++--- arch/sparc/kernel/setup_32.c | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c index e8452be5123b..8605dd710f3c 100644 --- a/arch/sparc/kernel/irq_32.c +++ b/arch/sparc/kernel/irq_32.c @@ -268,11 +268,11 @@ int sparc_floppy_request_irq(unsigned int irq, irq_handler_t irq_handler) if (sparc_cpu_model != sparc_leon) { struct tt_entry *trap_table; - trap_table = &trapbase_cpu1; + trap_table = &trapbase_cpu1[0]; INSTANTIATE(trap_table) - trap_table = &trapbase_cpu2; + trap_table = &trapbase_cpu2[0]; INSTANTIATE(trap_table) - trap_table = &trapbase_cpu3; + trap_table = &trapbase_cpu3[0]; INSTANTIATE(trap_table) } #endif diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index 15da3c0597a5..a8fb7c0bf053 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h @@ -138,10 +138,10 @@ extern unsigned int t_nmi[]; extern unsigned int linux_trap_ipi15_sun4d[]; extern unsigned int linux_trap_ipi15_sun4m[]; -extern struct tt_entry trapbase; -extern struct tt_entry trapbase_cpu1; -extern struct tt_entry trapbase_cpu2; -extern struct tt_entry trapbase_cpu3; +extern struct tt_entry trapbase[]; +extern struct tt_entry trapbase_cpu1[]; +extern struct tt_entry trapbase_cpu2[]; +extern struct tt_entry trapbase_cpu3[]; extern char cputypval[]; diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c index 58ad3f7de1fb..3b2c673ec627 100644 --- a/arch/sparc/kernel/kgdb_32.c +++ b/arch/sparc/kernel/kgdb_32.c @@ -37,7 +37,7 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) gdb_regs[GDB_Y] = regs->y; gdb_regs[GDB_PSR] = regs->psr; gdb_regs[GDB_WIM] = 0; - gdb_regs[GDB_TBR] = (unsigned long) &trapbase; + gdb_regs[GDB_TBR] = (unsigned long) &trapbase[0]; gdb_regs[GDB_PC] = regs->pc; gdb_regs[GDB_NPC] = regs->npc; gdb_regs[GDB_FSR] = 0; @@ -72,7 +72,7 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) gdb_regs[GDB_PSR] = t->kpsr; gdb_regs[GDB_WIM] = t->kwim; - gdb_regs[GDB_TBR] = (unsigned long) &trapbase; + gdb_regs[GDB_TBR] = (unsigned long) &trapbase[0]; gdb_regs[GDB_PC] = t->kpc; gdb_regs[GDB_NPC] = t->kpc + 4; gdb_regs[GDB_FSR] = 0; diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index 991e9ad3d3e8..1ee393abc463 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c @@ -245,13 +245,13 @@ void __init leon_smp_done(void) /* Free unneeded trap tables */ if (!cpu_present(1)) { - free_reserved_page(virt_to_page(&trapbase_cpu1)); + free_reserved_page(virt_to_page(&trapbase_cpu1[0])); } if (!cpu_present(2)) { - free_reserved_page(virt_to_page(&trapbase_cpu2)); + free_reserved_page(virt_to_page(&trapbase_cpu2[0])); } if (!cpu_present(3)) { - free_reserved_page(virt_to_page(&trapbase_cpu3)); + free_reserved_page(virt_to_page(&trapbase_cpu3[0])); } /* Ok, they are spinning and ready to go. */ smp_processors_ready = 1; diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index e3b72a7b46d3..704375c061e7 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c @@ -67,7 +67,7 @@ static void prom_sync_me(void) __asm__ __volatile__("wr %0, 0x0, %%tbr\n\t" "nop\n\t" "nop\n\t" - "nop\n\t" : : "r" (&trapbase)); + "nop\n\t" : : "r" (&trapbase[0])); prom_printf("PROM SYNC COMMAND...\n"); show_mem(); @@ -285,7 +285,7 @@ void __init setup_arch(char **cmdline_p) int i; unsigned long highest_paddr; - sparc_ttable = &trapbase; + sparc_ttable = &trapbase[0]; /* Initialize PROM console and command line. */ *cmdline_p = prom_getbootargs(); From patchwork Fri Feb 23 19:36:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg via B4 Relay X-Patchwork-Id: 205627 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp804338dyb; Fri, 23 Feb 2024 11:38:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVy6JGcYXHn8Bxmrk/cxnYoSwumk3PSs8F7At01Gh84Rd87ivKzDe8afwMtBJsYtvPusmXYT4Rz2Kefc96EjqJw2k7N0w== X-Google-Smtp-Source: AGHT+IHxdVWJMPZIUp26tRROF1JdM0jdykFQBis030dELXR0rQajXTkvrizTknEetCjxt7x5QKzB X-Received: by 2002:a05:6a20:43a9:b0:1a0:df5b:1217 with SMTP id i41-20020a056a2043a900b001a0df5b1217mr1017114pzl.14.1708717083380; Fri, 23 Feb 2024 11:38:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708717083; cv=pass; d=google.com; s=arc-20160816; b=uYG9WyxpghWNdsA+YQVG5OcjiBAokrtWi2uqDvbqi32bXGOqDKdkNA4t7p8RiPeUPc oD/EZi6IjMdr/d6V+Kvxt6Zt+p6cSIZRaw1KIsDcjyOYtg+g8Z9XSN6NlzxD7yepxVuR tbSTKReZqJEjYl1lPnZA+FAJJFigxPPYmffxKKD8qWiOcXppCdO/O9AWCWonww4qjg24 2GkdbFYYOPM5wIZCtG1f1cDz6jOCtstt4x7vtraGwEWh+nfH/fq02FqQwMoAEjrC6hDj Vfz0Y/8hdzHWTvT58L9yrdITZN9B+y4YCWVOj8+jY5LPgTUxX862dEV4NaU1ocd0OCDv vhWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=bp922fadTCJKRUJgpzSIZd4R2dC5vUscxKrmHoySftQ=; fh=CL4VwMdqDkOjIVq5vfpiK/zgFazi/Qclr+95A1i2dPU=; b=riWLmG+XBFzlmr4P0w2+IbtWc0h/Q+y+XMegHb/vczVcmBYPZUmFNZfrKeY8gL9PF2 DBWWc5BLzvbtvAM3rDkpglctuyJXYRr+2MQ+tc33dA5sA61dc8ciGrq6NDkmR4z3AzAb Tq0zk+aVdMXc75qkOrpjRKcb6uDEP3JScbt0Bca1eTeaLdE5IcM+KiYPpkS+KNGgZHd/ kM945DSXFedr6H2KVSjtNQ10aUMhSeCwDCqtvBoPee7eJknkJtImih4tTTB6nJQ7NB9j lvojPoqvwKNMSgGiNAbEQn5Zr/ciHDWN91PnkfD6kh9wbyHvV4tN7z50H6p4dqKA3s6P ZF8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=npQiehmU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79035-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79035-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s17-20020a63af51000000b005d8e28279bcsi12708457pgo.540.2024.02.23.11.38.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 11:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79035-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=npQiehmU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79035-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79035-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6987FB22FCF for ; Fri, 23 Feb 2024 19:38:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CFDD81474AF; Fri, 23 Feb 2024 19:37:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="npQiehmU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A1B11448DE; Fri, 23 Feb 2024 19:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; cv=none; b=FCgTpzewVQVmUKvmQq+l1hdwREkhS7NB4j8hdXGSDYwhnD2diUPOiN+b6cxqJ6o5LNVtE45Qxlc5JBSvI5SJYMbp0BK/2F44KME9hueNlahJjGOVZM3+be0yq08MotWvIXtsHOPDebHKbRkJGXlh+EHcDCVNiY7KMUgS8M0vR+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; c=relaxed/simple; bh=4p4XMrLHxSZnuFW2zgB0x93UQjVZtW3P2Uq2OHqeIIo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DijL4qqCA5byPGLZb3/LSyqOmpFDaoxjXO8jwiLBt0GATJfyVdx54ZV94iGkNiuguARcWFybRrIAOJ2Bz6fHq8hSrlH9cnGqM3UudcbnXKjeT4TZTk7njgyN9wO5J0iPCyBeS927/0s4NTFBYwqgNhB/tPs6ob6Zfeeoi8Lpe+k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=npQiehmU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id D63A6C43390; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708717024; bh=4p4XMrLHxSZnuFW2zgB0x93UQjVZtW3P2Uq2OHqeIIo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=npQiehmUx4lFzJo/rvn50pr5J1DG99Ea2TK6gLmaufaw90GojzLWN3nMDG13mcXtm oxo7H/731ejRRTc7lKzqyRVR7AmuM6HQFi3ZPPjmrGLfSW4Fl9iumLbp6OktjNVPV9 6T0NSLFDLYu1fYFLdO65wf0fg1D3QdBF/z+nGvpaJrpdJezYcDwMNQuIIE2Zk9sTFV rtZYUfUbn5fKrcDBhbMLGihRFqtEbBOXDQaROufDIcy0hK6+GAUfvt9Xf3FweZ89y3 wdj+nF7ywOu2BFZ/8XS2ym622OaKNxaRFhhlMKssiCHGE2HMV/0pmsCWelBoiZB9+Q nWGzhAz7NMufA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC55BC54E4C; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) From: Sam Ravnborg via B4 Relay Date: Fri, 23 Feb 2024 20:36:49 +0100 Subject: [PATCH 3/6] mtd: maps: sun_uflash: Declare uflash_devinit static Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240223-sam-fix-sparc32-all-builds-v1-3-5c60fd5c9250@ravnborg.org> References: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> In-Reply-To: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> To: Miquel Raynal , "Maciej W. Rozycki" Cc: sparclinux@vger.kernel.org, linux-parport@lists.infradead.org, "David S. Miller" , Andreas Larsson , Randy Dunlap , Arnd Bergmann , linux-kernel@vger.kernel.org, Sam Ravnborg X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708717023; l=826; i=sam@ravnborg.org; s=20230107; h=from:subject:message-id; bh=x2uAqMv58+DpgI3eYVpcudpJwlGuM5xq788IvJ499fo=; =?utf-8?q?b=3DwqNjuoc4O6iR?= =?utf-8?q?10ugVZng/NWir9h8I22iG/JoQ0Dc1v9cOvXdZROnE4FJPufIwv1hmdqp3WaYn6on?= OHCOKIlgABUBMri0Mmqs42qDdIHPTN0exdx5pM/8IpLNnnO/1ZpO X-Developer-Key: i=sam@ravnborg.org; a=ed25519; pk=R0+pqV7BRYOAeOIGkyOrSNke7arx5y3LkEuNi37YEyU= X-Endpoint-Received: by B4 Relay for sam@ravnborg.org/20230107 with auth_id=22 X-Original-From: Sam Ravnborg Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791719724640551848 X-GMAIL-MSGID: 1791719724640551848 From: Sam Ravnborg This fixes the following warning: sun_uflash.c:50:5: error: no previous prototype for 'uflash_devinit' Signed-off-by: Sam Ravnborg Cc: Andreas Larsson Cc: "David S. Miller" Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested --- drivers/mtd/maps/sun_uflash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index f58cfb15d6e8..b69dade3f7ad 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c @@ -47,7 +47,7 @@ struct map_info uflash_map_templ = { .bankwidth = UFLASH_BUSWIDTH, }; -int uflash_devinit(struct platform_device *op, struct device_node *dp) +static int uflash_devinit(struct platform_device *op, struct device_node *dp) { struct uflash_dev *up; From patchwork Fri Feb 23 19:36:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg via B4 Relay X-Patchwork-Id: 205628 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp804339dyb; Fri, 23 Feb 2024 11:38:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXI4LeJiyTUWg8mJFuWZySfHvO/11k2QbgtkNMXvUcxA+EBs7C0q6y72gpYEHwju/wM7y/aovRN7sdEIUx+sXPJqRvvDw== X-Google-Smtp-Source: AGHT+IEAre3eQEicPQN079lv+8Jj6bmFxYHXdSkzsrYObUOot+1r069tU3Y1+xBZIxkSwLUqPZlc X-Received: by 2002:aa7:cd19:0:b0:564:4a18:45f1 with SMTP id b25-20020aa7cd19000000b005644a1845f1mr562335edw.17.1708717083455; Fri, 23 Feb 2024 11:38:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708717083; cv=pass; d=google.com; s=arc-20160816; b=RDU+xk9akRkHTYe/bmk0jGnztj8QaATH4qb6HbhxiJv23VkWlAVaVCqwkFRbswsM9v h8+Ier41UkGjACrRRXYLGXTfq1C53Hvxl/VPxSKNmOUo0uFRqkJUe5KABBhZbjhd27wB U5iWrSbtWrVCMJkfY4gOmLHdYrUkwknSLDw2IPVUScwF3CYkaKaSEnxTUTfFpj3tAD3V Nf3EfjqHDqE4Gjrk1IjE3P4lb2a51b0hczko1Odxwq2PxjEBBoIMPjt48vftTJq/AlZ7 uR9uvDtRxS6pInJGQzHFfO31naDwKxTmEnlYib18lNnwUhmgECpYIQhpuVW2ndDRTBXy z4nw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=NtRuMuOEtQmwEXr1vnXXdDX5A0AqQFqMDxYUrlrG/Vc=; fh=PvQqV4Bf0t6dbZQeAZCKuMQRfTOm5uFBbXvYWXU40O8=; b=oLqfARcRN2JBYhT4QLplHlhDmIMYCyz/XkYgCaY/5T1/q8wUvzTUsvZqa7slsqQjvB /YVGnpuDpYsCiRw4Vn1hfUQinXsKGf+7NLDWKEcYDKWMg0HS7bAu6Qui5b8EbcDxDB5f 8TOQ+gXZH0As4KTSK5Jga8QzNB5CMYpMulexiz8PBfMpeF2qLhbW1QnpFdRQlTqIzL0b 5SOzuKWOyN4wgZ8IRlfy+O2Ue7NZoDY8FfuJc0LzVId2aKyE7xzI4zL8gPE8esdKUsf7 b1ZuvAHTxoyK36sI72AvHaWTKmo+M7wY7o6tg/xoWfYdydIChsKAsh4ycm7KnkF5dOPm hpbA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tZ+SNR75; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79036-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79036-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c10-20020a05640227ca00b0056541227202si1464106ede.91.2024.02.23.11.38.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 11:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79036-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tZ+SNR75; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79036-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79036-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 13DFB1F24A57 for ; Fri, 23 Feb 2024 19:38:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DAF8D1474B1; Fri, 23 Feb 2024 19:37:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tZ+SNR75" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B9F81448E7; Fri, 23 Feb 2024 19:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; cv=none; b=DFA9wM0Isz2rHo8ZWGEY8YTSbAYuX0Cb7qVipmEB6t5917GWgi/nadptyScHlbOt3ufopAJTfcBGO4GqTSYP18PlSwvf+axRZGT2fymialOyWRjwhFT5GRneEEJr4X0Rrq1fPUUZp4bKh9pV23it9F+wSJBsUB5M+Qjt7uPIPKw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; c=relaxed/simple; bh=Taq9zZXEuHop6oOVmeOcYk2VH2LXPBW64JCCgCMPo0U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ejmw4B5IdVBr676gL8ivQDf3Ju1d7hF4+/lcR/9GOIWWwbElyzilBlbM5pZmng2cCNaN3kTgMOThgzoVR225ssbLLUMann1drTAtQBDNT5icqxH/RBNBWKHeOrfaowMj2zClX33G0SyGNitZourfwj7VApR68xGBj2irDybJ4Cw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tZ+SNR75; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id E9BFFC43399; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708717024; bh=Taq9zZXEuHop6oOVmeOcYk2VH2LXPBW64JCCgCMPo0U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=tZ+SNR755LXQJveMS4oSWqODRHhIqYCow5DlvPGxxhSofZ9itYKbIDlnRW6SPE/Sw GIufooeq/g3Txs5HedOXR8GbV/mzfaKeTDbzV7MRWK6l4wOu33dLLDSmHEwWIAvui+ Zlt73W07DxNbwyvnfC92rf3xFjw81csgP1EkV1HWK2qhuZEGSrhH4SJKIeVrXBGVhI nm3L2zL8c1451GKtQTbKP4Gw8H8TOVejUTxz3Ws8aOYKRC5zcSQNuLH99xu9C2MCCB dJfQ7mpIPBxOcDkDpJ3BvpYcPTz+0o2xOaiaaZ0BTxi/gladdb4jK3vc/XsE0XLzCj bzHwn5/edD3AA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6E8BC5478C; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) From: Sam Ravnborg via B4 Relay Date: Fri, 23 Feb 2024 20:36:50 +0100 Subject: [PATCH 4/6] usb: host: uhci-grlib.c: Fix build, add platform_device Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240223-sam-fix-sparc32-all-builds-v1-4-5c60fd5c9250@ravnborg.org> References: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> In-Reply-To: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> To: Miquel Raynal , "Maciej W. Rozycki" Cc: sparclinux@vger.kernel.org, linux-parport@lists.infradead.org, "David S. Miller" , Andreas Larsson , Randy Dunlap , Arnd Bergmann , linux-kernel@vger.kernel.org, Sam Ravnborg , Greg Kroah-Hartman X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708717023; l=843; i=sam@ravnborg.org; s=20230107; h=from:subject:message-id; bh=sqg/lm4wXEPuq1ytjSL9tNUQrRYWPLYkbsaS7YxPZOY=; =?utf-8?q?b=3DYf6oyH4OQPmC?= =?utf-8?q?CmYgJxW7N28fyQCoMKKSNxs0vlLUK+Lg5W2SRp3H7IsbaZO1i623Y9GP7SuTpFfy?= 25H90LSdBlCgPq5t3KXirIB1wjdzTcK3MRLjedm+C9KL9F2qtvOb X-Developer-Key: i=sam@ravnborg.org; a=ed25519; pk=R0+pqV7BRYOAeOIGkyOrSNke7arx5y3LkEuNi37YEyU= X-Endpoint-Received: by B4 Relay for sam@ravnborg.org/20230107 with auth_id=22 X-Original-From: Sam Ravnborg Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791719724483595110 X-GMAIL-MSGID: 1791719724483595110 From: Sam Ravnborg Fix the followig build error: uhci-grlib.c:92:29: error: invalid use of undefined type 'struct platform_device' The fix was straightforward, and no attempt was made to understand why the build failed. Signed-off-by: Sam Ravnborg Cc: Andreas Larsson Cc: Greg Kroah-Hartman --- drivers/usb/host/uhci-grlib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/uhci-grlib.c b/drivers/usb/host/uhci-grlib.c index ac3fc5970315..cfebb833668e 100644 --- a/drivers/usb/host/uhci-grlib.c +++ b/drivers/usb/host/uhci-grlib.c @@ -22,6 +22,7 @@ #include #include #include +#include static int uhci_grlib_init(struct usb_hcd *hcd) { From patchwork Fri Feb 23 19:36:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg via B4 Relay X-Patchwork-Id: 205630 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp804583dyb; Fri, 23 Feb 2024 11:38:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWlvvW3OMQLYVsW3Ali6x072aVG1SDWzgPu9t0/zkfvbjhJr5kwr8V7JHa4gqN7wkj8qJzB+bPY8V7bag7fpVq99bq36A== X-Google-Smtp-Source: AGHT+IGcFM+vOo+X3waITkLzmKqtDMRoctu38C1yjaTwQpmRNuwaiP5HNyPqRNT5Py/9R2u7fMYh X-Received: by 2002:a17:902:d4c1:b0:1db:bd46:a429 with SMTP id o1-20020a170902d4c100b001dbbd46a429mr1051052plg.28.1708717114115; Fri, 23 Feb 2024 11:38:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708717114; cv=pass; d=google.com; s=arc-20160816; b=09pY2QYQWWxx2QDCBs+UIUo7cojcyTWJ2I0qZGKW33ciCGYyLjb94dU1VrlbH7aZwY XkEKi09h1MQl5+hoQbK0vagn2nDoMpqPTLweZWL2hF6h4z7QA8DsNuvJqijpMFAza5hK 1lJtKrvvIjWSDYobHDNN2AGwEg2spZ99K5Wof8L3z6jwKOKkqJPmX/RwDk7wFwwWihs6 cHVOZ8V8FwhP6Ivs6lP2L9X/bK6khZPosetqFo3weCAVabJYdWhJ5LTWg67B8eRYvWMG TK1NTOJHXvC5QdwzyUqiycrslFcQlxOu/R/yJgitjPqKotlOAD2YEBPU63noS6AliftM JK9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=mrbnfILbA5AzAlBcy4zJz/h470Acx+pw71XcbT9LLWg=; fh=CL4VwMdqDkOjIVq5vfpiK/zgFazi/Qclr+95A1i2dPU=; b=wsRGCkDnTdvNPSvdpFdBKjK5f0ODjhUw72K42YrdSBJN5jsgEgLwwWvdTPiMJeYqzU SpmuHNeBxkXmoYIkP2ypRXDfU+2lpHxR40/AlOHz9SwtbBtTCQfgP39uNhpFKbhoW/h8 koM2NDdPynF1tT1KWEkuxNvnlFhgzCF+MT/D27yx5xNAndVHJJdG/yIMw5jdThMUahGM UyWI7nlSPgQJXbo3xd8z2PseqXPcZzyRNmCmKfEOdTMz0qwlR6aUpijzr8K+k4afikDC jrWOJXi9DZQf1bvCsh/d1b5vKYMXKnFF4tsd2V9M2CjhSfozYHzeUnLOKT1NZ5ZWB58Q Bb+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vKHQnLvD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79037-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79037-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 191-20020a6300c8000000b005dc9617013bsi12336022pga.33.2024.02.23.11.38.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 11:38:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79037-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vKHQnLvD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79037-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79037-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A1257B22FBC for ; Fri, 23 Feb 2024 19:38:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B90691493A0; Fri, 23 Feb 2024 19:37:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vKHQnLvD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60A811448E9; Fri, 23 Feb 2024 19:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; cv=none; b=pdlI46xnVr1ZYRkxqOuzam4Wde9MveWEUtRz5YHL7P7IuPZVV+/xZ4rAeDr+3M9PRgoQidOmWMQlpa6IE8dVWftrqFPZzJSNj+SMHk8KAx1cgfrHYxhKPDlQiMP4dn38ckxRckH1seih6saKMDPwuwrIgCF7QwGT+XhxAavN2S4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; c=relaxed/simple; bh=JDG9d1e3LSCtM7kTWA5ChJDE7Zpsj0NIfR9IlwvgsvI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gIs/x2LdMaFOxHinPm1D+VJuMHxkG+wg5HzT7amYbISnNomQsv3ZfPlUIm77hDsJe1t+afptIkv4vL9zaaszk7Wn5lNNC2JN2xux0riTkDCCJgRrqQ35lmXyIQFf3BavNgoGhJbvyjy/Pk+pZ0ISFOuN9LzbpWt6iOEBjoP+AOI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vKHQnLvD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 0EE19C433B1; Fri, 23 Feb 2024 19:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708717025; bh=JDG9d1e3LSCtM7kTWA5ChJDE7Zpsj0NIfR9IlwvgsvI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=vKHQnLvDwhGpG9NDVRHQkrTVS4jB2Bf9SZMHBRV9SDIFqB6+a9SVe4rLT62xGQMYb ViUAunfga39Q+8lzEK8/OSJhyKgqnr/HtPHQ0gob09YPADFSOLaojVHvkh0kw3xfZ1 l1rBkdvvR27e3XKlMrpBVRcFRdq0Scd7tOrOoK5Syvs0jBPy8hEGsH+WAMnhglTl9a vdUrIxY5RiRsMOEoqNprMRybx5J1rsoogTNIultb9eHTnYcbfxf4JHDcQ5N9fE/EDL uHxxEu+3Le7rrnabaJ+E8DfQfbCpnmmYoUIz9hIp8XDinY2DymfU+yn4U9zogQ0u8p ywwzPX3WX4sKQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFBC2C54E49; Fri, 23 Feb 2024 19:37:04 +0000 (UTC) From: Sam Ravnborg via B4 Relay Date: Fri, 23 Feb 2024 20:36:51 +0100 Subject: [PATCH 5/6] sparc32: Do not select GENERIC_ISA_DMA Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240223-sam-fix-sparc32-all-builds-v1-5-5c60fd5c9250@ravnborg.org> References: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> In-Reply-To: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> To: Miquel Raynal , "Maciej W. Rozycki" Cc: sparclinux@vger.kernel.org, linux-parport@lists.infradead.org, "David S. Miller" , Andreas Larsson , Randy Dunlap , Arnd Bergmann , linux-kernel@vger.kernel.org, Sam Ravnborg X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708717023; l=889; i=sam@ravnborg.org; s=20230107; h=from:subject:message-id; bh=lMxXdOPMpDx1tzgAvR97ar00I1WhL1W/uCEBzu9wvkY=; =?utf-8?q?b=3DggGkf5ePuxoN?= =?utf-8?q?77uiKL1N8qedIdOOw6npYIMJDxI/0wfpWe9GpS7/PQuyPyLuCNWZG1R1N2uUkMUu?= 7tJF7mj6AdTslYKT4aZkP2h+GawJFdO/y/vRle52oc2KWM7LBg7E X-Developer-Key: i=sam@ravnborg.org; a=ed25519; pk=R0+pqV7BRYOAeOIGkyOrSNke7arx5y3LkEuNi37YEyU= X-Endpoint-Received: by B4 Relay for sam@ravnborg.org/20230107 with auth_id=22 X-Original-From: Sam Ravnborg Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791719756386280321 X-GMAIL-MSGID: 1791719756386280321 From: Sam Ravnborg sparc32 do not support generic isa dma, so do not select the symbol. Without this fix, the following patch would break the build with a missing prototype. Signed-off-by: Sam Ravnborg Cc: Andreas Larsson Cc: "David S. Miller" Cc: Randy Dunlap Cc: Maciej W. Rozycki Fixes: 66bcd06099bb ("parport_pc: Also enable driver for PCI systems") Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested --- arch/sparc/Kconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 734f23daecca..d08a5662ea60 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -138,10 +138,6 @@ config HIGHMEM default y if SPARC32 select KMAP_LOCAL -config GENERIC_ISA_DMA - bool - default y if SPARC32 - config PGTABLE_LEVELS default 4 if 64BIT default 3 From patchwork Fri Feb 23 19:36:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg via B4 Relay X-Patchwork-Id: 205631 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp804656dyb; Fri, 23 Feb 2024 11:38:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXu43vwbn+csn/jKOH4TJpNfjJsx4K1SUWmQXzj5tkQFaqeltWVVQ5oSfC/lRZkqSbCYOS5TqsuOfdaJFgQvrfiD12yWg== X-Google-Smtp-Source: AGHT+IGKM8Xz6iQecCEXBd2gI+Zym2SfEscg3NNkL6b8ICf2B2iZdqhAdY2QOJCrGVHMBcY7gQ/Q X-Received: by 2002:a0c:e20a:0:b0:68e:facf:fe4 with SMTP id q10-20020a0ce20a000000b0068efacf0fe4mr747991qvl.22.1708717124558; Fri, 23 Feb 2024 11:38:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708717124; cv=pass; d=google.com; s=arc-20160816; b=xTSU7NcmDXKXfQtUuibMzmJ4Jol6uvrgZob8jwvXjI1YdeuBYkHuHgIq+UqH0ofcY+ THXetlr1Qc6ruJOVdbf06BMH54W5BJGwG5IDuphSx3OeNGluYSPwswNtGTw8uQdzZapr mEJSqA+ITzuRQv3PEmMcVTGf1BrwNYxMGlI8spWdXTbG3lAasOh4w0m/wjHt6d/T5/z6 RHKTYGSsTXh2nsnoZ5Jr/cKGNhkcK4sGidj6lxNAmeIzfqFPjzkKgelm0fX4JeeVEvJC Y/ejYVkf91Je+nrPiXcQToptW0SKyNcuIkhD5TSPV1MFxOiNrDNtUfdi5b3SpdHPKt2z GQrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=DOee87lEiMkTpvgjCUR6WsUCosx0BEzvPSJnNBhlHj4=; fh=bG6f6n4RxQGOokanY9p8Ynq9k+zKZDWej0AWVDimNus=; b=WMxF3a7hac8qyPwXK3lZqkChAfrmePjDweXSFe7wBYDp40xuPV0FFJ5K/7njhp66RR tKDPHFa+o+EYx7QQ8nczEZYtbghNXdg+0qCP0eNhw0iAkllllXUfb3IXGG2eIjgXXzm8 ZlmC2ytNUyLvSVXT4/dVJ+AGoZ9sVLm5vaWL7rPL6BLFDh624m3ToWPiL3aMV76k0abR HXch2KfYFHXQ0lucxMTZHfe0i6k82PfLceE8SP+V6PwjcdFpuJSN7WS8Xb537106SXG+ +07LhsR6PPJbpiJoprN3nm/lB53J1UW01/+T24GLyKvsdQy98F5Cgk1alZA3uUOs8n/p nwcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oLkiBjBm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79038-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79038-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iu8-20020ad45cc8000000b0068f0803c9d8si6915697qvb.565.2024.02.23.11.38.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 11:38:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79038-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oLkiBjBm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79038-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79038-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4B20C1C22A33 for ; Fri, 23 Feb 2024 19:38:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC50B1493B7; Fri, 23 Feb 2024 19:37:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oLkiBjBm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F2AD145352; Fri, 23 Feb 2024 19:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; cv=none; b=p3cb+Uqdzr4Ww+S1+6FrtB2dDZ9/pGmjQNr907JK69smsc/wD8/RYEgLziqLV735eLheSRmVO6R/gngCRwCiIOtuLWtJMkR9RUqhXqRyjLQir00LmdTXFNLc9uCLGlR84wUfCjp7BX7VU5fjtupY0QKYIaGaorGeBOFv2f/d37I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717025; c=relaxed/simple; bh=aBXH6eHAeemUY+2GjxoEzpq9SPbIFngM8x9dUDRKN8Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rcmjAH7u3ddlFKFhjAzeh814oz1LyMT09OORoaduWNMLZhtB2e+BF/SdiduZyNAbAFKVZxMxowmDLOSpMCV0EpQ0wtPBUvBOgSdGltCJuzlSWGl9DhWnrqpfLcw5moU+k2NNK+ilvwV2BysU/I35STN7X2BWcdlYdxBThsuRChk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oLkiBjBm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 22D8BC433A6; Fri, 23 Feb 2024 19:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708717025; bh=aBXH6eHAeemUY+2GjxoEzpq9SPbIFngM8x9dUDRKN8Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=oLkiBjBmO51vEqSQnqroAmDKo1os6qINGe+cdVwTGPwi3wVtTQW3Al1Sq7XKLwX1t rAVD2HH6ApCrIFmjFdW6n8Xsv0bqFdBOPXxK1jpSgaMK+lBU/Tl3yEj+uh+kHieTWE KhwTgLhNV3Lg6IVWQhkJnIr3DMp/nZmG+FU16FcxZJs6U9V/x+MmQ9aLgFzhIleLZ5 hurDQxz9qWCZxsHIMoLKcsHUm9AOtDLei/ybBvNJQW3ti/5lltpX3YY9/DZCaYJFNc yF8GcJtVhpzk/MGaczS1PhGLFunI3k3vy+LvQC2nBe7/9KbmOnVNenyZ0LHzjacnob 02eLEe38A66pA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 114D5C54798; Fri, 23 Feb 2024 19:37:05 +0000 (UTC) From: Sam Ravnborg via B4 Relay Date: Fri, 23 Feb 2024 20:36:52 +0100 Subject: [PATCH 6/6] sparc32: Fix parport build with sparc32 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240223-sam-fix-sparc32-all-builds-v1-6-5c60fd5c9250@ravnborg.org> References: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> In-Reply-To: <20240223-sam-fix-sparc32-all-builds-v1-0-5c60fd5c9250@ravnborg.org> To: Miquel Raynal , "Maciej W. Rozycki" Cc: sparclinux@vger.kernel.org, linux-parport@lists.infradead.org, "David S. Miller" , Andreas Larsson , Randy Dunlap , Arnd Bergmann , linux-kernel@vger.kernel.org, Sam Ravnborg , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708717023; l=14433; i=sam@ravnborg.org; s=20230107; h=from:subject:message-id; bh=oZ0rejxcMTa2joV1C1od/thuO4r9k+TAXb9nS1wKQd4=; =?utf-8?q?b=3D7vEYqNiBTKxh?= =?utf-8?q?2kQAwVzrtGTqDdIx14R6uAPlxCNn3ptSt16UpexblzLBwYp9vWes/W2ZT/n178UC?= lE+FsQmSD6Er4hxo7pk14VWl3ewNH4EYEKy/ANliOQ5XtJveWqmw X-Developer-Key: i=sam@ravnborg.org; a=ed25519; pk=R0+pqV7BRYOAeOIGkyOrSNke7arx5y3LkEuNi37YEyU= X-Endpoint-Received: by B4 Relay for sam@ravnborg.org/20230107 with auth_id=22 X-Original-From: Sam Ravnborg Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791719767395053695 X-GMAIL-MSGID: 1791719767395053695 From: Sam Ravnborg include/asm/parport.h is sparc64 specific. Rename it to parport_64.h and use the generic version for sparc32. This fixed all{mod,yes}config build errors like: parport_pc.c:(.text):undefined-reference-to-ebus_dma_enable parport_pc.c:(.text):undefined-reference-to-ebus_dma_irq_enable parport_pc.c:(.text):undefined-reference-to-ebus_dma_register The errors occur as the sparc32 build references sparc64 symbols. Signed-off-by: Sam Ravnborg Cc: "David S. Miller" Cc: Andreas Larsson Cc: Randy Dunlap Cc: Maciej W. Rozycki Closes: https://lore.kernel.org/r/20230406160548.25721-1-rdunlap@infradead.org/ Fixes: 66bcd06099bb ("parport_pc: Also enable driver for PCI systems") Cc: stable@vger.kernel.org # v5.18+ --- arch/sparc/include/asm/parport.h | 259 +----------------------------------- arch/sparc/include/asm/parport_64.h | 256 +++++++++++++++++++++++++++++++++++ 2 files changed, 263 insertions(+), 252 deletions(-) diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index 0a7ffcfd59cd..e2eed8f97665 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h @@ -1,256 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0 */ -/* parport.h: sparc64 specific parport initialization and dma. - * - * Copyright (C) 1999 Eddie C. Dost (ecd@skynet.be) - */ +#ifndef ___ASM_SPARC_PARPORT_H +#define ___ASM_SPARC_PARPORT_H -#ifndef _ASM_SPARC64_PARPORT_H -#define _ASM_SPARC64_PARPORT_H 1 - -#include -#include - -#include -#include -#include - -#define PARPORT_PC_MAX_PORTS PARPORT_MAX - -/* - * While sparc64 doesn't have an ISA DMA API, we provide something that looks - * close enough to make parport_pc happy - */ -#define HAS_DMA - -#ifdef CONFIG_PARPORT_PC_FIFO -static DEFINE_SPINLOCK(dma_spin_lock); - -#define claim_dma_lock() \ -({ unsigned long flags; \ - spin_lock_irqsave(&dma_spin_lock, flags); \ - flags; \ -}) - -#define release_dma_lock(__flags) \ - spin_unlock_irqrestore(&dma_spin_lock, __flags); +#if defined(__sparc__) && defined(__arch64__) +#include +#else +#include +#endif #endif -static struct sparc_ebus_info { - struct ebus_dma_info info; - unsigned int addr; - unsigned int count; - int lock; - - struct parport *port; -} sparc_ebus_dmas[PARPORT_PC_MAX_PORTS]; - -static DECLARE_BITMAP(dma_slot_map, PARPORT_PC_MAX_PORTS); - -static inline int request_dma(unsigned int dmanr, const char *device_id) -{ - if (dmanr >= PARPORT_PC_MAX_PORTS) - return -EINVAL; - if (xchg(&sparc_ebus_dmas[dmanr].lock, 1) != 0) - return -EBUSY; - return 0; -} - -static inline void free_dma(unsigned int dmanr) -{ - if (dmanr >= PARPORT_PC_MAX_PORTS) { - printk(KERN_WARNING "Trying to free DMA%d\n", dmanr); - return; - } - if (xchg(&sparc_ebus_dmas[dmanr].lock, 0) == 0) { - printk(KERN_WARNING "Trying to free free DMA%d\n", dmanr); - return; - } -} - -static inline void enable_dma(unsigned int dmanr) -{ - ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); - - if (ebus_dma_request(&sparc_ebus_dmas[dmanr].info, - sparc_ebus_dmas[dmanr].addr, - sparc_ebus_dmas[dmanr].count)) - BUG(); -} - -static inline void disable_dma(unsigned int dmanr) -{ - ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 0); -} - -static inline void clear_dma_ff(unsigned int dmanr) -{ - /* nothing */ -} - -static inline void set_dma_mode(unsigned int dmanr, char mode) -{ - ebus_dma_prepare(&sparc_ebus_dmas[dmanr].info, (mode != DMA_MODE_WRITE)); -} - -static inline void set_dma_addr(unsigned int dmanr, unsigned int addr) -{ - sparc_ebus_dmas[dmanr].addr = addr; -} - -static inline void set_dma_count(unsigned int dmanr, unsigned int count) -{ - sparc_ebus_dmas[dmanr].count = count; -} - -static inline unsigned int get_dma_residue(unsigned int dmanr) -{ - return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); -} - -static int ecpp_probe(struct platform_device *op) -{ - unsigned long base = op->resource[0].start; - unsigned long config = op->resource[1].start; - unsigned long d_base = op->resource[2].start; - unsigned long d_len; - struct device_node *parent; - struct parport *p; - int slot, err; - - parent = op->dev.of_node->parent; - if (of_node_name_eq(parent, "dma")) { - p = parport_pc_probe_port(base, base + 0x400, - op->archdata.irqs[0], PARPORT_DMA_NOFIFO, - op->dev.parent->parent, 0); - if (!p) - return -ENOMEM; - dev_set_drvdata(&op->dev, p); - return 0; - } - - for (slot = 0; slot < PARPORT_PC_MAX_PORTS; slot++) { - if (!test_and_set_bit(slot, dma_slot_map)) - break; - } - err = -ENODEV; - if (slot >= PARPORT_PC_MAX_PORTS) - goto out_err; - - spin_lock_init(&sparc_ebus_dmas[slot].info.lock); - - d_len = (op->resource[2].end - d_base) + 1UL; - sparc_ebus_dmas[slot].info.regs = - of_ioremap(&op->resource[2], 0, d_len, "ECPP DMA"); - - if (!sparc_ebus_dmas[slot].info.regs) - goto out_clear_map; - - sparc_ebus_dmas[slot].info.flags = 0; - sparc_ebus_dmas[slot].info.callback = NULL; - sparc_ebus_dmas[slot].info.client_cookie = NULL; - sparc_ebus_dmas[slot].info.irq = 0xdeadbeef; - strcpy(sparc_ebus_dmas[slot].info.name, "parport"); - if (ebus_dma_register(&sparc_ebus_dmas[slot].info)) - goto out_unmap_regs; - - ebus_dma_irq_enable(&sparc_ebus_dmas[slot].info, 1); - - /* Configure IRQ to Push Pull, Level Low */ - /* Enable ECP, set bit 2 of the CTR first */ - outb(0x04, base + 0x02); - ns87303_modify(config, PCR, - PCR_EPP_ENABLE | - PCR_IRQ_ODRAIN, - PCR_ECP_ENABLE | - PCR_ECP_CLK_ENA | - PCR_IRQ_POLAR); - - /* CTR bit 5 controls direction of port */ - ns87303_modify(config, PTR, - 0, PTR_LPT_REG_DIR); - - p = parport_pc_probe_port(base, base + 0x400, - op->archdata.irqs[0], - slot, - op->dev.parent, - 0); - err = -ENOMEM; - if (!p) - goto out_disable_irq; - - dev_set_drvdata(&op->dev, p); - - return 0; - -out_disable_irq: - ebus_dma_irq_enable(&sparc_ebus_dmas[slot].info, 0); - ebus_dma_unregister(&sparc_ebus_dmas[slot].info); - -out_unmap_regs: - of_iounmap(&op->resource[2], sparc_ebus_dmas[slot].info.regs, d_len); - -out_clear_map: - clear_bit(slot, dma_slot_map); - -out_err: - return err; -} - -static int ecpp_remove(struct platform_device *op) -{ - struct parport *p = dev_get_drvdata(&op->dev); - int slot = p->dma; - - parport_pc_unregister_port(p); - - if (slot != PARPORT_DMA_NOFIFO) { - unsigned long d_base = op->resource[2].start; - unsigned long d_len; - - d_len = (op->resource[2].end - d_base) + 1UL; - - ebus_dma_irq_enable(&sparc_ebus_dmas[slot].info, 0); - ebus_dma_unregister(&sparc_ebus_dmas[slot].info); - of_iounmap(&op->resource[2], - sparc_ebus_dmas[slot].info.regs, - d_len); - clear_bit(slot, dma_slot_map); - } - - return 0; -} - -static const struct of_device_id ecpp_match[] = { - { - .name = "ecpp", - }, - { - .name = "parallel", - .compatible = "ecpp", - }, - { - .name = "parallel", - .compatible = "ns87317-ecpp", - }, - { - .name = "parallel", - .compatible = "pnpALI,1533,3", - }, - {}, -}; - -static struct platform_driver ecpp_driver = { - .driver = { - .name = "ecpp", - .of_match_table = ecpp_match, - }, - .probe = ecpp_probe, - .remove = ecpp_remove, -}; - -static int parport_pc_find_nonpci_ports(int autoirq, int autodma) -{ - return platform_driver_register(&ecpp_driver); -} - -#endif /* !(_ASM_SPARC64_PARPORT_H */ diff --git a/arch/sparc/include/asm/parport_64.h b/arch/sparc/include/asm/parport_64.h new file mode 100644 index 000000000000..0a7ffcfd59cd --- /dev/null +++ b/arch/sparc/include/asm/parport_64.h @@ -0,0 +1,256 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* parport.h: sparc64 specific parport initialization and dma. + * + * Copyright (C) 1999 Eddie C. Dost (ecd@skynet.be) + */ + +#ifndef _ASM_SPARC64_PARPORT_H +#define _ASM_SPARC64_PARPORT_H 1 + +#include +#include + +#include +#include +#include + +#define PARPORT_PC_MAX_PORTS PARPORT_MAX + +/* + * While sparc64 doesn't have an ISA DMA API, we provide something that looks + * close enough to make parport_pc happy + */ +#define HAS_DMA + +#ifdef CONFIG_PARPORT_PC_FIFO +static DEFINE_SPINLOCK(dma_spin_lock); + +#define claim_dma_lock() \ +({ unsigned long flags; \ + spin_lock_irqsave(&dma_spin_lock, flags); \ + flags; \ +}) + +#define release_dma_lock(__flags) \ + spin_unlock_irqrestore(&dma_spin_lock, __flags); +#endif + +static struct sparc_ebus_info { + struct ebus_dma_info info; + unsigned int addr; + unsigned int count; + int lock; + + struct parport *port; +} sparc_ebus_dmas[PARPORT_PC_MAX_PORTS]; + +static DECLARE_BITMAP(dma_slot_map, PARPORT_PC_MAX_PORTS); + +static inline int request_dma(unsigned int dmanr, const char *device_id) +{ + if (dmanr >= PARPORT_PC_MAX_PORTS) + return -EINVAL; + if (xchg(&sparc_ebus_dmas[dmanr].lock, 1) != 0) + return -EBUSY; + return 0; +} + +static inline void free_dma(unsigned int dmanr) +{ + if (dmanr >= PARPORT_PC_MAX_PORTS) { + printk(KERN_WARNING "Trying to free DMA%d\n", dmanr); + return; + } + if (xchg(&sparc_ebus_dmas[dmanr].lock, 0) == 0) { + printk(KERN_WARNING "Trying to free free DMA%d\n", dmanr); + return; + } +} + +static inline void enable_dma(unsigned int dmanr) +{ + ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); + + if (ebus_dma_request(&sparc_ebus_dmas[dmanr].info, + sparc_ebus_dmas[dmanr].addr, + sparc_ebus_dmas[dmanr].count)) + BUG(); +} + +static inline void disable_dma(unsigned int dmanr) +{ + ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 0); +} + +static inline void clear_dma_ff(unsigned int dmanr) +{ + /* nothing */ +} + +static inline void set_dma_mode(unsigned int dmanr, char mode) +{ + ebus_dma_prepare(&sparc_ebus_dmas[dmanr].info, (mode != DMA_MODE_WRITE)); +} + +static inline void set_dma_addr(unsigned int dmanr, unsigned int addr) +{ + sparc_ebus_dmas[dmanr].addr = addr; +} + +static inline void set_dma_count(unsigned int dmanr, unsigned int count) +{ + sparc_ebus_dmas[dmanr].count = count; +} + +static inline unsigned int get_dma_residue(unsigned int dmanr) +{ + return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); +} + +static int ecpp_probe(struct platform_device *op) +{ + unsigned long base = op->resource[0].start; + unsigned long config = op->resource[1].start; + unsigned long d_base = op->resource[2].start; + unsigned long d_len; + struct device_node *parent; + struct parport *p; + int slot, err; + + parent = op->dev.of_node->parent; + if (of_node_name_eq(parent, "dma")) { + p = parport_pc_probe_port(base, base + 0x400, + op->archdata.irqs[0], PARPORT_DMA_NOFIFO, + op->dev.parent->parent, 0); + if (!p) + return -ENOMEM; + dev_set_drvdata(&op->dev, p); + return 0; + } + + for (slot = 0; slot < PARPORT_PC_MAX_PORTS; slot++) { + if (!test_and_set_bit(slot, dma_slot_map)) + break; + } + err = -ENODEV; + if (slot >= PARPORT_PC_MAX_PORTS) + goto out_err; + + spin_lock_init(&sparc_ebus_dmas[slot].info.lock); + + d_len = (op->resource[2].end - d_base) + 1UL; + sparc_ebus_dmas[slot].info.regs = + of_ioremap(&op->resource[2], 0, d_len, "ECPP DMA"); + + if (!sparc_ebus_dmas[slot].info.regs) + goto out_clear_map; + + sparc_ebus_dmas[slot].info.flags = 0; + sparc_ebus_dmas[slot].info.callback = NULL; + sparc_ebus_dmas[slot].info.client_cookie = NULL; + sparc_ebus_dmas[slot].info.irq = 0xdeadbeef; + strcpy(sparc_ebus_dmas[slot].info.name, "parport"); + if (ebus_dma_register(&sparc_ebus_dmas[slot].info)) + goto out_unmap_regs; + + ebus_dma_irq_enable(&sparc_ebus_dmas[slot].info, 1); + + /* Configure IRQ to Push Pull, Level Low */ + /* Enable ECP, set bit 2 of the CTR first */ + outb(0x04, base + 0x02); + ns87303_modify(config, PCR, + PCR_EPP_ENABLE | + PCR_IRQ_ODRAIN, + PCR_ECP_ENABLE | + PCR_ECP_CLK_ENA | + PCR_IRQ_POLAR); + + /* CTR bit 5 controls direction of port */ + ns87303_modify(config, PTR, + 0, PTR_LPT_REG_DIR); + + p = parport_pc_probe_port(base, base + 0x400, + op->archdata.irqs[0], + slot, + op->dev.parent, + 0); + err = -ENOMEM; + if (!p) + goto out_disable_irq; + + dev_set_drvdata(&op->dev, p); + + return 0; + +out_disable_irq: + ebus_dma_irq_enable(&sparc_ebus_dmas[slot].info, 0); + ebus_dma_unregister(&sparc_ebus_dmas[slot].info); + +out_unmap_regs: + of_iounmap(&op->resource[2], sparc_ebus_dmas[slot].info.regs, d_len); + +out_clear_map: + clear_bit(slot, dma_slot_map); + +out_err: + return err; +} + +static int ecpp_remove(struct platform_device *op) +{ + struct parport *p = dev_get_drvdata(&op->dev); + int slot = p->dma; + + parport_pc_unregister_port(p); + + if (slot != PARPORT_DMA_NOFIFO) { + unsigned long d_base = op->resource[2].start; + unsigned long d_len; + + d_len = (op->resource[2].end - d_base) + 1UL; + + ebus_dma_irq_enable(&sparc_ebus_dmas[slot].info, 0); + ebus_dma_unregister(&sparc_ebus_dmas[slot].info); + of_iounmap(&op->resource[2], + sparc_ebus_dmas[slot].info.regs, + d_len); + clear_bit(slot, dma_slot_map); + } + + return 0; +} + +static const struct of_device_id ecpp_match[] = { + { + .name = "ecpp", + }, + { + .name = "parallel", + .compatible = "ecpp", + }, + { + .name = "parallel", + .compatible = "ns87317-ecpp", + }, + { + .name = "parallel", + .compatible = "pnpALI,1533,3", + }, + {}, +}; + +static struct platform_driver ecpp_driver = { + .driver = { + .name = "ecpp", + .of_match_table = ecpp_match, + }, + .probe = ecpp_probe, + .remove = ecpp_remove, +}; + +static int parport_pc_find_nonpci_ports(int autoirq, int autodma) +{ + return platform_driver_register(&ecpp_driver); +} + +#endif /* !(_ASM_SPARC64_PARPORT_H */