<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/acpi/acpi_processor.c, branch v3.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-05-16T14:27:35Z</updated>
<entry>
<title>ACPI / processor: Check if LAPIC is present during initialization</title>
<updated>2014-05-16T14:27:35Z</updated>
<author>
<name>Baoquan He</name>
<email>bhe@redhat.com</email>
</author>
<published>2014-05-05T04:48:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c401eb8ee374a5fc2b56042c0072ce51a0beb0dc'/>
<id>urn:sha1:c401eb8ee374a5fc2b56042c0072ce51a0beb0dc</id>
<content type='text'>
In acpi_processor_get_info(), ACPI processor info is initialized including
ID, namely CPU index. Currently, on a UP system running an SMP kerenl with
no LAPIC in the MADT, cpu0_initialized is checked to decide whether or not
the CPU has been initialized.

However, this check may not be sufficient for kdump kernels. Most of time
only 1 CPU is supported because of known problems in kdump kernels. So say
the multiple CPUs are present in the boot kernel and a crash happens on
one specific CPU, say CPU2. Then it jumps into the kdump kernel with
"nr_cpus=1" in the command line. In this situation, the kdump kernel
will reuse the ACPI resources from the crashed kernel directly. That
means all LAPIC instances are enabled in the MADT while only one CPU is
in use.  In the kdump kernel, x86_cpu_to_apicid contains the correct APIC
ID and it's related to the CPU ID. If cpu0_initialized is checked only, 0
will be used as the CPU index instead of that APIC ID, which is not
correct.

In addition to checking cpu0_initialized, check acpi_lapic. If acpi_lapic
is 0, then no LAPIC is available from the MADT and the system should be
treated as a UP one without a LAPIC (that is, assign 0 to the CPU index).
Otherwise, use the original (valid) CPU index.

Signed-off-by: Baoquan He &lt;bhe@redhat.com&gt;
[rjw: Subject and changelog]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / processor: do not mark present at boot but not onlined CPU as onlined</title>
<updated>2014-05-08T10:59:36Z</updated>
<author>
<name>Igor Mammedov</name>
<email>imammedo@redhat.com</email>
</author>
<published>2014-05-05T20:49:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b9d46dd7debf8e6dc8614106f1c1909fa8de64d'/>
<id>urn:sha1:0b9d46dd7debf8e6dc8614106f1c1909fa8de64d</id>
<content type='text'>
acpi_processor_add() assumes that present at boot CPUs
are always onlined, it is not so if a CPU failed to become
onlined. As result acpi_processor_add() will mark such CPU
device as onlined in sysfs and following attempts to
online/offline it using /sys/device/system/cpu/cpuX/online
attribute will fail.

Do not poke into device internals in acpi_processor_add()
and touch "struct device { .offline }" attribute, since
for CPUs onlined at boot it's set by:
  topology_init() -&gt; arch_register_cpu() -&gt; register_cpu()
before ACPI device tree is parsed, and for hotplugged
CPUs it's set when userspace onlines CPU via sysfs.

Signed-off-by: Igor Mammedov &lt;imammedo@redhat.com&gt;
Acked-by: Toshi Kani &lt;toshi.kani@hp.com&gt;
Cc: 3.11+ &lt;stable@vger.kernel.org&gt; # 3.11+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / processor: Fix failure of loading acpi-cpufreq driver</title>
<updated>2014-04-30T23:46:43Z</updated>
<author>
<name>Lan Tianyu</name>
<email>tianyu.lan@intel.com</email>
</author>
<published>2014-04-30T07:46:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4985c32ee4241d1aba1beeac72294faa46aaff10'/>
<id>urn:sha1:4985c32ee4241d1aba1beeac72294faa46aaff10</id>
<content type='text'>
According commit d640113fe (ACPI: processor: fix acpi_get_cpuid for UP
processor),  BIOS may not provide _MAT or MADT tables and acpi_get_apicid()
always returns -1. For these cases, original code will pass apic_id with
vaule of -1 to acpi_map_cpuid() and it will check the acpi_id. If acpi_id
is equal to zero, ignores apic_id and return zero for CPU0.

Commit b981513 (ACPI / scan: bail out early if failed to parse APIC
ID for CPU) changed the behavior. Return ENODEV when find apic_id is
less than zero after calling acpi_get_apicid(). This causes acpi-cpufreq
driver fails to be loaded on some machines. This patch is to fix it.

Fixes: b981513f806d (ACPI / scan: bail out early if failed to parse APIC ID for CPU)
References: https://bugzilla.kernel.org/show_bug.cgi?id=73781
Cc: 3.14+ &lt;stable@vger.kernel.org&gt; # 3.14+
Reported-and-tested-by: KATO Hiroshi &lt;katoh@mikage.ne.jp&gt;
Reported-and-tested-by: Stuart Foster &lt;smf.linux@ntlworld.com&gt;
Signed-off-by: Lan Tianyu &lt;tianyu.lan@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'acpi-processor', 'acpi-hotplug', 'acpi-init', 'acpi-pm' and 'acpica'</title>
<updated>2014-01-29T10:47:18Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-01-29T10:47:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=82e180598b54873553fb1d285fb0c90fc54f8f23'/>
<id>urn:sha1:82e180598b54873553fb1d285fb0c90fc54f8f23</id>
<content type='text'>
* acpi-processor:
  ACPI / scan: reduce log level of "ACPI: \_PR_.CPU4: failed to get CPU APIC ID"
  ACPI / processor: Return specific error value when mapping lapic id

* acpi-hotplug:
  ACPI / scan: Clear match_driver flag in acpi_bus_trim()

