<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/acpi/acpi_memhotplug.c, branch leds/master</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=leds%2Fmaster</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=leds%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-01-26T15:09:56Z</updated>
<entry>
<title>ACPICA: Resources: Provide common part for struct acpi_resource_address structures.</title>
<updated>2015-01-26T15:09:56Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2015-01-26T08:58:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a45de93eb10ae44446aec2c73d722562ab46092a'/>
<id>urn:sha1:a45de93eb10ae44446aec2c73d722562ab46092a</id>
<content type='text'>
struct acpi_resource_address and struct acpi_resource_extended_address64 share substracts
just at different offsets. To unify the parsing functions, OSPMs like Linux
need a new ACPI_ADDRESS64_ATTRIBUTE as their substructs, so they can
extract the shared data.

This patch also synchronizes the structure changes to the Linux kernel.
The usages are searched by matching the following keywords:
1. acpi_resource_address
2. acpi_resource_extended_address
3. ACPI_RESOURCE_TYPE_ADDRESS
4. ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS
And we found and fixed the usages in the following files:
 arch/ia64/kernel/acpi-ext.c
 arch/ia64/pci/pci.c
 arch/x86/pci/acpi.c
 arch/x86/pci/mmconfig-shared.c
 drivers/xen/xen-acpi-memhotplug.c
 drivers/acpi/acpi_memhotplug.c
 drivers/acpi/pci_root.c
 drivers/acpi/resource.c
 drivers/char/hpet.c
 drivers/pnp/pnpacpi/rsparser.c
 drivers/hv/vmbus_drv.c

Build tests are passed with defconfig/allnoconfig/allyesconfig and
defconfig+CONFIG_ACPI=n.

Original-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Original-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / scan: always register memory hotplug scan handler</title>
<updated>2014-05-30T14:04:36Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-05-30T02:29:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cccd420859a419756bc4ed25d52989a47d702561'/>
<id>urn:sha1:cccd420859a419756bc4ed25d52989a47d702561</id>
<content type='text'>
Prevent platform devices from being created for ACPI memory device
objects if CONFIG_ACPI_HOTPLUG_MEMORY is unset by compiling out the
memory hotplug scan handler's callbacks only in that case and still
compiling its device ID list in and registering the scan handler in
either case.

Also unset the memory hotplug scan handler's .attach() callback
if acpi_no_memhotplug is set, but still register the scan handler to
avoid creating platform devices for ACPI memory devices in that case
too.

This change is based on a prototype from Zhang Rui.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / memhotplug: add parameter to disable memory hotplug</title>
<updated>2014-01-16T00:43:49Z</updated>
<author>
<name>Prarit Bhargava</name>
<email>prarit@redhat.com</email>
</author>
<published>2014-01-14T19:21:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=00159a2013269bc0a617de885e4b921349192bd0'/>
<id>urn:sha1:00159a2013269bc0a617de885e4b921349192bd0</id>
<content type='text'>
When booting a kexec/kdump kernel on a system that has specific memory
hotplug regions the boot will fail with warnings like:

 swapper/0: page allocation failure: order:9, mode:0x84d0
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-65.el7.x86_64 #1
 Hardware name: QCI QSSC-S4R/QSSC-S4R, BIOS QSSC-S4R.QCI.01.00.S013.032920111005 03/29/2011
  0000000000000000 ffff8800341bd8c8 ffffffff815bcc67 ffff8800341bd950
  ffffffff8113b1a0 ffff880036339b00 0000000000000009 00000000000084d0
  ffff8800341bd950 ffffffff815b87ee 0000000000000000 0000000000000200
 Call Trace:
  [&lt;ffffffff815bcc67&gt;] dump_stack+0x19/0x1b
  [&lt;ffffffff8113b1a0&gt;] warn_alloc_failed+0xf0/0x160
  [&lt;ffffffff815b87ee&gt;] ?  __alloc_pages_direct_compact+0xac/0x196
  [&lt;ffffffff8113f14f&gt;] __alloc_pages_nodemask+0x7ff/0xa00
  [&lt;ffffffff815b417c&gt;] vmemmap_alloc_block+0x62/0xba
  [&lt;ffffffff815b41e9&gt;] vmemmap_alloc_block_buf+0x15/0x3b
  [&lt;ffffffff815b1ff6&gt;] vmemmap_populate+0xb4/0x21b
  [&lt;ffffffff815b461d&gt;] sparse_mem_map_populate+0x27/0x35
  [&lt;ffffffff815b400f&gt;] sparse_add_one_section+0x7a/0x185
  [&lt;ffffffff815a1e9f&gt;] __add_pages+0xaf/0x240
  [&lt;ffffffff81047359&gt;] arch_add_memory+0x59/0xd0
  [&lt;ffffffff815a21d9&gt;] add_memory+0xb9/0x1b0
  [&lt;ffffffff81333b9c&gt;] acpi_memory_device_add+0x18d/0x26d
  [&lt;ffffffff81309a01&gt;] acpi_bus_device_attach+0x7d/0xcd
  [&lt;ffffffff8132379d&gt;] acpi_ns_walk_namespace+0xc8/0x17f
  [&lt;ffffffff81309984&gt;] ? acpi_bus_type_and_status+0x90/0x90
  [&lt;ffffffff81309984&gt;] ? acpi_bus_type_and_status+0x90/0x90
  [&lt;ffffffff81323c8c&gt;] acpi_walk_namespace+0x95/0xc5
  [&lt;ffffffff8130a6d6&gt;] acpi_bus_scan+0x8b/0x9d
  [&lt;ffffffff81a2019a&gt;] acpi_scan_init+0x63/0x160
  [&lt;ffffffff81a1ffb5&gt;] acpi_init+0x25d/0x2a6
  [&lt;ffffffff81a1fd58&gt;] ? acpi_sleep_proc_init+0x2a/0x2a
  [&lt;ffffffff810020e2&gt;] do_one_initcall+0xe2/0x190
  [&lt;ffffffff819e20c4&gt;] kernel_init_freeable+0x17c/0x207
  [&lt;ffffffff819e18d0&gt;] ? do_early_param+0x88/0x88
  [&lt;ffffffff8159fea0&gt;] ? rest_init+0x80/0x80
  [&lt;ffffffff8159feae&gt;] kernel_init+0xe/0x180
  [&lt;ffffffff815cca2c&gt;] ret_from_fork+0x7c/0xb0
  [&lt;ffffffff8159fea0&gt;] ? rest_init+0x80/0x80
 Mem-Info:
 Node 0 DMA per-cpu:
 CPU    0: hi:    0, btch:   1 usd:   0
 Node 0 DMA32 per-cpu:
 CPU    0: hi:   42, btch:   7 usd:   0
 active_anon:0 inactive_anon:0 isolated_anon:0
  active_file:0 inactive_file:0 isolated_file:0
  unevictable:0 dirty:0 writeback:0 unstable:0
  free:872 slab_reclaimable:13 slab_unreclaimable:1880
  mapped:0 shmem:0 pagetables:0 bounce:0
  free_cma:0

