[PATCH v1 03/14] x86/boot: use <linux/compiler.h>

From: H. Peter Anvin

Date: Tue Jan 20 2026 - 14:54:55 EST


Include <linux/compiler.h> in arch/x86/boot/boot.h and replace
__attribute__((noreturn)) with __noreturn.

Signed-off-by: H. Peter Anvin (Intel) <hpa@xxxxxxxxx>
---
arch/x86/boot/boot.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index f185931283cb..1f2b7252e387 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -18,6 +18,7 @@

#ifndef __ASSEMBLER__

+#include <linux/compiler.h>
#include <asm/shared/io.h>
#include <linux/stdarg.h>
#include <linux/types.h>
@@ -279,17 +280,16 @@ void console_init(void);
void query_edd(void);

/* header.S */
-void __attribute__((noreturn)) die(void);
+void __noreturn die(void);

/* memory.c */
void detect_memory(void);

/* pm.c */
-void __attribute__((noreturn)) go_to_protected_mode(void);
+void __noreturn go_to_protected_mode(void);

/* pmjump.S */
-void __attribute__((noreturn))
- protected_mode_jump(u32 entrypoint, u32 bootparams);
+void __noreturn protected_mode_jump(u32 entrypoint, u32 bootparams);

/* printf.c */
int sprintf(char *buf, const char *fmt, ...);
--
2.52.0