Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This is included by init/main.c to check for architecture-dependent bugs. |
| 3 | * |
| 4 | * Needs: |
| 5 | * void check_bugs(void); |
| 6 | */ |
| 7 | #ifndef _ASM_BUGS_H |
| 8 | #define _ASM_BUGS_H |
| 9 | |
| 10 | #include <linux/config.h> |
Ralf Baechle | 3855157 | 2005-04-13 17:36:49 +0000 | [diff] [blame] | 11 | #include <linux/delay.h> |
Ralf Baechle | f03da6e | 2005-04-13 13:37:32 +0000 | [diff] [blame] | 12 | #include <asm/cpu.h> |
| 13 | #include <asm/cpu-info.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
| 15 | extern void check_bugs32(void); |
| 16 | extern void check_bugs64(void); |
| 17 | |
| 18 | static inline void check_bugs(void) |
| 19 | { |
Ralf Baechle | f03da6e | 2005-04-13 13:37:32 +0000 | [diff] [blame] | 20 | unsigned int cpu = smp_processor_id(); |
| 21 | |
| 22 | cpu_data[cpu].udelay_val = loops_per_jiffy; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | check_bugs32(); |
Ralf Baechle | 875d43e | 2005-09-03 15:56:16 -0700 | [diff] [blame] | 24 | #ifdef CONFIG_64BIT |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | check_bugs64(); |
| 26 | #endif |
| 27 | } |
| 28 | |
| 29 | #endif /* _ASM_BUGS_H */ |