From: Michael Ellerman <mpe@ellerman.id.au>
To: Andrew Donnellan <andrew.donnellan@au1.ibm.com>, linuxppc-dev@ozlabs.org
Subject: Re: [1/2] powerpc/powernv: new function to access OPAL msglog
Date: Tue, 09 Feb 2016 21:20:13 +1100 [thread overview]
Message-ID: <1455013213.23568.1.camel@ellerman.id.au> (raw)
In-Reply-To: <56B97926.1090304@au1.ibm.com>
On Tue, 2016-02-09 at 16:29 +1100, Andrew Donnellan wrote:
> On 08/02/16 22:31, Michael Ellerman wrote:
> > Pulling the memcons out of the bin_attr here is not all that nice. This routine
> > should really stand on its own without reference to the bin_attr. In theory I
> > might want to disable building sysfs but still have this routine available.
>
> Yeah it's a bit ugly, though does disabling sysfs actually break it?
Probably not, it looks like bin_attribute is still defined even when sysfs is
disabled. And the build would break in other places too.
> I can separate it out anyway - there's no reason for the memcons to be
> tied to the sysfs entry.
Yeah that was more my point.
> > It's also a bit fishy if it's called before the bin_attr is initialised or when
> > the memcons initialisation fails. In both cases it should be OK, because the
> > structs in question are static and so the private pointer will be NULL, but
> > that's a bit fragile.
> >
> > I think the solution is simply to create a:
> >
> > static struct memcons *opal_memcons;
> >
> > And use that in opal_msglog_copy() and so on.
>
> Will respin.
Thanks.
cheers
prev parent reply other threads:[~2016-02-09 10:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 6:50 [PATCH 1/2] powerpc/powernv: new function to access OPAL msglog Andrew Donnellan
2016-01-20 6:50 ` [PATCH 2/2] powerpc/xmon: add command to dump " Andrew Donnellan
2016-02-08 11:31 ` [1/2] powerpc/powernv: new function to access " Michael Ellerman
2016-02-09 5:29 ` Andrew Donnellan
2016-02-09 10:20 ` Michael Ellerman [this message]
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=1455013213.23568.1.camel@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=andrew.donnellan@au1.ibm.com \
--cc=linuxppc-dev@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 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).