linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Stewart Smith <stewart@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/4] powerpc/powernv: Add OPAL check token call
Date: Mon, 15 Sep 2014 13:19:18 +1000	[thread overview]
Message-ID: <1410751158.18144.7.camel@ale.ozlabs.ibm.com> (raw)
In-Reply-To: <1410750623.24738.9.camel@concordia>

On Mon, 2014-09-15 at 13:10 +1000, Michael Ellerman wrote:
> On Tue, 2014-08-19 at 14:47 +1000, Michael Neuling wrote:
> > Currently there is no way to generically check if an OPAL call exists o=
r not
> > from the host kernel.
> >=20
> > This adds an OPAL call opal_check_token() which tells you if the given =
token is
> > present in OPAL or not.
> >=20
> > Signed-off-by: Michael Neuling <mikey@neuling.org>
> > ---
> >  arch/powerpc/include/asm/opal.h                | 7 +++++++
> >  arch/powerpc/platforms/powernv/opal-wrappers.S | 1 +
> >  2 files changed, 8 insertions(+)
> >=20
> > diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm=
/opal.h
> > index 86055e5..4593a93 100644
> > --- a/arch/powerpc/include/asm/opal.h
> > +++ b/arch/powerpc/include/asm/opal.h
> > @@ -135,6 +135,7 @@ struct opal_sg_list {
> >  #define OPAL_FLASH_MANAGE			77
> >  #define OPAL_FLASH_UPDATE			78
> >  #define OPAL_RESYNC_TIMEBASE			79
> > +#define OPAL_CHECK_TOKEN			80
> >  #define OPAL_DUMP_INIT				81
> >  #define OPAL_DUMP_INFO				82
> >  #define OPAL_DUMP_READ				83
> > @@ -417,6 +418,11 @@ struct opal_msg {
> >  	__be64 params[8];
> >  };
> > =20
> > +enum OpalCheckTokenStatus {
> > +       OPAL_TOKEN_ABSENT =3D 0,
> > +       OPAL_TOKEN_PRESENT =3D 1
> > +};
>=20
> I don't see this used anywhere?
>=20
> And NoCamelCase !

We can probably just delete the enum since we are just doing this in
code anyway:

       if (!opal_check_token(OPAL_RTC_READ))
               goto out;

OK?  Or would you prefer the usage to read:

       if (opal_check_token(OPAL_RTC_READ) =3D=3D OPAL_TOKEN_ABSENT)
               goto out;


> Yes I know there's lots in that file, but I didn't merge that :)

Fickle bloody maintainers.  I thought I never say this but... I want our
crazy Frenchman back! :-P

Mikey

  reply	other threads:[~2014-09-15  3:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19  4:47 [PATCH 1/4] powerpc/powernv: Add OPAL check token call Michael Neuling
2014-08-19  4:48 ` [PATCH 2/4] powerpc/powernv: Check OPAL RTC calls exists before using Michael Neuling
2014-08-19  4:48 ` [PATCH 3/4] powerpc/powernv: Check OPAL elog calls exist " Michael Neuling
2014-09-15  3:13   ` Michael Ellerman
2014-08-19  4:48 ` [PATCH 4/4] powerpc/powernv: Check OPAL dump " Michael Neuling
2014-09-15  3:10 ` [PATCH 1/4] powerpc/powernv: Add OPAL check token call Michael Ellerman
2014-09-15  3:19   ` Michael Neuling [this message]
2014-09-15 12:24   ` Benjamin Herrenschmidt
2014-10-07  4:36 ` Stewart Smith

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=1410751158.18144.7.camel@ale.ozlabs.ibm.com \
    --to=mikey@neuling.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=stewart@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).