Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 1996 22:42:02 +0800
From:      Peter Wemm <peter@spinner.dialix.com>
To:        "John S. Dyson" <toor@dyson.iquest.net>
Cc:        phk@critter.tfs.com, freebsd-smp@freebsd.org
Subject:   Re: cvs commit: sys/i386/i386 locore.s swtch.s sys/i386/include pmap.h 
Message-ID:  <199611251442.WAA01604@spinner.DIALix.COM>
In-Reply-To: Your message of "Mon, 25 Nov 1996 08:38:07 EST." <199611251338.IAA01700@dyson.iquest.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
"John S. Dyson" wrote:
> > OBTW, easy question.  Is it safe to do a:
> > 	movl	%cr3, %eax
> > 	movl	%eax, %cr3
> > .. from a non-spl-maskable interrupt handler?
> > 
> I think that it is safe to do at anytime.  The processor will
> refill the tlb's as needed.  That is *exactly* what I would have
> suggested for what you are doing.  BTW, remember to save %eax :-).

Naturally..  Since this is from interrupt context, we don't have a lot of
choice about what we have to save...  The hardware saves some guff for
us, the rest we must do..

> It just so happens that pdirs never move once created.  Could 
> you possibly do a pushfl;cli;invltlb;popfl though?  That will
> keep interrupts away, and also will make pdirs movable eventually.
> (just kind of curious more than anything why/if cli/sti won't work
> in the context that you are describing.)

Umm, yes, that sounds fine.  No, cli/sti etc isn't a problem.  I was
planning on gutting the FAST_INTR() macro to produce a specific purpose,
lightweight, routine for this specific case.

What I meant by "non-spl-maskable" is that splhigh() will not block it,
and it will be allowed into the outer part of the kernel even if something
else has the mplock..  The entire routine will probably be:

save registers
cli
invltlb
lock inc counter
hit EOI in APIC
restore registers
reti

> John

Cheers,
-Peter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611251442.WAA01604>