Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42273
b: refs/heads/master
c: 5231800
h: refs/heads/master
i:
  42271: 83fce23
v: v3
  • Loading branch information
Arnd Bergmann authored and Paul Mackerras committed Dec 4, 2006
1 parent 124714f commit 9c0ca28
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6730ed4c280ff9e55766796523c94a7d111da09
refs/heads/master: 5231800c6fb99c106951a5e1a8e739ad9657e93f
13 changes: 13 additions & 0 deletions trunk/arch/powerpc/platforms/cell/pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ u32 cbe_read_phys_ctr(u32 cpu, u32 phys_ctr)

return val;
}
EXPORT_SYMBOL_GPL(cbe_read_phys_ctr);

void cbe_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val)
{
Expand All @@ -111,6 +112,7 @@ void cbe_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val)
}
}
}
EXPORT_SYMBOL_GPL(cbe_write_phys_ctr);

/*
* "Logical" counter registers.
Expand All @@ -130,6 +132,7 @@ u32 cbe_read_ctr(u32 cpu, u32 ctr)

return val;
}
EXPORT_SYMBOL_GPL(cbe_read_ctr);

void cbe_write_ctr(u32 cpu, u32 ctr, u32 val)
{
Expand All @@ -149,6 +152,7 @@ void cbe_write_ctr(u32 cpu, u32 ctr, u32 val)

cbe_write_phys_ctr(cpu, phys_ctr, val);
}
EXPORT_SYMBOL_GPL(cbe_write_ctr);

/*
* Counter-control registers.
Expand All @@ -164,12 +168,14 @@ u32 cbe_read_pm07_control(u32 cpu, u32 ctr)

return pm07_control;
}
EXPORT_SYMBOL_GPL(cbe_read_pm07_control);

void cbe_write_pm07_control(u32 cpu, u32 ctr, u32 val)
{
if (ctr < NR_CTRS)
WRITE_WO_MMIO(pm07_control[ctr], val);
}
EXPORT_SYMBOL_GPL(cbe_write_pm07_control);

/*
* Other PMU control registers. Most of these are write-only.
Expand Down Expand Up @@ -215,6 +221,7 @@ u32 cbe_read_pm(u32 cpu, enum pm_reg_name reg)

return val;
}
EXPORT_SYMBOL_GPL(cbe_read_pm);

void cbe_write_pm(u32 cpu, enum pm_reg_name reg, u32 val)
{
Expand Down Expand Up @@ -252,6 +259,7 @@ void cbe_write_pm(u32 cpu, enum pm_reg_name reg, u32 val)
break;
}
}
EXPORT_SYMBOL_GPL(cbe_write_pm);

/*
* Get/set the size of a physical counter to either 16 or 32 bits.
Expand All @@ -268,6 +276,7 @@ u32 cbe_get_ctr_size(u32 cpu, u32 phys_ctr)

return size;
}
EXPORT_SYMBOL_GPL(cbe_get_ctr_size);

void cbe_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size)
{
Expand All @@ -287,6 +296,7 @@ void cbe_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size)
cbe_write_pm(cpu, pm_control, pm_ctrl);
}
}
EXPORT_SYMBOL_GPL(cbe_set_ctr_size);

/*
* Enable/disable the entire performance monitoring unit.
Expand All @@ -304,13 +314,15 @@ void cbe_enable_pm(u32 cpu)
pm_ctrl = cbe_read_pm(cpu, pm_control) | CBE_PM_ENABLE_PERF_MON;
cbe_write_pm(cpu, pm_control, pm_ctrl);
}
EXPORT_SYMBOL_GPL(cbe_enable_pm);

void cbe_disable_pm(u32 cpu)
{
u32 pm_ctrl;
pm_ctrl = cbe_read_pm(cpu, pm_control) & ~CBE_PM_ENABLE_PERF_MON;
cbe_write_pm(cpu, pm_control, pm_ctrl);
}
EXPORT_SYMBOL_GPL(cbe_disable_pm);

/*
* Reading from the trace_buffer.
Expand All @@ -325,4 +337,5 @@ void cbe_read_trace_buffer(u32 cpu, u64 *buf)
*buf++ = in_be64(&pmd_regs->trace_buffer_0_63);
*buf++ = in_be64(&pmd_regs->trace_buffer_64_127);
}
EXPORT_SYMBOL_GPL(cbe_read_trace_buffer);

0 comments on commit 9c0ca28

Please sign in to comment.