<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/cpufreq/intel_pstate.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-07-10T17:37:58Z</updated>
<entry>
<title>intel_pstate: set BYT MSR with wrmsrl_on_cpu()</title>
<updated>2015-07-10T17:37:58Z</updated>
<author>
<name>Joe Konno</name>
</author>
<published>2015-05-12T14:59:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68c2e421b160403c686faf74937bbf8a34f417b8'/>
<id>urn:sha1:68c2e421b160403c686faf74937bbf8a34f417b8</id>
<content type='text'>
commit 0dd23f94251f49da99a6cbfb22418b2d757d77d6 upstream.

Commit 007bea098b86 (intel_pstate: Add setting voltage value for
baytrail P states.) introduced byt_set_pstate() with the assumption that
it would always be run by the CPU whose MSR is to be written by it.  It
turns out, however, that is not always the case in practice, so modify
byt_set_pstate() to enforce the MSR write done by it to always happen on
the right CPU.

Fixes: 007bea098b86 (intel_pstate: Add setting voltage value for baytrail P states.)
Signed-off-by: Joe Konno &lt;joe.konno@intel.com&gt;
Acked-by: Kristen Carlson Accardi &lt;kristen@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>intel_pstate: Correct BYT VID values.</title>
<updated>2014-11-14T17:00:01Z</updated>
<author>
<name>Dirk Brandewie</name>
</author>
<published>2014-10-13T15:37:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b019cc1ad058c1378563b8fefb3da63d2f56ec6'/>
<id>urn:sha1:4b019cc1ad058c1378563b8fefb3da63d2f56ec6</id>
<content type='text'>
commit d022a65ed2473fac4a600e3424503dc571160a3e upstream.

Using a VID value that is not high enough for the requested P state can
cause machine checks. Add a ceiling function to ensure calulated VIDs
with fractional values are set to the next highest integer VID value.

The algorythm for calculating the non-trubo VID from the BIOS writers
guide is:
 vid_ratio = (vid_max - vid_min) / (max_pstate - min_pstate)
 vid = ceiling(vid_min + (req_pstate - min_pstate) * vid_ratio)

Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>intel_pstate: Fix BYT frequency reporting</title>
<updated>2014-11-14T17:00:01Z</updated>
<author>
<name>Dirk Brandewie</name>
</author>
<published>2014-10-13T15:37:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da0b49e81e0cb492b384db389c40bff9cbb2b179'/>
<id>urn:sha1:da0b49e81e0cb492b384db389c40bff9cbb2b179</id>
<content type='text'>
commit b27580b05e6f5253228debc60b8ff4a786ff573a upstream.

BYT has a different conversion from P state to frequency than the core
processors.  This causes the min/max and current frequency to be
misreported on some BYT SKUs. Tested on BYT N2820, Ivybridge and
Haswell processors.

Link: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6663
Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: intel_pstate: Add CPU ID for Braswell processor</title>
<updated>2014-11-14T16:59:59Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2014-08-22T10:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c4efbfe4569265db67614b0c390498bc215d442'/>
<id>urn:sha1:2c4efbfe4569265db67614b0c390498bc215d442</id>
<content type='text'>
commit 16405f98bca8eb39a23b3ce03e241ca19e7af370 upstream.

This is pretty much the same as Intel Baytrail, only the CPU ID is
different. Add the new ID to the supported CPU list.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Chang Rebecca Swee Fun &lt;rebecca.swee.fun.chang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>intel_pstate: Add CPU IDs for Broadwell processors</title>
<updated>2014-11-14T16:59:59Z</updated>
<author>
<name>Dirk Brandewie</name>
</author>
<published>2014-05-08T19:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d11e885cfec081c0b69f36ff59310b11f36c6f2d'/>
<id>urn:sha1:d11e885cfec081c0b69f36ff59310b11f36c6f2d</id>
<content type='text'>
commit c7e241df5970171e3e86a516f91ca8a30ca516e8 upstream.

Add support for Broadwell processors.

Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Chang Rebecca Swee Fun &lt;rebecca.swee.fun.chang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: intel_pstate: Fix setting max_perf_pct in performance policy</title>
<updated>2014-11-14T16:59:59Z</updated>
<author>
<name>Pali Rohár</name>
</author>
<published>2014-10-15T23:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0d1e548952e7b1a0502ffd3ca6b17f4e831afdc'/>
<id>urn:sha1:e0d1e548952e7b1a0502ffd3ca6b17f4e831afdc</id>
<content type='text'>
commit 36b4bed5cd8f6e17019fa7d380e0836872c7b367 upstream.

Code which changes policy to powersave changes also max_policy_pct based on
max_freq. Code which change max_perf_pct has upper limit base on value
max_policy_pct. When policy is changing from powersave back to performance
then max_policy_pct is not changed. Which means that changing max_perf_pct is
not possible to high values if max_freq was too low in powersave policy.

Test case:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
800000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3300000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
100

$ echo powersave &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
$ echo 800000 &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
$ echo 20 &gt; /sys/devices/system/cpu/intel_pstate/max_perf_pct

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
800000
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
20

