NetBSD Problem Report #35705

From www@NetBSD.org  Mon Feb 19 12:21:28 2007
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
	id 5E9C263B9FB; Mon, 19 Feb 2007 12:21:28 +0000 (UTC)
Message-Id: <20070219122128.5E9C263B9FB@narn.NetBSD.org>
Date: Mon, 19 Feb 2007 12:21:28 +0000 (UTC)
From: gfussan@web.de
Reply-To: gfussan@web.de
To: gnats-bugs@NetBSD.org
Subject: interrupt handler ext_intr for edge triggered IRQs, only?
X-Send-Pr-Version: www-1.0

>Number:         35705
>Category:       port-powerpc
>Synopsis:       interrupt handler ext_intr for edge triggered IRQs, only?
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-powerpc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 19 12:25:00 +0000 2007
>Last-Modified:  Wed Feb 21 15:05:11 +0000 2007
>Originator:     Gernot Fussan
>Release:        NetBSD-3.0
>Organization:
>Environment:
evbppc, powerpc
>Description:
For the PowerPC-arch the machine-depending main interrupt handler ("ext_intr()") doesn't work correctly for level-triggered interrupts, as re-enabling interrupting before calling the interrupt-specific routine causes a re-jump into the ext_intr() with marking the second jump as a "pending" interrupt. So, every interrupt handler is called twice per hard-interrupt, always!

Why was it implemented like that?
Can anybody help here?

Thank you!

Bye,
Gernot

>How-To-Repeat:
Run a kernel profiling and compare number of calls of your hardware interrupt rountine and the (expected) amount of hardware interrupts really received during the profiling time.

>Fix:
Level-triggered interrupts will always interrupt when set and enabled.
Todo: Disable the currently processed (level-triggered) interrupt BEFORE re-enable all interrupts (with mtmsr(msr|PSL_EE)) and during the processing of this interrupt, and re-enable this interrupt again right AFTER its processing, after it's been unset.

>Audit-Trail:
From: Michael Lorenz <macallan@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-powerpc/35705: interrupt handler ext_intr for edge triggered IRQs, only?
Date: Wed, 21 Feb 2007 02:41:42 -0500

 The 'powerpc-arch' consists of many very different machines with very 
 different interrupt controllers and therefore very different code to 
 deal with them. Since you didn't give any indication what kind of 
 machine you're talking about I have no idea where to start looking for 
 the problem.

From: Allen Briggs <briggs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: port-powerpc-maintainer@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, gfussan@web.de
Subject: Re: port-powerpc/35705: interrupt handler ext_intr for edge triggered IRQs, only?
Date: Wed, 21 Feb 2007 10:02:25 -0500

 On Wed, Feb 21, 2007 at 07:45:01AM +0000, Michael Lorenz wrote:
 >  The 'powerpc-arch' consists of many very different machines with very 
 >  different interrupt controllers and therefore very different code to 
 >  deal with them. Since you didn't give any indication what kind of 
 >  machine you're talking about I have no idea where to start looking for 
 >  the problem.

 Hi Michael,

 We've determined it was an ibm4xx-based issue and I referred submitter
 to someone else with ibm4xx hardware and experience.  The submitter has
 also provided diffs for the other to review.  GNATS must have been
 pulled off the to/cc line somewhere.

 Thanks,
 -allen

 -- 
 Allen Briggs  |  http://www.ninthwonder.com/~briggs/  |  briggs@ninthwonder.com

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.