[Skiboot] [PATCH v3 2/4] Move P8 timer code to separate file

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Mar 14 16:08:04 AEDT 2017


On 03/14/2017 10:31 AM, Vasant Hegde wrote:
> Lets move P8 timer support code from slw.c to sbe_p8.c (as suggested
> by Ben). There is a difference between timer support in P8 and P9.
> Hence I think it makes sense to name it as sbe_p8.c
>
> Note that this is pure code movement and renaming functions/variables.
> No functionality changes.

@Ben,
   As you suggested, I moved P8 timer code to separate file. But now I'm 
thinking it may be good to have single file (sbe.c) and add all SBE related code 
their (both P8 timer code and new P9 code).

In P8, we have used direct SCOMs for SBE timer. But from P9 onwards we are 
getting MBOX messages for SBE operations. So we can have something like below


void sbe_timer_init(void)
{
	if (proc_gen == proc_gen_p8)
		p8_sbe_timer();
	else
		sbe_timer();
}

Let me know which one is better.

-Vasant



More information about the Skiboot mailing list