Lines Matching refs:pcc_ss_id

95 #define GET_PCC_VADDR(offs, pcc_ss_id) (pcc_data[pcc_ss_id]->pcc_comm_addr + \  argument
196 static int check_pcc_chan(int pcc_ss_id, bool chk_err_bit) in check_pcc_chan() argument
199 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; in check_pcc_chan()
222 pcc_ss_id, ret); in check_pcc_chan()
231 static int send_pcc_cmd(int pcc_ss_id, u16 cmd) in send_pcc_cmd() argument
234 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; in send_pcc_cmd()
250 send_pcc_cmd(pcc_ss_id, CMD_WRITE); in send_pcc_cmd()
252 ret = check_pcc_chan(pcc_ss_id, false); in send_pcc_cmd()
287 pcc_ss_id); in send_pcc_cmd()
309 pcc_ss_id, cmd, ret); in send_pcc_cmd()
314 ret = check_pcc_chan(pcc_ss_id, true); in send_pcc_cmd()
619 int pcc_data_alloc(int pcc_ss_id) in pcc_data_alloc() argument
621 if (pcc_ss_id < 0 || pcc_ss_id >= MAX_PCC_SUBSPACES) in pcc_data_alloc()
624 if (pcc_data[pcc_ss_id]) { in pcc_data_alloc()
625 pcc_data[pcc_ss_id]->refcount++; in pcc_data_alloc()
627 pcc_data[pcc_ss_id] = kzalloc(sizeof(struct cppc_pcc_data), in pcc_data_alloc()
629 if (!pcc_data[pcc_ss_id]) in pcc_data_alloc()
631 pcc_data[pcc_ss_id]->refcount++; in pcc_data_alloc()
901 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, pr->id); in acpi_cppc_processor_exit() local
903 if (pcc_ss_id >=0 && pcc_data[pcc_ss_id]) { in acpi_cppc_processor_exit()
904 if (pcc_data[pcc_ss_id]->pcc_channel_acquired) { in acpi_cppc_processor_exit()
905 pcc_data[pcc_ss_id]->refcount--; in acpi_cppc_processor_exit()
906 if (!pcc_data[pcc_ss_id]->refcount) { in acpi_cppc_processor_exit()
907 pcc_mbox_free_channel(pcc_data[pcc_ss_id]->pcc_channel); in acpi_cppc_processor_exit()
908 kfree(pcc_data[pcc_ss_id]); in acpi_cppc_processor_exit()
909 pcc_data[pcc_ss_id] = NULL; in acpi_cppc_processor_exit()
970 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cpc_read() local
979 if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0) in cpc_read()
980 vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); in cpc_read()
1004 reg->bit_width, pcc_ss_id); in cpc_read()
1015 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cpc_write() local
1018 if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0) in cpc_write()
1019 vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); in cpc_write()
1043 reg->bit_width, pcc_ss_id); in cpc_write()
1061 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); in cppc_get_desired_perf() local
1070 if (pcc_ss_id < 0) in cppc_get_desired_perf()
1073 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_desired_perf()
1077 if (send_pcc_cmd(pcc_ss_id, CMD_READ) >= 0) in cppc_get_desired_perf()
1107 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); in cppc_get_perf_caps() local
1128 if (pcc_ss_id < 0) { in cppc_get_perf_caps()
1132 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_perf_caps()
1136 if (send_pcc_cmd(pcc_ss_id, CMD_READ) < 0) { in cppc_get_perf_caps()
1195 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); in cppc_get_perf_ctrs() local
1220 if (pcc_ss_id < 0) { in cppc_get_perf_ctrs()
1224 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_perf_ctrs()
1228 if (send_pcc_cmd(pcc_ss_id, CMD_READ) < 0) { in cppc_get_perf_ctrs()
1274 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); in cppc_set_perf() local
1293 if (pcc_ss_id < 0) { in cppc_set_perf()
1297 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_perf()
1300 ret = check_pcc_chan(pcc_ss_id, false); in cppc_set_perf()
1373 send_pcc_cmd(pcc_ss_id, CMD_WRITE); in cppc_set_perf()
1411 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu_num); in cppc_get_transition_latency() local
1422 if (pcc_ss_id < 0) in cppc_get_transition_latency()
1425 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_transition_latency()