Re: PATCH 2.5.x disable BAR when sizing

From: Eric W. Biederman (ebiederm@xmission.com)
Date: Sun Dec 22 2002 - 14:57:44 EST


Linus Torvalds <torvalds@transmeta.com> writes:

> On Sun, 22 Dec 2002, Paul Mackerras wrote:
> >
> > Linus Torvalds writes:
> >
> > > Actually, I think it's certainly valid to not allow "printk()" to happen
> > > around the BAR probing, at least at bootup when we control all the CPU's
> > > tightly anyway.
> >
> > I'd like us to disable interrupts too. On powermacs, the interrupt
> > controller is typically inside a combo I/O ASIC which is on the PCI
> > bus.
>
> I certainly wpouldn't mind disabling local interrupts around that code
> sequence, but the problem with that is that I don't think it much matters,
> since it wouldn't help the SMP case anyway (and in fact even doing an
> old-style "cli/sti" if we still supported it would not have helped either,
> since the global interrupt disable would still have allowed the other
> CPU's to touch the irq controller).
>
> And since the pci bus will be scanned in an "subsys_initcall", the other
> CPU's are definitely active at that point.

Ouch, I hadn't thought about that one...

> In short, I don't think we can easily fix this. And again, I think that
> the only good approach would be to really make sure the machine is
> quescent while the PCI bus is initially scanned (and again, the later
> scans behing proper hotplug bus bridges should be fine thanks to bridge
> decoding limits).

For a similar reason this is why my kexec stuff does not attempt to
do generic device disables.

> Sadly, as I already mentioned, there isn't any generic PCI method of
> shutting up device interrupts.
>
> I think the only workable setup (which we effectively already do on x86,
> not that we should have this problem in the first place) is to just turn
> off the interrupts _at_ the interrupt controller. Which simply means that
> we really shouldn't be getting any interrupts while probing the root bus.
> Then you enable the interrupts as device drivers request them..

Well we need southbridge drivers on x86 if we want to prevent SCI interrupts
because those go around the i82559. Though we might catch them at the local
apic...

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Dec 23 2002 - 22:00:31 EST