Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11206
b: refs/heads/master
c: 330cfe0
h: refs/heads/master
v: v3
  • Loading branch information
Thiemo Seufer authored and Ralf Baechle committed Oct 29, 2005
1 parent 8832554 commit 1a609cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65dd7026a906f7a70ef326f18540c0b648a0ffed
refs/heads/master: 330cfe016bec3cdf517a626083bcb0d7b1854744
4 changes: 2 additions & 2 deletions trunk/arch/mips/mm/c-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ static struct bcache_ops no_sc_ops = {

struct bcache_ops *bcops = &no_sc_ops;

#define cpu_is_r4600_v1_x() ((read_c0_prid() & 0xfffffff0) == 0x2010)
#define cpu_is_r4600_v2_x() ((read_c0_prid() & 0xfffffff0) == 0x2020)
#define cpu_is_r4600_v1_x() ((read_c0_prid() & 0xfffffff0) == 0x00002010)
#define cpu_is_r4600_v2_x() ((read_c0_prid() & 0xfffffff0) == 0x00002020)

#define R4600_HIT_CACHEOP_WAR_IMPL \
do { \
Expand Down
13 changes: 8 additions & 5 deletions trunk/arch/mips/mm/pg-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
#include <asm/cpu.h>
#include <asm/war.h>

#define half_scache_line_size() (cpu_scache_line_size() >> 1)
#define half_scache_line_size() (cpu_scache_line_size() >> 1)
#define cpu_is_r4600_v1_x() ((read_c0_prid() & 0xfffffff0) == 0x00002010)
#define cpu_is_r4600_v2_x() ((read_c0_prid() & 0xfffffff0) == 0x00002020)


/*
* Maximum sizes:
Expand Down Expand Up @@ -198,14 +201,14 @@ static inline void build_cdex_p(void)
if (store_offset & (cpu_dcache_line_size() - 1))
return;

if (R4600_V1_HIT_CACHEOP_WAR && ((read_c0_prid() & 0xfff0) == 0x2010)) {
if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) {
build_nop();
build_nop();
build_nop();
build_nop();
}

if (R4600_V2_HIT_CACHEOP_WAR && ((read_c0_prid() & 0xfff0) == 0x2020))
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
build_insn_word(0x8c200000); /* lw $zero, ($at) */

mi.c_format.opcode = cache_op;
Expand Down Expand Up @@ -361,7 +364,7 @@ void __init build_clear_page(void)

build_addiu_a2_a0(PAGE_SIZE - (cpu_has_prefetch ? pref_offset_clear : 0));

if (R4600_V2_HIT_CACHEOP_WAR && ((read_c0_prid() & 0xfff0) == 0x2020))
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
build_insn_word(0x3c01a000); /* lui $at, 0xa000 */

dest = label();
Expand Down Expand Up @@ -417,7 +420,7 @@ void __init build_copy_page(void)

build_addiu_a2_a0(PAGE_SIZE - (cpu_has_prefetch ? pref_offset_copy : 0));

if (R4600_V2_HIT_CACHEOP_WAR && ((read_c0_prid() & 0xfff0) == 0x2020))
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
build_insn_word(0x3c01a000); /* lui $at, 0xa000 */

dest = label();
Expand Down

0 comments on commit 1a609cd

Please sign in to comment.