linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Hari Bathini <hbathini@linux.vnet.ibm.com>
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 11:03:17 +1100	[thread overview]
Message-ID: <1418774597.17248.1.camel@ellerman.id.au> (raw)
In-Reply-To: <20141216180530.7778.23702.stgit@localhost.localdomain>

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.

> 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.

cheers

  reply	other threads:[~2014-12-17  0:03 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 [this message]
2014-12-17 11:10     ` Hari Bathini
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=1418774597.17248.1.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@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).