Skip to content

Commit 2f649c1

Browse files
James BottomleyJames Bottomley
authored andcommitted
[PARISC] fix TLB fault path on PA2.0 narrow systems
commit 5e18558 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>
1 parent ed5fb24 commit 2f649c1

1 file changed

Lines changed: 17 additions & 13 deletions

File tree

‎arch/parisc/kernel/entry.S‎

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@
552552
* entry (identifying the physical page) and %r23 up with
553553
* the from tlb entry (or nothing if only a to entry---for
554554
* 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
556556
cmpib,COND(<>),n 0,\spc,\fault
557557
ldil L%(TMPALIAS_MAP_START),\tmp
558558
#if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000)
@@ -581,11 +581,15 @@
581581
*/
582582
cmpiclr,= 0x01,\tmp,%r0
583583
ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot
584-
#ifdef CONFIG_64BIT
584+
.ifc \patype,20
585585
depd,z \prot,8,7,\prot
586-
#else
586+
.else
587+
.ifc \patype,11
587588
depw,z \prot,8,7,\prot
588-
#endif
589+
.else
590+
.error "undefined PA type to do_alias"
591+
.endif
592+
.endif
589593
/*
590594
* OK, it is in the temp alias region, check whether "from" or "to".
591595
* Check "subtle" note in pacache.S re: r23/r26.
@@ -1189,7 +1193,7 @@ dtlb_miss_20w:
11891193
nop
11901194

11911195
dtlb_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
11931197

11941198
idtlbt pte,prot
11951199

@@ -1213,7 +1217,7 @@ nadtlb_miss_20w:
12131217
nop
12141218

12151219
nadtlb_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
12171221

12181222
idtlbt pte,prot
12191223

@@ -1245,7 +1249,7 @@ dtlb_miss_11:
12451249
nop
12461250

12471251
dtlb_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
12491253

12501254
idtlba pte,(va)
12511255
idtlbp prot,(va)
@@ -1277,7 +1281,7 @@ nadtlb_miss_11:
12771281
nop
12781282

12791283
nadtlb_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
12811285

12821286
idtlba pte,(va)
12831287
idtlbp prot,(va)
@@ -1304,7 +1308,7 @@ dtlb_miss_20:
13041308
nop
13051309

13061310
dtlb_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
13081312

13091313
idtlbt pte,prot
13101314

@@ -1330,7 +1334,7 @@ nadtlb_miss_20:
13301334
nop
13311335

13321336
nadtlb_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
13341338

13351339
idtlbt pte,prot
13361340

@@ -1457,7 +1461,7 @@ naitlb_miss_20w:
14571461
nop
14581462

14591463
naitlb_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
14611465

14621466
iitlbt pte,prot
14631467

@@ -1511,7 +1515,7 @@ naitlb_miss_11:
15111515
nop
15121516

15131517
naitlb_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
15151519

15161520
iitlba pte,(%sr0, va)
15171521
iitlbp prot,(%sr0, va)
@@ -1557,7 +1561,7 @@ naitlb_miss_20:
15571561
nop
15581562

15591563
naitlb_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
15611565

15621566
iitlbt pte,prot
15631567

0 commit comments

Comments
 (0)