From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>,
"Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
Michael Neuling <mikey@neuling.org>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>,
Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [v2 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle
Date: Wed, 19 Jul 2017 18:13:28 +0530 [thread overview]
Message-ID: <20170719124328.GB30836@in.ibm.com> (raw)
In-Reply-To: <8760eoiqae.fsf@concordia.ellerman.id.au>
Hi Nicholas, Michael,
On Wed, Jul 19, 2017 at 10:07:05PM +1000, Michael Ellerman wrote:
> Nicholas Piggin <npiggin@gmail.com> writes:
> >> diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
> >> index a7b5af3..0262283 100644
> >> --- a/arch/powerpc/kernel/asm-offsets.c
> >> +++ b/arch/powerpc/kernel/asm-offsets.c
> >> @@ -743,6 +743,18 @@ int main(void)
> >> OFFSET(PACA_SUBCORE_SIBLING_MASK, paca_struct, subcore_sibling_mask);
> >> OFFSET(PACA_SIBLING_PACA_PTRS, paca_struct, thread_sibling_pacas);
> >> OFFSET(PACA_REQ_PSSCR, paca_struct, requested_psscr);
> >> +
> >> + OFFSET(PACA_PID, paca_struct, stop_spr_save_area[0]);
> >> + OFFSET(PACA_LDBAR, paca_struct, stop_spr_save_area[1]);
> >> + OFFSET(PACA_FSCR, paca_struct, stop_spr_save_area[2]);
> >> + OFFSET(PACA_HFSCR, paca_struct, stop_spr_save_area[3]);
> >> +
> >> + /* On POWER9, we are already saving MMCR0 for ESL=EC=1 */
> >> + OFFSET(PACA_MMCRA, paca_struct, stop_spr_save_area[4]);
> >> + OFFSET(PACA_MMCR1, paca_struct, stop_spr_save_area[5]);
> >> + OFFSET(PACA_MMCR2, paca_struct, stop_spr_save_area[6]);
> >
> > Don't these offset names go against convention?
> >
> > Look at e.g., how PACA_EXGEN is used. I would prefer using that
> > convention. You could make the name slightly shorter too, e.g.,
> > just stop_sprs or so.
>
> Yes please.
>
> If I see PACA_MMCRA I'm expecting that's paca->mmcra.
Ah, ok. I will fix this.
>
> Also if the same values always go in the same place then please use a
> proper struct, rather than an array. ie.
>
Ok, I will add the struct instead of a array.
> struct stop_sprs
> {
> u64 pid;
> u64 ldbar;
> ...
> }
>
> cheers
>
--
Thanks and Regards
gautham.
next prev parent reply other threads:[~2017-07-19 12:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 8:18 [v2 PATCH 0/2] powerpc: powernv: Enable stop4 via cpuidle Gautham R. Shenoy
2017-07-19 8:18 ` [v2 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle Gautham R. Shenoy
2017-07-19 9:03 ` Nicholas Piggin
2017-07-19 12:07 ` Michael Ellerman
2017-07-19 12:43 ` Gautham R Shenoy [this message]
2017-07-19 8:18 ` [v2 PATCH 2/2] powernv/powerpc: Clear PECE1 in LPCR via stop-api only on Hotplug Gautham R. Shenoy
2017-07-19 9:09 ` Nicholas Piggin
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=20170719124328.GB30836@in.ibm.com \
--to=ego@linux.vnet.ibm.com \
--cc=akshay.adiga@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=shilpa.bhat@linux.vnet.ibm.com \
--cc=svaidy@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).