Skip to content

Commit 2f794d0

Browse files
Manuel Laussralfbaechle
authored andcommitted
MIPS: Alchemy: MIPS hazard workarounds are not required.
The Alchemy manuals state: "All pipeline hazards and dependencies are enforced by hardware interlocks so that any sequence of instructions is guaranteed to execute correctly. Therefore, it is not necessary to pad legacy MIPS hazards (such as load delay slots and coprocessor accesses) with NOPs." Run-tested on Au12x0, without any ill effects. Signed-off-by: Manuel Lauss <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
1 parent 32647e0 commit 2f794d0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/mips/include/asm/hazards.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ do { \
8787
: "=r" (tmp)); \
8888
} while (0)
8989

90-
#elif defined(CONFIG_CPU_MIPSR1)
90+
#elif defined(CONFIG_CPU_MIPSR1) && !defined(CONFIG_MACH_ALCHEMY)
9191

9292
/*
9393
* These are slightly complicated by the fact that we guarantee R1 kernels to
@@ -139,7 +139,7 @@ do { \
139139
} while (0)
140140

141141
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \
142-
defined(CONFIG_CPU_R5500)
142+
defined(CONFIG_CPU_R5500) || defined(CONFIG_MACH_ALCHEMY)
143143

144144
/*
145145
* R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.

arch/mips/mm/tlbex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
292292
case CPU_R4300:
293293
case CPU_5KC:
294294
case CPU_TX49XX:
295-
case CPU_ALCHEMY:
296295
case CPU_PR4450:
297296
uasm_i_nop(p);
298297
tlbw(p);
@@ -315,6 +314,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
315314
case CPU_R5500:
316315
if (m4kc_tlbp_war())
317316
uasm_i_nop(p);
317+
case CPU_ALCHEMY:
318318
tlbw(p);
319319
break;
320320

0 commit comments

Comments
 (0)