Re: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-23 Thread Scott Wood
On Wed, 2014-01-22 at 20:49 -0600, Wang Dongsheng-B40534 wrote: > > > > > > > > The whole point of calling enable_kernel_fp() in C code before > > > > suspending is to ensure that the FP state gets saved. If FP is used > > > > after that point it is a bug. If you're worried about such bugs, then

RE: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-22 Thread dongsheng.w...@freescale.com
> > > > > > The whole point of calling enable_kernel_fp() in C code before > > > suspending is to ensure that the FP state gets saved. If FP is used > > > after that point it is a bug. If you're worried about such bugs, then > > > clear MSR[FP] after calling enable_kernel_fp(), rather than adding

Re: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-22 Thread Scott Wood
@enomsg.org; > > linuxppc- > > d...@lists.ozlabs.org > > Subject: Re: [PATCH 2/3] powerpc/85xx: Provide two functions to > > save/restore the > > core registers > > > > On Mon, 2014-01-20 at 00:03 -0600, Wang Dongsheng-B40534 wrote: > > &g

RE: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-20 Thread dongsheng.w...@freescale.com
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, January 21, 2014 9:06 AM > To: Wang Dongsheng-B40534 > Cc: b...@kernel.crashing.org; Zhao Chenhui-B35336; an...@enomsg.org; linuxppc- > d...@lists.ozlabs.org > Subject: Re: [PATCH 2/3] powerpc/85xx: Pro

Re: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-20 Thread Scott Wood
On Mon, 2014-01-20 at 00:03 -0600, Wang Dongsheng-B40534 wrote: > > > > > + /* > > > > > + * Need to save float-point registers if MSR[FP] = 1. > > > > > + */ > > > > > + mfmsr r12 > > > > > + andi. r12, r12, MSR_FP > > > > > + beq 1f > > > > > + do_sr_fpr_regs

RE: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-19 Thread dongsheng.w...@freescale.com
> > > What is there that is specfic to a particular core type that can't be > handled > > > from C code? > > > > > > > In the context of the calling, maybe not in C environment.(Deep sleep > > without > > C environment when calling those interfaces) > > Could you provide a concrete example? > :

Re: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-15 Thread Scott Wood
@enomsg.org; > > linuxppc- > > d...@lists.ozlabs.org > > Subject: Re: [PATCH 2/3] powerpc/85xx: Provide two functions to > > save/restore the > > core registers > > > > On Tue, 2014-01-14 at 15:59 +0800, Dongsheng Wang wrote: > > > From: Wang Don

RE: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-14 Thread dongsheng.w...@freescale.com
> -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, January 15, 2014 7:51 AM > To: Wang Dongsheng-B40534 > Cc: b...@kernel.crashing.org; Zhao Chenhui-B35336; an...@enomsg.org; linuxppc- > d...@lists.ozlabs.org > Subject: Re: [PATCH 2/3] powerpc/85xx:

Re: [PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-14 Thread Scott Wood
On Tue, 2014-01-14 at 15:59 +0800, Dongsheng Wang wrote: > From: Wang Dongsheng > > Add fsl_cpu_state_save/fsl_cpu_state_restore functions, used for deep > sleep and hibernation to save/restore core registers. We abstract out > save/restore code for use in various modules, to make them don't need

[PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-14 Thread Dongsheng Wang
From: Wang Dongsheng Add fsl_cpu_state_save/fsl_cpu_state_restore functions, used for deep sleep and hibernation to save/restore core registers. We abstract out save/restore code for use in various modules, to make them don't need to maintain. Currently supported processors type are E6500, E5500