Re: [PATCH] (Longhaul 1/5) PCI: Protect bus master DMA from Longhaul by rw semaphores

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 28, 2006 at 03:56:50PM +0200, Rafa? Bilski wrote:
> 	This patch will allow Longhaul cpufreq driver to change frequency
> without breaking BMDMA. In order to work properly it needs:
> - adding rw_semaphore to pci_device and bus structures - this is
> patch below,
> - Longhaul should find host bridge and lock write on bus before
> frequency change,

Eeek!  You mean the longhaul driver can change the frequency of the PCI
bus?  Oh, that's a recipe for disaster...

> - device driver support - device should lock read its bus before
> starting DMA transfer. I have curently implemented this for ide
> layer (tested with via82cxxx), libata (not tested, but this is similar
> code to ide) and VIA Rhine network card driver.
> 	I don't know if this is acceptable infrastructure, but I hope it is
> less horrible then last. Is this infrastructure at all?

No, it's a hack :)

No, this is not acceptable.  What exactly do you want to do here?  Make
sure the PCI drivers are not doing DMA when the longhaul driver wants to
change the pci bus speed?

How often will this bus change happen?

Does it really save battery?

Will all PCI devices work properly at different speeds from what they
originally thought they were running at?

And what about PCI devices that always do DMA?  (think USB controllers,
they can easily saturate the PCI bus all the time).

Why not just suspend all PCI devices make the bus change, and then
resume them?  That would require no PCI core, or driver changes.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux