Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-05 Thread Scott Wood
On 07/03/2012 10:45 PM, Zhao Chenhui wrote: > On Tue, Jul 03, 2012 at 10:17:12PM -0500, Tabi Timur-B04825 wrote: >> Zhao Chenhui wrote: >>> If the guts variable is NULL, it indicates there is error in dts or kernel. >>> We should fix the error, rather than ignore it. >> >> And that's why there's a

Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-05 Thread Tabi Timur-B04825
On Tue, Jul 3, 2012 at 5:21 AM, Zhao Chenhui wrote: > Do hardware timebase sync. Firstly, stop all timebases, and transfer > the timebase value of the boot core to the other core. Finally, > start all timebases. > > Only apply to dual-core chips, such as MPC8572, P2020, etc. > > Signed-off-by: Zha

Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-05 Thread Timur Tabi
Zhao Chenhui wrote: > If the guts node is missing, this code snippet will be skipped. If the guts > node is existed, > the return value of of_iomap(), namely guts, will be tested. If it is NULL, > it shows > that there is error in dts, or the ioremap() in of_iomap() failed. I think > these errors

Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-05 Thread Zhao Chenhui
On Wed, Jul 04, 2012 at 10:19:54AM -0500, Tabi Timur-B04825 wrote: > Zhao Chenhui wrote: > > On Tue, Jul 03, 2012 at 10:17:12PM -0500, Tabi Timur-B04825 wrote: > >> Zhao Chenhui wrote: > >>> If the guts variable is NULL, it indicates there is error in dts or > >>> kernel. > >>> We should fix the e

Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-04 Thread Tabi Timur-B04825
Zhao Chenhui wrote: > On Tue, Jul 03, 2012 at 10:17:12PM -0500, Tabi Timur-B04825 wrote: >> Zhao Chenhui wrote: >>> If the guts variable is NULL, it indicates there is error in dts or kernel. >>> We should fix the error, rather than ignore it. >> >> And that's why there's a warning message. Crashi

Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-03 Thread Zhao Chenhui
On Tue, Jul 03, 2012 at 10:17:12PM -0500, Tabi Timur-B04825 wrote: > Zhao Chenhui wrote: > > If the guts variable is NULL, it indicates there is error in dts or kernel. > > We should fix the error, rather than ignore it. > > And that's why there's a warning message. Crashing the kernel is not >

Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-03 Thread Tabi Timur-B04825
Zhao Chenhui wrote: > If the guts variable is NULL, it indicates there is error in dts or kernel. > We should fix the error, rather than ignore it. And that's why there's a warning message. Crashing the kernel is not going to fix anything. > Moreover, if smp_85xx_ops.give/take_timebase is NULL,

Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-03 Thread Zhao Chenhui
On Tue, Jul 03, 2012 at 07:46:24AM -0500, Tabi Timur-B04825 wrote: > On Tue, Jul 3, 2012 at 5:21 AM, Zhao Chenhui > wrote: > > > + np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids); > > + if (np) { > > + guts = of_iomap(np, 0); > > + of_node_put(np);

Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-03 Thread Tabi Timur-B04825
On Tue, Jul 3, 2012 at 5:21 AM, Zhao Chenhui wrote: > + np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids); > + if (np) { > + guts = of_iomap(np, 0); > + of_node_put(np); > + if (!guts) { > + pr_err("%s: Could not map

[PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync

2012-07-03 Thread Zhao Chenhui
Do hardware timebase sync. Firstly, stop all timebases, and transfer the timebase value of the boot core to the other core. Finally, start all timebases. Only apply to dual-core chips, such as MPC8572, P2020, etc. Signed-off-by: Zhao Chenhui Signed-off-by: Li Yang --- v7: * removed CONFIG_85xx