From: Hari Bathini <hbathini@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
Subject: Re: [PATCH v2 1/3] powerpc/nvram: move generic code for nvram and pstore
Date: Wed, 17 Dec 2014 16:40:45 +0530 [thread overview]
Message-ID: <549164B5.5000406@linux.vnet.ibm.com> (raw)
In-Reply-To: <1418774597.17248.1.camel@ellerman.id.au>
On 12/17/2014 05:33 AM, Michael Ellerman wrote:
> On Tue, 2014-12-16 at 23:35 +0530, Hari Bathini wrote:
>> With minor checks, we can move most of the code for nvram
>> under pseries to a common place to be re-used by other
>> powerpc platforms like powernv. This patch moves such
>> common code to arch/powerpc/kernel/nvram_64.c file.
> Sharing the code is great.
>
> But, you need to keep in mind that it is very common for us to build kernels
> with both POWERNV=y and PSERIES=y.
>
> So you need to make sure you're only using CONFIG_PPC_PSERIES to protect things
> that are optional on pseries. Not things that we *shouldn't* be doing on
> powernv.
>
> For example the logic in nvram_init_oops_partition() looks like it might do the
> wrong thing for PSERIES=y POWERNV=y.
True. It might do wrong thing when an incorrect value is passed by the
caller.
But since the caller is platform specific code
[pseries_nvram_init_log_partitions() or
opal_nvram_init_log_partitions() routine], with appropriate parameter
passed,
I haven't seen any issues while testing.
>> diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
>> index b390f55..a033fe9 100644
>> --- a/arch/powerpc/include/asm/rtas.h
>> +++ b/arch/powerpc/include/asm/rtas.h
>> @@ -343,6 +343,8 @@ extern int early_init_dt_scan_rtas(unsigned long node,
>> extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal);
>>
>> #ifdef CONFIG_PPC_PSERIES
>> +extern unsigned long last_rtas_event;
>> +extern int clobbering_unread_rtas_event(void);
> You should add an empty version of this for !PSERIES, so you don't have to
> ifdef all the call sites.
Sure. Will update accordingly..
Thanks
Hari
> cheers
>
>
next prev parent reply other threads:[~2014-12-17 18:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 18:05 [PATCH v2 0/3] powerpc/pstore: Add pstore support for nvram partitions Hari Bathini
2014-12-16 18:05 ` [PATCH v2 1/3] powerpc/nvram: move generic code for nvram and pstore Hari Bathini
2014-12-17 0:03 ` Michael Ellerman
2014-12-17 11:10 ` Hari Bathini [this message]
2014-12-16 18:05 ` [PATCH v2 2/3] pstore: Add pstore type id for firmware partition Hari Bathini
2014-12-16 18:06 ` [PATCH v2 3/3] pstore: add pstore support on powernv Hari Bathini
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=549164B5.5000406@linux.vnet.ibm.com \
--to=hbathini@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
/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).