<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/cppc_acpi.c, branch v4.17.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-02-22T21:54:00+00:00</updated>
<entry>
<title>ACPI / CPPC: Update all pr_(debug/err) messages to log the susbspace id</title>
<updated>2018-02-22T21:54:00+00:00</updated>
<author>
<name>George Cherian</name>
<email>george.cherian@cavium.com</email>
</author>
<published>2018-02-20T11:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d29abc836843b8c9537b4d778eb2d429a804a5ed'/>
<id>urn:sha1:d29abc836843b8c9537b4d778eb2d429a804a5ed</id>
<content type='text'>
CPPC dirver is aware of multiple PCC subspace IDs. Enhance the debug
and error messages in the driver to print the subspace id. In case of
error it will be helpful to find which particular subspace is failing.

Signed-off-by: George Cherian &lt;george.cherian@cavium.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / CPPC: Use 64-bit arithmetic instead of 32-bit</title>
<updated>2018-02-07T10:15:02+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-02-06T23:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b52f451105020677cad61a13b3b67af3fdedb91f'/>
<id>urn:sha1:b52f451105020677cad61a13b3b67af3fdedb91f</id>
<content type='text'>
Add suffix ULL to constant 500 in order to give the compiler complete
information about the proper arithmetic to use. Notice that this
constant is used in a context that expects an expression of type
u64 (64 bits, unsigned).

The expression NUM_RETRIES * cppc_ss-&gt;latency at line 578, which at
preprocessing time translates to 500 * cppc_ss-&gt;latency is currently
being evaluated using 32-bit arithmetic.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: CPPC: remove initial assignment of pcc_ss_data</title>
<updated>2017-12-18T11:10:37+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-12-08T23:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=951ef0e19f0736b45d1c4d81f4dfa04a43f87df5'/>
<id>urn:sha1:951ef0e19f0736b45d1c4d81f4dfa04a43f87df5</id>
<content type='text'>
The initialization of pcc_ss_data from pcc_data[pcc_ss_id] before
pcc_ss_id is being range checked could lead to an out-of-bounds array
read.  This very same initialization is also being performed after
the range check on pcc_ss_id, so we can just remove this problematic
and also redundant assignment to fix the issue.

Detected by cppcheck:
warning: Value stored to 'pcc_ss_data' during its initialization is never
read

Fixes: 85b1407bf6d2 (ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs)
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / CPPC: Fix KASAN global out of bounds warning</title>
<updated>2017-12-05T22:25:49+00:00</updated>
<author>
<name>George Cherian</name>
<email>george.cherian@cavium.com</email>
</author>
<published>2017-12-04T14:06:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1ecbd7170d6579a1ee389a37bf1f0437ea01a388'/>
<id>urn:sha1:1ecbd7170d6579a1ee389a37bf1f0437ea01a388</id>
<content type='text'>
Default value of pcc_subspace_idx is -1.
Make sure to check pcc_subspace_idx before using the same as array index.
This will avoid following KASAN warnings too.

[   15.113449] ==================================================================
[   15.116983] BUG: KASAN: global-out-of-bounds in cppc_get_perf_caps+0xf3/0x3b0
[   15.116983] Read of size 8 at addr ffffffffb9a5c0d8 by task swapper/0/1
[   15.116983] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2+ #2
[   15.116983] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016
[   15.116983] Call Trace:
[   15.116983]  dump_stack+0x7c/0xbb
[   15.116983]  print_address_description+0x1df/0x290
[   15.116983]  kasan_report+0x28a/0x370
[   15.116983]  ? cppc_get_perf_caps+0xf3/0x3b0
[   15.116983]  cppc_get_perf_caps+0xf3/0x3b0
[   15.116983]  ? cpc_read+0x210/0x210
[   15.116983]  ? __rdmsr_on_cpu+0x90/0x90
[   15.116983]  ? rdmsrl_on_cpu+0xa9/0xe0
[   15.116983]  ? rdmsr_on_cpu+0x100/0x100
[   15.116983]  ? wrmsrl_on_cpu+0x9c/0xd0
[   15.116983]  ? wrmsrl_on_cpu+0x9c/0xd0
[   15.116983]  ? wrmsr_on_cpu+0xe0/0xe0
[   15.116983]  __intel_pstate_cpu_init.part.16+0x3a2/0x530
[   15.116983]  ? intel_pstate_init_cpu+0x197/0x390
[   15.116983]  ? show_no_turbo+0xe0/0xe0
[   15.116983]  ? __lockdep_init_map+0xa0/0x290
[   15.116983]  intel_pstate_cpu_init+0x30/0x60
[   15.116983]  cpufreq_online+0x155/0xac0
[   15.116983]  cpufreq_add_dev+0x9b/0xb0
[   15.116983]  subsys_interface_register+0x1ae/0x290
[   15.116983]  ? bus_unregister_notifier+0x40/0x40
[   15.116983]  ? mark_held_locks+0x83/0xb0
[   15.116983]  ? _raw_write_unlock_irqrestore+0x32/0x60
[   15.116983]  ? intel_pstate_setup+0xc/0x104
[   15.116983]  ? intel_pstate_setup+0xc/0x104
[   15.116983]  ? cpufreq_register_driver+0x1ce/0x2b0
[   15.116983]  cpufreq_register_driver+0x1ce/0x2b0
[   15.116983]  ? intel_pstate_setup+0x104/0x104
[   15.116983]  intel_pstate_register_driver+0x3a/0xa0
[   15.116983]  intel_pstate_init+0x3c4/0x434
[   15.116983]  ? intel_pstate_setup+0x104/0x104
[   15.116983]  ? intel_pstate_setup+0x104/0x104
[   15.116983]  do_one_initcall+0x9c/0x206
[   15.116983]  ? parameq+0xa0/0xa0
[   15.116983]  ? initcall_blacklisted+0x150/0x150
[   15.116983]  ? lock_downgrade+0x2c0/0x2c0
[   15.116983]  kernel_init_freeable+0x327/0x3f0
[   15.116983]  ? start_kernel+0x612/0x612
[   15.116983]  ? _raw_spin_unlock_irq+0x29/0x40
[   15.116983]  ? finish_task_switch+0xdd/0x320
[   15.116983]  ? finish_task_switch+0x8e/0x320
[   15.116983]  ? rest_init+0xd0/0xd0
[   15.116983]  kernel_init+0xf/0x11a
[   15.116983]  ? rest_init+0xd0/0xd0
[   15.116983]  ret_from_fork+0x24/0x30

