bugs.h 882 字节
Newer Older
L
Linus Torvalds 已提交
1 2 3
/*
 * This is included by init/main.c to check for architecture-dependent bugs.
 *
4 5
 * Copyright (C) 2007  Maciej W. Rozycki
 *
L
Linus Torvalds 已提交
6 7 8 9 10 11
 * Needs:
 *	void check_bugs(void);
 */
#ifndef _ASM_BUGS_H
#define _ASM_BUGS_H

12
#include <linux/bug.h>
13
#include <linux/delay.h>
14

15 16
#include <asm/cpu.h>
#include <asm/cpu-info.h>
L
Linus Torvalds 已提交
17

18 19 20 21
extern int daddiu_bug;

extern void check_bugs64_early(void);

L
Linus Torvalds 已提交
22 23 24
extern void check_bugs32(void);
extern void check_bugs64(void);

25 26 27 28 29 30 31
static inline void check_bugs_early(void)
{
#ifdef CONFIG_64BIT
	check_bugs64_early();
#endif
}

L
Linus Torvalds 已提交
32 33
static inline void check_bugs(void)
{
34 35 36
	unsigned int cpu = smp_processor_id();

	cpu_data[cpu].udelay_val = loops_per_jiffy;
L
Linus Torvalds 已提交
37
	check_bugs32();
38
#ifdef CONFIG_64BIT
L
Linus Torvalds 已提交
39 40 41 42
	check_bugs64();
#endif
}

43 44 45 46 47 48 49 50 51 52
static inline int r4k_daddiu_bug(void)
{
#ifdef CONFIG_64BIT
	WARN_ON(daddiu_bug < 0);
	return daddiu_bug != 0;
#else
	return 0;
#endif
}

L
Linus Torvalds 已提交
53
#endif /* _ASM_BUGS_H */
反馈
建议
客服 返回
顶部