Re: remote debugging via FireWire

Benjamin Herrenschmidt
2007-02-11T21:36:12Z

On Sat, 2007-02-10 at 20:16 +0100, Stefan Richter wrote:
> [ohci1394_early]
>
> Some remarks to the September 2006 version at
> http://www.suse.de/~bk/firewire/ :
>
> - Seems its .remove won't work properly if more than one OHCI-1394
> controller is installed. And it's .probe isn't reentrant, but that
> might be less of a problem.
> - Its functionality will be lost if there is a FireWire bus reset,
> e.g. when something is plugged in or out. To keep physical DMA
> alive, an interrupt handler had to be installed which writes ~0
> to OHCI1394_PhyReqFilter{Hi,Lo}Set. Can interrupt handlers be
> registered in an early setup stage?
> - There might be some register accesses in the setup which could be
> omitted; I'd have to look this up.
> - Could be optimized to not use ohci1394.h::struct ti_ohci.
> - PCI_CLASS_FIREWIRE_OHCI can be replaced by
> include/linux/pci_ids.h::PCI_CLASS_SERIAL_FIREWIRE_OHCI which
> was newly added in 2.6.20-git#.
> - I suppose .probe should check for PCI_CLASS_SERIAL_FIREWIRE_OHCI
> instead of PCI_CLASS_SERIAL_FIREWIRE.
> - How about dropping support for configuring this as module, to
> simplify the code? Unless this would interfere with ohci1394; and
> it probably would if there was an interrupt handler...
> - "depends on X86_64" is missing in Kconfig.
> - Maybe put it into arch/x86_64/drivers/ instead of drivers/ieee1394?
> - Plus what I mentioned earlier in the thread.
>
> I could send code to address some of this at next weekend or later.

I'd like to have that on ppc as well, so I'd rather keep it in drivers/

I agree that it doesn't need to be a module. If you can load modules,
then you can load the full ohci driver. Thus, if it's an early thingy
initialized by arch, it can export a special "takeover" hook that the
proper ohci module can then call to override it (important if we start
having an irq handler).

Andi, also, how do you deal with iommu ? Not at all ? :-)

Ben.