flush_tlb_all_local:
Hi all,
into parisc/kernel/pacache.S, i find this:
[...]flush_tlb_all_local:
[...]
rsm PSW_SM_Q,%r0 /* Turn off Q bit to load iia queue */
ldil L%REAL_MODE_PSW, %r1
ldo R%REAL_MODE_PSW(%r1), %r1
mtctl %r1, %cr22
mtctl %r0, %cr17
mtctl %r0, %cr17[...]
Why twice 'mtctl %r0, %cr17'?
and also:
[...]
fitmanymiddle: /* Loop if LOOP >= 2 */
ADDIB> -1,%r31,fitmanymiddle /* Adjusted inner loop
decr */
pitlbe 0(%sr1,%r28)
pitlbe,m %arg1(%sr1,%r28) /* Last pitlbe and addr
adjust */
Typicaly the function name is flush_..., so why do we 'purge' here?
Thanks in advance for help,
Joel
Quoted 7 lines · Joel Soete
ldo R%REAL_MODE_PSW(%r1), %r1 mtctl %r1, %cr22 mtctl %r0, %cr17 mtctl %r0, %cr17[...]
Why twice 'mtctl %r0, %cr17'?
Good question. No clue. Looks like a brain fart since clearing it
once should work unless there's a weird bug. I'll remove it.
Quoted 10 lines
and also:
[...]
fitmanymiddle: /* Loop if LOOP >= 2 */
ADDIB> -1,%r31,fitmanymiddle /* Adjusted inner loop
decr */
pitlbe 0(%sr1,%r28)
pitlbe,m %arg1(%sr1,%r28) /* Last pitlbe and addr
adjust */Typicaly the function name is
flush_..., so why do we 'purge' here?
AFAICT, because purge is sufficient.
It doesn't look like parisc even provides a FITBLE instruction.
thanks,
grant
Quoted 5 lines · Grant Grundler
Quoted 1 line · Joel Soete
Why twice 'mtctl %r0, %cr17'?
Good question. No clue. Looks like a brain fart since clearing it
once should work unless there's a weird bug. I'll remove it.
definitely not a brainfart. Read PA2.0 arch book (section 2) where it talks about cr17/cr18. CR17 is two registers and writing it twice clear both head/tail of the IIAS. Just like cr18 is also written twice.
sorry for not catching that the first time around. grant
Quoted 10 lines · Grant Grundler
Quoted 5 lines · Joel Soete
Quoted 1 line
Why twice 'mtctl %r0, %cr17'?
Good question. No clue. Looks like a brain fart since clearing it
once should work unless there's a weird bug. I'll remove it.definitely not a brainfart. Read PA2.0 arch book (section 2) where it talks about cr17/cr18. CR17 is two registers and writing it twice clear both head/tail of the IIAS. Just like cr18 is also written twice.
Probably, there should be a comment in the code noting this special behavior.
Dave
Signature · 2 lines
J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Quoted 2 lines · John David Anglin
Probably, there should be a comment in the code noting this special behavior.
Done. They're deliberately a little bit cryptic to ensure that people actually go and look at the arch book, but they are different so people don't think this might be a merge error.
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk