[PATCH v2 1/5] sunxi: psci: clean away preprocessor macros

Sam Edwards cfsworks at gmail.com
Thu Sep 28 01:32:06 CEST 2023


On 9/27/23 10:34, Andre Przywara wrote:
>> In the majority of cases, there are no changes to the text section
>> introduced by this patch. In the R40 case, there's a small change where
>> the compiler adds a NULL check onto the result of the `(void *)cpucfg +
>> SUN8I_R40_PWR_CLAMP(cpu)` computation, which we can ignore as it won't
>> affect anything in practice. In the sun7i case, the only changes are
>> because I am NOT hardcoding the CPU to 0, which does look like I broke
>> it (since that means it will use cpu=1). So I'm going to need to fix
>> that in v3.
> 
>        ^^^^^^^
> Do you have an update on this? I will try to test it on an R40 ASAP.

In my (not yet submitted) v3, I have the following change done:

  	if (IS_ENABLED(CONFIG_MACH_SUN7I)) {
  		clamp = &cpucfg->cpu1_pwr_clamp;
  		pwroff = &cpucfg->cpu1_pwroff;
+		cpu = 0;
  	} else if (IS_ENABLED(CONFIG_MACH_SUN8I_R40)) {

That does negate any binary change in the SUN7I case. R40 is the only 
one that needs testing still. If you feel like testing on any SUN7Is 
just for good measure, you'll want to add in that missing line.

> Cheers,
> Andre

Likewise,
Sam


More information about the U-Boot mailing list