Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Jan 2001 12:06:56 -0800 (PST)
From:      John Baldwin <john@baldwin.cx>
To:        alpha@FreeBSD.org
Subject:   Disabling ints via IPL
Message-ID:  <XFMail.010102120656.john@baldwin.cx>
Resent-Message-ID: <200101022006.f02K6WG01727@meow.osd.bsdi.com>

next in thread | raw e-mail | index | archive | help
Part IV. :)

On 17-Nov-00 Andrew Gallatin wrote:
> You're missing one thing -- From alpha/swtch.s:
> 
> LEAF(exception_return, 1)                     /* XXX should be NESTED */
> <...>
>       /* We've got an AST.  Handle it. */
>>----->        ldiq    a0, ALPHA_PSL_IPL_0             /* drop IPL to zero */ 
>       call_pal PAL_OSF1_swpipl
>       mov     sp, a0                          /* only arg is frame */
>       CALL(ast)
> 
> <...>
> 
> Won't this lead in recursion on the interrupt stack if there's an ast
> pending?

Ugh.  Yuck.  Hmm.  We need that ast() so that we switch to the interrupt
thread, too (we will need it for light-weight ithreads as well).  We should
probably lower the IPL to the saved IPL in the stack frame instead.  It will
always be zero except for this hack for pc164's (since this is only done when
returning to userland, which runs at IPL 0).  Hmm.  Actually, we will want to
restore the saved IPL in the frame to 0 after this inside of ast() (since ast()
is going to switch to the itnerrupt thread, and we will be back at IPL 0 when
we return).  So, what we really need to modify is not the IPL we switch to on
return, but the IPL we use here before calling ast().

> Drew

--

Re: light-weight ithreads, I'm not sure the ast() will be needed, but it might
be.  Also, this obviously won't just be for PC164's at this point.  However, we
really should only do this if we can't get interrupt source disabling/enabling
to work as otherwise we are going to serialize interrupts and really kill
interrupt performance.  Especially on SMP systems.  (Only one interrupt handler
at a time across all CPU's, unless the IPL is a per-CPU thing, in which case
this could get a bit more complicated on SMP systems if we have to resort to
depending on IPL on an SMP system.)

-- 

John Baldwin <john@baldwin.cx> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




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