diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-02-17 21:22:27 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-18 22:52:33 -0500 |
commit | 071c06cb570d38efe23a124e885f2f3e643a9206 (patch) | |
tree | 76c3e1193501db7a8b8d2ff21ad31d5592534c53 /arch/powerpc | |
parent | b8f87782e82709d613c5d2a165d1443478e57c00 (diff) |
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/pmc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c index 0516e2d3e02e..461499b43cff 100644 --- a/arch/powerpc/kernel/pmc.c +++ b/arch/powerpc/kernel/pmc.c | |||
@@ -37,7 +37,7 @@ static void dummy_perf(struct pt_regs *regs) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | ||
40 | static DEFINE_SPINLOCK(pmc_owner_lock); | 40 | static DEFINE_RAW_SPINLOCK(pmc_owner_lock); |
41 | static void *pmc_owner_caller; /* mostly for debugging */ | 41 | static void *pmc_owner_caller; /* mostly for debugging */ |
42 | perf_irq_t perf_irq = dummy_perf; | 42 | perf_irq_t perf_irq = dummy_perf; |
43 | 43 | ||
@@ -45,7 +45,7 @@ int reserve_pmc_hardware(perf_irq_t new_perf_irq) | |||
45 | { | 45 | { |
46 | int err = 0; | 46 | int err = 0; |
47 | 47 | ||
48 | spin_lock(&pmc_owner_lock); | 48 | raw_spin_lock(&pmc_owner_lock); |
49 | 49 | ||
50 | if (pmc_owner_caller) { | 50 | if (pmc_owner_caller) { |
51 | printk(KERN_WARNING "reserve_pmc_hardware: " | 51 | printk(KERN_WARNING "reserve_pmc_hardware: " |
@@ -59,21 +59,21 @@ int reserve_pmc_hardware(perf_irq_t new_perf_irq) | |||
59 | perf_irq = new_perf_irq ? new_perf_irq : dummy_perf; | 59 | perf_irq = new_perf_irq ? new_perf_irq : dummy_perf; |
60 | 60 | ||
61 | out: | 61 | out: |
62 | spin_unlock(&pmc_owner_lock); | 62 | raw_spin_unlock(&pmc_owner_lock); |
63 | return err; | 63 | return err; |
64 | } | 64 | } |
65 | EXPORT_SYMBOL_GPL(reserve_pmc_hardware); | 65 | EXPORT_SYMBOL_GPL(reserve_pmc_hardware); |
66 | 66 | ||
67 | void release_pmc_hardware(void) | 67 | void release_pmc_hardware(void) |
68 | { | 68 | { |
69 | spin_lock(&pmc_owner_lock); | 69 | raw_spin_lock(&pmc_owner_lock); |
70 | 70 | ||
71 | WARN_ON(! pmc_owner_caller); | 71 | WARN_ON(! pmc_owner_caller); |
72 | 72 | ||
73 | pmc_owner_caller = NULL; | 73 | pmc_owner_caller = NULL; |
74 | perf_irq = dummy_perf; | 74 | perf_irq = dummy_perf; |
75 | 75 | ||
76 | spin_unlock(&pmc_owner_lock); | 76 | raw_spin_unlock(&pmc_owner_lock); |
77 | } | 77 | } |
78 | EXPORT_SYMBOL_GPL(release_pmc_hardware); | 78 | EXPORT_SYMBOL_GPL(release_pmc_hardware); |
79 | 79 | ||