Commit 81269a08 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

perf_event: x86: Fixup constraints typing issue

Constraints gets defined an u64 but in long quantities and then cast to
long.
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <20100122155535.504916780@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 502568d5
...@@ -1232,7 +1232,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign) ...@@ -1232,7 +1232,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
int i, j , w, num; int i, j , w, num;
int weight, wmax; int weight, wmax;
unsigned long *c; unsigned long *c;
u64 constraints[X86_PMC_IDX_MAX][BITS_TO_LONGS(X86_PMC_IDX_MAX)]; unsigned long constraints[X86_PMC_IDX_MAX][BITS_TO_LONGS(X86_PMC_IDX_MAX)];
unsigned long used_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; unsigned long used_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
struct hw_perf_event *hwc; struct hw_perf_event *hwc;
...@@ -1249,7 +1249,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign) ...@@ -1249,7 +1249,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
*/ */
for (i = 0, num = n; i < n; i++, num--) { for (i = 0, num = n; i < n; i++, num--) {
hwc = &cpuc->event_list[i]->hw; hwc = &cpuc->event_list[i]->hw;
c = (unsigned long *)constraints[i]; c = constraints[i];
/* never assigned */ /* never assigned */
if (hwc->idx == -1) if (hwc->idx == -1)
...@@ -1306,7 +1306,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign) ...@@ -1306,7 +1306,7 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
for (w = 1, num = n; num && w <= wmax; w++) { for (w = 1, num = n; num && w <= wmax; w++) {
/* for each event */ /* for each event */
for (i = 0; num && i < n; i++) { for (i = 0; num && i < n; i++) {
c = (unsigned long *)constraints[i]; c = constraints[i];
hwc = &cpuc->event_list[i]->hw; hwc = &cpuc->event_list[i]->hw;
weight = bitmap_weight(c, X86_PMC_IDX_MAX); weight = bitmap_weight(c, X86_PMC_IDX_MAX);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment