Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp504879rbb; Sat, 24 Feb 2024 09:42:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUKhX1GC4BCwws2XSYS4OIs2gVXU67PVx96Ye8/oTKhqcOlb7uYzdtpLfC/JWHnDUZDRHiSOrC617eaLOWreWeQZhmIWjvZ1jsmFjr8Ww== X-Google-Smtp-Source: AGHT+IE0Bon/KqAWuapvkF15sA71ozBiM5PsQUJC1LtvwBEeEUwqYCbK+wMBH9H8DbCJtBp2VNG6 X-Received: by 2002:a17:902:ec85:b0:1dc:652d:708f with SMTP id x5-20020a170902ec8500b001dc652d708fmr3939666plg.15.1708796569256; Sat, 24 Feb 2024 09:42:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708796569; cv=pass; d=google.com; s=arc-20160816; b=SIc1osERJ4vcYKxVxNXGWeL/TYyMby8H9hErXfTQ+Hc+BqOWE4CTv1A4fTONmi1pha YFPJIWIGstgnRfSNhmB/EZm+kOGp4Cx0tQm0iE5UcwQacvLG6Fc6Mj7jEQgBk/kSC5fW 3aJcnxzH1HuhMpwnKTr65+yj1izTa+ricgpBqAAR3D1H6ac2Rwi8uu8EbqQmgtaQ7PPL lNRLj1ErqBZH8ohHJsaa+6fUt0OswYczuFVnV/KObaTMcwPQ7kO5ph1ocbWtiy/3+EIy um0zwJq9bLH2/RjCjG5ik1ytLGf75cuYDvwyg22up2uus1s0vDfdWR5glDoFM7ethMso 1UnQ== 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=as1vhJnTJ+EuPoSBCrbF/MlzfpRRk/+1GsLtSk5qlmk=; fh=axaiTczyEibQIAZR7tL5HdXpt5eDXppl7AUtI52L8OM=; b=wr7VN7AUOlIau6HJEQrF9Eq1cp6/PiEf46gicDGF5qwyT1UNah4t7uDO2SS783DC7l bmD64Z5BnBcc2pVZsgbqG63TGrNtoSXOTpEm1BFP6npVfQVQecC63comt6CnwjwukFOl Rfu/hIeLFnxVVi052DqnPQl/UkrhYfklPtfuaWPk1YFssNTgs3vHf+oQTiFvZzwOzWPz jOeXIZBtt4ZptR/q3lzB9V4GAu0yOqmYcJYC6ugk5MlS7KK2sm3bNSyWems+E5hlGIQG +c+rOg56/vddkhQnJrWiLxZOEPeu0pcNhDpJBTBSKgN8GsvHKx39O9lm+7WQNkRTU5f8 tSXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vKBq28rD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79764-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s4-20020a170903320400b001dc722a4dc1si1091588plh.9.2024.02.24.09.42.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 09:42:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vKBq28rD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79764-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E916F282853 for ; Sat, 24 Feb 2024 17:42:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5623C4C618; Sat, 24 Feb 2024 17:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vKBq28rD" 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 4138947A7D; Sat, 24 Feb 2024 17:42:27 +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=1708796547; cv=none; b=ECNXw0Xg8jCdFP4PihgyZ+++rr9ILKEoYfBCP7TTSL7i+EjDniheWvLSMtcLT2DIM+vaFTmS7LzA68HuPwR/ch3arub1SxiwcRX1k5fRbmYLy0mHSYP5uoPaMBJ71vaUyC0xjdnx4R6/rAEkAM/hbSTmv8PNQeFe3QAphU2WZzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708796547; c=relaxed/simple; bh=KhibXx79KhV4Nn5Ac7moITyyyPysThl4fpScNz8Pr/M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DrhjAhYgfKOrGLdFmES+fQLvewQOoBLVuWZ0SngqYeTQUhZnAeF6g0PPnq1G0vgl7nESlqJ4ZgmDKX65Mm0IU5FEfsw09mj1arYmXEdogX20/zdojpjsRyw0xgpAL1y4ILUkwOLHqJ4xCos7jf3fEw0gbMbeZ5n8qxzJ0ngYl5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vKBq28rD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id E5B20C433C7; Sat, 24 Feb 2024 17:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708796546; bh=KhibXx79KhV4Nn5Ac7moITyyyPysThl4fpScNz8Pr/M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=vKBq28rDLYBxWS+6wdcz3Ro6DeCqynaZXnZgYW9pifNgbUAldTOOJrElePN7r/583 5FjNG14v+PULmhB4HC4olHOxqM2yPmyBCobKXtVzMncaO6/478HUdvYQERDZePjTWJ Slc9drLkTWSGDothmavQWfJWNB7SUj5nvcFolS6Oow9CO7x86/gauxxCboux+16PIx LNd4uHOIKT0d0iz68VuihNCSTjRuDcAqGQMzzKTio1/r3OI5BtavbGMU7pnXVvy62A NZZeqb2sGXkZ3Phr9D5WCXjpNtKUnrDr0A3RuiDnAw7G4SH0lAxsWxq66MmS00iO7k bdaLavbDEZ5rw== 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 D4CF1C48BF6; Sat, 24 Feb 2024 17:42:26 +0000 (UTC) From: Sam Ravnborg via B4 Relay Date: Sat, 24 Feb 2024 18:42:22 +0100 Subject: [PATCH v2 1/7] 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240224-sam-fix-sparc32-all-builds-v2-1-1f186603c5c4@ravnborg.org> References: <20240224-sam-fix-sparc32-all-builds-v2-0-1f186603c5c4@ravnborg.org> In-Reply-To: <20240224-sam-fix-sparc32-all-builds-v2-0-1f186603c5c4@ravnborg.org> To: "Maciej W. Rozycki" , sparclinux@vger.kernel.org, Andreas Larsson , Randy Dunlap Cc: Miquel Raynal , linux-parport@lists.infradead.org, "David S. Miller" , Arnd Bergmann , linux-kernel@vger.kernel.org, Sam Ravnborg X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708796545; l=3720; i=sam@ravnborg.org; s=20230107; h=from:subject:message-id; bh=J7PFWlRTGPOE40ffjTuq4qFkXa+HB/VYE+coSnVem7c=; =?utf-8?q?b=3DvbgHBac6mbEY?= =?utf-8?q?rKMqmpY/6A/xQZQwbFq2qJIc/DAzPT9BwFc2LOH7g4a6bo2kBYCR6oflCdIeHFdn?= r3Zmm3YPC8JijWXAcCsTfvRh+UV4vm59dTk7YY+6QFT67fdRb6ej 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: 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 Fixes: 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally") Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Reviewed-by: Maciej W. Rozycki Tested-by: Maciej W. Rozycki # build-tested Cc: "David S. Miller" Cc: Andreas Larsson --- 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); -- 2.34.1