* [parisc-linux] flush_tlb_all_local:
@ 2003-10-12 16:07 Joel Soete
2003-10-13 3:12 ` Grant Grundler
0 siblings, 1 reply; 5+ messages in thread
From: Joel Soete @ 2003-10-12 16:07 UTC (permalink / raw)
To: parisc-linux
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] flush_tlb_all_local:
2003-10-12 16:07 [parisc-linux] flush_tlb_all_local: Joel Soete
@ 2003-10-13 3:12 ` Grant Grundler
2003-10-13 4:14 ` Grant Grundler
0 siblings, 1 reply; 5+ messages in thread
From: Grant Grundler @ 2003-10-13 3:12 UTC (permalink / raw)
To: Joel Soete; +Cc: parisc-linux
On Sun, Oct 12, 2003 at 04:07:50PM +0000, Joel Soete wrote:
> 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.
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] flush_tlb_all_local:
2003-10-13 3:12 ` Grant Grundler
@ 2003-10-13 4:14 ` Grant Grundler
2003-10-13 18:57 ` John David Anglin
0 siblings, 1 reply; 5+ messages in thread
From: Grant Grundler @ 2003-10-13 4:14 UTC (permalink / raw)
To: Joel Soete; +Cc: parisc-linux
On Sun, Oct 12, 2003 at 09:12:58PM -0600, Grant Grundler wrote:
> On Sun, Oct 12, 2003 at 04:07:50PM +0000, Joel Soete wrote:
> > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] flush_tlb_all_local:
2003-10-13 4:14 ` Grant Grundler
@ 2003-10-13 18:57 ` John David Anglin
2003-10-13 19:44 ` Matthew Wilcox
0 siblings, 1 reply; 5+ messages in thread
From: John David Anglin @ 2003-10-13 18:57 UTC (permalink / raw)
To: Grant Grundler; +Cc: soete.joel, parisc-linux
> On Sun, Oct 12, 2003 at 09:12:58PM -0600, Grant Grundler wrote:
> > On Sun, Oct 12, 2003 at 04:07:50PM +0000, Joel Soete wrote:
> > > 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
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] flush_tlb_all_local:
2003-10-13 18:57 ` John David Anglin
@ 2003-10-13 19:44 ` Matthew Wilcox
0 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2003-10-13 19:44 UTC (permalink / raw)
To: John David Anglin; +Cc: Grant Grundler, soete.joel, parisc-linux
On Mon, Oct 13, 2003 at 02:57:19PM -0400, John David Anglin wrote:
> 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.
--
"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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-13 19:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-12 16:07 [parisc-linux] flush_tlb_all_local: Joel Soete
2003-10-13 3:12 ` Grant Grundler
2003-10-13 4:14 ` Grant Grundler
2003-10-13 18:57 ` John David Anglin
2003-10-13 19:44 ` Matthew Wilcox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.