Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2394116lqp; Sun, 24 Mar 2024 17:32:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmmVM4ZMIsEGaJ2+yvSMtPySlOlm+XzAuydJ7iDWg32s6WailWy1mEIoxr06zTWiXmsMY1wbyEasKoY8cY2O6zl4y/GNcBvl887moVcw== X-Google-Smtp-Source: AGHT+IFH+Vwi22yrv9hm5Ms/AAZQAwk9t3yhqI9jJ7VUSe8+xFUoZY56L5EYLEQWmJdjqj+NGFxl X-Received: by 2002:a05:622a:1aa3:b0:431:3b42:3211 with SMTP id s35-20020a05622a1aa300b004313b423211mr7262692qtc.33.1711326751322; Sun, 24 Mar 2024 17:32:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711326751; cv=pass; d=google.com; s=arc-20160816; b=k6zVjzwmylTjaQiLzXg3Lj5Js1BXI3tHvWcoQLd4p5DZ2ULvgVFpECutzEYOY21Q57 y0HsCCEsDiq+63/kpiFQ6Y1Pu3PFXKv8fdhlvWVNAJeTYDNboikSkhdMsPKZlljUzobW pvuuNt+lcvO2QnoqAfLWuX4Y8aVqI5Lx10fXwKWZX81jpoAtEfqbDbNrQTkxIbowIZ6F fiC23uiDhNyW/mMFje7hSAu21iP+EeUDqTX59LWf9KbVLaXGYTDa6j9/vnKMrOrwENlM 8B2cEh/TL2JqU++X0XZCrNGKm9DPeF3xQj7H6vZARSGxMZ276O4O4RPCtchDkYOC6MMj Irhg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cGHzWYo6IuZKE5gCG3bdYIx86eomIjHy2zuWye0w5YU=; fh=HBtmBv3eDgIMGIFfAISuXWXQZI8OZZlMeXqentb7eg4=; b=GQBaEvXw7vL3nBfXWLNZ2CXk3axNiX/gwXbCpCIjvSyAH+C2cucHHLT8LxNycTxv68 WZglIoHoMNyNUXea9Nl7P2P3CV4SF9p88EdboBYsDbATII8vQtZu5f1gKAKlIiq1ShKG KUnn/MwdZ2yBLilFz2/eGTZsqpqrgDAz1k/IwsdHYU+tKJrNAPM9ekqTg9jxPPnkmvGr X+45VtdecfzMqPV3ZxFfh69S6ljSqJTJ64ESJ4SsqGtM0ayW2reMOGChCsfBeZg914qe iI3puiZu1Y1t8BxOzbwUYoxatH4NKmm3CxOQPQeFgcZ6JBNUrftbn9vrDGhaBVnS74cj +o7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cuUWBBFQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bq23-20020a05622a1c1700b00430d4cc9433si4392794qtb.577.2024.03.24.17.32.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:32:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113421-linux.lists.archive=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=cuUWBBFQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113421-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 035E21C23974 for ; Mon, 25 Mar 2024 00:32:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0BF621A8A4C; Sun, 24 Mar 2024 22:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cuUWBBFQ" 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 224511A83F7; Sun, 24 Mar 2024 22:43:43 +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=1711320223; cv=none; b=RT1CedZI6QtRn3EgubLsEW25be9i5VmhWY0Pnx+/6Apw2z/tV+L3j6VchhqdrIJcShRlnc6baSa86xPAjfMi4VeSZm6Elxw50Ixs+p4P0hobyO5U7ZW1Nnpi/rOpmeVlj891e2QPGrxOWN5jKoW4cwld7bjL8ImjMW9+m0w1Oas= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320223; c=relaxed/simple; bh=ChoPWhP9raUpj1qBrL5DD6Y3fNZl2x8Bp0/imvtvhAA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kVioQiGIl3DRW9d04mIlcH00D5q0HtfMHegEUNAOFNDYNFR3LDbygPJKazVDxehI7zpWgaKgnRTHqZEugutOMM7NxCLpxYumoHa2WngPNNFOvjUDvzn+6moJrzXacvG6we494nXiXwaTHYVXib1CshktJ5o+nV/1MXiJdRoQG/A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cuUWBBFQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 107CEC433B2; Sun, 24 Mar 2024 22:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320223; bh=ChoPWhP9raUpj1qBrL5DD6Y3fNZl2x8Bp0/imvtvhAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cuUWBBFQJ1HeTqM/uCpHHuRAfRCVx7MTMkfxL14GImXqc4Oy9xoePTv9aC34jpTp9 o+ZV/zy+hXOHtlROZz2onT+b8wYFXi7x2FqD+NNMNkK3X/uGCn1NhSduNc7xrDoSl8 cvghs39ZWXqUHX05+WvfZgGTJ01X6fEVoUn5Zz3uCXxupoE0Hwxc7NGL6bi5DntfF2 gJzwdZxCorNMc0FrdR8viwKmC+1F3qe5xDkW0y5Au0X9dhAFuFOOXhVRAIKioAJc1k im3atw9L3Hj4CruuivhX2eBIGe8n3fEocM52M5xOE47Vu33Tii9y2ggF29MlCGDiUc IzHJwKUArXKsg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sam Ravnborg , Randy Dunlap , "Maciej W . Rozycki" , "David S. Miller" , Andreas Larsson , Sasha Levin Subject: [PATCH 6.8 530/715] sparc32: Use generic cmpdi2/ucmpdi2 variants Date: Sun, 24 Mar 2024 18:31:49 -0400 Message-ID: <20240324223455.1342824-531-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Sam Ravnborg [ Upstream commit 802a8874a3889a4a0d218d4f73e5855c96d5b8a8 ] 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 Reviewed-by: Andreas Larsson Tested-by: Andreas Larsson Signed-off-by: Andreas Larsson Link: https://lore.kernel.org/r/20240224-sam-fix-sparc32-all-builds-v2-1-1f186603c5c4@ravnborg.org Signed-off-by: Sasha Levin --- 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(-) delete mode 100644 arch/sparc/lib/cmpdi2.c delete mode 100644 arch/sparc/lib/ucmpdi2.c diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 204c43cb3d435..0c5a98ef11440 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 59669ebddd4e1..ee5091dd67ed7 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 333367fe73533..0000000000000 --- 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 82c1cccb12644..0000000000000 --- 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.43.0