Re: [PATCH RFC 7/8] soc: samsung: exynos-pmu: add Exynos850 CPU hotplug support

From: Alexey Klimov

Date: Tue Mar 17 2026 - 10:20:08 EST


Hi Peter,

On Fri Mar 6, 2026 at 2:15 PM GMT, Peter Griffin wrote:
> On Thu, 26 Feb 2026 at 15:47, Alexey Klimov <alexey.klimov@xxxxxxxxxx> wrote:
>>
>> Some Exynos-based SoCs require specific set of writes/updates to PMU
>> and PMU intr gen blocks in order to put a CPU or a group of CPUs into
>> a different sleep states or prepare these entities for a CPU_OFF.
>> The same is valid for a reverse procedures like wake-ups or CPU(s)
>> online. Without these writes/updates the CPU(s) wake-up or online
>> fails.
>> Add support for Exynos850-based SoCs for PMU and PMU intr gen write/update
>> sequences.
>> While at this, also add description of Exynos850 PMU registers.
>>
>> Signed-off-by: Alexey Klimov <alexey.klimov@xxxxxxxxxx>
>> ---
>> drivers/soc/samsung/exynos-pmu.c | 86 +++++++++++++++++++++++++++--
>> include/linux/soc/samsung/exynos-regs-pmu.h | 5 ++
>> 2 files changed, 87 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c
>> index 0967fa56708a..7b9b8e22d91b 100644
>> --- a/drivers/soc/samsung/exynos-pmu.c
>> +++ b/drivers/soc/samsung/exynos-pmu.c
>> @@ -118,6 +118,10 @@ static const struct regmap_config regmap_pmu_intr = {
>> .use_raw_spinlock = true,
>> };
>>
>> +const struct exynos_pmu_data exynos850_pmu_data = {
>> + .pmu_cpuhp = true,
>> +};
>> +
>
> You may want to consider having an e850-pmu.c file to contain the e850
> specific data and hooks.
>
> Andre recently moved some of the gs101-specific parts into gs101-pmu.c
> (although not the actual gs101 online/offline hooks). Now that more
> SoCs are being added it could be a good time for exynos-pmu to contain
> only the generic code and the <soc>-pmu.c file having the
> peculiarities/hooks for the specific SoC.

Thanks. Yeah. That's why it was sent as an RFC to get pointers where
to place things properly. I'll update it.

[..]

>> - pmu_context->cpu_pmu_online = __gs101_cpu_pmu_online;
>> - pmu_context->cpu_pmu_offline = __gs101_cpu_pmu_offline;
>> + if (of_machine_is_compatible("google,gs101")) {
>> + pmu_context->cpu_pmu_online = __gs101_cpu_pmu_online;
>> + pmu_context->cpu_pmu_offline = __gs101_cpu_pmu_offline;
>> + }
>> +
>> + if (of_machine_is_compatible("samsung,exynos850")) {
>> + pmu_context->cpu_pmu_online = __exynos850_cpu_pmu_online;
>> + pmu_context->cpu_pmu_offline = __exynos850_cpu_pmu_offline;
>>
>
> There should be no compatibles inside probe (that rule applies to all
> drivers & subsystems). Instead use the driver match data
> (exynos_pmu_data).

Thanks. Yep, I'll update it.

BR,
Alexey