Lines Matching refs:phys_ctr
62 u32 cbe_read_phys_ctr(u32 cpu, u32 phys_ctr) in cbe_read_phys_ctr() argument
66 if (phys_ctr < NR_PHYS_CTRS) { in cbe_read_phys_ctr()
70 if (val_in_latch & (1 << phys_ctr)) { in cbe_read_phys_ctr()
71 READ_SHADOW_REG(val, pm_ctr[phys_ctr]); in cbe_read_phys_ctr()
73 READ_MMIO_UPPER32(val, pm_ctr[phys_ctr]); in cbe_read_phys_ctr()
81 void cbe_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val) in cbe_write_phys_ctr() argument
86 if (phys_ctr < NR_PHYS_CTRS) { in cbe_write_phys_ctr()
91 WRITE_WO_MMIO(pm_ctr[phys_ctr], val); in cbe_write_phys_ctr()
102 shadow_regs->counter_value_in_latch |= (1 << phys_ctr); in cbe_write_phys_ctr()
117 u32 phys_ctr = ctr & (NR_PHYS_CTRS - 1); in cbe_read_ctr() local
119 val = cbe_read_phys_ctr(cpu, phys_ctr); in cbe_read_ctr()
121 if (cbe_get_ctr_size(cpu, phys_ctr) == 16) in cbe_read_ctr()
130 u32 phys_ctr; in cbe_write_ctr() local
133 phys_ctr = ctr & (NR_PHYS_CTRS - 1); in cbe_write_ctr()
135 if (cbe_get_ctr_size(cpu, phys_ctr) == 16) { in cbe_write_ctr()
136 phys_val = cbe_read_phys_ctr(cpu, phys_ctr); in cbe_write_ctr()
144 cbe_write_phys_ctr(cpu, phys_ctr, val); in cbe_write_ctr()
259 u32 cbe_get_ctr_size(u32 cpu, u32 phys_ctr) in cbe_get_ctr_size() argument
263 if (phys_ctr < NR_PHYS_CTRS) { in cbe_get_ctr_size()
265 size = (pm_ctrl & CBE_PM_16BIT_CTR(phys_ctr)) ? 16 : 32; in cbe_get_ctr_size()
272 void cbe_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size) in cbe_set_ctr_size() argument
276 if (phys_ctr < NR_PHYS_CTRS) { in cbe_set_ctr_size()
280 pm_ctrl |= CBE_PM_16BIT_CTR(phys_ctr); in cbe_set_ctr_size()
284 pm_ctrl &= ~CBE_PM_16BIT_CTR(phys_ctr); in cbe_set_ctr_size()