Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295173
b: refs/heads/master
c: 307b1cd
h: refs/heads/master
i:
  295171: 6ccc90b
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Mar 23, 2012
1 parent 943f9f7 commit b3607ef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2df5e12900d847af9113980d015939dde0d1b1d4
refs/heads/master: 307b1cd7ecd7f3dc5ce3d3860957f034f0abe4df
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,14 @@ static bool __perf_sched_find_counter(struct perf_sched *sched)
/* Prefer fixed purpose counters */
if (x86_pmu.num_counters_fixed) {
idx = X86_PMC_IDX_FIXED;
for_each_set_bit_cont(idx, c->idxmsk, X86_PMC_IDX_MAX) {
for_each_set_bit_from(idx, c->idxmsk, X86_PMC_IDX_MAX) {
if (!__test_and_set_bit(idx, sched->state.used))
goto done;
}
}
/* Grab the first unused counter starting with idx */
idx = sched->state.counter;
for_each_set_bit_cont(idx, c->idxmsk, X86_PMC_IDX_FIXED) {
for_each_set_bit_from(idx, c->idxmsk, X86_PMC_IDX_FIXED) {
if (!__test_and_set_bit(idx, sched->state.used))
goto done;
}
Expand Down
5 changes: 4 additions & 1 deletion trunk/include/linux/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ extern unsigned long __sw_hweight64(__u64 w);
(bit) = find_next_bit((addr), (size), (bit) + 1))

/* same as for_each_set_bit() but use bit as value to start with */
#define for_each_set_bit_cont(bit, addr, size) \
#define for_each_set_bit_from(bit, addr, size) \
for ((bit) = find_next_bit((addr), (size), (bit)); \
(bit) < (size); \
(bit) = find_next_bit((addr), (size), (bit) + 1))

#define for_each_set_bit_cont(bit, addr, size) \
for_each_set_bit_from(bit, addr, size)

static __inline__ int get_bitmask_order(unsigned int count)
{
int order;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/util/include/linux/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
(bit) = find_next_bit((addr), (size), (bit) + 1))

/* same as for_each_set_bit() but use bit as value to start with */
#define for_each_set_bit_cont(bit, addr, size) \
#define for_each_set_bit_from(bit, addr, size) \
for ((bit) = find_next_bit((addr), (size), (bit)); \
(bit) < (size); \
(bit) = find_next_bit((addr), (size), (bit) + 1))
Expand Down

0 comments on commit b3607ef

Please sign in to comment.