From: Viresh Kumar <viresh.kumar@linaro.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/2] cpufreq: prevent lockup on reading scaling_available_frequencies
Date: Wed, 7 Oct 2015 22:33:04 +0530 [thread overview]
Message-ID: <20151007170304.GD4557@linux> (raw)
In-Reply-To: <1444234737.3514.17.camel@spandruv-desk3.jf.intel.com>
On 07-10-15, 09:18, Srinivas Pandruvada wrote:
> freq_table is allocated in init() callbacks and freed on exit()
> callback. But I don't see any driver changing policy->freq_table to NULL
> or setting value to policy->freq_table to their allocated freq_table .
That's what I am asking for.
> I see policy->freq_table is only assigned value in function
> cpufreq_table_validate_and_show, as part of the core API.
Its just an helper written to reduce code redundancy..
> So I think we
> should set to NULL after clients freed the freq_table as part of core
> function.
Not really. If we want to do the opposite, then we should initiate
policy->freq_table = NULL, right from exit(), as its done as part of
init() first.
> Otherwise we need to modify every client cpufreq driver and assign
> policy->freq_table=NULL on .exit(). Since they don't assign value to
> this policy->freq_table in first place, they shouldn't change this.
They did set it in the first place, with help of a helper routine
though.
But I do understand the code redundancy we are about to create. So,
maybe we can do this in the core as a special case.
But then you missed another location where exit() was called.
> Also I don't know why we need to keep the sysfs entry cpufreq after
> offline. There are other values, which we can read without crash, but
> may not be valid. We may delete this sysfs entry. But may be some
> cpufreq driver cares about this even after offline. If we can delete
> this entry, it can be part of cleanup of cpufreq subsystem.
Go thought the mail threads where that support is added, it was indeed
useful.
--
viresh
next prev parent reply other threads:[~2015-10-07 17:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 22:23 [PATCH 1/2] cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus Srinivas Pandruvada
2015-10-01 22:23 ` [PATCH 2/2] cpufreq: prevent lockup on reading scaling_available_frequencies Srinivas Pandruvada
2015-10-07 12:45 ` Viresh Kumar
2015-10-07 16:18 ` Srinivas Pandruvada
2015-10-07 17:03 ` Viresh Kumar [this message]
2015-10-07 18:05 ` Srinivas Pandruvada
2015-10-07 18:32 ` Viresh Kumar
2015-10-07 12:19 ` [PATCH 1/2] cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus Viresh Kumar
2015-10-07 15:34 ` Srinivas Pandruvada
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=20151007170304.GD4557@linux \
--to=viresh.kumar@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=srinivas.pandruvada@linux.intel.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).