aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/perf_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/perf_event.c')
-rw-r--r--arch/arm/kernel/perf_event.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
index 421a4bb88fed..624e2a5de2b3 100644
--- a/arch/arm/kernel/perf_event.c
+++ b/arch/arm/kernel/perf_event.c
@@ -32,7 +32,7 @@ static struct platform_device *pmu_device;
32 * Hardware lock to serialize accesses to PMU registers. Needed for the 32 * Hardware lock to serialize accesses to PMU registers. Needed for the
33 * read/modify/write sequences. 33 * read/modify/write sequences.
34 */ 34 */
35DEFINE_SPINLOCK(pmu_lock); 35static DEFINE_RAW_SPINLOCK(pmu_lock);
36 36
37/* 37/*
38 * ARMv6 supports a maximum of 3 events, starting from index 1. If we add 38 * ARMv6 supports a maximum of 3 events, starting from index 1. If we add
@@ -65,7 +65,7 @@ struct cpu_hw_events {
65 */ 65 */
66 unsigned long active_mask[BITS_TO_LONGS(ARMPMU_MAX_HWEVENTS)]; 66 unsigned long active_mask[BITS_TO_LONGS(ARMPMU_MAX_HWEVENTS)];
67}; 67};
68DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events); 68static DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events);
69 69
70struct arm_pmu { 70struct arm_pmu {
71 enum arm_perf_pmu_ids id; 71 enum arm_perf_pmu_ids id;
@@ -673,17 +673,17 @@ arch_initcall(init_hw_perf_events);
673 * This code has been adapted from the ARM OProfile support. 673 * This code has been adapted from the ARM OProfile support.
674 */ 674 */
675struct frame_tail { 675struct frame_tail {
676 struct frame_tail *fp; 676 struct frame_tail __user *fp;
677 unsigned long sp; 677 unsigned long sp;
678 unsigned long lr; 678 unsigned long lr;
679} __attribute__((packed)); 679} __attribute__((packed));
680 680
681/* 681/*
682 * Get the return address for a single stackframe and return a pointer to the 682 * Get the return address for a single stackframe and return a pointer to the
683 * next frame tail. 683 * next frame tail.
684 */ 684 */
685static struct frame_tail * 685static struct frame_tail __user *
686user_backtrace(struct frame_tail *tail, 686user_backtrace(struct frame_tail __user *tail,
687 struct perf_callchain_entry *entry) 687 struct perf_callchain_entry *entry)
688{ 688{
689 struct frame_tail buftail; 689 struct frame_tail buftail;
@@ -709,10 +709,10 @@ user_backtrace(struct frame_tail *tail,
709void 709void
710perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) 710perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
711{ 711{
712 struct frame_tail *tail; 712 struct frame_tail __user *tail;
713 713
714 714
715 tail = (struct frame_tail *)regs->ARM_fp - 1; 715 tail = (struct frame_tail __user *)regs->ARM_fp - 1;
716 716
717 while (tail && !((unsigned long)tail & 0x3)) 717 while (tail && !((unsigned long)tail & 0x3))
718 tail = user_backtrace(tail, entry); 718 tail = user_backtrace(tail, entry);