[Skiboot] [PATCH 8/8] Remove dead POWER7 code

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Nov 8 21:10:35 AEDT 2019


On 11/8/19 2:39 PM, Nicholas Piggin wrote:
> Vasant Hegde's on November 8, 2019 4:56 pm:
>> On 11/7/19 7:22 PM, Nicholas Piggin wrote:
>>> There are a number of proc_gen branches removed that are trivially
>>> dead code and comments that refer to P7. As well as those:
>>>
>>> - Oliver points out that add_xics_icps() must be unused on POWER8
>>>     because it asserts if number of threads > 4, so remove it.
>>>
>>> - Change 16b7ae641 ("Remove POWER7 and POWER7+ support") removed all
>>>     references to opal_boot_trampoline, so remove that.
>>>
>>> - It also removed the only non-trival choose_bus implementation, so
>>>     that is removed and its caller simplified.
>>>
>>> Cc: Stewart Smith <stewart at flamingspork.com>
>>> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
>>> ---
>>>    asm/head.S             | 10 ------
>>>    core/affinity.c        |  2 +-
>>>    core/direct-controls.c | 12 -------
>>>    core/fast-reboot.c     |  6 ----
>>>    core/pci.c             | 43 +++--------------------
>>>    hdata/cpu-common.c     |  2 +-
>>>    hdata/paca.c           | 80 ------------------------------------------
>>
>> May be remove this file completely? IIRC PACA is P7 only stuff, in P8 we moved
>> to PCIA structure.
> 
> Can we do that? Okay sounds good.

Yes. paca structure is part of legacy SPIRA. From P8 onwards we are using new 
SPIRA-H/S.
So I think its safe to remove this file.

> 
>>> diff --git a/core/direct-controls.c b/core/direct-controls.c
>>> index 507a16f50..424b3d94c 100644
>>> --- a/core/direct-controls.c
>>> +++ b/core/direct-controls.c
>>> @@ -522,9 +522,6 @@ int dctl_set_special_wakeup(struct cpu_thread *t)
>>>    	struct cpu_thread *c = t->primary;
>>>    	int rc = OPAL_SUCCESS;
>>>
>>> -	if (proc_gen != proc_gen_p9 && proc_gen != proc_gen_p8)
>>> -		return OPAL_UNSUPPORTED;
>>> -
>>
>> Now we have to fix below if-else to throw proper error for unsupported proc_gen_*.
> 
> There is no unsupported proc_gen, we only support 8 or 9.
> proc_gen_unknown should actually just be removed, it's completely dead
> code because we never get out of boot_entry if it's an unknown CPU.

Correct. But `else` part is unconditionally falls back to P8 code. It might 
create problem during bring up of new chips.

-Vasant



> 
> Thanks,
> Nick
> 



More information about the Skiboot mailing list