kernels/linux-2.4.0/arch/mips/kernel/setup.c
/*
 * Probe whether cpu has config register by trying to play with
 * alternate cache bit and see whether it matters.
 * It's used by cpu_probe to distinguish between R3000A and R3081.
 */
Probe whether cpu has config register by trying to play with
alternate cache bit and see whether it matters.
It's used by cpu_probe to distinguish between R3000A and R3081.
Probe whether cpu has config register by trying to play with alternate cache bit and see whether it matters . It ' s used by cpu_probe to distinguish between R3000A and R3081 .
static inline int cpu_has_confreg(void)
{
#ifdef CONFIG_CPU_R3000
	extern unsigned long r3k_cache_size(unsigned long);
	unsigned long size1, size2; 
	unsigned long cfg = read_32bit_cp0_register(CP0_CONF);
	size1 = r3k_cache_size(ST0_DE);
	write_32bit_cp0_register(CP0_CONF, cfg^CONF_AC);
	size2 = r3k_cache_size(ST0_DE);
	write_32bit_cp0_register(CP0_CONF, cfg);
	return size1 != size2;
#else
	return 0;
#endif
}
static inline int cpu_has_confreg ( void ) { #ifdef CONFIG_CPU_R3000 extern unsigned long r3k_cache_size ( unsigned long ) ; unsigned long size1 , size2 ; unsigned long cfg = read_32bit_cp0_register ( CP0_CONF ) ; size1 = r3k_cache_size ( ST0_DE ) ; write_32bit_cp0_register ( CP0_CONF , cfg ^ CONF_AC ) ; size2 = r3k_cache_size ( ST0_DE ) ; write_32bit_cp0_register ( CP0_CONF , cfg ) ; return size1 != size2 ; #else return 0 ; #endif }
Probe whether cpu has config register by trying to play with
 alternate cache bit and see whether it matters.
Probe whether cpu has config register by trying to play with alternate cache bit and see whether it matters .