diff options
author | David S. Miller <davem@davemloft.net> | 2012-08-17 08:16:22 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-19 10:04:08 +0400 |
commit | 0bab20ba4c95f56355c24a0b9f03eb486c2a267d (patch) | |
tree | 906d0ca27a6c62ea01b55e24f7a4c3a7e76a723e /arch/sparc/kernel/pcr.c | |
parent | 8c79bfa51101354853f0f5d3b02435cec429da51 (diff) | |
download | linux-0bab20ba4c95f56355c24a0b9f03eb486c2a267d.tar.xz |
sparc64: Add 'reg_num' argument to pcr_ops methods.
SPARC-T4 and later have multiple PCR registers, one for each
PIC counter.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/pcr.c')
-rw-r--r-- | arch/sparc/kernel/pcr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c index 0ce0dd2332aa..3d9ab5be23d8 100644 --- a/arch/sparc/kernel/pcr.c +++ b/arch/sparc/kernel/pcr.c @@ -60,16 +60,18 @@ void arch_irq_work_raise(void) const struct pcr_ops *pcr_ops; EXPORT_SYMBOL_GPL(pcr_ops); -static u64 direct_pcr_read(void) +static u64 direct_pcr_read(unsigned long reg_num) { u64 val; + WARN_ON_ONCE(reg_num != 0); read_pcr(val); return val; } -static void direct_pcr_write(u64 val) +static void direct_pcr_write(unsigned long reg_num, u64 val) { + WARN_ON_ONCE(reg_num != 0); write_pcr(val); } @@ -78,10 +80,11 @@ static const struct pcr_ops direct_pcr_ops = { .write = direct_pcr_write, }; -static void n2_pcr_write(u64 val) +static void n2_pcr_write(unsigned long reg_num, u64 val) { unsigned long ret; + WARN_ON_ONCE(reg_num != 0); if (val & PCR_N2_HTRACE) { ret = sun4v_niagara2_setperf(HV_N2_PERF_SPARC_CTL, val); if (ret != HV_EOK) |