pci: Arch hook to determine config space size
Brian King
brking at us.ibm.com
Wed Feb 2 02:23:36 EST 2005
Grant Grundler wrote:
> On Mon, Jan 31, 2005 at 01:40:04PM -0600, Brian King wrote:
>
>>CC'ing the linux-pci mailing list...
>
>
> thanks...
>
>
>>>This patch adds an arch hook so
>>>that individual archs can indicate if the underlying system supports
>>>expanded config space accesses or not.
>
>
>>>@@ -653,6 +653,8 @@ static int pci_cfg_space_size(struct pci
>>> goto fail;
>>> }
>>>
>>>+ if (!pcibios_exp_cfg_space(dev))
>>>+ goto fail;
>>> if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL)
>>> goto fail;
>
>
> pci_read_config_dword lands in arch specific code.
> See drivers/pci/access.c:PCI_OP_READ() macro.
>
> I'm missing what pcibios_exp_cfg_space() does that can't be handled by
> the bus_ops supplied by pci_scan_bus().
>
> I would expect the pci_read_config_dword to fail for being out of bounds.
> Is that wrong?
> Or is bus_ops not feasible in this case because pcibios needs access
> to pci_dev?
The current patch for this has become essentially that. It is now a
PPC64 specific patch that adds bounds checking in the PPC64 PCI config
access functions.
-Brian
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
More information about the Linuxppc64-dev
mailing list