xref: /openbmc/linux/arch/mips/include/asm/bugs.h (revision 060f03e9)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2007  Maciej W. Rozycki
4  */
5 #ifndef _ASM_BUGS_H
6 #define _ASM_BUGS_H
7 
8 #include <linux/bug.h>
9 #include <linux/smp.h>
10 
11 #include <asm/cpu.h>
12 #include <asm/cpu-info.h>
13 
14 extern int daddiu_bug;
15 
16 extern void check_bugs64_early(void);
17 
18 extern void check_bugs32(void);
19 extern void check_bugs64(void);
20 
21 static inline int r4k_daddiu_bug(void)
22 {
23 	if (!IS_ENABLED(CONFIG_CPU_R4X00_BUGS64))
24 		return 0;
25 
26 	WARN_ON(daddiu_bug < 0);
27 	return daddiu_bug != 0;
28 }
29 
30 #endif /* _ASM_BUGS_H */
31