ACPI fix for 6.12-rc6
Make the ACPI CPPC library use a raw spinlock for operations carried out in scheduler context via the schedutil governor and the ACPI CPPC cpufreq driver (Pierre Gondois). -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmclHlESHHJqd0Byand5 c29ja2kubmV0AAoJEILEb/54YlRxkasQAKKLQlbVhzb/JZvd56VpJH6Ma0ImuXvX uyqhO3gjiCdSx1pxLakaBXM4J887Mtsx5hfy7WrsbUEkEUJqkrwScJee4zjcCH2k tWai3Q7YJsqDg4/7Pq8T9uFNEue9ZvWAOuQ/wV8kBPSIuQKCQ59d83eosQyOnSYE Avaa78URdnszOXmn3a9chzIUD4HWCmF+/v1D+Bw/HR1vqrdoBnlaRfq9PUsWSjUe 91CP0HI5I6brKipJgjxv/joxXqKCmvnSkBnD+sk8OyR9kASk8j1TKn1YZDoiNY0x bQI5NlOVm+Sx1RTMQCDY1y2EsmIvVYtxHTkPm87dy/q6xyXkwAKBXkfaogsn7fgb IbHQrpWnenQP/M49Iqwq0BVelX9jVaWPLtCMYA9nsrYsgUlCH/0rlQ9rcKcP0uhn qIbkUt40AyrYmVFon2D+upa7ccqFpfVX/9LljwFujxSwNVGA0tAl52GTQ6+jLWfE bOOq8dIJdra03T1IDpmgq/GK3RlYHDZVt/QsaZ2SYBZgh9wl4A65tX97++tsP0Re ytZES41uPqmuN4gmR+/T6RL3tb/c7N/7R5Zk/o51kFMFP0DCuOP6GO7JLPAgkRj+ e/6zq+eaIcSuDzYCfzh66zlcOexj4EucjImKe/AC1VJSF5qgK98QJlAqn1jbfonk 09ErkHWNwjNl =vxLs -----END PGP SIGNATURE----- Merge tag 'acpi-6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Make the ACPI CPPC library use a raw spinlock for operations carried out in scheduler context via the schedutil governor and the ACPI CPPC cpufreq driver (Pierre Gondois)" * tag 'acpi-6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: CPPC: Make rmw_lock a raw_spin_lock
This commit is contained in:
commit
c426456857
@ -867,7 +867,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
|
|||||||
|
|
||||||
/* Store CPU Logical ID */
|
/* Store CPU Logical ID */
|
||||||
cpc_ptr->cpu_id = pr->id;
|
cpc_ptr->cpu_id = pr->id;
|
||||||
spin_lock_init(&cpc_ptr->rmw_lock);
|
raw_spin_lock_init(&cpc_ptr->rmw_lock);
|
||||||
|
|
||||||
/* Parse PSD data for this CPU */
|
/* Parse PSD data for this CPU */
|
||||||
ret = acpi_get_psd(cpc_ptr, handle);
|
ret = acpi_get_psd(cpc_ptr, handle);
|
||||||
@ -1087,6 +1087,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
|
|||||||
int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
|
int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
|
||||||
struct cpc_reg *reg = ®_res->cpc_entry.reg;
|
struct cpc_reg *reg = ®_res->cpc_entry.reg;
|
||||||
struct cpc_desc *cpc_desc;
|
struct cpc_desc *cpc_desc;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
size = GET_BIT_WIDTH(reg);
|
size = GET_BIT_WIDTH(reg);
|
||||||
|
|
||||||
@ -1126,7 +1127,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock(&cpc_desc->rmw_lock);
|
raw_spin_lock_irqsave(&cpc_desc->rmw_lock, flags);
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 8:
|
case 8:
|
||||||
prev_val = readb_relaxed(vaddr);
|
prev_val = readb_relaxed(vaddr);
|
||||||
@ -1141,7 +1142,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
|
|||||||
prev_val = readq_relaxed(vaddr);
|
prev_val = readq_relaxed(vaddr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
spin_unlock(&cpc_desc->rmw_lock);
|
raw_spin_unlock_irqrestore(&cpc_desc->rmw_lock, flags);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
val = MASK_VAL_WRITE(reg, prev_val, val);
|
val = MASK_VAL_WRITE(reg, prev_val, val);
|
||||||
@ -1174,7 +1175,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
|
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
|
||||||
spin_unlock(&cpc_desc->rmw_lock);
|
raw_spin_unlock_irqrestore(&cpc_desc->rmw_lock, flags);
|
||||||
|
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ struct cpc_desc {
|
|||||||
int write_cmd_status;
|
int write_cmd_status;
|
||||||
int write_cmd_id;
|
int write_cmd_id;
|
||||||
/* Lock used for RMW operations in cpc_write() */
|
/* Lock used for RMW operations in cpc_write() */
|
||||||
spinlock_t rmw_lock;
|
raw_spinlock_t rmw_lock;
|
||||||
struct cpc_register_resource cpc_regs[MAX_CPC_REG_ENT];
|
struct cpc_register_resource cpc_regs[MAX_CPC_REG_ENT];
|
||||||
struct acpi_psd_package domain_info;
|
struct acpi_psd_package domain_info;
|
||||||
struct kobject kobj;
|
struct kobject kobj;
|
||||||
|
Loading…
Reference in New Issue
Block a user