Lines Matching refs:pcc_ss_id

95 #define GET_PCC_VADDR(offs, pcc_ss_id) (pcc_data[pcc_ss_id]->pcc_comm_addr + \  argument
201 static int check_pcc_chan(int pcc_ss_id, bool chk_err_bit) in check_pcc_chan() argument
204 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; in check_pcc_chan()
227 pcc_ss_id, ret); in check_pcc_chan()
236 static int send_pcc_cmd(int pcc_ss_id, u16 cmd) in send_pcc_cmd() argument
239 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; in send_pcc_cmd()
255 send_pcc_cmd(pcc_ss_id, CMD_WRITE); in send_pcc_cmd()
257 ret = check_pcc_chan(pcc_ss_id, false); in send_pcc_cmd()
292 pcc_ss_id); in send_pcc_cmd()
314 pcc_ss_id, cmd, ret); in send_pcc_cmd()
319 ret = check_pcc_chan(pcc_ss_id, true); in send_pcc_cmd()
607 static int pcc_data_alloc(int pcc_ss_id) in pcc_data_alloc() argument
609 if (pcc_ss_id < 0 || pcc_ss_id >= MAX_PCC_SUBSPACES) in pcc_data_alloc()
612 if (pcc_data[pcc_ss_id]) { in pcc_data_alloc()
613 pcc_data[pcc_ss_id]->refcount++; in pcc_data_alloc()
615 pcc_data[pcc_ss_id] = kzalloc(sizeof(struct cppc_pcc_data), in pcc_data_alloc()
617 if (!pcc_data[pcc_ss_id]) in pcc_data_alloc()
619 pcc_data[pcc_ss_id]->refcount++; in pcc_data_alloc()
915 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, pr->id); in acpi_cppc_processor_exit() local
917 if (pcc_ss_id >= 0 && pcc_data[pcc_ss_id]) { in acpi_cppc_processor_exit()
918 if (pcc_data[pcc_ss_id]->pcc_channel_acquired) { in acpi_cppc_processor_exit()
919 pcc_data[pcc_ss_id]->refcount--; in acpi_cppc_processor_exit()
920 if (!pcc_data[pcc_ss_id]->refcount) { in acpi_cppc_processor_exit()
921 pcc_mbox_free_channel(pcc_data[pcc_ss_id]->pcc_channel); in acpi_cppc_processor_exit()
922 kfree(pcc_data[pcc_ss_id]); in acpi_cppc_processor_exit()
923 pcc_data[pcc_ss_id] = NULL; in acpi_cppc_processor_exit()
983 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cpc_read() local
1008 } else if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0) in cpc_read()
1009 vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); in cpc_read()
1033 reg->bit_width, pcc_ss_id); in cpc_read()
1044 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cpc_write() local
1060 } else if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0) in cpc_write()
1061 vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); in cpc_write()
1085 reg->bit_width, pcc_ss_id); in cpc_write()
1106 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); in cppc_get_perf() local
1110 if (pcc_ss_id < 0) in cppc_get_perf()
1113 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_perf()
1117 if (send_pcc_cmd(pcc_ss_id, CMD_READ) >= 0) in cppc_get_perf()
1184 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); in cppc_get_perf_caps() local
1205 if (pcc_ss_id < 0) { in cppc_get_perf_caps()
1209 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_perf_caps()
1213 if (send_pcc_cmd(pcc_ss_id, CMD_READ) < 0) { in cppc_get_perf_caps()
1314 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); in cppc_get_perf_ctrs() local
1339 if (pcc_ss_id < 0) { in cppc_get_perf_ctrs()
1343 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_perf_ctrs()
1347 if (send_pcc_cmd(pcc_ss_id, CMD_READ) < 0) { in cppc_get_perf_ctrs()
1388 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cppc_set_epp_perf() local
1404 if (pcc_ss_id < 0) { in cppc_set_epp_perf()
1421 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_epp_perf()
1425 ret = send_pcc_cmd(pcc_ss_id, CMD_WRITE); in cppc_set_epp_perf()
1458 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); in cppc_get_auto_sel_caps() local
1462 if (pcc_ss_id < 0) in cppc_get_auto_sel_caps()
1465 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_auto_sel_caps()
1469 if (send_pcc_cmd(pcc_ss_id, CMD_READ) >= 0) { in cppc_get_auto_sel_caps()
1492 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cppc_set_auto_sel() local
1506 if (pcc_ss_id < 0) { in cppc_set_auto_sel()
1517 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_auto_sel()
1521 ret = send_pcc_cmd(pcc_ss_id, CMD_WRITE); in cppc_set_auto_sel()
1542 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cppc_set_enable() local
1557 if (pcc_ss_id < 0) in cppc_set_enable()
1564 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_enable()
1568 ret = send_pcc_cmd(pcc_ss_id, CMD_WRITE); in cppc_set_enable()
1588 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cppc_set_perf() local
1609 if (pcc_ss_id < 0) { in cppc_set_perf()
1613 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_perf()
1616 ret = check_pcc_chan(pcc_ss_id, false); in cppc_set_perf()
1695 send_pcc_cmd(pcc_ss_id, CMD_WRITE); in cppc_set_perf()
1737 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu_num); in cppc_get_transition_latency() local
1750 if (pcc_ss_id < 0) in cppc_get_transition_latency()
1753 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_transition_latency()