linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PCIe enhanced configuration mechanism support on ppc arch
@ 2006-08-17 19:01 Shawn Jin
  0 siblings, 0 replies; 7+ messages in thread
From: Shawn Jin @ 2006-08-17 19:01 UTC (permalink / raw)
  To: ppcdev

Hi,

I'm trying to find out if the current PCI subsystem supports the PCIe
enhanced configuration mechanism, in particular, on the ppc/powerpc
arch, which is basically a MMIO access with the address containing all
bus, device, function, and offset info.

Could someone here give an authoritative answer? Or point me to
somewhere I can look for it by myself, such as which file or directory
in the kernel tree. I searched at arch/ppc/kernel,
arch/powerpc/kernel, and drivers/pci but couldn't find an answer. :(

Thanks,
-Shawn.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PCIe enhanced configuration mechanism support on ppc arch
@ 2006-08-30 16:30 Milton Miller
  2006-08-30 18:30 ` Arnd Bergmann
  2006-08-30 23:03 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 7+ messages in thread
From: Milton Miller @ 2006-08-30 16:30 UTC (permalink / raw)
  To: Shawn Jin; +Cc: linuxppc-dev

On Fri Aug 18 05:01:48 EST 2006, Shawn Jin wrote:
> I'm trying to find out if the current PCI subsystem supports the PCIe
> enhanced configuration mechanism, in particular, on the ppc/powerpc
> arch, which is basically a MMIO access with the address containing all
> bus, device, function, and offset info.

If what you are really trying to find is the 4k extended config space,
then there are some platforms that support that on some slots.

If you are trying to find the mmio address for your adapter, then the
answer is I am not aware of any PowerPC platforms that provide that,
although I am not familiar with the embedded processor platforms nor
the pci express Apple boxes.

> Could someone here give an authoritative answer? Or point me to
> somewhere I can look for it by myself, such as which file or directory
> in the kernel tree. I searched at arch/ppc/kernel,
> arch/powerpc/kernel, and drivers/pci but couldn't find an answer. :(

The config access support is in arch/powerpc/kernel/rtas_pci.c,
the setting of pci_ext_config_space is at arch/powerpc/kernel/pci_dn.c.

milton

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PCIe enhanced configuration mechanism support on ppc arch
  2006-08-30 16:30 PCIe enhanced configuration mechanism support on ppc arch Milton Miller
@ 2006-08-30 18:30 ` Arnd Bergmann
  2006-08-30 23:03 ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2006-08-30 18:30 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Milton Miller

On Wednesday 30 August 2006 18:30, Milton Miller wrote:
> The config access support is in arch/powerpc/kernel/rtas_pci.c,
> the setting of pci_ext_config_space is at arch/powerpc/kernel/pci_dn.c.
> 
Well, so far that is only true for pseries and cell, as the others
normally don't use rtas for config space access.

Other platforms have their config space implementation in
arch/powerpc/platforms/<platform>/pci.c and may not support
this.

	Arnd <><

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PCIe enhanced configuration mechanism support on ppc arch
  2006-08-30 16:30 PCIe enhanced configuration mechanism support on ppc arch Milton Miller
  2006-08-30 18:30 ` Arnd Bergmann
@ 2006-08-30 23:03 ` Benjamin Herrenschmidt
  2006-08-31 10:11   ` Segher Boessenkool
  1 sibling, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2006-08-30 23:03 UTC (permalink / raw)
  To: Milton Miller; +Cc: linuxppc-dev

On Wed, 2006-08-30 at 11:30 -0500, Milton Miller wrote:
> On Fri Aug 18 05:01:48 EST 2006, Shawn Jin wrote:
> > I'm trying to find out if the current PCI subsystem supports the PCIe
> > enhanced configuration mechanism, in particular, on the ppc/powerpc
> > arch, which is basically a MMIO access with the address containing all
> > bus, device, function, and offset info.
> 
> If what you are really trying to find is the 4k extended config space,
> then there are some platforms that support that on some slots.
> 
> If you are trying to find the mmio address for your adapter, then the
> answer is I am not aware of any PowerPC platforms that provide that,
> although I am not familiar with the embedded processor platforms nor
> the pci express Apple boxes.
> 
> > Could someone here give an authoritative answer? Or point me to
> > somewhere I can look for it by myself, such as which file or directory
> > in the kernel tree. I searched at arch/ppc/kernel,
> > arch/powerpc/kernel, and drivers/pci but couldn't find an answer. :(
> 
> The config access support is in arch/powerpc/kernel/rtas_pci.c,
> the setting of pci_ext_config_space is at arch/powerpc/kernel/pci_dn.c.

Actually, that only sets the variable used by the RTAS PCI accessors.
Other platforms might do differently. The PCI probe code uses the
generic pci_cfg_space_size() function to determine wether extended
config space is supported for a given device.

An example of platform not using RTAS and that does support extended
config space is the PCI Express link out of the U4 northbridge on
PowerMac (though not the other PCIe slots connected to the HT<->PCIe
tunnel, at least not for now).

It's basically just a matter of having your low level config access
routines supporting those >=256 offsets. The generic code tests that by
doing a dummy access and checks for an error return.

Ben.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PCIe enhanced configuration mechanism support on ppc arch
  2006-08-30 23:03 ` Benjamin Herrenschmidt
