summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@kernel.org>2024-01-28 09:53:55 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-02-13 21:18:49 -0500
commit695faeb592497313689556cd6b2cc830a0f3b9a0 (patch)
tree5421dbd711fdc83c8b458a703ca7c182514b002b
parent66a299649c4b1dd26ef9dc69fce24fb6b12215b5 (diff)
bcachefs: Fix build on parisc by avoiding __multi3()
The gcc compiler on paric does support the __int128 type, although the architecture does not have native 128-bit support. The effect is, that the bcachefs u128_square() function will pull in the libgcc __multi3() helper, which breaks the kernel build when bcachefs is built as module since this function isn't currently exported in arch/parisc/kernel/parisc_ksyms.c. The build failure can be seen in the latest debian kernel build at: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=hppa&ver=6.7.1-1%7Eexp1&stamp=1706132569&raw=0 We prefer to not export that symbol, so fall back to the optional 64-bit implementation provided by bcachefs and thus avoid usage of __multi3(). Signed-off-by: Helge Deller <deller@gmx.de> Cc: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> (cherry picked from commit eba38cc7578bef94865341c73608bdf49193a51d)
-rw-r--r--fs/bcachefs/mean_and_variance.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/mean_and_variance.h b/fs/bcachefs/mean_and_variance.h
index 647505010b39..056e797383fb 100644
--- a/fs/bcachefs/mean_and_variance.h
+++ b/fs/bcachefs/mean_and_variance.h
@@ -14,7 +14,7 @@
* type
*/
-#ifdef __SIZEOF_INT128__
+#if defined(__SIZEOF_INT128__) && defined(__KERNEL__) && !defined(CONFIG_PARISC)
typedef struct {
unsigned __int128 v;