lkml.org 
[lkml]   [2008]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Patch v2] Make PCI extended config space (MMCONFIG) a driver opt-in
as a general thing I like where this patch is going

On Sun, 13 Jan 2008 00:24:15 -0700
Matthew Wilcox <matthew@wil.cx> 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



\
 
 \ /
  Last update: 2008-01-13 18:05    [W:0.140 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site