public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] cpufreq: exynos: Broadcast frequency change notifications for all cores
Date: Thu, 31 Jan 2013 15:45:19 +0100	[thread overview]
Message-ID: <1520677.WES295RohH@amdc1227> (raw)
In-Reply-To: <CAOh2x==GeK4qM=kjy-tzhbEh4L9AmRXoG_0tUzov1SK+uRFxcw@mail.gmail.com>

Hi Viresh,

On Thursday 31 of January 2013 09:50:37 Viresh Kumar wrote:
> On Tue, Nov 13, 2012 at 2:56 PM, Tomasz Figa <t.figa@samsung.com> wrote:
> > On Exynos SoCs all cores share the same frequency setting, so changing
> > frequency of one core will affect rest of cores.
> > 
> > This patch modifies the exynos-cpufreq driver to inform cpufreq core
> > about this behavior and broadcast frequency change notifications for
> > all cores.
> > 
> >         /* When the new frequency is lower than current frequency */
> >         if ((freqs.new < freqs.old) ||
> > 
> > @@ -235,6 +237,7 @@ static int exynos_cpufreq_cpu_init(struct
> > cpufreq_policy *policy)> 
> >                 cpumask_copy(policy->related_cpus, cpu_possible_mask);
> >                 cpumask_copy(policy->cpus, cpu_online_mask);
> >         
> >         } else {
> > 
> > +               policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
> > 
> >                 cpumask_setall(policy->cpus);
> 
> I couldn't understand the use of this change. Can you please explain ?

All cores on Exynos SoCs share the same clock source, which means that 
they all always run at the same frequency. So setting frequency on one 
core sets the frequency on all cores and so it doesn't matter on which 
core the frequency setting operation is done.

As you can see in include/linux/cpufreq.h:

#define CPUFREQ_SHARED_TYPE_ANY  (3) /* Freq can be set from any dependent 
CPU*/

which basically tells (together with rest of the patch) the cpufreq 
subsystem about what I wrote earlier.

Best regards,
-- 
Tomasz Figa
Samsung Poland R&D Center
SW Solution Development, Linux Platform

  reply	other threads:[~2013-01-31 14:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13  9:26 [PATCH] cpufreq: exynos: Broadcast frequency change notifications for all cores Tomasz Figa
2012-11-21 13:52 ` Tomasz Figa
2012-11-21 20:47   ` Rafael J. Wysocki
2012-11-21 21:23     ` Tomasz Figa
2012-11-21 23:41       ` Rafael J. Wysocki
2013-01-31  4:20 ` Viresh Kumar
2013-01-31 14:45   ` Tomasz Figa [this message]
2013-01-31 14:52     ` Viresh Kumar
2013-01-31 15:04       ` Tomasz Figa
2013-01-31 15:16         ` Viresh Kumar
2013-01-31 16:07           ` Tomasz Figa
2013-01-31 16:12             ` Viresh Kumar
2013-02-01  3:47               ` Viresh Kumar

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=1520677.WES295RohH@amdc1227 \
    --to=t.figa@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.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