From owner-freebsd-smp Mon Nov 25 06:42:52 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA21503 for smp-outgoing; Mon, 25 Nov 1996 06:42:52 -0800 (PST) Received: from spinner.DIALix.COM (root@spinner.DIALix.COM [192.203.228.67]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA21488 for ; Mon, 25 Nov 1996 06:42:34 -0800 (PST) Received: from spinner.DIALix.COM (peter@localhost.DIALix.oz.au [127.0.0.1]) by spinner.DIALix.COM (8.8.3/8.8.3) with ESMTP id WAA01604; Mon, 25 Nov 1996 22:42:02 +0800 (WST) Message-Id: <199611251442.WAA01604@spinner.DIALix.COM> To: "John S. Dyson" 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 In-reply-to: Your message of "Mon, 25 Nov 1996 08:38:07 EST." <199611251338.IAA01700@dyson.iquest.net> Date: Mon, 25 Nov 1996 22:42:02 +0800 From: Peter Wemm Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk "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