Date: Wed, 17 May 1995 23:30:52 +0200 From: esser@ZPR.Uni-Koeln.DE (Stefan Esser) To: Bruce Evans <bde@zeta.org.au> Cc: current@FreeBSD.org Subject: Re: Enthusiasm boost: make world works on 386SX16 4Mb Message-ID: <199505172130.AA05623@FileServ1.MI.Uni-Koeln.DE> In-Reply-To: Bruce Evans <bde@zeta.org.au> "Re: Enthusiasm boost: make world works on 386SX16 4Mb" (May 18, 7:12)
next in thread | previous in thread | raw e-mail | index | archive | help
On May 18, 7:12, Bruce Evans wrote: } Subject: Re: Enthusiasm boost: make world works on 386SX16 4Mb } >The problem is, that the current interrupt statistics scheme is } >tightly bound to ISA. } } >The register_intr() function gets a device_id, which is used to } >initialise the intr_countp[] and intrnames[] arrays. } } Urk. You currently use device_id 0, so all pci interrupts get } counted as clock interrupts. Well, this particular line is Wolfgang's code, not mine :) Yes. I noticed the same when I looked for a way to tally PCI interrupts ... Calling "register_intr() with an device_id argument of -1 would fix this without introducing further problems, but I didn't want to apply such a fix before 2.0.5 is out. (It's a local change without any bad consequences, perhaps it should be made just now, though ???) } >Since device_id is an index into an ISA specific data structure } >(which doesn't make much sense for a PCI device), there is no } >valid device_id for any PCI device. } } It's actually only an index into intr_countp[] and intrnames[]. } Config is supposed to fill in all device tables with suitable } indexes and build a string table to match. You can fake this } now using dummy isa devices: } } device PCI0 at isa? } ... } device PCI15 at isa? } } Use a trivial failing probe routine to copy the ids to a pci-specific } place. Yes. Know this. But this would be to much of a hack IMHO ! } >The easy solution to this problem would be to make register_intr() } >less specific to ISA by passing an &intrcnt and an intrname } >parameter instead of the ISA device id. } } >This would require (very simple) changes to: } } >/sys/i386/isa/isa_device.h (prototype) } >/sys/i386/isa/isa.c (definition + a few calls) } >/sys/i386/isa/clock.c (2 calls) } >/sys/i386/isa/pcibus.c (1 call) } >/sys/i386/eisa/eisaconf.c (1 call) } } It would also require changing intrnames[] from a string table to an } array and changing systat etc. to expect an array. This should be Not necessarily ... I've locally patched "config" to put pci devices into "vector.h". This makes the names appear in the intrnames array, it just can't be located by the register_intr() code. By having an explicit intrcnt address and another name parameter, register_intr() could match the name in the intrnames array as build by the modified config. All statistic tools could then stay unchanged for now. Later register_intr() could use the same parameters to initialise an array of char pointers, and systat etc be patched to expect such an array ... Regards, STefan -- Stefan Esser Internet: <se@ZPR.Uni-Koeln.DE> Zentrum fuer Paralleles Rechnen Tel: +49 221 4706017 Universitaet zu Koeln FAX: +49 221 4705160 Weyertal 80 50931 Koeln
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505172130.AA05623>