Skip to content

Commit 0a17adc

Browse files
committed
Merge branches 'acpi-processor' and 'acpi-cppc'
Merge ACPI processor driver updates and ACPI CPPC library updates for 6.16-rc1: - Clean up the initialization of CPU data structures in the ACPI processor driver (Zhang Rui). - Remove an obsolete comment regarding the C-states handling in the ACPI processor driver (Giovanni Gherdovich). - Simplify PCC shared memory region handling (Sudeep Holla). - Rework and extend functions for reading CPPC register values and for updating CPPC registers (Lifeng Zheng). - Add three functions related to autonomous CPU performance state selection to the CPPC library (Lifeng Zheng). * acpi-processor: ACPI: processor: idle: Remove redundant pr->power.count assignment ACPI: processor: idle: Set pr->flags.power unconditionally ACPI: processor: idle: Remove obsolete comment * acpi-cppc: ACPI: CPPC: Add three functions related to autonomous selection ACPI: CPPC: Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel() ACPI: CPPC: Refactor register value get and set ABIs ACPI: CPPC: Add cppc_set_reg_val() ACPI: CPPC: Extract cppc_get_reg_val_in_pcc() ACPI: CPPC: Rename cppc_get_perf() to cppc_get_reg_val() ACPI: CPPC: Optimize cppc_get_perf() ACPI: CPPC: Add IS_OPTIONAL_CPC_REG macro to judge if a cpc_reg is optional ACPI: CPPC: Simplify PCC shared memory region handling ACPI: PCC: Simplify PCC shared memory region handling
3 parents 5349b00 + 0edd1d1 + f35e5b3 commit 0a17adc

File tree

5 files changed

+225
-164
lines changed

5 files changed

+225
-164
lines changed

drivers/acpi/acpi_pcc.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
struct pcc_data {
3333
struct pcc_mbox_chan *pcc_chan;
34-
void __iomem *pcc_comm_addr;
3534
struct completion done;
3635
struct mbox_client cl;
3736
struct acpi_pcc_info ctx;
@@ -81,14 +80,6 @@ acpi_pcc_address_space_setup(acpi_handle region_handle, u32 function,
8180
ret = AE_SUPPORT;
8281
goto err_free_channel;
8382
}
84-
data->pcc_comm_addr = acpi_os_ioremap(pcc_chan->shmem_base_addr,
85-
pcc_chan->shmem_size);
86-
if (!data->pcc_comm_addr) {
87-
pr_err("Failed to ioremap PCC comm region mem for %d\n",
88-
ctx->subspace_id);
89-
ret = AE_NO_MEMORY;
90-
goto err_free_channel;
91-
}
9283

9384
*region_context = data;
9485
return AE_OK;
@@ -113,7 +104,7 @@ acpi_pcc_address_space_handler(u32 function, acpi_physical_address addr,
113104
reinit_completion(&data->done);
114105

115106
/* Write to Shared Memory */
116-
memcpy_toio(data->pcc_comm_addr, (void *)value, data->ctx.length);
107+
memcpy_toio(data->pcc_chan->shmem, (void *)value, data->ctx.length);
117108

118109
ret = mbox_send_message(data->pcc_chan->mchan, NULL);
119110
if (ret < 0)
@@ -134,7 +125,7 @@ acpi_pcc_address_space_handler(u32 function, acpi_physical_address addr,
134125

135126
mbox_chan_txdone(data->pcc_chan->mchan, ret);
136127

137-
memcpy_fromio(value, data->pcc_comm_addr, data->ctx.length);
128+
memcpy_fromio(value, data->pcc_chan->shmem, data->ctx.length);
138129

139130
return AE_OK;
140131
}

0 commit comments

Comments
 (0)