From: Sam Ravnborg via B4 Relay <devnull+sam.ravnborg.org@kernel.org> To: "Maciej W. Rozycki" <macro@orcam.me.uk>, sparclinux@vger.kernel.org, Andreas Larsson <andreas@gaisler.com>, Randy Dunlap <rdunlap@infradead.org> Cc: Miquel Raynal <miquel.raynal@bootlin.com>, linux-parport@lists.infradead.org, "David S. Miller" <davem@davemloft.net>, Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org> Subject: [PATCH v2 1/7] sparc32: Use generic cmpdi2/ucmpdi2 variants Date: Sat, 24 Feb 2024 18:42:22 +0100 [thread overview] Message-ID: <20240224-sam-fix-sparc32-all-builds-v2-1-1f186603c5c4@ravnborg.org> (raw) In-Reply-To: <20240224-sam-fix-sparc32-all-builds-v2-0-1f186603c5c4@ravnborg.org> From: Sam Ravnborg <sam@ravnborg.org> 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 <sam@ravnborg.org> Fixes: 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally") Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk> Tested-by: Maciej W. Rozycki <macro@orcam.me.uk> # build-tested Cc: "David S. Miller" <davem@davemloft.net> Cc: Andreas Larsson <andreas@gaisler.com> --- 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 <linux/module.h> - -#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 <linux/module.h> -#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
WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org> To: "Maciej W. Rozycki" <macro@orcam.me.uk>, sparclinux@vger.kernel.org, Andreas Larsson <andreas@gaisler.com>, Randy Dunlap <rdunlap@infradead.org> Cc: Miquel Raynal <miquel.raynal@bootlin.com>, linux-parport@lists.infradead.org, "David S. Miller" <davem@davemloft.net>, Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org> Subject: [PATCH v2 1/7] sparc32: Use generic cmpdi2/ucmpdi2 variants Date: Sat, 24 Feb 2024 18:42:22 +0100 [thread overview] Message-ID: <20240224-sam-fix-sparc32-all-builds-v2-1-1f186603c5c4@ravnborg.org> (raw) In-Reply-To: <20240224-sam-fix-sparc32-all-builds-v2-0-1f186603c5c4@ravnborg.org> 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 <sam@ravnborg.org> Fixes: 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally") Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk> Tested-by: Maciej W. Rozycki <macro@orcam.me.uk> # build-tested Cc: "David S. Miller" <davem@davemloft.net> Cc: Andreas Larsson <andreas@gaisler.com> --- 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 <linux/module.h> - -#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 <linux/module.h> -#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
next prev parent reply other threads:[~2024-02-24 17:42 UTC|newest] Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-24 17:42 [PATCH v2 0/7] sparc32: build fixes for all{yes,mod}config builds Sam Ravnborg via B4 Relay 2024-02-24 17:42 ` Sam Ravnborg 2024-02-24 17:42 ` Sam Ravnborg via B4 Relay [this message] 2024-02-24 17:42 ` [PATCH v2 1/7] sparc32: Use generic cmpdi2/ucmpdi2 variants Sam Ravnborg 2024-03-08 20:00 ` Andreas Larsson 2024-02-24 17:42 ` [PATCH v2 2/7] sparc32: Fix build with trapbase Sam Ravnborg via B4 Relay 2024-02-24 17:42 ` Sam Ravnborg 2024-03-08 20:01 ` Andreas Larsson 2024-02-24 17:42 ` [PATCH v2 3/7] mtd: maps: sun_uflash: Declare uflash_devinit static Sam Ravnborg via B4 Relay 2024-02-24 17:42 ` Sam Ravnborg 2024-02-26 10:23 ` Miquel Raynal 2024-03-08 20:02 ` Andreas Larsson 2024-02-24 17:42 ` [PATCH v2 4/7] sparc32: Do not select ZONE_DMA Sam Ravnborg via B4 Relay 2024-02-24 17:42 ` Sam Ravnborg 2024-02-25 0:57 ` Maciej W. Rozycki 2024-02-25 7:08 ` Sam Ravnborg 2024-03-02 23:51 ` Randy Dunlap 2024-03-05 15:06 ` Andreas Larsson 2024-03-05 15:26 ` Arnd Bergmann 2024-03-06 14:19 ` Andreas Larsson 2024-03-06 14:45 ` Arnd Bergmann 2024-03-06 15:31 ` Andreas Larsson 2024-03-06 16:22 ` Arnd Bergmann 2024-03-06 18:19 ` Arnd Bergmann 2024-03-07 12:42 ` Andreas Larsson 2024-03-07 13:06 ` Arnd Bergmann 2024-03-06 15:04 ` Christoph Hellwig 2024-03-06 15:24 ` Arnd Bergmann 2024-02-24 17:42 ` [PATCH v2 5/7] sparc32: Do not select GENERIC_ISA_DMA Sam Ravnborg via B4 Relay 2024-02-24 17:42 ` Sam Ravnborg 2024-03-08 20:03 ` Andreas Larsson 2024-03-09 9:04 ` Maciej W. Rozycki 2024-02-24 17:42 ` [PATCH v2 6/7] sparc32: Fix parport build with sparc32 Sam Ravnborg via B4 Relay 2024-02-24 17:42 ` Sam Ravnborg 2024-03-02 23:52 ` Randy Dunlap 2024-03-08 20:04 ` Andreas Larsson 2024-03-09 9:06 ` Maciej W. Rozycki 2024-02-24 17:42 ` [PATCH v2 7/7] sparc32: Fix section mismatch in leon_pci_grpci Sam Ravnborg via B4 Relay 2024-02-24 17:42 ` Sam Ravnborg 2024-03-02 23:54 ` Randy Dunlap 2024-03-05 15:06 ` Andreas Larsson 2024-03-07 18:20 ` Andreas Larsson 2024-03-07 20:16 ` Maciej W. Rozycki 2024-03-08 7:06 ` Andreas Larsson 2024-03-08 12:09 ` Maciej W. Rozycki 2024-03-08 22:08 ` Sam Ravnborg 2024-03-08 20:07 ` Andreas Larsson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240224-sam-fix-sparc32-all-builds-v2-1-1f186603c5c4@ravnborg.org \ --to=devnull+sam.ravnborg.org@kernel.org \ --cc=andreas@gaisler.com \ --cc=arnd@arndb.de \ --cc=davem@davemloft.net \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-parport@lists.infradead.org \ --cc=macro@orcam.me.uk \ --cc=miquel.raynal@bootlin.com \ --cc=rdunlap@infradead.org \ --cc=sam@ravnborg.org \ --cc=sparclinux@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.