提交 8689b517 编写于 作者: A Andi Kleen 提交者: Andi Kleen

[PATCH] i386: Fix some warnings added by earlier patch

Signed-off-by: NAndi Kleen <ak@suse.de>
上级 90767bd1
...@@ -126,7 +126,7 @@ int avail_to_resrv_perfctr_nmi_bit(unsigned int counter) ...@@ -126,7 +126,7 @@ int avail_to_resrv_perfctr_nmi_bit(unsigned int counter)
int cpu; int cpu;
BUG_ON(counter > NMI_MAX_COUNTER_BITS); BUG_ON(counter > NMI_MAX_COUNTER_BITS);
for_each_possible_cpu (cpu) { for_each_possible_cpu (cpu) {
if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
return 0; return 0;
} }
return 1; return 1;
...@@ -142,7 +142,7 @@ int avail_to_resrv_perfctr_nmi(unsigned int msr) ...@@ -142,7 +142,7 @@ int avail_to_resrv_perfctr_nmi(unsigned int msr)
BUG_ON(counter > NMI_MAX_COUNTER_BITS); BUG_ON(counter > NMI_MAX_COUNTER_BITS);
for_each_possible_cpu (cpu) { for_each_possible_cpu (cpu) {
if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
return 0; return 0;
} }
return 1; return 1;
...@@ -157,7 +157,7 @@ static int __reserve_perfctr_nmi(int cpu, unsigned int msr) ...@@ -157,7 +157,7 @@ static int __reserve_perfctr_nmi(int cpu, unsigned int msr)
counter = nmi_perfctr_msr_to_bit(msr); counter = nmi_perfctr_msr_to_bit(msr);
BUG_ON(counter > NMI_MAX_COUNTER_BITS); BUG_ON(counter > NMI_MAX_COUNTER_BITS);
if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
return 1; return 1;
return 0; return 0;
} }
...@@ -171,7 +171,7 @@ static void __release_perfctr_nmi(int cpu, unsigned int msr) ...@@ -171,7 +171,7 @@ static void __release_perfctr_nmi(int cpu, unsigned int msr)
counter = nmi_perfctr_msr_to_bit(msr); counter = nmi_perfctr_msr_to_bit(msr);
BUG_ON(counter > NMI_MAX_COUNTER_BITS); BUG_ON(counter > NMI_MAX_COUNTER_BITS);
clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)); clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]);
} }
int reserve_perfctr_nmi(unsigned int msr) int reserve_perfctr_nmi(unsigned int msr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册