Skip to content

Commit eda2052

Browse files
committed
parisc: BTLB: Clear possibly existing BTLB entries
Call PDC to remove all existing BTLB entries (which may exist from some previous operating system runs) before switching to virtual mode. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 70bd68d commit eda2052

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

arch/parisc/kernel/head.S

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ $pgt_fill_loop:
180180
std %dp,0x18(%r10)
181181
#endif
182182

183-
#ifdef CONFIG_64BIT
184-
/* Get PDCE_PROC for monarch CPU. */
185183
#define MEM_PDC_LO 0x388
186184
#define MEM_PDC_HI 0x35C
185+
#ifdef CONFIG_64BIT
186+
/* Get PDCE_PROC for monarch CPU. */
187187
ldw MEM_PDC_LO(%r0),%r3
188188
ldw MEM_PDC_HI(%r0),%r10
189189
depd %r10, 31, 32, %r3 /* move to upper word */
@@ -269,7 +269,17 @@ stext_pdc_ret:
269269
tovirt_r1 %r6
270270
mtctl %r6,%cr30 /* restore task thread info */
271271
#endif
272-
272+
273+
#ifndef CONFIG_64BIT
274+
/* clear all BTLBs */
275+
ldi PDC_BLOCK_TLB,%arg0
276+
load32 PA(stext_pdc_btlb_ret), %rp
277+
ldw MEM_PDC_LO(%r0),%r3
278+
bv (%r3)
279+
ldi PDC_BTLB_PURGE_ALL,%arg1
280+
stext_pdc_btlb_ret:
281+
#endif
282+
273283
/* PARANOID: clear user scratch/user space SR's */
274284
mtsp %r0,%sr0
275285
mtsp %r0,%sr1

0 commit comments

Comments
 (0)