From: John Kacur <jkacur@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Cc: Clark Williams <williams@redhat.com>, John Kacur <jkacur@redhat.com>
Subject: [PATCH 07/26] x86: Convert pci_config_lock to raw_spinlock
Date: Mon, 11 Jan 2010 22:26:37 +0100 [thread overview]
Message-ID: <1263245216-14754-8-git-send-email-jkacur@redhat.com> (raw)
In-Reply-To: <1263245216-14754-7-git-send-email-jkacur@redhat.com>
Convert locks that cannot sleep in preempt-rt to raw_spinlocks.
See also bde31e2e149219765bb3a4bb3c568fa9623b5521
Signed-off-by: John Kacur <jkacur@redhat.com>
---
arch/x86/include/asm/pci_x86.h | 2 +-
arch/x86/pci/common.c | 2 +-
arch/x86/pci/direct.c | 16 ++++++++--------
arch/x86/pci/mmconfig_32.c | 8 ++++----
arch/x86/pci/numaq_32.c | 8 ++++----
arch/x86/pci/pcbios.c | 8 ++++----
6 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index b4bf9a9..567d009 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/arch/x86/include/asm/pci_x86.h
@@ -83,7 +83,7 @@ struct irq_routing_table {
extern unsigned int pcibios_irq_mask;
extern int pcibios_scanned;
-extern spinlock_t pci_config_lock;
+extern raw_spinlock_t pci_config_lock;
extern int (*pcibios_enable_irq)(struct pci_dev *dev);
extern void (*pcibios_disable_irq)(struct pci_dev *dev);
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index d2552c6..b79d322 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -81,7 +81,7 @@ int pcibios_scanned;
* This interrupt-safe spinlock protects all accesses to PCI
* configuration space.
*/
-DEFINE_SPINLOCK(pci_config_lock);
+DEFINE_RAW_SPINLOCK(pci_config_lock);
static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d)
{
diff --git a/arch/x86/pci/direct.c b/arch/x86/pci/direct.c
index 347d882..bd33620 100644
--- a/arch/x86/pci/direct.c
+++ b/arch/x86/pci/direct.c
@@ -27,7 +27,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus,
return -EINVAL;
}
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8);
@@ -43,7 +43,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus,
break;
}
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
@@ -56,7 +56,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus,
if ((bus > 255) || (devfn > 255) || (reg > 4095))
return -EINVAL;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8);
@@ -72,7 +72,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus,
break;
}
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
@@ -108,7 +108,7 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus,
if (dev & 0x10)
return PCIBIOS_DEVICE_NOT_FOUND;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
outb((u8)(0xF0 | (fn << 1)), 0xCF8);
outb((u8)bus, 0xCFA);
@@ -127,7 +127,7 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus,
outb(0, 0xCF8);
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
@@ -147,7 +147,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus,
if (dev & 0x10)
return PCIBIOS_DEVICE_NOT_FOUND;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
outb((u8)(0xF0 | (fn << 1)), 0xCF8);
outb((u8)bus, 0xCFA);
@@ -166,7 +166,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus,
outb(0, 0xCF8);
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index 90d5fd4..a3d9c54 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -64,7 +64,7 @@ err: *value = -1;
if (!base)
goto err;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
pci_exp_set_dev_base(base, bus, devfn);
@@ -79,7 +79,7 @@ err: *value = -1;
*value = mmio_config_readl(mmcfg_virt_addr + reg);
break;
}
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
@@ -97,7 +97,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
if (!base)
return -EINVAL;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
pci_exp_set_dev_base(base, bus, devfn);
@@ -112,7 +112,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
mmio_config_writel(mmcfg_virt_addr + reg, value);
break;
}
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c
index 8eb295e..2dad4dc 100644
--- a/arch/x86/pci/numaq_32.c
+++ b/arch/x86/pci/numaq_32.c
@@ -41,7 +41,7 @@ static int pci_conf1_mq_read(unsigned int seg, unsigned int bus,
if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255))
return -EINVAL;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
write_cf8(bus, devfn, reg);
@@ -66,7 +66,7 @@ static int pci_conf1_mq_read(unsigned int seg, unsigned int bus,
break;
}
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
@@ -80,7 +80,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus,
if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255))
return -EINVAL;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
write_cf8(bus, devfn, reg);
@@ -105,7 +105,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus,
break;
}
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return 0;
}
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
index 1c975cc..2daa521 100644
--- a/arch/x86/pci/pcbios.c
+++ b/arch/x86/pci/pcbios.c
@@ -161,7 +161,7 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
if (!value || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
switch (len) {
case 1:
@@ -212,7 +212,7 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
break;
}
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return (int)((result & 0xff00) >> 8);
}
@@ -227,7 +227,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
if ((bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
- spin_lock_irqsave(&pci_config_lock, flags);
+ raw_spin_lock_irqsave(&pci_config_lock, flags);
switch (len) {
case 1:
@@ -268,7 +268,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
break;
}
- spin_unlock_irqrestore(&pci_config_lock, flags);
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
return (int)((result & 0xff00) >> 8);
}
--
1.6.5.2
next prev parent reply other threads:[~2010-01-11 21:30 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 21:26 [PATCH 00/26] Convert locks that can't sleep in -rt " John Kacur
2010-01-11 21:26 ` [PATCH 01/26] xtime_lock: Convert atomic_seqlock to raw_seqlock, fix up all users John Kacur
2010-01-11 21:26 ` [PATCH 02/26] seqlock: Create raw_seqlock John Kacur
2010-01-11 21:26 ` [PATCH 03/26] x86: Convert tlbstate_lock to raw_spinlock John Kacur
2010-01-11 21:26 ` [PATCH 04/26] sched: Convert thread_group_cputimer lock " John Kacur
2010-01-11 21:26 ` [PATCH 05/26] x86: Convert ioapic_lock and vector_lock to raw_spinlocks John Kacur
2010-01-11 21:26 ` [PATCH 06/26] x86: Convert i8259A_lock to raw_spinlock John Kacur
2010-01-11 21:26 ` John Kacur [this message]
2010-01-11 21:26 ` [PATCH 08/26] i8253: Convert i8253_lock " John Kacur
2010-01-11 21:26 ` [PATCH 09/26] x86: Convert set_atomicity_lock " John Kacur
2010-01-11 21:26 ` [PATCH 10/26] ACPI: Convert c3_lock " John Kacur
2010-01-11 21:26 ` [PATCH 11/26] rtmutex: Convert wait_lock and pi_lock " John Kacur
2010-01-11 21:26 ` [PATCH 12/26] printk: Convert lock " John Kacur
2010-01-11 21:26 ` [PATCH 13/26] genirq: Convert locks to raw_spinlocks John Kacur
2010-01-11 21:26 ` [PATCH 14/26] trace: Convert various locks to raw_spinlock John Kacur
2010-01-11 21:26 ` [PATCH 15/26] clocksource: Convert watchdog_lock " John Kacur
2010-01-11 21:26 ` [PATCH 16/26] timer_stats: Convert to raw_spinlocks John Kacur
2010-01-11 21:26 ` [PATCH 17/26] x86: kvm: Convert i8254/i8259 locks to raw_spinlock John Kacur
2010-01-11 21:26 ` [PATCH 18/26] x86 - nmi: Convert nmi_lock " John Kacur
2010-01-11 21:26 ` [PATCH 19/26] cgroups: Convert cgroups release_list_lock " John Kacur
2010-01-11 21:26 ` [PATCH 20/26] proportions: Convert spinlocks to raw_spinlocks John Kacur
2010-01-11 21:26 ` [PATCH 21/26] percpu_counter: Convert to raw_spinlock John Kacur
2010-01-11 21:26 ` [PATCH 22/26] oprofile: " John Kacur
2010-01-11 21:26 ` [PATCH 23/26] vgacon: Convert vga console lock " John Kacur
2010-01-11 21:26 ` [PATCH 24/26] pci-access: Convert pci_lock " John Kacur
2010-01-11 21:26 ` [PATCH 25/26] kprobes: Convert to raw_spinlocks John Kacur
2010-01-11 21:26 ` [PATCH 26/26] softlockup: " John Kacur
2010-01-12 3:54 ` [PATCH 25/26] kprobes: " Frederic Weisbecker
2010-01-11 21:50 ` [PATCH 19/26] cgroups: Convert cgroups release_list_lock to raw_spinlock Paul Menage
2010-01-11 22:11 ` John Kacur
2010-01-12 3:39 ` [PATCH 14/26] trace: Convert various locks " Frederic Weisbecker
2010-01-13 15:28 ` Steven Rostedt
2010-01-13 15:36 ` John Kacur
2010-01-13 15:41 ` Steven Rostedt
2010-01-13 18:09 ` John Kacur
2010-01-17 13:00 ` Frederic Weisbecker
2010-01-12 3:24 ` [PATCH 00/26] Convert locks that can't sleep in -rt " Frederic Weisbecker
2010-01-12 3:49 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263245216-14754-8-git-send-email-jkacur@redhat.com \
--to=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome