提交 6e63ea4b 编写于 作者: R Robert Richter

x86/oprofile: Whitespaces changes only

This patch fixes whitespace changes of code that will be touched in
follow-on patches.
Signed-off-by: NRobert Richter <robert.richter@amd.com>
上级 44ab9a6b
...@@ -516,12 +516,12 @@ int __init op_nmi_init(struct oprofile_operations *ops) ...@@ -516,12 +516,12 @@ int __init op_nmi_init(struct oprofile_operations *ops)
register_cpu_notifier(&oprofile_cpu_nb); register_cpu_notifier(&oprofile_cpu_nb);
#endif #endif
/* default values, can be overwritten by model */ /* default values, can be overwritten by model */
ops->create_files = nmi_create_files; ops->create_files = nmi_create_files;
ops->setup = nmi_setup; ops->setup = nmi_setup;
ops->shutdown = nmi_shutdown; ops->shutdown = nmi_shutdown;
ops->start = nmi_start; ops->start = nmi_start;
ops->stop = nmi_stop; ops->stop = nmi_stop;
ops->cpu_type = cpu_type; ops->cpu_type = cpu_type;
if (model->init) if (model->init)
ret = model->init(ops); ret = model->init(ops);
......
...@@ -91,7 +91,7 @@ static void op_amd_setup_ctrs(struct op_x86_model_spec const *model, ...@@ -91,7 +91,7 @@ static void op_amd_setup_ctrs(struct op_x86_model_spec const *model,
int i; int i;
/* clear all counters */ /* clear all counters */
for (i = 0 ; i < NUM_CONTROLS; ++i) { for (i = 0; i < NUM_CONTROLS; ++i) {
if (unlikely(!msrs->controls[i].addr)) if (unlikely(!msrs->controls[i].addr))
continue; continue;
rdmsrl(msrs->controls[i].addr, val); rdmsrl(msrs->controls[i].addr, val);
...@@ -229,7 +229,7 @@ static int op_amd_check_ctrs(struct pt_regs * const regs, ...@@ -229,7 +229,7 @@ static int op_amd_check_ctrs(struct pt_regs * const regs,
u64 val; u64 val;
int i; int i;
for (i = 0 ; i < NUM_COUNTERS; ++i) { for (i = 0; i < NUM_COUNTERS; ++i) {
if (!reset_value[i]) if (!reset_value[i])
continue; continue;
rdmsrl(msrs->counters[i].addr, val); rdmsrl(msrs->counters[i].addr, val);
...@@ -250,7 +250,7 @@ static void op_amd_start(struct op_msrs const * const msrs) ...@@ -250,7 +250,7 @@ static void op_amd_start(struct op_msrs const * const msrs)
{ {
u64 val; u64 val;
int i; int i;
for (i = 0 ; i < NUM_COUNTERS ; ++i) { for (i = 0; i < NUM_COUNTERS; ++i) {
if (reset_value[i]) { if (reset_value[i]) {
rdmsrl(msrs->controls[i].addr, val); rdmsrl(msrs->controls[i].addr, val);
val |= ARCH_PERFMON_EVENTSEL0_ENABLE; val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
...@@ -270,7 +270,7 @@ static void op_amd_stop(struct op_msrs const * const msrs) ...@@ -270,7 +270,7 @@ static void op_amd_stop(struct op_msrs const * const msrs)
* Subtle: stop on all counters to avoid race with setting our * Subtle: stop on all counters to avoid race with setting our
* pm callback * pm callback
*/ */
for (i = 0 ; i < NUM_COUNTERS ; ++i) { for (i = 0; i < NUM_COUNTERS; ++i) {
if (!reset_value[i]) if (!reset_value[i])
continue; continue;
rdmsrl(msrs->controls[i].addr, val); rdmsrl(msrs->controls[i].addr, val);
...@@ -285,11 +285,11 @@ static void op_amd_shutdown(struct op_msrs const * const msrs) ...@@ -285,11 +285,11 @@ static void op_amd_shutdown(struct op_msrs const * const msrs)
{ {
int i; int i;
for (i = 0 ; i < NUM_COUNTERS ; ++i) { for (i = 0; i < NUM_COUNTERS; ++i) {
if (msrs->counters[i].addr) if (msrs->counters[i].addr)
release_perfctr_nmi(MSR_K7_PERFCTR0 + i); release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
} }
for (i = 0 ; i < NUM_CONTROLS ; ++i) { for (i = 0; i < NUM_CONTROLS; ++i) {
if (msrs->controls[i].addr) if (msrs->controls[i].addr)
release_evntsel_nmi(MSR_K7_EVNTSEL0 + i); release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
} }
......
...@@ -558,7 +558,7 @@ static void p4_setup_ctrs(struct op_x86_model_spec const *model, ...@@ -558,7 +558,7 @@ static void p4_setup_ctrs(struct op_x86_model_spec const *model,
} }
/* clear the cccrs we will use */ /* clear the cccrs we will use */
for (i = 0 ; i < num_counters ; i++) { for (i = 0; i < num_counters; i++) {
if (unlikely(!msrs->controls[i].addr)) if (unlikely(!msrs->controls[i].addr))
continue; continue;
rdmsr(p4_counters[VIRT_CTR(stag, i)].cccr_address, low, high); rdmsr(p4_counters[VIRT_CTR(stag, i)].cccr_address, low, high);
...@@ -575,7 +575,7 @@ static void p4_setup_ctrs(struct op_x86_model_spec const *model, ...@@ -575,7 +575,7 @@ static void p4_setup_ctrs(struct op_x86_model_spec const *model,
} }
/* setup all counters */ /* setup all counters */
for (i = 0 ; i < num_counters ; ++i) { for (i = 0; i < num_counters; ++i) {
if (counter_config[i].enabled && msrs->controls[i].addr) { if (counter_config[i].enabled && msrs->controls[i].addr) {
reset_value[i] = counter_config[i].count; reset_value[i] = counter_config[i].count;
pmc_setup_one_p4_counter(i); pmc_setup_one_p4_counter(i);
...@@ -678,7 +678,7 @@ static void p4_shutdown(struct op_msrs const * const msrs) ...@@ -678,7 +678,7 @@ static void p4_shutdown(struct op_msrs const * const msrs)
{ {
int i; int i;
for (i = 0 ; i < num_counters ; ++i) { for (i = 0; i < num_counters; ++i) {
if (msrs->counters[i].addr) if (msrs->counters[i].addr)
release_perfctr_nmi(msrs->counters[i].addr); release_perfctr_nmi(msrs->counters[i].addr);
} }
...@@ -687,7 +687,7 @@ static void p4_shutdown(struct op_msrs const * const msrs) ...@@ -687,7 +687,7 @@ static void p4_shutdown(struct op_msrs const * const msrs)
* conjunction with the counter registers (hence the starting offset). * conjunction with the counter registers (hence the starting offset).
* This saves a few bits. * This saves a few bits.
*/ */
for (i = num_counters ; i < num_controls ; ++i) { for (i = num_counters; i < num_controls; ++i) {
if (msrs->controls[i].addr) if (msrs->controls[i].addr)
release_evntsel_nmi(msrs->controls[i].addr); release_evntsel_nmi(msrs->controls[i].addr);
} }
......
...@@ -81,7 +81,7 @@ static void ppro_setup_ctrs(struct op_x86_model_spec const *model, ...@@ -81,7 +81,7 @@ static void ppro_setup_ctrs(struct op_x86_model_spec const *model,
} }
/* clear all counters */ /* clear all counters */
for (i = 0 ; i < num_counters; ++i) { for (i = 0; i < num_counters; ++i) {
if (unlikely(!msrs->controls[i].addr)) if (unlikely(!msrs->controls[i].addr))
continue; continue;
rdmsrl(msrs->controls[i].addr, val); rdmsrl(msrs->controls[i].addr, val);
...@@ -125,7 +125,7 @@ static int ppro_check_ctrs(struct pt_regs * const regs, ...@@ -125,7 +125,7 @@ static int ppro_check_ctrs(struct pt_regs * const regs,
if (unlikely(!reset_value)) if (unlikely(!reset_value))
goto out; goto out;
for (i = 0 ; i < num_counters; ++i) { for (i = 0; i < num_counters; ++i) {
if (!reset_value[i]) if (!reset_value[i])
continue; continue;
rdmsrl(msrs->counters[i].addr, val); rdmsrl(msrs->counters[i].addr, val);
...@@ -188,11 +188,11 @@ static void ppro_shutdown(struct op_msrs const * const msrs) ...@@ -188,11 +188,11 @@ static void ppro_shutdown(struct op_msrs const * const msrs)
{ {
int i; int i;
for (i = 0 ; i < num_counters ; ++i) { for (i = 0; i < num_counters; ++i) {
if (msrs->counters[i].addr) if (msrs->counters[i].addr)
release_perfctr_nmi(MSR_P6_PERFCTR0 + i); release_perfctr_nmi(MSR_P6_PERFCTR0 + i);
} }
for (i = 0 ; i < num_counters ; ++i) { for (i = 0; i < num_counters; ++i) {
if (msrs->controls[i].addr) if (msrs->controls[i].addr)
release_evntsel_nmi(MSR_P6_EVNTSEL0 + i); release_evntsel_nmi(MSR_P6_EVNTSEL0 + i);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册