All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Wang Dongsheng <dongsheng.wang@freescale.com>
Cc: anton@enomsg.org, Wang Dongsheng <dongsheng.wang@freescale.com>,
	johannes@sipsolutions.net, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc: add Book E support to 64-bit hibernation
Date: Wed, 12 Jun 2013 17:03:48 -0500	[thread overview]
Message-ID: <1371074628.18413.53@snotra> (raw)
In-Reply-To: <1370774260-31072-1-git-send-email-dongsheng.wang@freescale.com> (from dongsheng.wang@freescale.com on Sun Jun  9 05:37:39 2013)

On 06/09/2013 05:37:39 AM, Wang Dongsheng wrote:
>  /* these macros rely on the save area being
>   * pointed to by r11 */
> +
> +#define SAVE_SPR(register)		\
> +	mfspr	r0,SPRN_##register	;\
> +	std	r0,SL_##register(r11)
> +#define RESTORE_SPR(register)		\
> +	ld	r0,SL_##register(r11)	;\
> +	mtspr	SPRN_##register,r0
> +#define RESTORE_SPRG(n)			\
> +	ld	r0,SL_SPRG##n(r11)	;\
> +	mtsprg	n,r0
>  #define SAVE_SPECIAL(special)		\
>  	mf##special	r0		;\
>  	std	r0, SL_##special(r11)

Is there a particular SPR that you're trying to save, for which =20
SAVE_SPECIAL doesn't work?

> +#else
> +	/* Save SPRGs */
> +	RESTORE_SPRG(0)
> +	RESTORE_SPRG(1)
> +	RESTORE_SPRG(2)
> +	RESTORE_SPRG(3)
> +	RESTORE_SPRG(4)
> +	RESTORE_SPRG(5)
> +	RESTORE_SPRG(6)
> +	RESTORE_SPRG(7)

Why do we need this on book3e and not on book3s?

> +
> +	RESTORE_SPECIAL(MSR)
> +
> +	/* Restore TCR and clear any pending bits in TSR. */
> +	RESTORE_SPR(TCR)
> +	lis	r0, (TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS)@h
> +	mtspr	SPRN_TSR,r0

Please be internally consistent with whitespace after commas, even if =20
the rest of the file is already inconsistent. :-P

> +
> +	/* Kick decrementer */
> +	li	r0,1
> +	mtdec	r0

Why doesn't book3s need to kick the decrementer?

-Scott=

  parent reply	other threads:[~2013-06-12 22:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 10:37 [PATCH 1/2] powerpc: add Book E support to 64-bit hibernation Wang Dongsheng
2013-06-09 10:37 ` [PATCH 2/2] powerpc/hibernate: add restore mmu context after resume Wang Dongsheng
2013-07-10 10:11   ` Wang Dongsheng-B40534
2013-07-10 21:42     ` Scott Wood
2013-07-12  4:04       ` Wang Dongsheng-B40534
2013-07-12 21:54         ` Scott Wood
2013-07-12 23:06           ` Benjamin Herrenschmidt
2013-08-07  9:55             ` Wang Dongsheng-B40534
2013-06-12 22:03 ` Scott Wood [this message]
2013-06-13  9:55   ` [PATCH 1/2] powerpc: add Book E support to 64-bit hibernation Wang Dongsheng-B40534
2013-06-13 16:51     ` Scott Wood
2013-06-17  5:54       ` Wang Dongsheng-B40534
2013-06-18  0:01         ` Scott Wood
2013-06-18  0:17           ` Benjamin Herrenschmidt
2013-06-18  0:22             ` Scott Wood
2013-06-18  1:29               ` Benjamin Herrenschmidt
2013-07-10  9:41 ` Wang Dongsheng-B40534
2013-07-10  9:51   ` Benjamin Herrenschmidt
2013-07-10 10:05     ` Wang Dongsheng-B40534

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371074628.18413.53@snotra \
    --to=scottwood@freescale.com \
    --cc=anton@enomsg.org \
    --cc=dongsheng.wang@freescale.com \
    --cc=johannes@sipsolutions.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.