Skip to content

Commit

Permalink
MIPS: OCTEON: Implement DCache errata workaround for all CN6XXX
Browse files Browse the repository at this point in the history
Make messages refer to all CN6XXX.

Signed-off-by: David Daney <[email protected]>
Signed-off-by: Aleksey Makarov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/8941/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
daviddaney authored and ralfbaechle committed Feb 20, 2015
1 parent 664f1ae commit e3d0ead
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions arch/mips/cavium-octeon/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ EXPORT_SYMBOL(prom_putchar);

void prom_free_prom_memory(void)
{
if (OCTEON_IS_MODEL(OCTEON_CN63XX_PASS1_X)) {
if (CAVIUM_OCTEON_DCACHE_PREFETCH_WAR) {
/* Check for presence of Core-14449 fix. */
u32 insn;
u32 *foo;
Expand All @@ -1063,8 +1063,9 @@ void prom_free_prom_memory(void)
panic("No PREF instruction at Core-14449 probe point.");

if (((insn >> 16) & 0x1f) != 28)
panic("Core-14449 WAR not in place (%04x).\n"
"Please build kernel with proper options (CONFIG_CAVIUM_CN63XXP1).", insn);
panic("OCTEON II DCache prefetch workaround not in place (%04x).\n"
"Please build kernel with proper options (CONFIG_CAVIUM_CN63XXP1).",
insn);
}
}

Expand Down
3 changes: 3 additions & 0 deletions arch/mips/include/asm/mach-cavium-octeon/war.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@
#define R10000_LLSC_WAR 0
#define MIPS34K_MISSED_ITLB_WAR 0

#define CAVIUM_OCTEON_DCACHE_PREFETCH_WAR \
OCTEON_IS_MODEL(OCTEON_CN6XXX)

#endif /* __ASM_MIPS_MACH_CAVIUM_OCTEON_WAR_H */
2 changes: 1 addition & 1 deletion arch/mips/mm/uasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ I_u3u1u2(_ldx)
void ISAFUNC(uasm_i_pref)(u32 **buf, unsigned int a, signed int b,
unsigned int c)
{
if (OCTEON_IS_MODEL(OCTEON_CN63XX_PASS1_X) && a <= 24 && a != 5)
if (CAVIUM_OCTEON_DCACHE_PREFETCH_WAR && a <= 24 && a != 5)
/*
* As per erratum Core-14449, replace prefetches 0-4,
* 6-24 with 'pref 28'.
Expand Down

0 comments on commit e3d0ead

Please sign in to comment.