diff options
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 3815ac1d58b2..8631320a50d0 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -140,7 +140,8 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | #ifdef CONFIG_LOCK_STAT | 142 | #ifdef CONFIG_LOCK_STAT |
143 | static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], lock_stats); | 143 | static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], |
144 | cpu_lock_stats); | ||
144 | 145 | ||
145 | static int lock_point(unsigned long points[], unsigned long ip) | 146 | static int lock_point(unsigned long points[], unsigned long ip) |
146 | { | 147 | { |
@@ -186,7 +187,7 @@ struct lock_class_stats lock_stats(struct lock_class *class) | |||
186 | memset(&stats, 0, sizeof(struct lock_class_stats)); | 187 | memset(&stats, 0, sizeof(struct lock_class_stats)); |
187 | for_each_possible_cpu(cpu) { | 188 | for_each_possible_cpu(cpu) { |
188 | struct lock_class_stats *pcs = | 189 | struct lock_class_stats *pcs = |
189 | &per_cpu(lock_stats, cpu)[class - lock_classes]; | 190 | &per_cpu(cpu_lock_stats, cpu)[class - lock_classes]; |
190 | 191 | ||
191 | for (i = 0; i < ARRAY_SIZE(stats.contention_point); i++) | 192 | for (i = 0; i < ARRAY_SIZE(stats.contention_point); i++) |
192 | stats.contention_point[i] += pcs->contention_point[i]; | 193 | stats.contention_point[i] += pcs->contention_point[i]; |
@@ -213,7 +214,7 @@ void clear_lock_stats(struct lock_class *class) | |||
213 | 214 | ||
214 | for_each_possible_cpu(cpu) { | 215 | for_each_possible_cpu(cpu) { |
215 | struct lock_class_stats *cpu_stats = | 216 | struct lock_class_stats *cpu_stats = |
216 | &per_cpu(lock_stats, cpu)[class - lock_classes]; | 217 | &per_cpu(cpu_lock_stats, cpu)[class - lock_classes]; |
217 | 218 | ||
218 | memset(cpu_stats, 0, sizeof(struct lock_class_stats)); | 219 | memset(cpu_stats, 0, sizeof(struct lock_class_stats)); |
219 | } | 220 | } |
@@ -223,12 +224,12 @@ void clear_lock_stats(struct lock_class *class) | |||
223 | 224 | ||
224 | static struct lock_class_stats *get_lock_stats(struct lock_class *class) | 225 | static struct lock_class_stats *get_lock_stats(struct lock_class *class) |
225 | { | 226 | { |
226 | return &get_cpu_var(lock_stats)[class - lock_classes]; | 227 | return &get_cpu_var(cpu_lock_stats)[class - lock_classes]; |
227 | } | 228 | } |
228 | 229 | ||
229 | static void put_lock_stats(struct lock_class_stats *stats) | 230 | static void put_lock_stats(struct lock_class_stats *stats) |
230 | { | 231 | { |
231 | put_cpu_var(lock_stats); | 232 | put_cpu_var(cpu_lock_stats); |
232 | } | 233 | } |
233 | 234 | ||
234 | static void lock_release_holdtime(struct held_lock *hlock) | 235 | static void lock_release_holdtime(struct held_lock *hlock) |