From owner-freebsd-hackers Tue Apr 14 00:39:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA16059 for freebsd-hackers-outgoing; Tue, 14 Apr 1998 00:39:04 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA16039 for ; Tue, 14 Apr 1998 07:38:49 GMT (envelope-from luigi@labinfo.iet.unipi.it) 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 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 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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-hackers" in the body of the message