@ 2006-08-31 10:11   ` Segher Boessenkool
  2006-08-31 12:02     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Segher Boessenkool @ 2006-08-31 10:11 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Milton Miller

> An example of platform not using RTAS and that does support extended
> config space is the PCI Express link out of the U4 northbridge on
> PowerMac (though not the other PCIe slots connected to the HT<->PCIe
> tunnel, at least not for now).
>
> It's basically just a matter of having your low level config access
> routines supporting those >=256 offsets. The generic code tests  
> that by
> doing a dummy access and checks for an error return.

The U3/U4 HT config access code never returns the error though; it
happily accesses the config space of the next device instead.  Got
a patch, will send it later -- it's not a regression, there's no big
hurry for 2.6.18.


Segher

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PCIe enhanced configuration mechanism support on ppc arch
  2006-08-31 10:11   ` Segher Boessenkool
@ 2006-08-31 12:02     ` Benjamin Herrenschmidt
  2006-08-31 21:31       ` Segher Boessenkool
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2006-08-31 12:02 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Milton Miller

On Thu, 2006-08-31 at 12:11 +0200, Segher Boessenkool wrote:
> > An example of platform not using RTAS and that does support extended
> > config space is the PCI Express link out of the U4 northbridge on
> > PowerMac (though not the other PCIe slots connected to the HT<->PCIe
> > tunnel, at least not for now).
> >
> > It's basically just a matter of having your low level config access
> > routines supporting those >=256 offsets. The generic code tests  
> > that by
> > doing a dummy access and checks for an error return.
> 
> The U3/U4 HT config access code never returns the error though; it
> happily accesses the config space of the next device instead.  Got
> a patch, will send it later -- it's not a regression, there's no big
> hurry for 2.6.18.

Better to have it in if possible though. Thanks

Ben.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PCIe enhanced configuration mechanism support on ppc arch
  2006-08-31 12:02     ` Benjamin Herrenschmidt
@ 2006-08-31 21:31       ` Segher Boessenkool
  0 siblings, 0 replies; 7+ messages in thread
From: Segher Boessenkool @ 2006-08-31 21:31 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Milton Miller

>> The U3/U4 HT config access code never returns the error though; it
>> happily accesses the config space of the next device instead.  Got
>> a patch, will send it later -- it's not a regression, there's no big
>> hurry for 2.6.18.
>
> Better to have it in if possible though. Thanks

I'm more worried about having 2.6.18 work at all, sorry.  I might
be fast enough of course (ahem), but no promises :-)


Segher

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-08-31 21:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-30 16:30 PCIe enhanced configuration mechanism support on ppc arch Milton Miller
2006-08-30 18:30 ` Arnd Bergmann
2006-08-30 23:03 ` Benjamin Herrenschmidt
2006-08-31 10:11   ` Segher Boessenkool
2006-08-31 12:02     ` Benjamin Herrenschmidt
2006-08-31 21:31       ` Segher Boessenkool
  -- strict thread matches above, loose matches on Subject: below --
2006-08-17 19:01 Shawn Jin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).