Subject: CPU_INFO_FOREACH vs mi_cpu_attach().
To: None <>
From: matthew green <>
List: tech-kern
Date: 12/17/2007 08:59:20
hi folks.

i'm trying to clean up some issues with CPU_INFO_FOREACH() being
used before all cpus are attached.

i wonder if there should be some defer method for these calls so
that cpus attached after it has run can actually do something.

from my experience so far all these callers are really callers
of softint_establish().  so, i think that if this function gains
the ability to defer these setups until just before the point of 
config_interrupts() time, which should be before any of these
softint's get called.

another alternative i thought of was to introduce some knowledge
between mi_cpu_attach() and eg, softint_establish() such that
mi_cpu_attach() knows what missing calls for each cpu are needed.
this method would require re-working most of the callers to deal
with individual cpus (eg, softint_establish() would need to know
to setup the relevant parts for this cpu.)

comments/suggestions?  i guess at this point i'm most likely to
try the first idea (pre config_interrupts().)