$ echo performance &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
$ echo 3300000 &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
$ echo 100 &gt; /sys/devices/system/cpu/intel_pstate/max_perf_pct

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3300000
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
24

And now intel_pstate driver allows to set maximal value for max_perf_pct based
on max_policy_pct which is 24 for previous powersave max_freq 800000.

This patch will set default value for max_policy_pct when setting policy to
performance so it will allow to set also max value for max_perf_pct.

Signed-off-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Acked-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>intel_pstate: Set CPU number before accessing MSRs</title>
<updated>2014-07-17T23:21:05Z</updated>
<author>
<name>Vincent Minet</name>
</author>
<published>2014-07-04T23:51:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc5c48b656b5000536340c403b42ea52f5965ccf'/>
<id>urn:sha1:bc5c48b656b5000536340c403b42ea52f5965ccf</id>
<content type='text'>
commit 179e8471673ce0249cd4ecda796008f7757e5bad upstream.

Ensure that cpu-&gt;cpu is set before writing MSR_IA32_PERF_CTL during CPU
initialization. Otherwise only cpu0 has its P-state set and all other
cores are left with their values unchanged.

In most cases, this is not too serious because the P-states will be set
correctly when the timer function is run.  But when the default governor
is set to performance, the per-CPU current_pstate stays the same forever
and no attempts are made to write the MSRs again.

Signed-off-by: Vincent Minet &lt;vincent@vincent-minet.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>intel_pstate: don't touch turbo bit if turbo disabled or unavailable.</title>
<updated>2014-07-17T23:21:05Z</updated>
<author>
<name>Dirk Brandewie</name>
</author>
<published>2014-06-20T14:27:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0493292c2589b47957fc566b067c2cf60c829b71'/>
<id>urn:sha1:0493292c2589b47957fc566b067c2cf60c829b71</id>
<content type='text'>
commit dd5fbf70f96dbfd7ee432096a1f979b2b3267856 upstream.

If turbo is disabled in the BIOS bit 38 should be set in
MSR_IA32_MISC_ENABLE register per section 14.3.2.1 of the SDM Vol 3
document 325384-050US Feb 2014.  If this bit is set do *not* attempt
to disable trubo via the MSR_IA32_PERF_CTL register.  On some systems
trying to disable turbo via MSR_IA32_PERF_CTL will cause subsequent
writes to MSR_IA32_PERF_CTL not take affect, in fact reading
MSR_IA32_PERF_CTL will not show the IDA/Turbo DISENGAGE bit(32) as
set. A write of bit 32 to zero returns to normal operation.

Also deal with the case where the processor does not support
turbo and the BIOS does not report the fact in MSR_IA32_MISC_ENABLE
but does report the max and turbo P states as the same value.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=64251
Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>intel_pstate: Fix setting VID</title>
<updated>2014-07-17T23:21:05Z</updated>
<author>
<name>Dirk Brandewie</name>
</author>
<published>2014-06-20T14:27:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=313b12ee56c99a9bc3809a9fa6968a2e9b69ca53'/>
<id>urn:sha1:313b12ee56c99a9bc3809a9fa6968a2e9b69ca53</id>
<content type='text'>
commit c16ed06024a6e699c332831dd50d8276744e3de8 upstream.

Commit 21855ff5 (intel_pstate: Set turbo VID for BayTrail) introduced
setting the turbo VID which is required to prevent a machine check on
some Baytrail SKUs under heavy graphics based workloads.  The
docmumentation update that brought the requirement to light also
changed the bit mask used for enumerating P state and VID values from
0x7f to 0x3f.

This change returns the mask value to 0x7f.

Tested with the Intel NUC DN2820FYK,
BIOS version FYBYT10H.86A.0034.2014.0513.1413 with v3.16-rc1 and
v3.14.8 kernel versions.

Fixes: 21855ff5 (intel_pstate: Set turbo VID for BayTrail)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=77951
Reported-and-tested-by: Rune Reterson &lt;rune@megahurts.dk&gt;
Reported-and-tested-by: Eric Eickmeyer &lt;erich@ericheickmeyer.com&gt;
Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>intel_pstate: Correct rounding in busy calculation</title>
<updated>2014-07-09T18:18:26Z</updated>
<author>
<name>Doug Smythies</name>
</author>
<published>2014-06-17T20:36:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4e368a53c65f8acd462b2b038c18a21d30eaeb8'/>
<id>urn:sha1:f4e368a53c65f8acd462b2b038c18a21d30eaeb8</id>
<content type='text'>
commit 51d211e9c334b9eca3505f4052afa660c3e0606b upstream.

There was a mistake in the actual rounding portion this previous patch:
f0fe3cd7e12d (intel_pstate: Correct rounding in busy calculation) such that
the rounding was asymetric and incorrect.

Severity: Not very serious, but can increase target pstate by one extra value.
For real world work flows the issue should self correct (but I have no proof).
It is the equivalent of different PID gains for positive and negative numbers.

Examples:
 -3.000000 used to round to -4, rounds to -3 with this patch.
 -3.503906 used to round to -5, rounds to -4 with this patch.

Fixes: f0fe3cd7e12d (intel_pstate: Correct rounding in busy calculation)
Signed-off-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