because the system has run out of memory at boot time.  This occurs
because of the following sequence in the boot:

Main kernel boots and sets E820 map.  The second kernel is booted with a
map generated by the kdump service using memmap= and memmap=exactmap.
These parameters are added to the kernel parameters of the kexec/kdump
kernel.   The kexec/kdump kernel has limited memory resources so as not
to severely impact the main kernel.

The system then panics and the kdump/kexec kernel boots (which is a
completely new kernel boot).  During this boot ACPI is initialized and the
kernel (as can be seen above) traverses the ACPI namespace and finds an
entry for a memory device to be hotadded.

ie)

  [&lt;ffffffff815a1e9f&gt;] __add_pages+0xaf/0x240
  [&lt;ffffffff81047359&gt;] arch_add_memory+0x59/0xd0
  [&lt;ffffffff815a21d9&gt;] add_memory+0xb9/0x1b0
  [&lt;ffffffff81333b9c&gt;] acpi_memory_device_add+0x18d/0x26d
  [&lt;ffffffff81309a01&gt;] acpi_bus_device_attach+0x7d/0xcd
  [&lt;ffffffff8132379d&gt;] acpi_ns_walk_namespace+0xc8/0x17f
  [&lt;ffffffff81309984&gt;] ? acpi_bus_type_and_status+0x90/0x90
  [&lt;ffffffff81309984&gt;] ? acpi_bus_type_and_status+0x90/0x90
  [&lt;ffffffff81323c8c&gt;] acpi_walk_namespace+0x95/0xc5
  [&lt;ffffffff8130a6d6&gt;] acpi_bus_scan+0x8b/0x9d
  [&lt;ffffffff81a2019a&gt;] acpi_scan_init+0x63/0x160
  [&lt;ffffffff81a1ffb5&gt;] acpi_init+0x25d/0x2a6

At this point the kernel adds page table information and the the kexec/kdump
kernel runs out of memory.

This can also be reproduced by using the memmap=exactmap and mem=X
parameters on the main kernel and booting.

This patchset resolves the problem by adding a kernel parameter,
acpi_no_memhotplug, to disable ACPI memory hotplug.

Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Acked-by: Toshi Kani &lt;toshi.kani@hp.com&gt;
Acked-by: David Rientjes &lt;rientjes@google.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.stealer.net/cgit.cgi/user/sven/linux.git/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-hotplug'</title>
<updated>2013-10-28T00:12:41Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-10-28T00:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5c2aae8355f7ec1341d5c473c500a77bbfa7f701'/>
<id>urn:sha1:5c2aae8355f7ec1341d5c473c500a77bbfa7f701</id>
<content type='text'>
* acpi-hotplug:
  ACPI / memhotplug: Use defined marco METHOD_NAME__STA
  ACPI / hotplug: Use kobject_init_and_add() instead of _init() and _add()
  ACPI / hotplug: Don't set kobject parent pointer explicitly
  ACPI / hotplug: Set kobject name via kobject_add(), not kobject_set_name()
  hotplug, powerpc, x86: Remove cpu_hotplug_driver_lock()
  hotplug / x86: Disable ARCH_CPU_PROBE_RELEASE on x86
  hotplug / x86: Add hotplug lock to missing places
  hotplug / x86: Fix online state in cpu0 debug interface
