blob: cb2ea7c15c7ac66ce79a4b7a94c0bb96f4765f51 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Baechle38551572005-04-13 17:36:49 +000011#include <linux/delay.h>
Ralf Baechlef03da6e2005-04-13 13:37:32 +000012#include <asm/cpu.h>
13#include <asm/cpu-info.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
15extern void check_bugs32(void);
16extern void check_bugs64(void);
17
18static inline void check_bugs(void)
19{
Ralf Baechlef03da6e2005-04-13 13:37:32 +000020 unsigned int cpu = smp_processor_id();
21
22 cpu_data[cpu].udelay_val = loops_per_jiffy;
Linus Torvalds1da177e2005-04-16 15:20:36 -070023 check_bugs32();
Ralf Baechle875d43e2005-09-03 15:56:16 -070024#ifdef CONFIG_64BIT
Linus Torvalds1da177e2005-04-16 15:20:36 -070025 check_bugs64();
26#endif
27}
28
29#endif /* _ASM_BUGS_H */