Message ID | cover.1744356724.git.herbert@gondor.apana.org.au |
---|---|
Headers | show |
Series | Make crypto/internal/simd.h resilient | expand |
On Fri, Apr 11, 2025 at 03:38:43PM +0800, Herbert Xu wrote: > Add missing header inclusions and protect against double inclusion. > > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> > --- > include/asm-generic/simd.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/include/asm-generic/simd.h b/include/asm-generic/simd.h > index d0343d58a74a..ac29a22eb7cf 100644 > --- a/include/asm-generic/simd.h > +++ b/include/asm-generic/simd.h > @@ -1,6 +1,10 @@ > /* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_GENERIC_SIMD_H > +#define _ASM_GENERIC_SIMD_H > > -#include <linux/hardirq.h> > +#include <linux/compiler_attributes.h> > +#include <linux/preempt.h> > +#include <linux/types.h> > > /* > * may_use_simd - whether it is allowable at this time to issue SIMD > @@ -13,3 +17,5 @@ static __must_check inline bool may_use_simd(void) > { > return !in_interrupt(); > } > + > +#endif /* _ASM_GENERIC_SIMD_H */ 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(); | ^~~~~~~~~~~~~~~~~ | preempt_disable ../arch/powerpc/lib/crc-t10dif-glue.c: In function 'crc_t10dif_arch': ../arch/powerpc/lib/crc-t10dif-glue.c:48:17: error: implicit declaration of function 'pagefault_disable'; did you mean 'preempt_disable'? [-Wimplicit-function-declaration] 48 | pagefault_disable(); | ^~~~~~~~~~~~~~~~~ | preempt_disable ../arch/powerpc/lib/crc32-glue.c:48:17: error: implicit declaration of function 'pagefault_enable'; did you mean 'preempt_enable'? [-Wimplicit-function-declaration] 48 | pagefault_enable(); | ^~~~~~~~~~~~~~~~ | preempt_enable ../arch/powerpc/lib/crc-t10dif-glue.c:52:17: error: implicit declaration of function 'pagefault_enable'; did you mean 'preempt_enable'? [-Wimplicit-function-declaration] 52 | pagefault_enable(); | ^~~~~~~~~~~~~~~~ | preempt_enable