</content>
</entry>
<entry>
<title>ACPI / memhotplug: Use defined marco METHOD_NAME__STA</title>
<updated>2013-10-10T00:32:33Z</updated>
<author>
<name>Zhang Yanfei</name>
<email>zhangyanfei@cn.fujitsu.com</email>
</author>
<published>2013-10-02T08:27:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=16ff816d3b5d2b81fcff5ca44eb9a98ac3b604b4'/>
<id>urn:sha1:16ff816d3b5d2b81fcff5ca44eb9a98ac3b604b4</id>
<content type='text'>
We already have predefined marco for method name "_STA', so
using the marco instead of directly using the string.

Signed-off-by: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / mm: use NUMA_NO_NODE</title>
<updated>2013-09-23T23:40:38Z</updated>
<author>
<name>Jianguo Wu</name>
<email>wujianguo@huawei.com</email>
</author>
<published>2013-08-30T01:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1bb25df0fde2cdb2f250a7e7e43c2ec1ba65d0f5'/>
<id>urn:sha1:1bb25df0fde2cdb2f250a7e7e43c2ec1ba65d0f5</id>
<content type='text'>
Use more appropriate NUMA_NO_NODE instead of -1

Signed-off-by: Jianguo Wu &lt;wujianguo@huawei.com&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / memhotplug: Fix a stale pointer in error path</title>
<updated>2013-07-14T23:26:18Z</updated>
<author>
<name>Toshi Kani</name>
<email>toshi.kani@hp.com</email>
</author>
<published>2013-07-10T16:47:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d19f503e22316a84c39bc19445e0e4fdd49b3532'/>
<id>urn:sha1:d19f503e22316a84c39bc19445e0e4fdd49b3532</id>
<content type='text'>
device-&gt;driver_data needs to be cleared when releasing its data,
mem_device, in an error path of acpi_memory_device_add().

The function evaluates the _CRS of memory device objects, and fails
when it gets an unexpected resource or cannot allocate memory.  A
kernel crash or data corruption may occur when the kernel accesses
the stale pointer.

Signed-off-by: Toshi Kani &lt;toshi.kani@hp.com&gt;
Reviewed-by: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Cc: 2.6.32+ &lt;stable@vger.kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Memory hotplug / ACPI: Simplify memory removal</title>
<updated>2013-06-01T19:37:10Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-05-27T10:58:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=242831eb15a06fa4414eaa705fdc6dd432ab98d1'/>
<id>urn:sha1:242831eb15a06fa4414eaa705fdc6dd432ab98d1</id>
<content type='text'>
Now that the memory offlining should be taken care of by the
companion device offlining code in acpi_scan_hot_remove(), the
ACPI memory hotplug driver doesn't need to offline it in
remove_memory() any more.  Moreover, since the return value of
remove_memory() is not used, it's better to make it be a void
function and trigger a BUG() if the memory scheduled for removal is
not offline.

Change the code in accordance with the above observations.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Toshi Kani &lt;toshi.kani@hp.com&gt;
</content>
</entry>
<entry>
<title>ACPI / memhotplug: Bind removable memory blocks to ACPI device nodes</title>
<updated>2013-05-12T12:14:38Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-05-07T22:29:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e2ff39400d81233374e780b133496a2296643d7d'/>
<id>urn:sha1:e2ff39400d81233374e780b133496a2296643d7d</id>
<content type='text'>
During ACPI memory hotplug configuration bind memory blocks residing
in modules removable through the standard ACPI mechanism to struct
acpi_device objects associated with ACPI namespace objects
representing those modules.  Accordingly, unbind those memory blocks
from the struct acpi_device objects when the memory modules in
question are being removed.

When "offline" operation for devices representing memory blocks is
introduced, this will allow the ACPI core's device hot-remove code to
use it to carry out remove_memory() for those memory blocks and check
the results of that before it actually removes the modules holding
them from the system.

Since walk_memory_range() is used for accessing all memory blocks
corresponding to a given ACPI namespace object, it is exported from
memory_hotplug.c so that the code in acpi_memhotplug.c can use it.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Tested-by: Vasilis Liaskovitis &lt;vasilis.liaskovitis@profitbricks.com&gt;
Reviewed-by: Toshi Kani &lt;toshi.kani@hp.com&gt;
</content>
</entry>
</feed>
