Re: [BK PATCH] PCI Express patches for 2.4.27-pre3

From: Andi Kleen
Date: Mon May 24 2004 - 17:24:28 EST


Greg KH <greg@xxxxxxxxx> writes:
> obj-y += pci-pc.o pci-irq.o
> diff -Nru a/arch/x86_64/kernel/mmconfig.c b/arch/x86_64/kernel/mmconfig.c
> --- /dev/null Wed Dec 31 16:00:00 1969
> +++ b/arch/x86_64/kernel/mmconfig.c Mon May 24 13:52:10 2004


> +static inline void pci_exp_set_dev_base(int bus, int devfn)
> +{
> + u32 dev_base = pci_mmcfg_base_addr | (bus << 20) | (devfn << 12);
> + if (dev_base != mmcfg_last_accessed_device) {
> + mmcfg_last_accessed_device = dev_base;
> + set_fixmap(FIX_PCIE_MCFG, dev_base);
> + }

Please no dynamic fixmap crap on x86-64. Do it like 2.6 does - ioremap()
the complete mmconfig aperture once and just just reference it directly.

Then you can also get rid of the spinlocks in the actual access functions,
since everything will be stateless.

-Andi

-
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/