Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 1998 12:44:42 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/6299: vmstat -i does not show PnP device interrupts
Message-ID:  <199804141944.MAA10735@bubba.whistle.com>

next in thread | raw e-mail | index | archive | help

>Number:         6299
>Category:       kern
>Synopsis:       vmstat -i does not show PnP device interrupts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 14 12:50:00 PDT 1998
>Last-Modified:
>Originator:     Archie Cobbs
>Organization:
Whistle Communications, Inc.
>Release:        FreeBSD 2.2.6-RELEASE i386
>Environment:

	FreeBSD-2.2.6

>Description:

>How-To-Repeat:

	1. Install and enable interrupt driven PnP device.
	2. Run "vmstat -i".
	3. Notice device is not listed

>Fix:
	
	Unknown (by me)

>Audit-Trail:
>Unformatted:
>From luigi@labinfo.iet.unipi.it Tue Apr 14 00:38:57 1998
Received: from whistle.com (whistle.com [207.76.205.131]) by bubba.whistle.com (8.8.7/8.6.12) with ESMTP id AAA07159 for <archie@bubba.whistle.com>; Tue, 14 Apr 1998 00:38:57 -0700 (PDT)
Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id AAA10829 for <archie@whistle.com>; Tue, 14 Apr 1998 00:38:56 -0700 (PDT)
Received: from gatekeeper.whistle.com(207.76.204.2) by whistle.com via smap (V1.3)
	id sma010827; Tue Apr 14 00:38:51 1998
Received: (from smap@localhost) by gatekeeper.whistle.com (8.7.5/8.6.12) id AAA00295 for <archie@whistle.com>; Tue, 14 Apr 1998 00:38:51 -0700 (PDT)
Received: from labinfo.iet.unipi.it( 131.114.9.5) by gatekeeper via smap (V2.0)
	id xma000293; Tue, 14 Apr 98 00:38:36 -0700
Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id HAA02347; Tue, 14 Apr 1998 07:58:06 +0200
From: Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Message-Id: <199804140558.HAA02347@labinfo.iet.unipi.it>
Subject: Re: PnP code and vmstat
To: archie@whistle.com (Archie Cobbs)
Date: Tue, 14 Apr 1998 07:58:05 +0200 (MET DST)
Cc: freebsd-hackers@FreeBSD.ORG
In-Reply-To: <199804140217.TAA06608@bubba.whistle.com> from "Archie Cobbs" at Apr 13, 98 07:17:05 pm
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Status: RO

> I'm working on a PnP device driver. It's working OK and IS receiving
> interrupts, but the command "vmstat -i" doesn't show it in the
> listing. What's wrong?

The data structure (call it XXX, I don't remember the name) used
by vmstat -i does not have entries for PnP devices. If i remember
well, the XXX entry for each driver is assigned after the attach
routine. It happens as follows:
 * for ISA devices, the name is looked up somehow (being statically
   declared in the kernel config, this is easy);
 * there are spare entries for PCI devices which are assigned and
   renamed dynamically

You should do a similar thing for PnP devices -- create spare entries
and then assign them to the requesting device.

Don't ask me where this struct is located... look at what is done after
calling the device attach routine.

(for the sound driver, i used a dirty hack and charged all interrupts
to the pcm0 device even if it was for pcm1...)

	cheers
	luigi
-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________



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



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