@@ -1288,74 +1288,12 @@ nadtlb_check_alias_20:
12881288nadtlb_emulate:
12891289
12901290 /*
1291- * Non access misses can be caused by fdc,fic,pdc,lpa,probe and
1292- * probei instructions. We don't want to fault for these
1293- * instructions (not only does it not make sense, it can cause
1294- * deadlocks, since some flushes are done with the mmap
1295- * semaphore held). If the translation doesn't exist, we can't
1296- * insert a translation, so have to emulate the side effects
1297- * of the instruction. Since we don't insert a translation
1298- * we can get a lot of faults during a flush loop, so it makes
1299- * sense to try to do it here with minimum overhead. We only
1300- * emulate fdc,fic,pdc,probew,prober instructions whose base
1301- * and index registers are not shadowed. We defer everything
1302- * else to the "slow" path.
1291+ * Non-access misses can be caused by fdc,fic,pdc,lpa,probe and
1292+ * probei instructions. The kernel no longer faults doing flushes.
1293+ * Use of lpa and probe instructions is rare. Given the issue
1294+ * with shadow registers, we defer everything to the "slow" path.
13031295 */
1304-
1305- mfctl %cr19,%r9 /* Get iir */
1306-
1307- /* PA 2.0 Arch Ref. Book pg 382 has a good description of the insn bits.
1308- Checks for fdc,fdce,pdc,"fic,4f",prober,probeir,probew, probeiw */
1309-
1310- /* Checks for fdc,fdce,pdc,"fic,4f" only */
1311- ldi 0x280 ,%r16
1312- and %r9 ,%r16,%r17
1313- cmpb ,<>,n %r16,%r17,nadtlb_probe_check
1314- bb,>=,n %r9 ,26 ,nadtlb_nullify /* m bit not set, just nullify */
1315- BL get_register,%r25
1316- extrw,u %r9 ,15 ,5 ,%r8 /* Get index register # */
1317- cmpib,COND(=),n -1 ,%r1,nadtlb_fault /* have to use slow path */
1318- copy %r1,%r24
1319- BL get_register,%r25
1320- extrw,u %r9 ,10 ,5 ,%r8 /* Get base register # */
1321- cmpib,COND(=),n -1 ,%r1,nadtlb_fault /* have to use slow path */
1322- BL set_register,%r25
1323- add ,l %r1,%r24,%r1 /* doesn't affect c/b bits */
1324-
1325- nadtlb_nullify:
1326- mfctl %ipsw,%r8
1327- ldil L%PSW_N,%r9
1328- or %r8 ,%r9 ,%r8 /* Set PSW_N */
1329- mtctl %r8 ,%ipsw
1330-
1331- rfir
1332- nop
1333-
1334- /*
1335- When there is no translation for the probe address then we
1336- must nullify the insn and return zero in the target register.
1337- This will indicate to the calling code that it does not have
1338- write/read privileges to this address.
1339-
1340- This should technically work for prober and probew in PA 1.1,
1341- and also probe,r and probe,w in PA 2.0
1342-
1343- WARNING: USE ONLY NON-SHADOW REGISTERS WITH PROBE INSN!
1344- THE SLOW-PATH EMULATION HAS NOT BEEN WRITTEN YET.
1345-
1346- */
1347- nadtlb_probe_check:
1348- ldi 0x80 ,%r16
1349- and %r9 ,%r16,%r17
1350- cmpb ,<>,n %r16,%r17,nadtlb_fault /* Must be probe,[rw]*/
1351- BL get_register,%r25 /* Find the target register */
1352- extrw,u %r9 ,31 ,5 ,%r8 /* Get target register */
1353- cmpib,COND(=),n -1 ,%r1,nadtlb_fault /* have to use slow path */
1354- BL set_register,%r25
1355- copy %r0,%r1 /* Write zero to target register */
1356- b nadtlb_nullify /* Nullify return insn */
1357- nop
1358-
1296+ b,n nadtlb_fault
13591297
13601298#ifdef CONFIG_64BIT
13611299itlb_miss_20w:
0 commit comments