Commit dd8f65a
MIPS: Add missing EHB in mtc0 -> mfc0 sequence.
commit 0b24cae upstream.
Add a missing EHB (Execution Hazard Barrier) in mtc0 -> mfc0 sequence.
Without this execution hazard barrier it's possible for the value read
back from the KScratch register to be the value from before the mtc0.
Reproducible on P5600 & P6600.
The hazard is documented in the MIPS Architecture Reference Manual Vol.
III: MIPS32/microMIPS32 Privileged Resource Architecture (MD00088), rev
6.03 table 8.1 which includes:
Producer | Consumer | Hazard
----------|----------|----------------------------
mtc0 | mfc0 | any coprocessor 0 register
Signed-off-by: Dmitry Korotin <dkorotin@wavecomp.com>
[paul.burton@mips.com:
- Commit message tweaks.
- Add Fixes tags.
- Mark for stable back to v3.15 where P5600 support was introduced.]
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: 3d8bfdd ("MIPS: Use C0_KScratch (if present) to hold PGD pointer.")
Fixes: 829dcc0 ("MIPS: Add MIPS P5600 probe support")
Cc: linux-mips@vger.kernel.org
Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent ea663ab commit dd8f65a
1 file changed
+20
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| 389 | + | |
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
| |||
674 | 675 | | |
675 | 676 | | |
676 | 677 | | |
677 | | - | |
| 678 | + | |
| 679 | + | |
678 | 680 | | |
679 | | - | |
| 681 | + | |
680 | 682 | | |
| 683 | + | |
681 | 684 | | |
682 | 685 | | |
683 | 686 | | |
| |||
935 | 938 | | |
936 | 939 | | |
937 | 940 | | |
938 | | - | |
| 941 | + | |
| 942 | + | |
939 | 943 | | |
940 | | - | |
| 944 | + | |
941 | 945 | | |
| 946 | + | |
942 | 947 | | |
943 | 948 | | |
944 | 949 | | |
| |||
1238 | 1243 | | |
1239 | 1244 | | |
1240 | 1245 | | |
| 1246 | + | |
1241 | 1247 | | |
1242 | 1248 | | |
1243 | 1249 | | |
| |||
1592 | 1598 | | |
1593 | 1599 | | |
1594 | 1600 | | |
1595 | | - | |
1596 | 1601 | | |
| 1602 | + | |
| 1603 | + | |
1597 | 1604 | | |
1598 | 1605 | | |
1599 | | - | |
1600 | 1606 | | |
1601 | 1607 | | |
1602 | 1608 | | |
1603 | 1609 | | |
| 1610 | + | |
| 1611 | + | |
1604 | 1612 | | |
1605 | 1613 | | |
1606 | 1614 | | |
| |||
1614 | 1622 | | |
1615 | 1623 | | |
1616 | 1624 | | |
1617 | | - | |
1618 | 1625 | | |
1619 | 1626 | | |
1620 | | - | |
| 1627 | + | |
1621 | 1628 | | |
1622 | | - | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1623 | 1633 | | |
| 1634 | + | |
1624 | 1635 | | |
1625 | 1636 | | |
1626 | 1637 | | |
| |||
0 commit comments