aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel
diff options
context:
space:
mode:
authorJames Bottomley <JBottomley@Parallels.com>2012-05-21 02:49:01 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-05-25 05:52:17 -0400
commit2f649c1f6f0fef445ce79a19b79e5ce8fe9d7f19 (patch)
tree21cf299abdaf27bddc86a8177f99f1bb178ab4a4 /arch/parisc/kernel
parented5fb2471b7060767957fb964eb1aaec71533ab1 (diff)
[PARISC] fix TLB fault path on PA2.0 narrow systems
commit 5e185581d7c46ddd33cd9c01106d1fc86efb9376 Author: James Bottomley <JBottomley@Parallels.com> [PARISC] fix PA1.1 oops on boot Didn't quite fix the crash on boot. It moved it from PA1.1 processors to PA2.0 narrow kernels. The final fix is to make sure the [id]tlb_miss_20 paths also work. Even on narrow systems, these paths require using the wide instructions becuase the tlb insertion format is wide. Fix this by conditioning the dep[wd],z on whether we're being called from _11 or _20[w] paths. Tested-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r--arch/parisc/kernel/entry.S30
1 files changed, 17 insertions, 13 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 535034217021..07ef351edd57 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -552,7 +552,7 @@
552 * entry (identifying the physical page) and %r23 up with 552 * entry (identifying the physical page) and %r23 up with
553 * the from tlb entry (or nothing if only a to entry---for 553 * the from tlb entry (or nothing if only a to entry---for
554 * clear_user_page_asm) */ 554 * clear_user_page_asm) */
555 .macro do_alias spc,tmp,tmp1,va,pte,prot,fault 555 .macro do_alias spc,tmp,tmp1,va,pte,prot,fault,patype
556 cmpib,COND(<>),n 0,\spc,\fault 556 cmpib,COND(<>),n 0,\spc,\fault
557 ldil L%(TMPALIAS_MAP_START),\tmp 557 ldil L%(TMPALIAS_MAP_START),\tmp
558#if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000) 558#if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000)
@@ -581,11 +581,15 @@
581 */ 581 */
582 cmpiclr,= 0x01,\tmp,%r0 582 cmpiclr,= 0x01,\tmp,%r0
583 ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot 583 ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot
584#ifdef CONFIG_64BIT 584.ifc \patype,20
585 depd,z \prot,8,7,\prot 585 depd,z \prot,8,7,\prot
586#else 586.else
587.ifc \patype,11
587 depw,z \prot,8,7,\prot 588 depw,z \prot,8,7,\prot
588#endif 589.else
590 .error "undefined PA type to do_alias"
591.endif
592.endif
589 /* 593 /*
590 * OK, it is in the temp alias region, check whether "from" or "to". 594 * OK, it is in the temp alias region, check whether "from" or "to".
591 * Check "subtle" note in pacache.S re: r23/r26. 595 * Check "subtle" note in pacache.S re: r23/r26.
@@ -1189,7 +1193,7 @@ dtlb_miss_20w:
1189 nop 1193 nop
1190 1194
1191dtlb_check_alias_20w: 1195dtlb_check_alias_20w:
1192 do_alias spc,t0,t1,va,pte,prot,dtlb_fault 1196 do_alias spc,t0,t1,va,pte,prot,dtlb_fault,20
1193 1197
1194 idtlbt pte,prot 1198 idtlbt pte,prot
1195 1199
@@ -1213,7 +1217,7 @@ nadtlb_miss_20w:
1213 nop 1217 nop
1214 1218
1215nadtlb_check_alias_20w: 1219nadtlb_check_alias_20w:
1216 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate 1220 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,20
1217 1221
1218 idtlbt pte,prot 1222 idtlbt pte,prot
1219 1223
@@ -1245,7 +1249,7 @@ dtlb_miss_11:
1245 nop 1249 nop
1246 1250
1247dtlb_check_alias_11: 1251dtlb_check_alias_11:
1248 do_alias spc,t0,t1,va,pte,prot,dtlb_fault 1252 do_alias spc,t0,t1,va,pte,prot,dtlb_fault,11
1249 1253
1250 idtlba pte,(va) 1254 idtlba pte,(va)
1251 idtlbp prot,(va) 1255 idtlbp prot,(va)
@@ -1277,7 +1281,7 @@ nadtlb_miss_11:
1277 nop 1281 nop
1278 1282
1279nadtlb_check_alias_11: 1283nadtlb_check_alias_11:
1280 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate 1284 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,11
1281 1285
1282 idtlba pte,(va) 1286 idtlba pte,(va)
1283 idtlbp prot,(va) 1287 idtlbp prot,(va)
@@ -1304,7 +1308,7 @@ dtlb_miss_20:
1304 nop 1308 nop
1305 1309
1306dtlb_check_alias_20: 1310dtlb_check_alias_20:
1307 do_alias spc,t0,t1,va,pte,prot,dtlb_fault 1311 do_alias spc,t0,t1,va,pte,prot,dtlb_fault,20
1308 1312
1309 idtlbt pte,prot 1313 idtlbt pte,prot
1310 1314
@@ -1330,7 +1334,7 @@ nadtlb_miss_20:
1330 nop 1334 nop
1331 1335
1332nadtlb_check_alias_20: 1336nadtlb_check_alias_20:
1333 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate 1337 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,20
1334 1338
1335 idtlbt pte,prot 1339 idtlbt pte,prot
1336 1340
@@ -1457,7 +1461,7 @@ naitlb_miss_20w:
1457 nop 1461 nop
1458 1462
1459naitlb_check_alias_20w: 1463naitlb_check_alias_20w:
1460 do_alias spc,t0,t1,va,pte,prot,naitlb_fault 1464 do_alias spc,t0,t1,va,pte,prot,naitlb_fault,20
1461 1465
1462 iitlbt pte,prot 1466 iitlbt pte,prot
1463 1467
@@ -1511,7 +1515,7 @@ naitlb_miss_11:
1511 nop 1515 nop
1512 1516
1513naitlb_check_alias_11: 1517naitlb_check_alias_11:
1514 do_alias spc,t0,t1,va,pte,prot,itlb_fault 1518 do_alias spc,t0,t1,va,pte,prot,itlb_fault,11
1515 1519
1516 iitlba pte,(%sr0, va) 1520 iitlba pte,(%sr0, va)
1517 iitlbp prot,(%sr0, va) 1521 iitlbp prot,(%sr0, va)
@@ -1557,7 +1561,7 @@ naitlb_miss_20:
1557 nop 1561 nop
1558 1562
1559naitlb_check_alias_20: 1563naitlb_check_alias_20:
1560 do_alias spc,t0,t1,va,pte,prot,naitlb_fault 1564 do_alias spc,t0,t1,va,pte,prot,naitlb_fault,20
1561 1565
1562 iitlbt pte,prot 1566 iitlbt pte,prot
1563 1567