mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
powerpc: Convert pmc_owner_lock to raw_spinlock
pmc_owner_lock needs to be a real spinlock in RT. Convert it to raw_spinlock. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
b8f87782e8
commit
071c06cb57
@ -37,7 +37,7 @@ static void dummy_perf(struct pt_regs *regs)
|
||||
}
|
||||
|
||||
|
||||
static DEFINE_SPINLOCK(pmc_owner_lock);
|
||||
static DEFINE_RAW_SPINLOCK(pmc_owner_lock);
|
||||
static void *pmc_owner_caller; /* mostly for debugging */
|
||||
perf_irq_t perf_irq = dummy_perf;
|
||||
|
||||
@ -45,7 +45,7 @@ int reserve_pmc_hardware(perf_irq_t new_perf_irq)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
spin_lock(&pmc_owner_lock);
|
||||
raw_spin_lock(&pmc_owner_lock);
|
||||
|
||||
if (pmc_owner_caller) {
|
||||
printk(KERN_WARNING "reserve_pmc_hardware: "
|
||||
@ -59,21 +59,21 @@ int reserve_pmc_hardware(perf_irq_t new_perf_irq)
|
||||
perf_irq = new_perf_irq ? new_perf_irq : dummy_perf;
|
||||
|
||||
out:
|
||||
spin_unlock(&pmc_owner_lock);
|
||||
raw_spin_unlock(&pmc_owner_lock);
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(reserve_pmc_hardware);
|
||||
|
||||
void release_pmc_hardware(void)
|
||||
{
|
||||
spin_lock(&pmc_owner_lock);
|
||||
raw_spin_lock(&pmc_owner_lock);
|
||||
|
||||
WARN_ON(! pmc_owner_caller);
|
||||
|
||||
pmc_owner_caller = NULL;
|
||||
perf_irq = dummy_perf;
|
||||
|
||||
spin_unlock(&pmc_owner_lock);
|
||||
raw_spin_unlock(&pmc_owner_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(release_pmc_hardware);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user