forked from luck/tmp_suning_uos_patched
MIPS: Convert ICACHE_REFILLS_WORKAROUND_WAR into a config option
Use a new config option to enable I-cache refill workaround and remove define from different war.h files. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
24a1c023f3
commit
886ee1363a
|
@ -568,6 +568,7 @@ config MIPS_MALTA
|
||||||
select SYS_SUPPORTS_VPE_LOADER
|
select SYS_SUPPORTS_VPE_LOADER
|
||||||
select SYS_SUPPORTS_ZBOOT
|
select SYS_SUPPORTS_ZBOOT
|
||||||
select USE_OF
|
select USE_OF
|
||||||
|
select WAR_ICACHE_REFILLS
|
||||||
select ZONE_DMA32 if 64BIT
|
select ZONE_DMA32 if 64BIT
|
||||||
help
|
help
|
||||||
This enables support for the MIPS Technologies Malta evaluation
|
This enables support for the MIPS Technologies Malta evaluation
|
||||||
|
@ -756,6 +757,7 @@ config SGI_IP32
|
||||||
select SYS_HAS_CPU_NEVADA
|
select SYS_HAS_CPU_NEVADA
|
||||||
select SYS_SUPPORTS_64BIT_KERNEL
|
select SYS_SUPPORTS_64BIT_KERNEL
|
||||||
select SYS_SUPPORTS_BIG_ENDIAN
|
select SYS_SUPPORTS_BIG_ENDIAN
|
||||||
|
select WAR_ICACHE_REFILLS
|
||||||
help
|
help
|
||||||
If you want this kernel to run on SGI O2 workstation, say Y here.
|
If you want this kernel to run on SGI O2 workstation, say Y here.
|
||||||
|
|
||||||
|
@ -2666,6 +2668,13 @@ config WAR_R4600_V2_HIT_CACHEOP
|
||||||
config WAR_TX49XX_ICACHE_INDEX_INV
|
config WAR_TX49XX_ICACHE_INDEX_INV
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
# The RM7000 processors and the E9000 cores have a bug (though PMC-Sierra
|
||||||
|
# opposes it being called that) where invalid instructions in the same
|
||||||
|
# I-cache line worth of instructions being fetched may case spurious
|
||||||
|
# exceptions.
|
||||||
|
config WAR_ICACHE_REFILLS
|
||||||
|
bool
|
||||||
|
|
||||||
#
|
#
|
||||||
# - Highmem only makes sense for the 32-bit kernel.
|
# - Highmem only makes sense for the 32-bit kernel.
|
||||||
# - The current highmem code will only work properly on physically indexed
|
# - The current highmem code will only work properly on physically indexed
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 1
|
#define R10000_LLSC_WAR 1
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 1
|
#define R10000_LLSC_WAR 1
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#ifdef CONFIG_CPU_R10000
|
#ifdef CONFIG_CPU_R10000
|
||||||
#define R10000_LLSC_WAR 1
|
#define R10000_LLSC_WAR 1
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 1
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 1
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ extern int sb1250_m3_workaround_needed(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#define BCM1250_M3_WAR 0
|
#define BCM1250_M3_WAR 0
|
||||||
#define SIBYTE_1956_WAR 0
|
#define SIBYTE_1956_WAR 0
|
||||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
|
||||||
#define R10000_LLSC_WAR 0
|
#define R10000_LLSC_WAR 0
|
||||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||||
|
|
||||||
|
|
|
@ -93,16 +93,6 @@
|
||||||
#error Check setting of SIBYTE_1956_WAR for your platform
|
#error Check setting of SIBYTE_1956_WAR for your platform
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* The RM7000 processors and the E9000 cores have a bug (though PMC-Sierra
|
|
||||||
* opposes it being called that) where invalid instructions in the same
|
|
||||||
* I-cache line worth of instructions being fetched may case spurious
|
|
||||||
* exceptions.
|
|
||||||
*/
|
|
||||||
#ifndef ICACHE_REFILLS_WORKAROUND_WAR
|
|
||||||
#error Check setting of ICACHE_REFILLS_WORKAROUND_WAR for your platform
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On the R10000 up to version 2.6 (not sure about 2.7) there is a bug that
|
* On the R10000 up to version 2.6 (not sure about 2.7) there is a bug that
|
||||||
* may cause ll / sc and lld / scd sequences to execute non-atomically.
|
* may cause ll / sc and lld / scd sequences to execute non-atomically.
|
||||||
|
|
|
@ -545,6 +545,12 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
|
||||||
return err ?: protected_restore_fp_context(sc);
|
return err ?: protected_restore_fp_context(sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_WAR_ICACHE_REFILLS
|
||||||
|
#define SIGMASK ~(cpu_icache_line_size()-1)
|
||||||
|
#else
|
||||||
|
#define SIGMASK ALMASK
|
||||||
|
#endif
|
||||||
|
|
||||||
void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
|
void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
|
||||||
size_t frame_size)
|
size_t frame_size)
|
||||||
{
|
{
|
||||||
|
@ -565,7 +571,7 @@ void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
|
||||||
|
|
||||||
sp = sigsp(sp, ksig);
|
sp = sigsp(sp, ksig);
|
||||||
|
|
||||||
return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? ~(cpu_icache_line_size()-1) : ALMASK));
|
return (void __user *)((sp - frame_size) & SIGMASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user