[   15.116983] The buggy address belongs to the variable:
[   15.116983]  __key.36299+0x38/0x40

[   15.116983] Memory state around the buggy address:
[   15.116983]  ffffffffb9a5bf80: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa
[   15.116983]  ffffffffb9a5c000: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa
[   15.116983] &gt;ffffffffb9a5c080: fa fa fa fa 00 fa fa fa fa fa fa fa 00 00 00 00
[   15.116983]                                                     ^
[   15.116983]  ffffffffb9a5c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   15.116983]  ffffffffb9a5c180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   15.116983] ==================================================================

Fixes: 85b1407bf6d2 (ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs)
Reported-by: Changbin Du &lt;changbin.du@intel.com&gt;
Signed-off-by: George Cherian &lt;george.cherian@cavium.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs</title>
<updated>2017-11-08T23:39:54+00:00</updated>
<author>
<name>George Cherian</name>
<email>george.cherian@cavium.com</email>
</author>
<published>2017-10-11T08:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=85b1407bf6d2f4a1583e9201b8c163703df733cc'/>
<id>urn:sha1:85b1407bf6d2f4a1583e9201b8c163703df733cc</id>
<content type='text'>
Based on ACPI 6.2 Section 8.4.7.1.9 If the PCC register space is used,
all PCC registers, for all processors in the same performance domain
(as defined by _PSD), must be defined to be in the same subspace.

Based on Section 14.1 of ACPI specification, it is possible to have a
maximum of 256 PCC subspace IDs. Add support of multiple PCC subspace
ID instead of using a single global pcc_data structure.

While at that, fix the time_delta check in send_pcc_cmd() so that
last_mpar_reset and mpar_count are initialized properly.

Signed-off-by: George Cherian &lt;george.cherian@cavium.com&gt;
Reviewed-by: Prashanth Prakash &lt;pprakash@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>scripts/spelling.txt: add regsiter -&gt; register spelling mistake</title>
<updated>2017-05-09T00:15:13+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2017-05-08T22:57:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad61dd303a0f2439bb104349e2d2ec91a3010ce0'/>
<id>urn:sha1:ad61dd303a0f2439bb104349e2d2ec91a3010ce0</id>
<content type='text'>
This typo is quite common.  Fix it and add it to the spelling file so
that checkpatch catches it earlier.

Link: http://lkml.kernel.org/r/20170317011131.6881-2-sboyd@codeaurora.org
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ACPI / CPPC: add sysfs entries for CPPC perf capabilities</title>
<updated>2017-04-18T21:37:50+00:00</updated>
<author>
<name>Prakash, Prashanth</name>
<email>pprakash@codeaurora.org</email>
</author>
<published>2017-03-29T19:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c74d8473d19c159a3c3eabaa4819e110c97e8ec'/>
<id>urn:sha1:2c74d8473d19c159a3c3eabaa4819e110c97e8ec</id>
<content type='text'>
Computed delivered performance using CPPC feedback counters are in the
CPPC abstract scale, whereas cppc_cpufreq driver operates in KHz scale.
Exposing the CPPC performance capabilities (highest,lowest, nominal,
lowest non-linear) will allow userspace to figure out the conversion
factor from CPPC abstract scale to KHz.

Also rename ctr_wrap_time to wraparound_time so that show_cppc_data()
macro will work with it.

Signed-off-by: Prashanth Prakash &lt;pprakash@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / CPPC: Read lowest nonlinear perf in cppc_get_perf_caps()</title>
<updated>2017-04-18T21:37:49+00:00</updated>
<author>
<name>Prakash, Prashanth</name>
<email>pprakash@codeaurora.org</email>
</author>
<published>2017-03-29T19:49:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=368520a6b2dd232ea5743a6acd9f056bc30e05b4'/>
<id>urn:sha1:368520a6b2dd232ea5743a6acd9f056bc30e05b4</id>
<content type='text'>
Read lowest non linear perf in cppc_get_perf_caps so that it can be exposed
via sysfs to the usespace. Lowest non linear perf is the lowest performance
level at which nonlinear power savings are achieved.

