diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-13 00:28:45 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-13 00:28:45 -0700 |
commit | 9343af084c7e8911897b0883042ee690cee3aaef (patch) | |
tree | 6211a4bdc84690bec6530d27a3abb19f5e8bb8f3 /arch/mips/pci | |
parent | e182c77cc291456eed127b1472952ddb59a81a9d (diff) | |
parent | 0d0fb0f9c5fddef4a10242fe3337f00f528a3099 (diff) | |
download | op-kernel-dev-9343af084c7e8911897b0883042ee690cee3aaef.zip op-kernel-dev-9343af084c7e8911897b0883042ee690cee3aaef.tar.gz |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
lib/Kconfig.debug
Diffstat (limited to 'arch/mips/pci')
-rw-r--r-- | arch/mips/pci/ops-loongson2.c | 10 | ||||
-rw-r--r-- | arch/mips/pci/ops-titan-ht.c | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/mips/pci/ops-loongson2.c b/arch/mips/pci/ops-loongson2.c index 2bb4057..d657ee0 100644 --- a/arch/mips/pci/ops-loongson2.c +++ b/arch/mips/pci/ops-loongson2.c @@ -180,15 +180,21 @@ struct pci_ops loongson_pci_ops = { }; #ifdef CONFIG_CS5536 +DEFINE_RAW_SPINLOCK(msr_lock); + void _rdmsr(u32 msr, u32 *hi, u32 *lo) { struct pci_bus bus = { .number = PCI_BUS_CS5536 }; u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); + unsigned long flags; + + raw_spin_lock_irqsave(&msr_lock, flags); loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr); loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_LO, 4, lo); loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_HI, 4, hi); + raw_spin_unlock_irqrestore(&msr_lock, flags); } EXPORT_SYMBOL(_rdmsr); @@ -198,9 +204,13 @@ void _wrmsr(u32 msr, u32 hi, u32 lo) .number = PCI_BUS_CS5536 }; u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); + unsigned long flags; + + raw_spin_lock_irqsave(&msr_lock, flags); loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr); loongson_pcibios_write(&bus, devfn, PCI_MSR_DATA_LO, 4, lo); loongson_pcibios_write(&bus, devfn, PCI_MSR_DATA_HI, 4, hi); + raw_spin_unlock_irqrestore(&msr_lock, flags); } EXPORT_SYMBOL(_wrmsr); #endif diff --git a/arch/mips/pci/ops-titan-ht.c b/arch/mips/pci/ops-titan-ht.c index 46c636c..749c192 100644 --- a/arch/mips/pci/ops-titan-ht.c +++ b/arch/mips/pci/ops-titan-ht.c @@ -26,7 +26,6 @@ #include <linux/types.h> #include <linux/pci.h> #include <linux/kernel.h> -#include <linux/slab.h> #include <linux/delay.h> #include <asm/io.h> |