From: Benjamin Herrenschmidt <bh40@calva.net>
To: linuxppc-dev@lists.linuxppc.org,
linuxppc-user@lists.linuxppc.org,
debian-powerpc@lists.debian.org, linux-pmac@samba.anu.edu.au
Subject: Bogus interrupts: test fix
Date: Thu, 7 Jan 1999 14:37:18 +0100 [thread overview]
Message-ID: <19990107143718.019579@mail.mipsys.com> (raw)
I've updated the 2.2-pre4 test kernel on my web page, it contains a test
fix for the bogus interrupt problem. Please try it and give me feedback.
Also, do not worry about the "lost interrupts" counter I added to
/proc/interrupts, they are not really "lost" but I would be interested in
knowing how much of them you get with ordinary use of the system.
The "fix" looks like this:
void __pmac pmac_mask_and_ack_irq(int irq_nr)
{
unsigned long bit = 1UL << (irq_nr & 0x1f);
int i = irq_nr >> 5;
if ((unsigned)irq_nr >= max_irqs)
return;
/*spin_lock(&irq_controller_lock);*/
clear_bit(irq_nr, cached_irq_mask);
if (test_and_clear_bit(irq_nr, lost_interrupts))
atomic_dec(&n_lost_interrupts);
out_le32(&pmac_irq_hw[i]->ack, bit);
out_le32(&pmac_irq_hw[i]->enable, cached_irq_mask[i]);
out_le32(&pmac_irq_hw[i]->ack, bit);
do {
/* make sure ack gets to controller before we enable interrupts */
sync();
} while(in_le32(&pmac_irq_hw[i]->flag) & bit);
/*spin_unlock(&irq_controller_lock);*/
/*if ( irq_controller_lock.lock )
panic("irq controller lock still held in mask and ack\n");*/
}
Note that the sync() may now be useless. I don't have anymore bogus
interrupts on the PowerBook for now but I usually have very few of them
anyway. I'm more interested by results from people with a real problem
(io slowdown due to lots of them).
I'll post this kernel on an ftp site later today too.
--
E-Mail: <mailto:bh40@calva.net>
BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
next reply other threads:[~1999-01-07 13:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-07 13:37 Benjamin Herrenschmidt [this message]
1999-01-07 14:42 ` Bogus interrupts: test fix Albrecht Dreß
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=19990107143718.019579@mail.mipsys.com \
--to=bh40@calva.net \
--cc=debian-powerpc@lists.debian.org \
--cc=linux-pmac@samba.anu.edu.au \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=linuxppc-user@lists.linuxppc.org \
/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).