Searched refs:phys_ctr (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/arch/powerpc/platforms/cell/
H A Dpmu.c74 u32 cbe_read_phys_ctr(u32 cpu, u32 phys_ctr) cbe_read_phys_ctr() argument
78 if (phys_ctr < NR_PHYS_CTRS) { cbe_read_phys_ctr()
82 if (val_in_latch & (1 << phys_ctr)) { cbe_read_phys_ctr()
83 READ_SHADOW_REG(val, pm_ctr[phys_ctr]); cbe_read_phys_ctr()
85 READ_MMIO_UPPER32(val, pm_ctr[phys_ctr]); cbe_read_phys_ctr()
93 void cbe_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val) cbe_write_phys_ctr() argument
98 if (phys_ctr < NR_PHYS_CTRS) { cbe_write_phys_ctr()
103 WRITE_WO_MMIO(pm_ctr[phys_ctr], val); cbe_write_phys_ctr()
114 shadow_regs->counter_value_in_latch |= (1 << phys_ctr); cbe_write_phys_ctr()
129 u32 phys_ctr = ctr & (NR_PHYS_CTRS - 1); cbe_read_ctr() local
131 val = cbe_read_phys_ctr(cpu, phys_ctr); cbe_read_ctr()
133 if (cbe_get_ctr_size(cpu, phys_ctr) == 16) cbe_read_ctr()
142 u32 phys_ctr; cbe_write_ctr() local
145 phys_ctr = ctr & (NR_PHYS_CTRS - 1); cbe_write_ctr()
147 if (cbe_get_ctr_size(cpu, phys_ctr) == 16) { cbe_write_ctr()
148 phys_val = cbe_read_phys_ctr(cpu, phys_ctr); cbe_write_ctr()
156 cbe_write_phys_ctr(cpu, phys_ctr, val); cbe_write_ctr()
271 u32 cbe_get_ctr_size(u32 cpu, u32 phys_ctr) cbe_get_ctr_size() argument
275 if (phys_ctr < NR_PHYS_CTRS) { cbe_get_ctr_size()
277 size = (pm_ctrl & CBE_PM_16BIT_CTR(phys_ctr)) ? 16 : 32; cbe_get_ctr_size()
284 void cbe_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size) cbe_set_ctr_size() argument
288 if (phys_ctr < NR_PHYS_CTRS) { cbe_set_ctr_size()
292 pm_ctrl |= CBE_PM_16BIT_CTR(phys_ctr); cbe_set_ctr_size()
296 pm_ctrl &= ~CBE_PM_16BIT_CTR(phys_ctr); cbe_set_ctr_size()
/linux-4.4.14/arch/powerpc/include/asm/
H A Dcell-pmu.h79 extern u32 cbe_read_phys_ctr(u32 cpu, u32 phys_ctr);
80 extern void cbe_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val);
89 extern u32 cbe_get_ctr_size(u32 cpu, u32 phys_ctr);
90 extern void cbe_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size);
H A Dps3.h506 u32 ps3_read_phys_ctr(u32 cpu, u32 phys_ctr);
507 void ps3_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val);
516 u32 ps3_get_ctr_size(u32 cpu, u32 phys_ctr);
517 void ps3_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size);
/linux-4.4.14/drivers/ps3/
H A Dps3-lpm.c210 u32 ps3_read_phys_ctr(u32 cpu, u32 phys_ctr) ps3_read_phys_ctr() argument
216 if (phys_ctr >= NR_PHYS_CTRS) { ps3_read_phys_ctr()
217 dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__, ps3_read_phys_ctr()
218 __LINE__, phys_ctr); ps3_read_phys_ctr() local
226 "phys_ctr %u, %s\n", __func__, __LINE__, phys_ctr, ps3_read_phys_ctr() local
231 switch (phys_ctr) { ps3_read_phys_ctr()
254 void ps3_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val) ps3_write_phys_ctr() argument
262 if (phys_ctr >= NR_PHYS_CTRS) { ps3_write_phys_ctr()
263 dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__, ps3_write_phys_ctr()
264 __LINE__, phys_ctr); ps3_write_phys_ctr() local
268 switch (phys_ctr) { ps3_write_phys_ctr()
303 "phys_ctr %u, val %u, %s\n", __func__, __LINE__, ps3_write_phys_ctr()
304 phys_ctr, val, ps3_result(result)); ps3_write_phys_ctr() local
318 u32 phys_ctr = ctr & (NR_PHYS_CTRS - 1); ps3_read_ctr() local
320 val = ps3_read_phys_ctr(cpu, phys_ctr); ps3_read_ctr()
322 if (ps3_get_ctr_size(cpu, phys_ctr) == 16) ps3_read_ctr()
338 u32 phys_ctr; ps3_write_ctr() local
341 phys_ctr = ctr & (NR_PHYS_CTRS - 1); ps3_write_ctr()
343 if (ps3_get_ctr_size(cpu, phys_ctr) == 16) { ps3_write_ctr()
344 phys_val = ps3_read_phys_ctr(cpu, phys_ctr); ps3_write_ctr()
352 ps3_write_phys_ctr(cpu, phys_ctr, val); ps3_write_ctr()
521 u32 ps3_get_ctr_size(u32 cpu, u32 phys_ctr) ps3_get_ctr_size() argument
525 if (phys_ctr >= NR_PHYS_CTRS) { ps3_get_ctr_size()
526 dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__, ps3_get_ctr_size()
527 __LINE__, phys_ctr); ps3_get_ctr_size() local
532 return (pm_ctrl & CBE_PM_16BIT_CTR(phys_ctr)) ? 16 : 32; ps3_get_ctr_size()
540 void ps3_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size) ps3_set_ctr_size() argument
544 if (phys_ctr >= NR_PHYS_CTRS) { ps3_set_ctr_size()
545 dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__, ps3_set_ctr_size()
546 __LINE__, phys_ctr); ps3_set_ctr_size() local
554 pm_ctrl |= CBE_PM_16BIT_CTR(phys_ctr); ps3_set_ctr_size()
559 pm_ctrl &= ~CBE_PM_16BIT_CTR(phys_ctr); ps3_set_ctr_size()

Completed in 224 milliseconds