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.f02K6VG01723@meow.osd.bsdi.com>

next in thread | raw e-mail | index | archive | help
Part III...

-----FW: Re: PC164 IDE only works (was: SMPng stability)-----

Date: Fri, 17 Nov 2000 10:51:31 -0800 (PST)
From: John Baldwin <jhb@FreeBSD.org>
To: Andrew Gallatin <gallatin@cs.duke.edu>
Subject: Re: PC164 IDE only works (was: SMPng stability)
Cc: mjacob@feral.com


On 17-Nov-00 Andrew Gallatin wrote:
> 
> Next question -- how the heck do we keep the ipl at ALPHA_PSL_IPL_IO
> until the interrupt thread is run?  Can you muck with the psl in the 
> in hardware frame and have the palcode beleive you?
> 
> Keeping the ipl at 4 will also mean mucking with exception return,
> etc, etc, etc.   Ick.

Well, first of all, we should only do this for PC164's as this is going to kill
interrupt performance. :(  You can muck with the IPL in the saved psr on the
stack.  You will only need to do this for DEVICE_IO interrupts.  And you can do
it by writing the current IPL into the saved frame from within interrupt(). 
IOW, in the DEVICE_IO case block, have something like:

if (user_has_a_lame_pc164) {
    frame.psr &= ~ALPHA_PSR_IPL_MASK;
    frame.psr |= alpha_read_psr() & ALPHA_PSR_IPL_MASK;
}

Then in ithd_loop(), before grabbing sched_lock via mtx_enter(), add in:

if (user_has_a_lame_pc164)
    alpha_pal_swpipl(ALPHA_PSL_IPL_0);

That should do the trick.

> Drew

-- 

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>