9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <miller@hamnavoe.demon.co.uk>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Weird error.
Date: Mon, 20 Jan 2003 11:20:09 +0000	[thread overview]
Message-ID: <8ce2eb49c40409f5ff7fd225af155b31@hamnavoe.demon.co.uk> (raw)
In-Reply-To: <200301192134.h0JLYew14284@augusta.math.psu.edu>

> Sun Jan 19 12:45:36: mpintrenable: multiple botch irq3, tbdf 5000000, lo 00000979, n 00000979

It's a benign error message resulting from the interaction of three
mostly harmless bugs:

1.  intdisable() on x86 MP architecture doesn't actually disable
interrupts.  The comment says:
	 * For now, none of this will work with the APIC code,

2.  i8250disable() marks the UART disabled after calling intdisable(),
without checking whether the disable succeeded.  So the next time the
UART device is opened the interrupt is enabled again.

3.  mpintrenablex() doesn't distinguish correctly between enabling a
device twice and enabling multiple devices (or multifunction devices)
which share an interrupt.

I think 2.  would be the easiest to fix, for example as follows:

/sys/src/9/pc/fns.h:61 c fns.h:61
< void	intrdisable(int, void (*)(Ureg *, void *), void*, int, char*);
---
> int	intrdisable(int, void (*)(Ureg *, void *), void*, int, char*);
/sys/src/9/pc/trap.c:67 c trap.c:67
< void
---
> int
/sys/src/9/pc/trap.c:79 c trap.c:79
< 		return;
---
> 		return -1;
/sys/src/9/pc/trap.c:95 a trap.c:96
> 	return 0;
/sys/src/9/pc/uarti8250.c:530,531 c uarti8250.c:530,531
< 		intrdisable(ctlr->irq, i8250interrupt, uart, ctlr->tbdf, uart->name);
< 		ctlr->iena = 0;
---
> 		if(intrdisable(ctlr->irq, i8250interrupt, uart, ctlr->tbdf, uart->name) == 0)
> 			ctlr->iena = 0;



  reply	other threads:[~2003-01-20 11:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-19 21:30 Dan Cross
2003-01-19 21:32 ` Russ Cox
2003-01-19 21:34 ` Dan Cross
2003-01-20 11:20   ` Richard Miller [this message]
2003-01-20 20:50     ` Dan Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ce2eb49c40409f5ff7fd225af155b31@hamnavoe.demon.co.uk \
    --to=miller@hamnavoe.demon.co.uk \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).