PCI Express support for 2.4 kernel
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Vladimir Kondratiev
As I explained in comment to function, it is not really critical. The problem is, there is no generic way (or I don't know it) to recognize PCI-E. One suggest to go over all devices and see whether PCI-E capability present for at least one of them. I don't think it is good way to do. Sanity check do pretty good job here. If it is not PCI-E platform, this address in physical memory will not be connected to anything real. You will get 0xff's.
I don't think that's a good assumption. There will be surely be some machine that has an mapping there. You will need to find some fool proof way to detect the presence of PCI-Express. Otherwise it will likely fail the number one criterium for merging ("it shall not break anything else")
And in general new development should be done in 2.6 first...
-Andi
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Review
Quoted 6 lines · Vladimir Kondratiev
#define
PCI_PROBE_CONF10x0002
#definePCI_PROBE_CONF20x0004(quoted diff) +4
-0+ +#ifdef CONFIG_PCI_EXPRESS +#define PCI_PROBE_EXP 0x0008 +#endif
Drop the #ifdef here.
Review
Quoted 3 lines
(quoted diff) +3
-0+#ifdef CONFIG_PCI_EXPRESS +#include <asm/fixmap.h> +#endif
Same here.
Review
Quoted 7 lines
(quoted diff) +7
-0+static inline void pci_exp_set_dev_base(int bus, int dev, int fn) +{ + u32 dev_base = (bus << 20) | (dev << 15) | (fn << 12); + if (dev_base != pcie_last_accessed_device) { + pcie_last_accessed_device = dev_base; + set_fixmap_nocache(FIX_PCIE_CONFIG, rrbar_phys | dev_base); + }
When you use one fix map per CPU you can avoid the lock. All that would be needed would be a local_irq_disable()/enable() then. While normally config space accesses should not be performance critical sometimes they are done frequently to work around hardware bugs.
I still think it would be better to cache mappings and use a hash table though ...
-Andi
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Vladimir Kondratiev
Quoted 1 line
Yes, separation into generic and platform specific part seems nice, but besides memory mapping and locking, all you have is very simple arithmetic. Does it worth the work for separation?
For 64-bit world, agree, it could and should be done uniform.
Could you put the relevant code into an asm/ file for 2.6 then please?
Background: x86-64 shares the PCI code with i386 which just works for both 32bit and 64bit currently. If it is all changeable in the asm/ file then I won't need to change it later again. Of course the fixmap would work for x86-64 too, but just mapping the 256MB is much nicer and preferable.
-Andi
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Alan Cox
And X11 will want to access it via /proc interfaces. And someone will eventually go and design a different way to access PCI-EX for their hardware 8)
It would be nice if it did. Just currently it uses racy port accesses from user space :-(
-Andi
Quoted 7 lines · Andi Kleen
Quoted 3 lines · Alan Cox
And X11 will want to access it via /proc interfaces. And someone will eventually go and design a different way to access PCI-EX for their hardware 8)
It would be nice if it did. Just currently it uses racy port accesses from user space :-(
Depends what patches you applied and how you built it 8) However XFree meets hotplug is so unfunny its not good to consider before dinner, nor XFree meets irqs or XFree meets SAK and high security models.
Linus had a nice comment that the basic DRI/fb modules should be dealing with the PCI layer and perhaps exposing the DMA engine for newer cards (to trusted parties). For older cards there are all sorts of reasons you don't want to do this on the performance side but even then a driver which refused to free up the PCI map space until X noticed the file handle was returning errors and selected EOF would make a lot of the stuff sort out.
Maybe in part the GGI folks were right all those years ago. We had two extreme views and the middle may be closer
Alan
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Vladimir Kondratiev
Quoted 1 line
I thought this way also. But I found that it is not. You may know several chipsets,
and do per-chipset stuff, but there is no generic procedure. At least authors of PCI-E
don't know (it is nice to have access to the authors ;-) ).
This sounds like a serious design flaw in PCI-Express. Can you ask them to address this before it is too late?
-Andi
You know, I am also thinking in this direction. I already started conversation to implement some standard method.
Vladimir.
Quoted 16 lines · Andi Kleen
Quoted 7 lines · Vladimir Kondratiev
I thought this way also. But I found that it is not. You may know several chipsets,
and do per-chipset stuff, but there is no generic procedure. At least authors of PCI-E
don't know (it is nice to have access to the authors ;-) ).This sounds like a serious design flaw in PCI-Express. Can you ask them to address this before it is too late?
-Andi