Date: Tue, 14 Apr 1998 07:58:05 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: archie@whistle.com (Archie Cobbs) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: PnP code and vmstat Message-ID: <199804140558.HAA02347@labinfo.iet.unipi.it> In-Reply-To: <199804140217.TAA06608@bubba.whistle.com> from "Archie Cobbs" at Apr 13, 98 07:17:05 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804140558.HAA02347>