tech-kern archive

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

Re: [patch] PCI memory & i/o enables



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/08/11 20:38, Eduardo Horvath wrote:
> On Fri, 8 Apr 2011, David Young wrote:
>
>> Here is a patch that changes the way that the PCI subsystem and
>> drivers use PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED. I
>> went ahead and renamed the flags in order to poison old-fashioned
>> uses. Now they're called PCI_FLAGS_IO_OKAY and
>> PCI_FLAGS_MEM_OKAY.
>>
>> For simplicity's sake, I'll just write of PCI_FLAGS_IO_ENABLED,
>> below, but the same discussion applies to PCI_FLAGS_MEM_ENABLED.
>>
>> Traditionally, if PCI_FLAGS_IO_ENABLED is set in the
>> pci_attach_args.pa_flags, it tells a PCI device driver, "the
>> bridges upstream forward PCI I/O transactions to this device,
>> *and* I/O transactions are enabled in the device's PCI CSR."
>> Some drivers, finding that neither PCI_FLAGS_IO_ENABLED nor the
>> corresponding PCI CSR bit is set set both pa_flags and the CSR
>> themselves. Those drivers assume that the upstream bridges are
>> forwarding I/O transactions, which may or may not be true. They
>> have to assume, though, because the information in pa_flags is
>> not specific.
>>
>> My patch makes the PCI_FLAGS_IO_OKAY condition more specific: it
>> tells a PCI device driver, "the bridges upstream forward PCI I/O
>> transactions to this device". If the flag isn't set, the driver
>> has no business setting it. Also, if the flag isn't set, there's
>> not much use in the driver setting the corresponding bit in the
>> PCI CSR.
>
> It looks like you're renaming constants. What is the functional
> change here other than renaming things? What happens to drivers
> that use the old *IO_ENABLED flags? What are you trying to
> accomplish here?
>
> Eduardo
>
If I got it right the functional change is that a device drivers do
not enable mem or io upstream the bus.
For me this seems right, it makes responsibilities right, the only
corner case I can think off (after short time thinking) is are there
any device drivers that are known to do this in order to work.

Lars

- -- 
- ------------------------------------

Mystische Erklärungen:
Die mystischen Erklärungen gelten für tief;
die Wahrheit ist, dass sie noch nicht einmal oberflächlich sind.

   -- Friedrich Nietzsche
   [ Die Fröhliche Wissenschaft Buch 3, 126 ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2fV0kACgkQcxuYqjT7GRZCnQCgrR6E7RGvbuDpz0JRqZUgfdyf
NxkAoMzNDf6uuuKmxc7m+0sD7KPFPtJR
=pBDm
-----END PGP SIGNATURE-----



Home | Main Index | Thread Index | Old Index