Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 May 1995 17:56:50 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, esser@ZPR.Uni-Koeln.DE
Cc:        current@FreeBSD.org
Subject:   Re: Enthusiasm boost: make world works on 386SX16 4Mb
Message-ID:  <199505190756.RAA23102@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I've got one new idea regarding tallying PCI interrupts.
>Not a solution, but an easy workaround for now:

>How about reserving the "0" entry in intrcnt[] and the 
>intrnames list for PCI ?

Ugh.  Entries 0 and 1 are already reserved for clk and rtc.
That's already 2 too many reservations.  Anyway, if you reserve
entry 2, then you would only have to change pcibus.c and worry
about people using old config binaries so that entry 2 is
something else.

>} OK.  Put all the controller names in the string table so
>} that you don't have to decide which.

>To support PCI devices, I've got to put some number of each 
>into the string table. E.g. the "de" driver can be used with
>4channel Ethernet cards, which will all use the same IRQ, but
>are independent devices and should get private intrcnt values,
>IMHO. 

>So it might be useful to have some 8 entries for each PCI 
>driver, as long as a fixed string table is used. 

>But this won't do for loadable device drivers and really 
>is no good match for PCI neither.

The PCI interrupt multiplexor will have to do its own interrupt
multiplexing.  How about generating device ids and maintaining
the string table dynamically using this interface:

	int register_dev(char const *name, int intr);
	int unregister_dev(char const *name, int intr);

Device ids may live longer than the drivers that generate them
and only go away if they have been unregistered and the intrcnt[]
or intrnames[] table fills up.  The tables should be large enough
so that this doesn't normally happen.  The same driver may use
multiple interrupts (normally at different times, e.g., unloading
and reloading may change the interrupt).  If the table fills up
and there are no unregistered slots to reuse, then a bit bucket
id will be returned.  The bit bucket id may also be used for
multiplexed interrupts so that they don't get counted twice.
I think a string table for the names is good enough.  intrcnt[]
and intrnames[] have to be statically allocated so that systat
etc. can find them, but when systat etc. are changed to support
the tables changing due to loading and unloading lkm's, they
can be changed to support the table addresses changing due to
realloc'ing the tables.

Bruce



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