Signed-off-by: Prashanth Prakash &lt;pprakash@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / CPPC: Fix per-CPU pointer management in acpi_cppc_processor_probe()</title>
<updated>2016-12-12T22:52:34+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-12-09T23:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28076483afac9dd77df269f5d460e51a09dfb19f'/>
<id>urn:sha1:28076483afac9dd77df269f5d460e51a09dfb19f</id>
<content type='text'>
Fix a possible use-after-free scenario in acpi_cppc_processor_probe()
that can happen if the function returns without cleaning up the
per-CPU pointer set by it previously.

Reported-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / CPPC: Fix crash in acpi_cppc_processor_exit()</title>
<updated>2016-12-12T22:51:36+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2016-12-07T19:06:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e9d68dad58c70f40f50adfeabd2fdaa39a743fd'/>
<id>urn:sha1:9e9d68dad58c70f40f50adfeabd2fdaa39a743fd</id>
<content type='text'>
First I had crashed what I bisected down to de966cf4a4fa (sched/x86: Change
CONFIG_SCHED_ITMT to CONFIG_SCHED_MC_PRIO) because it made SCHED_ITMT the
default.

Then I run another bisect round and got here with the same backtrace:

|BUG: unable to handle kernel NULL pointer dereference at           (null)
|IP: [&lt;ffffffff812aab6e&gt;] acpi_cppc_processor_exit+0x40/0x60
|PGD 0 [    0.577616]
|Oops: 0000 [#1] SMP
|Modules linked in:
|CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.9.0-rc6-00146-g17669006adf6 #51
|task: ffff88003f878000 task.stack: ffffc90000008000
|RIP: 0010:[&lt;ffffffff812aab6e&gt;]  [&lt;ffffffff812aab6e&gt;] acpi_cppc_processor_exit+0x40/0x60
|RSP: 0000:ffffc9000000bd48  EFLAGS: 00010296
|RAX: 00000000000137e0 RBX: 0000000000000000 RCX: 0000000000000001
|RDX: ffff88003fc00000 RSI: 0000000000000000 RDI: ffff88003fbca130
|RBP: ffffc9000000bd60 R08: 0000000000000514 R09: 0000000000000000
|R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000002
|R13: 0000000000000020 R14: ffffffff8167cb00 R15: 0000000000000000
|FS:  0000000000000000(0000) GS:ffff88003fcc0000(0000) knlGS:0000000000000000
|CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|CR2: 0000000000000000 CR3: 0000000001618000 CR4: 00000000000406e0
|Stack:
| ffff88003f939848 ffff88003fbca130 0000000000000001 ffffc9000000bd80
| ffffffff812a4ccb ffff88003fc0cee8 0000000000000000 ffffc9000000bdb8
| ffffffff812dc20d ffff88003fc0cee8 ffffffff8167cb00 ffff88003fc0cf48
|Call Trace:
| [&lt;ffffffff812a4ccb&gt;] acpi_processor_stop+0xb2/0xc5
| [&lt;ffffffff812dc20d&gt;] driver_probe_device+0x14d/0x2f0
| [&lt;ffffffff812dc41e&gt;] __driver_attach+0x6e/0x90
| [&lt;ffffffff812da234&gt;] bus_for_each_dev+0x54/0x90
| [&lt;ffffffff812dbbf9&gt;] driver_attach+0x19/0x20
| [&lt;ffffffff812db6a6&gt;] bus_add_driver+0xe6/0x200
| [&lt;ffffffff812dcb23&gt;] driver_register+0x83/0xc0
| [&lt;ffffffff816f050a&gt;] acpi_processor_driver_init+0x20/0x94
| [&lt;ffffffff81000487&gt;] do_one_initcall+0x97/0x180
| [&lt;ffffffff816ccf5c&gt;] kernel_init_freeable+0x112/0x1a6
| [&lt;ffffffff813a0fc9&gt;] kernel_init+0x9/0xf0
| [&lt;ffffffff813acf35&gt;] ret_from_fork+0x25/0x30
|Code: 02 00 00 00 48 8b 14 d5 e0 c3 55 81 48 8b 1c 02 4c 8d 6b 20 eb 15 49 8b 7d 00 48 85 ff 74 05 e8 39 8c d9 ff 41 ff c4 49 83 c5 20 &lt;44&gt; 3b 23 72 e6 48 8d bb a0 02 00 00 e8 b1 6f f9 ff 48 89 df e8
|RIP  [&lt;ffffffff812aab6e&gt;] acpi_cppc_processor_exit+0x40/0x60
| RSP &lt;ffffc9000000bd48&gt;
|CR2: 0000000000000000
|---[ end trace 917a625107b09711 ]---

Fix it.

Fixes: 17669006adf6 (cpufreq/intel_pstate: Use CPPC to get max performance)
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
