lkml.org 
[lkml]   [2003]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: PCI Express support for 2.4 kernel
From
Date
Vladimir Kondratiev <vladimir.kondratiev@intel.com> writes:


> #define PCI_PROBE_CONF1 0x0002
> #define PCI_PROBE_CONF2 0x0004
> +
> +#ifdef CONFIG_PCI_EXPRESS
> +#define PCI_PROBE_EXP 0x0008
> +#endif

Drop the #ifdef here.

> +#ifdef CONFIG_PCI_EXPRESS
> +#include <asm/fixmap.h>
> +#endif

Same here.


> +static inline void pci_exp_set_dev_base(int bus, int dev, int fn)
> +{
> + u32 dev_base = (bus << 20) | (dev << 15) | (fn << 12);
> + if (dev_base != pcie_last_accessed_device) {
> + pcie_last_accessed_device = dev_base;
> + set_fixmap_nocache(FIX_PCIE_CONFIG, rrbar_phys | dev_base);
> + }

When you use one fix map per CPU you can avoid the lock. All that would
be needed would be a local_irq_disable()/enable() then. While normally
config space accesses should not be performance critical sometimes
they are done frequently to work around hardware bugs.

I still think it would be better to cache mappings and use a hash table
though ...

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:1.282 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site