[Skiboot] [PATCH v4 4/9] hw/slw: Move P8 bits behind CONFIG_P8

Nicholas Piggin npiggin at gmail.com
Mon Dec 20 16:40:02 AEDT 2021


Excerpts from Cédric Le Goater's message of December 18, 2021 1:15 am:
> On 12/17/21 03:36, Nicholas Piggin wrote:
>> This saves about 3kB from skiboot.lid.xz
>> 
>> Reviewed-by: Dan Horák <dan at danny.cz>
>> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
>> ---
>>   core/fast-reboot.c   |   2 +
>>   hw/slw.c             | 176 ++++++++++++++++++++++---------------------
>>   libpore/Makefile.inc |   8 +-
>>   3 files changed, 100 insertions(+), 86 deletions(-)
> 
> I think its time for P8 to have its own file. how complex would it be
> to introduce :
> 
>    hw/slw.c
>    hw/slw_p8.c
>    hw/slw_p9.c
>    hw/slw_p10.c
> 
> at least the first two ?

Okay I've done the first two as a subsequent patch which seems like
quite a good cleanup. Could possibly move p9/10 into their own file
too afterwards.

>> @@ -287,6 +288,7 @@ static void cleanup_cpu_state(void)
> 
> 
> There is a comment saying :
> 
>    P9 clears TLBs in cpu_fast_reboot_complete
> 
> I didn't find it in the code ?

Hmm, that may have been from cpu_set_radix_mode() which was
removed by commit 53ef0db6e2.

We might be saved in practice most of the time with OPAL_REINIT_CPUS.

>> @@ -1389,6 +1396,7 @@ void slw_init(void)
>>   				slw_late_init_p8(chip);
>>   		}
>>   		p8_sbe_init_timer();
> 
> The p8_sbe* routine are still compiled in AFAICT.

Hmm. Does the sbe timer depend on slw?

Thanks,
Nick


More information about the Skiboot mailing list