Re: [PATCH 4/4] x86_64: check msr to get mmconfig for amd family 10hopteron v3

From: Yinghai Lu
Date: Mon Feb 11 2008 - 22:26:22 EST


On Monday 11 February 2008 06:51:15 pm Andrew Morton wrote:
> On Mon, 11 Feb 2008 18:20:46 -0800 Yinghai Lu <Yinghai.Lu@xxxxxxx> wrote:
>
> > On Monday 11 February 2008 05:09:44 pm Andrew Morton wrote:
> > > On Mon, 11 Feb 2008 16:48:35 -0800
> > > Yinghai Lu <Yinghai.Lu@xxxxxxx> wrote:
> > >
> > > > From: Yinghai Lu <Yinghai.Lu@xxxxxxx>
> > > >
> > > > so even booting kernel with acpi=off or even MCFG is not there, we still can
> > > > use MMCONFIG.
> > > >
> > >
> > > This patch threw a big reject. I didn't check why.
> > >
> > >
> > > > + pci_direct_conf1.read(0, bus, devfn, 0, 4, &l);
> > >
> > > When I fixed the reject, compilation failed here.
> > >
> > > arch/x86/pci/mmconfig-shared.c: In function 'pci_mmcfg_check_hostbridge':
> > > arch/x86/pci/mmconfig-shared.c:214: error: 'pci_direct_conf1' undeclared (first use in this function)
> > >
> > >
> > > What kernel are you patching?
> > >
> >
> > linus tree.
>
> hm. So why didn't it compile? pci_direct_conf1 is defined over in
> arch/x86/pci/direct.c and is not mentioned in any header file.

it is in arch/x86/pci/pci.h

and arch/x86/pci/mmconf_shared.c has one
#include "pci.h"

did you compile that for 32 bit?

YH

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b6ce068a1285a24185b01be8a49021827516b3e1

diff --git a/arch/x86/pci/pci.h b/arch/x86/pci/pci.h
index 36cb44c..3431518 100644 (file)
--- a/arch/x86/pci/pci.h
+++ b/arch/x86/pci/pci.h
@@ -85,10 +85,17 @@ extern spinlock_t pci_config_lock;
extern int (*pcibios_enable_irq)(struct pci_dev *dev);
extern void (*pcibios_disable_irq)(struct pci_dev *dev);

-extern int pci_conf1_write(unsigned int seg, unsigned int bus,
- unsigned int devfn, int reg, int len, u32 value);
-extern int pci_conf1_read(unsigned int seg, unsigned int bus,
- unsigned int devfn, int reg, int len, u32 *value);
+struct pci_raw_ops {
+ int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn,
+ int reg, int len, u32 *val);
+ int (*write)(unsigned int domain, unsigned int bus, unsigned int devfn,
+ int reg, int len, u32 val);
+};
+
+extern struct pci_raw_ops *raw_pci_ops;
+extern struct pci_raw_ops *raw_pci_ext_ops;
+
+extern struct pci_raw_ops pci_direct_conf1;

extern int pci_direct_probe(void);
extern void pci_direct_init(int type);
--
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/