Skip to contentSkip to conversation

MIPS: 74K/1074K: Fix typo in erratum workaround.

PATCH In review Tony Wu 2 participants 2 messages Jan 6, 2015 MIPS

lore
Share & tools
lore

Tony Wu

author
#0 lore raw

PATCH 1/1 MIPS: 74K/1074K: Fix typo in erratum workaround.

In commit 9213ad (MIPS: 74K/1074K: Correct erratum workaround.), MIPS_CACHE_VTAG should go to icache.flags.

Cc Maciej W. Rozycki <[email protected]>
Cc Steven J. Hill <[email protected]>
Cc Leonid Yegoshin <[email protected]>
arch/mips/mm/c-r4k.c +2 -2
index dd261df..deebd0b 100644
@@ -902,13 +902,13 @@ static inline void alias_74k_erratum(struct cpuinfo_mips *c)
 	switch (imp) {
 	case PRID_IMP_74K:
 		if (rev <= PRID_REV_ENCODE_332(2, 4, 0))
-			c->dcache.flags |= MIPS_CACHE_VTAG;
+			c->icache.flags |= MIPS_CACHE_VTAG;
 		if (rev == PRID_REV_ENCODE_332(2, 4, 0))
 			write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND);
 		break;
 	case PRID_IMP_1074K:
 		if (rev <= PRID_REV_ENCODE_332(1, 1, 0)) {
-			c->dcache.flags |= MIPS_CACHE_VTAG;
+			c->icache.flags |= MIPS_CACHE_VTAG;
 			write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND);
 		}
 		break;
#1 lore raw
Quoted 18 lines · Tony Wu

In commit 9213ad (MIPS: 74K/1074K: Correct erratum workaround.), MIPS_CACHE_VTAG should go to icache.flags.

Cc Maciej W. Rozycki <[email protected]>
Cc Steven J. Hill <[email protected]>
Cc Leonid Yegoshin <[email protected]>
arch/mips/mm/c-r4k.c +1 -1
index dd261df..deebd0b 100644
@@ -902,13 +902,13 @@ static inline void alias_74k_erratum(struct cpuinfo_mips *c)
  	switch (imp) {
  	case PRID_IMP_74K:
  		if (rev <= PRID_REV_ENCODE_332(2, 4, 0))
-			c->dcache.flags |= MIPS_CACHE_VTAG;
+			c->icache.flags |= MIPS_CACHE_VTAG;

arch/mips/mm/c-r4k.c static inline void alias_74k_erratum(struct cpuinfo_mips *c) · line 914

Quoted 10 lines
arch/mips/mm/c-r4k.c +1 -1
  		if (rev == PRID_REV_ENCODE_332(2, 4, 0))
  			write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND);
  		break;
  	case PRID_IMP_1074K:
  		if (rev <= PRID_REV_ENCODE_332(1, 1, 0)) {
-			c->dcache.flags |= MIPS_CACHE_VTAG;
+			c->icache.flags |= MIPS_CACHE_VTAG;
  			write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND);
  		}
  		break;

It is not a typo, it is a special case and an original patch should follow the patch

http://patchwork.linux-mips.org/patch/8459/

which has a use of 'cpu_has_vtag_dcache'

- Leonid.