From: Greg KH <gregkh@linuxfoundation.org>
To: Quentin Perret <quentin.perret@arm.com>
Cc: rafael@kernel.org, peterz@infradead.org, mingo@redhat.com,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
dietmar.eggemann@arm.com
Subject: Re: [PATCH] PM / EM: Expose the Energy Model in debugfs
Date: Tue, 22 Jan 2019 16:54:55 +0100 [thread overview]
Message-ID: <20190122155455.GA20697@kroah.com> (raw)
In-Reply-To: <20190122153412.zuehulqwb7ung43u@queper01-lin>
On Tue, Jan 22, 2019 at 03:34:14PM +0000, Quentin Perret wrote:
> On Monday 07 Jan 2019 at 12:26:08 (+0000), Quentin Perret wrote:
> > diff --git a/kernel/power/energy_model.c b/kernel/power/energy_model.c
> > index d9dc2c38764a..8ef48daa62ff 100644
> > --- a/kernel/power/energy_model.c
> > +++ b/kernel/power/energy_model.c
> > @@ -10,6 +10,7 @@
> >
> > #include <linux/cpu.h>
> > #include <linux/cpumask.h>
> > +#include <linux/debugfs.h>
> > #include <linux/energy_model.h>
> > #include <linux/sched/topology.h>
> > #include <linux/slab.h>
> > @@ -23,6 +24,88 @@ static DEFINE_PER_CPU(struct em_perf_domain *, em_data);
> > */
> > static DEFINE_MUTEX(em_pd_mutex);
> >
> > +#ifdef CONFIG_DEBUG_FS
> > +static struct dentry *rootdir;
> > +
> > +static int em_debug_create_cs(struct em_cap_state *cs, struct dentry *pd)
> > +{
> > + struct dentry *d;
> > + char name[24];
> > +
> > + snprintf(name, sizeof(name), "cs:%lu", cs->frequency);
> > +
> > + d = debugfs_create_dir(name, pd);
> > + if (!d)
> > + return -ENOMEM;
> > +
> > + if (!debugfs_create_ulong("frequency", 0444, d, &cs->frequency))
> > + return -ENOMEM;
>
> Looking at the patches Greg just sent I assume all this is wrong.
Yes it is :)
> I'll send a v2 without the 'if' all over.
That would be wonderful, thanks.
greg k-h
prev parent reply other threads:[~2019-01-22 15:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 12:26 [PATCH] PM / EM: Expose the Energy Model in debugfs Quentin Perret
2019-01-22 15:34 ` Quentin Perret
2019-01-22 15:54 ` Greg KH [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=20190122155455.GA20697@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=quentin.perret@arm.com \
--cc=rafael@kernel.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).