All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Wang Dongsheng-B40534 <B40534@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	"anton@enomsg.org" <anton@enomsg.org>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 1/2] powerpc: add Book E support to 64-bit hibernation
Date: Mon, 17 Jun 2013 19:01:23 -0500	[thread overview]
Message-ID: <1371513683.9073.6@snotra> (raw)
In-Reply-To: <ABB05CD9C9F68C46A5CEDC7F15439259F85C34@039-SN2MPN1-022.039d.mgd.msft.net> (from B40534@freescale.com on Mon Jun 17 00:54:32 2013)

On 06/17/2013 12:54:32 AM, Wang Dongsheng-B40534 wrote:
>=20
>=20
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Friday, June 14, 2013 12:51 AM
> > To: Wang Dongsheng-B40534
> > Cc: Wood Scott-B07421; benh@kernel.crashing.org;
> > johannes@sipsolutions.net; anton@enomsg.org; =20
> galak@kernel.crashing.org;
> > linuxppc-dev@lists.ozlabs.org
> > Subject: Re: [PATCH 1/2] powerpc: add Book E support to 64-bit
> > hibernation
> >
> > On 06/13/2013 04:55:43 AM, Wang Dongsheng-B40534 wrote:
> > > > > +#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?
> > > >
> > > Book3e: SPRG1 used save paca, SPRG2 be defined
> > > SPRN_SPRG_TLB_EXFRAME,...
> > > I think those register should be save, even now some SPRG =20
> register not
> > > be use.
> >
> > Are those expected/allowed to change as a result of the restore?
> >
> Those registers are used by software, some allowed to change.
> Exception handling is used in some registers, see exception-64e.h
> These registers can be modified and saved.

I really doubt the exception scratch registers need to be saved -- =20
we're not trying to restore into the middle of an exception =20
prolog/epilog.

book3s has the PACA as well and they don't save it.  Don't we rely on =20
things like boot-time memory allocations happening in the same place =20
when we resume?  extlb is part of the PACA, so the same applies.

Granted, this isn't performance critical so it may seem better to =20
save/restore just in case, but there's value in not unnecessarily =20
deviating from what book3s does.

-Scott=

  reply	other threads:[~2013-06-18  0:01 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 ` [PATCH 1/2] powerpc: add Book E support to 64-bit hibernation Scott Wood
2013-06-13  9:55   ` 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 [this message]
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=1371513683.9073.6@snotra \
    --to=scottwood@freescale.com \
    --cc=B07421@freescale.com \
    --cc=B40534@freescale.com \
    --cc=anton@enomsg.org \
    --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.