* acpi-init:
  ACPI / init: Flag use of ACPI and ACPI idioms for power supplies to regulator API

* acpi-pm:
  ACPI / PM: Use ACPI_COMPANION() to get ACPI companions of devices

* acpica:
  ACPICA: Remove bool usage from ACPICA.
</content>
</entry>
<entry>
<title>ACPI / scan: reduce log level of "ACPI: \_PR_.CPU4: failed to get CPU APIC ID"</title>
<updated>2014-01-27T22:05:44Z</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2014-01-27T06:34:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f778d1218f10504a87353c696faf116481fa27a6'/>
<id>urn:sha1:f778d1218f10504a87353c696faf116481fa27a6</id>
<content type='text'>
Commit b981513f806d (ACPI / scan: bail out early if failed to parse
APIC ID for CPU) emits an error message if ACPI processor driver fails
to query APIC ID for the CPU.

Originally it's designed to catch BIOS bugs for CPU hot-addition. But
it accidently reveals another type of BIOS bug that:
 1) BIOS implements ACPI objects for all possible instead of present
    CPUs. (It's valid to do that per ACPI specification.)
 2) BIOS doesn't implement the _STA method for CPU objects. OSPM assumes
    that all CPU objects are present and functioning and attempts to
    use those CPU objects for CPU enumeration, which then triggers the
    error message. According to ACPI spec, BIOS should implement _STA
    for those absent CPUs at least.

Though it's a BIOS bug in essential, there are some BIOSes in the fields
which are implmented in this way. So reduce the log level from ERR to
DEBUG to accommodate these existing BIOSes.

Fixes: b981513f806d (ACPI / scan: bail out early if failed to parse APIC ID for CPU)
Reported-and-tested-by: Jörg Otte &lt;jrg.otte@gmail.com&gt;
Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
[rjw: Changelog]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'acpi-gpe', 'acpi-video', 'acpi-thermal', 'acpi-processor', 'acpi-sleep'</title>
<updated>2014-01-12T22:46:55Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-01-12T22:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bcc7201a91176f815f48f8ad889a20c5c829d9a9'/>
<id>urn:sha1:bcc7201a91176f815f48f8ad889a20c5c829d9a9</id>
<content type='text'>
* acpi-gpe:
  ACPI / EC: disable GPE before removing GPE handler
  ACPI / Button: Fix enabling button GPEs twice

* acpi-video:
  ACPI: Blacklist Win8 OSI for some HP laptop 2013 models
  ACPI / video: Fix typo in video_detect.c

* acpi-thermal:
  ACPI / thermal: remove const from thermal_zone_device_ops declaration

* acpi-processor:
  ACPI / scan: bail out early if failed to parse APIC ID for CPU

* acpi-sleep:
  ACPI / sleep: remove panic in case hardware has changed after S4
</content>
</entry>
<entry>
<title>ACPI / scan: bail out early if failed to parse APIC ID for CPU</title>
<updated>2014-01-11T00:31:38Z</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2014-01-09T08:15:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b981513f806d26b2cc971eb65ced14bede67558b'/>
<id>urn:sha1:b981513f806d26b2cc971eb65ced14bede67558b</id>
<content type='text'>
Enhance ACPI CPU hotplug driver to print clear error message and
bail out early if BIOS returns wrong value in ACPI MADT table or
_MAT method. Otherwise it will add the CPU device even if failed
to get APIC ID and fails any operations against sysfs interface:
/sys/devices/system/cpu/cpux/online

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / bind: Pass struct acpi_device pointer to acpi_bind_one()</title>
<updated>2013-12-07T00:05:50Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-11-29T15:27:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24dee1fc99fd6d38fc859d7f6dda1dab21493bef'/>
<id>urn:sha1:24dee1fc99fd6d38fc859d7f6dda1dab21493bef</id>
<content type='text'>
There is no reason to pass an ACPI handle to acpi_bind_one() instead
of a struct acpi_device pointer to the target device object, so
modify that function to take a struct acpi_device pointer as its
second argument and update all code depending on it accordingly.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Tested-by: Lan Tianyu &lt;tianyu.lan@intel.com&gt; # for USB/ACPI
</content>
</entry>
<entry>
<title>Merge branch 'acpi-processor'</title>
<updated>2013-10-28T00:11:24Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-10-28T00:11:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3fbc4d63744b21ed6814ce768672531500bd3f14'/>
<id>urn:sha1:3fbc4d63744b21ed6814ce768672531500bd3f14</id>
<content type='text'>
* acpi-processor:
  ACPI / processor: fixed a brace coding style issue
  ACPI / processor: Remove outdated comments
  ACPI / processor: remove unnecessary if (!pr) check
  ACPI / processor: remove some dead code in acpi_processor_get_info()
  x86 / ACPI: simplify _acpi_map_lsapic()
  ACPI / processor: use apic_id and remove duplicated _MAT evaluation
  ACPI / processor: Introduce apic_id in struct processor to save parsed APIC id
</content>
</entry>
<entry>
<title>ACPI / processor: Remove outdated comments</title>
<updated>2013-09-23T23:39:40Z</updated>
<author>
<name>Hanjun Guo</name>
<email>hanjun.guo@linaro.org</email>
</author>
<published>2013-09-02T03:57:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7cc34680c1ab418d5c7fd0f9621515b7a0aa1d66'/>
<id>urn:sha1:7cc34680c1ab418d5c7fd0f9621515b7a0aa1d66</id>
<content type='text'>
acpi_get_processor_id() can be find nowhere, and the acpi id
is synchronized to APIC id when acpi_get_cpuid() is called, so
the comments can be removed.

Signed-off-by: Hanjun Guo &lt;hanjun.guo@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
