Commit 2f649c1f authored by James Bottomley's avatar James Bottomley

[PARISC] fix TLB fault path on PA2.0 narrow systems

commit 5e185581
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: default avatarHelge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent ed5fb247
...@@ -552,7 +552,7 @@ ...@@ -552,7 +552,7 @@
* entry (identifying the physical page) and %r23 up with * entry (identifying the physical page) and %r23 up with
* the from tlb entry (or nothing if only a to entry---for * the from tlb entry (or nothing if only a to entry---for
* clear_user_page_asm) */ * clear_user_page_asm) */
.macro do_alias spc,tmp,tmp1,va,pte,prot,fault .macro do_alias spc,tmp,tmp1,va,pte,prot,fault,patype
cmpib,COND(<>),n 0,\spc,\fault cmpib,COND(<>),n 0,\spc,\fault
ldil L%(TMPALIAS_MAP_START),\tmp ldil L%(TMPALIAS_MAP_START),\tmp
#if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000) #if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000)
...@@ -581,11 +581,15 @@ ...@@ -581,11 +581,15 @@
*/ */
cmpiclr,= 0x01,\tmp,%r0 cmpiclr,= 0x01,\tmp,%r0
ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot
#ifdef CONFIG_64BIT .ifc \patype,20
depd,z \prot,8,7,\prot depd,z \prot,8,7,\prot
#else .else
.ifc \patype,11
depw,z \prot,8,7,\prot depw,z \prot,8,7,\prot
#endif .else
.error "undefined PA type to do_alias"
.endif
.endif
/* /*
* OK, it is in the temp alias region, check whether "from" or "to". * OK, it is in the temp alias region, check whether "from" or "to".
* Check "subtle" note in pacache.S re: r23/r26. * Check "subtle" note in pacache.S re: r23/r26.
...@@ -1189,7 +1193,7 @@ dtlb_miss_20w: ...@@ -1189,7 +1193,7 @@ dtlb_miss_20w:
nop nop
dtlb_check_alias_20w: dtlb_check_alias_20w:
do_alias spc,t0,t1,va,pte,prot,dtlb_fault do_alias spc,t0,t1,va,pte,prot,dtlb_fault,20
idtlbt pte,prot idtlbt pte,prot
...@@ -1213,7 +1217,7 @@ nadtlb_miss_20w: ...@@ -1213,7 +1217,7 @@ nadtlb_miss_20w:
nop nop
nadtlb_check_alias_20w: nadtlb_check_alias_20w:
do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,20
idtlbt pte,prot idtlbt pte,prot
...@@ -1245,7 +1249,7 @@ dtlb_miss_11: ...@@ -1245,7 +1249,7 @@ dtlb_miss_11:
nop nop
dtlb_check_alias_11: dtlb_check_alias_11:
do_alias spc,t0,t1,va,pte,prot,dtlb_fault do_alias spc,t0,t1,va,pte,prot,dtlb_fault,11
idtlba pte,(va) idtlba pte,(va)
idtlbp prot,(va) idtlbp prot,(va)
...@@ -1277,7 +1281,7 @@ nadtlb_miss_11: ...@@ -1277,7 +1281,7 @@ nadtlb_miss_11:
nop nop
nadtlb_check_alias_11: nadtlb_check_alias_11:
do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,11
idtlba pte,(va) idtlba pte,(va)
idtlbp prot,(va) idtlbp prot,(va)
...@@ -1304,7 +1308,7 @@ dtlb_miss_20: ...@@ -1304,7 +1308,7 @@ dtlb_miss_20:
nop nop
dtlb_check_alias_20: dtlb_check_alias_20:
do_alias spc,t0,t1,va,pte,prot,dtlb_fault do_alias spc,t0,t1,va,pte,prot,dtlb_fault,20
idtlbt pte,prot idtlbt pte,prot
...@@ -1330,7 +1334,7 @@ nadtlb_miss_20: ...@@ -1330,7 +1334,7 @@ nadtlb_miss_20:
nop nop
nadtlb_check_alias_20: nadtlb_check_alias_20:
do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,20
idtlbt pte,prot idtlbt pte,prot
...@@ -1457,7 +1461,7 @@ naitlb_miss_20w: ...@@ -1457,7 +1461,7 @@ naitlb_miss_20w:
nop nop
naitlb_check_alias_20w: naitlb_check_alias_20w:
do_alias spc,t0,t1,va,pte,prot,naitlb_fault do_alias spc,t0,t1,va,pte,prot,naitlb_fault,20
iitlbt pte,prot iitlbt pte,prot
...@@ -1511,7 +1515,7 @@ naitlb_miss_11: ...@@ -1511,7 +1515,7 @@ naitlb_miss_11:
nop nop
naitlb_check_alias_11: naitlb_check_alias_11:
do_alias spc,t0,t1,va,pte,prot,itlb_fault do_alias spc,t0,t1,va,pte,prot,itlb_fault,11
iitlba pte,(%sr0, va) iitlba pte,(%sr0, va)
iitlbp prot,(%sr0, va) iitlbp prot,(%sr0, va)
...@@ -1557,7 +1561,7 @@ naitlb_miss_20: ...@@ -1557,7 +1561,7 @@ naitlb_miss_20:
nop nop
naitlb_check_alias_20: naitlb_check_alias_20:
do_alias spc,t0,t1,va,pte,prot,naitlb_fault do_alias spc,t0,t1,va,pte,prot,naitlb_fault,20
iitlbt pte,prot iitlbt pte,prot
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment