public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] powerpc/crc: Include uaccess.h and others
       [not found]   ` <20250416170943.GB189808@quark.localdomain>
@ 2025-04-17  2:26     ` Herbert Xu
  0 siblings, 0 replies; only message in thread
From: Herbert Xu @ 2025-04-17  2:26 UTC (permalink / raw)
  To: Eric Biggers
  Cc: Linux Crypto Mailing List, Stephen Rothwell,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Apr 16, 2025 at 10:09:43AM -0700, Eric Biggers wrote:
> 
> This patch broke the powerpc build:
> 
> ../arch/powerpc/lib/crc32-glue.c: In function 'crc32c_arch':
> ../arch/powerpc/lib/crc32-glue.c:44:17: error: implicit declaration of function 'pagefault_disable'; did you mean 'preempt_disable'? [-Wimplicit-function-declaration]
>    44 |                 pagefault_disable();

Sorry, I should've done a grep for asm/simd.h.

---8<---
The powerpc crc code was relying on pagefault_disable from being
pulled in by random header files.

Fix this by explicitly including uaccess.h.  Also add other missing
header files to prevent similar problems in future.

Reported-by: Eric Biggers <ebiggers@kernel•org>
Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
Fixes: 7ba8df47810f ("asm-generic: Make simd.h more resilient")
Signed-off-by: Herbert Xu <herbert@gondor•apana.org.au>

diff --git a/arch/powerpc/lib/crc-t10dif-glue.c b/arch/powerpc/lib/crc-t10dif-glue.c
index f411b0120cc5..fa988e249f01 100644
--- a/arch/powerpc/lib/crc-t10dif-glue.c
+++ b/arch/powerpc/lib/crc-t10dif-glue.c
@@ -6,15 +6,15 @@
  * [based on crc32c-vpmsum_glue.c]
  */
 
-#include <linux/crc-t10dif.h>
-#include <crypto/internal/simd.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
-#include <linux/cpufeature.h>
-#include <asm/simd.h>
 #include <asm/switch_to.h>
+#include <crypto/internal/simd.h>
+#include <linux/cpufeature.h>
+#include <linux/crc-t10dif.h>
+#include <linux/jump_label.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/preempt.h>
+#include <linux/uaccess.h>
 
 #define VMX_ALIGN		16
 #define VMX_ALIGN_MASK		(VMX_ALIGN-1)
diff --git a/arch/powerpc/lib/crc32-glue.c b/arch/powerpc/lib/crc32-glue.c
index dbd10f339183..28450fe04e86 100644
--- a/arch/powerpc/lib/crc32-glue.c
+++ b/arch/powerpc/lib/crc32-glue.c
@@ -1,12 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#include <linux/crc32.h>
-#include <crypto/internal/simd.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/cpufeature.h>
-#include <asm/simd.h>
 #include <asm/switch_to.h>
+#include <crypto/internal/simd.h>
+#include <linux/cpufeature.h>
+#include <linux/crc32.h>
+#include <linux/jump_label.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/preempt.h>
+#include <linux/uaccess.h>
 
 #define VMX_ALIGN		16
 #define VMX_ALIGN_MASK		(VMX_ALIGN-1)
-- 
Email: Herbert Xu <herbert@gondor•apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-17  2:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1744356724.git.herbert@gondor.apana.org.au>
     [not found] ` <c2a0a6a3467c6ff404e524d564f777fad31c9ebc.1744356724.git.herbert@gondor.apana.org.au>
     [not found]   ` <20250416170943.GB189808@quark.localdomain>
2025-04-17  2:26     ` [PATCH] powerpc/crc: Include uaccess.h and others Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox