Re: [Patch v2] Make PCI extended config space (MMCONFIG) a driveropt-in
From: Arjan van de Ven
Date: Sun Jan 13 2008 - 12:02:03 EST
as a general thing I like where this patch is going
On Sun, 13 Jan 2008 00:24:15 -0700
Matthew Wilcox <matthew@xxxxxx> wrote:
> +
> +int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int
> devfn,
> + int reg, int len,
> u32 *val) +{
> + if (reg < 256)
> + return raw_pci_ops->read(domain, bus, devfn, reg,
> len, val);
> + if (raw_pci_ext_ops)
> + return raw_pci_ext_ops->read(domain, bus, devfn,
> reg, len, val);
> + return -EINVAL;
would be nice the "reg > 256 && raw_pci_Ext_ops==NULL" case would just
call the raw_pci_ops-> pointer, to give that a chance of refusal
(but I guess that shouldn't really happen)
> --- a/arch/x86/pci/mmconfig-shared.c
> +++ b/arch/x86/pci/mmconfig-shared.c
> @@ -28,7 +28,7 @@ static int __initdata pci_mmcfg_resources_inserted;
> static const char __init *pci_mmcfg_e7520(void)
> {
> u32 win;
> - pci_conf1_read(0, 0, PCI_DEVFN(0,0), 0xce, 2, &win);
> + pci_direct_conf1.read(0, 0, PCI_DEVFN(0,0), 0xce, 2, &win);
couldn't this (at least in some next patch) use the vector if it exists?
\
> @@ -140,5 +134,6 @@ int __init pci_mmcfg_arch_init(void)
> {
> printk(KERN_INFO "PCI: Using MMCONFIG\n");
> raw_pci_ops = &pci_mmcfg;
> + raw_pci_ext_ops = &pci_mmcfg;
why set BOTH vectors? you probably ONLY want to set the ext one, so
that calls to the lower 256 go to the original
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/