<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/arch/powerpc/platforms/pseries/hotplug-memory.c, branch v3.16.35</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>powerpc/pseries: Failure on removing device node</title>
<updated>2014-09-17T16:21:56+00:00</updated>
<author>
<name>Gavin Shan</name>
<email>gwshan@linux.vnet.ibm.com</email>
</author>
<published>2014-08-11T09:16:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=db11f8f5b326c96062ebd973505f13e47d1e127d'/>
<id>db11f8f5b326c96062ebd973505f13e47d1e127d</id>
<content type='text'>
commit f1b3929c232784580e5d8ee324b6bc634e709575 upstream.

While running command "drmgr -c phb -r -s 'PHB 528'", following
backtrace jumped out because the target device node isn't marked
with OF_DETACHED by of_detach_node(), which caused by error
returned from memory hotplug related reconfig notifier when
disabling CONFIG_MEMORY_HOTREMOVE. The patch fixes it.

ERROR: Bad of_node_put() on /pci@800000020000210/ethernet@0
CPU: 14 PID: 2252 Comm: drmgr Tainted: G        W     3.16.0+ #427
Call Trace:
[c000000012a776a0] [c000000000013d9c] .show_stack+0x88/0x148 (unreliable)
[c000000012a77750] [c00000000083cd34] .dump_stack+0x7c/0x9c
[c000000012a777d0] [c0000000006807c4] .of_node_release+0x58/0xe0
[c000000012a77860] [c00000000038a7d0] .kobject_release+0x174/0x1b8
[c000000012a77900] [c00000000038a884] .kobject_put+0x70/0x78
[c000000012a77980] [c000000000681680] .of_node_put+0x28/0x34
[c000000012a77a00] [c000000000681ea8] .__of_get_next_child+0x64/0x70
[c000000012a77a90] [c000000000682138] .of_find_node_by_path+0x1b8/0x20c
[c000000012a77b40] [c000000000051840] .ofdt_write+0x308/0x688
[c000000012a77c20] [c000000000238430] .proc_reg_write+0xb8/0xd4
[c000000012a77cd0] [c0000000001cbeac] .vfs_write+0xec/0x1f8
[c000000012a77d70] [c0000000001cc3b0] .SyS_write+0x58/0xa0
[c000000012a77e30] [c00000000000a064] syscall_exit+0x0/0x98

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f1b3929c232784580e5d8ee324b6bc634e709575 upstream.

While running command "drmgr -c phb -r -s 'PHB 528'", following
backtrace jumped out because the target device node isn't marked
with OF_DETACHED by of_detach_node(), which caused by error
returned from memory hotplug related reconfig notifier when
disabling CONFIG_MEMORY_HOTREMOVE. The patch fixes it.

ERROR: Bad of_node_put() on /pci@800000020000210/ethernet@0
CPU: 14 PID: 2252 Comm: drmgr Tainted: G        W     3.16.0+ #427
Call Trace:
[c000000012a776a0] [c000000000013d9c] .show_stack+0x88/0x148 (unreliable)
[c000000012a77750] [c00000000083cd34] .dump_stack+0x7c/0x9c
[c000000012a777d0] [c0000000006807c4] .of_node_release+0x58/0xe0
[c000000012a77860] [c00000000038a7d0] .kobject_release+0x174/0x1b8
[c000000012a77900] [c00000000038a884] .kobject_put+0x70/0x78
[c000000012a77980] [c000000000681680] .of_node_put+0x28/0x34
[c000000012a77a00] [c000000000681ea8] .__of_get_next_child+0x64/0x70
[c000000012a77a90] [c000000000682138] .of_find_node_by_path+0x1b8/0x20c
[c000000012a77b40] [c000000000051840] .ofdt_write+0x308/0x688
[c000000012a77c20] [c000000000238430] .proc_reg_write+0xb8/0xd4
[c000000012a77cd0] [c0000000001cbeac] .vfs_write+0xec/0x1f8
[c000000012a77d70] [c0000000001cc3b0] .SyS_write+0x58/0xa0
[c000000012a77e30] [c00000000000a064] syscall_exit+0x0/0x98

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc: Allow ppc_md platform hook to override memory_block_size_bytes</title>
<updated>2014-06-05T03:20:39+00:00</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@au1.ibm.com</email>
</author>
<published>2014-06-04T07:50:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=a5d862576a64cb3e0c22dc9cc2170e4d750714f9'/>
<id>a5d862576a64cb3e0c22dc9cc2170e4d750714f9</id>
<content type='text'>
The pseries platform code unconditionally overrides
memory_block_size_bytes regardless of the running platform.

Create a ppc_md hook that so each platform can choose to
do what it wants.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pseries platform code unconditionally overrides
memory_block_size_bytes regardless of the running platform.

Create a ppc_md hook that so each platform can choose to
do what it wants.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc/pseries: Protect remove_memory() with device hotplug lock</title>
<updated>2014-04-28T06:32:14+00:00</updated>
<author>
<name>Li Zhong</name>
<email>zhong@linux.vnet.ibm.com</email>
</author>
<published>2014-04-10T08:25:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=42dbfc8649737cb622b2a7e02045401c4c09561c'/>
<id>42dbfc8649737cb622b2a7e02045401c4c09561c</id>
<content type='text'>
While testing memory hot-remove, I found following dead lock:

Process #1141 is drmgr, trying to remove some memory, i.e. memory499.
It holds the memory_hotplug_mutex, and blocks when trying to remove file
"online" under dir memory499, in kernfs_drain(), at
        wait_event(root-&gt;deactivate_waitq,
                   atomic_read(&amp;kn-&gt;active) == KN_DEACTIVATED_BIAS);

Process #1120 is trying to online memory499 by
   echo 1 &gt; memory499/online

In .kernfs_fop_write, it uses kernfs_get_active() to increase
&amp;kn-&gt;active, thus blocking process #1141. While itself is blocked later
when trying to acquire memory_hotplug_mutex, which is held by process

The backtrace of both processes are shown below:

[&lt;c000000001b18600&gt;] 0xc000000001b18600
[&lt;c000000000015044&gt;] .__switch_to+0x144/0x200
[&lt;c000000000263ca4&gt;] .online_pages+0x74/0x7b0
[&lt;c00000000055b40c&gt;] .memory_subsys_online+0x9c/0x150
[&lt;c00000000053cbe8&gt;] .device_online+0xb8/0x120
[&lt;c00000000053cd04&gt;] .online_store+0xb4/0xc0
[&lt;c000000000538ce4&gt;] .dev_attr_store+0x64/0xa0
[&lt;c00000000030f4ec&gt;] .sysfs_kf_write+0x7c/0xb0
[&lt;c00000000030e574&gt;] .kernfs_fop_write+0x154/0x1e0
[&lt;c000000000268450&gt;] .vfs_write+0xe0/0x260
[&lt;c000000000269144&gt;] .SyS_write+0x64/0x110
[&lt;c000000000009ffc&gt;] syscall_exit+0x0/0x7c

[&lt;c000000001b18600&gt;] 0xc000000001b18600
[&lt;c000000000015044&gt;] .__switch_to+0x144/0x200
[&lt;c00000000030be14&gt;] .__kernfs_remove+0x204/0x300
[&lt;c00000000030d428&gt;] .kernfs_remove_by_name_ns+0x68/0xf0
[&lt;c00000000030fb38&gt;] .sysfs_remove_file_ns+0x38/0x60
[&lt;c000000000539354&gt;] .device_remove_attrs+0x54/0xc0
[&lt;c000000000539fd8&gt;] .device_del+0x158/0x250
[&lt;c00000000053a104&gt;] .device_unregister+0x34/0xa0
[&lt;c00000000055bc14&gt;] .unregister_memory_section+0x164/0x170
[&lt;c00000000024ee18&gt;] .__remove_pages+0x108/0x4c0
[&lt;c00000000004b590&gt;] .arch_remove_memory+0x60/0xc0
[&lt;c00000000026446c&gt;] .remove_memory+0x8c/0xe0
[&lt;c00000000007f9f4&gt;] .pseries_remove_memblock+0xd4/0x160
[&lt;c00000000007fcfc&gt;] .pseries_memory_notifier+0x27c/0x290
[&lt;c0000000008ae6cc&gt;] .notifier_call_chain+0x8c/0x100
[&lt;c0000000000d858c&gt;] .__blocking_notifier_call_chain+0x6c/0xe0
[&lt;c00000000071ddec&gt;] .of_property_notify+0x7c/0xc0
[&lt;c00000000071ed3c&gt;] .of_update_property+0x3c/0x1b0
[&lt;c0000000000756cc&gt;] .ofdt_write+0x3dc/0x740
[&lt;c0000000002f60fc&gt;] .proc_reg_write+0xac/0x110
[&lt;c000000000268450&gt;] .vfs_write+0xe0/0x260
[&lt;c000000000269144&gt;] .SyS_write+0x64/0x110
[&lt;c000000000009ffc&gt;] syscall_exit+0x0/0x7c

This patch uses lock_device_hotplug() to protect remove_memory() called
in pseries_remove_memblock(), which is also stated before function
remove_memory():

 * NOTE: The caller must call lock_device_hotplug() to serialize hotplug
 * and online/offline operations before this call, as required by
 * try_offline_node().
 */
void __ref remove_memory(int nid, u64 start, u64 size)

With this lock held, the other process(#1120 above) trying to online the
memory block will retry the system call when calling
lock_device_hotplug_sysfs(), and finally find No such device error.

Signed-off-by: Li Zhong &lt;zhong@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While testing memory hot-remove, I found following dead lock:

Process #1141 is drmgr, trying to remove some memory, i.e. memory499.
It holds the memory_hotplug_mutex, and blocks when trying to remove file
"online" under dir memory499, in kernfs_drain(), at
        wait_event(root-&gt;deactivate_waitq,
                   atomic_read(&amp;kn-&gt;active) == KN_DEACTIVATED_BIAS);

Process #1120 is trying to online memory499 by
   echo 1 &gt; memory499/online

In .kernfs_fop_write, it uses kernfs_get_active() to increase
&amp;kn-&gt;active, thus blocking process #1141. While itself is blocked later
when trying to acquire memory_hotplug_mutex, which is held by process

The backtrace of both processes are shown below:

[&lt;c000000001b18600&gt;] 0xc000000001b18600
[&lt;c000000000015044&gt;] .__switch_to+0x144/0x200
[&lt;c000000000263ca4&gt;] .online_pages+0x74/0x7b0
[&lt;c00000000055b40c&gt;] .memory_subsys_online+0x9c/0x150
[&lt;c00000000053cbe8&gt;] .device_online+0xb8/0x120
[&lt;c00000000053cd04&gt;] .online_store+0xb4/0xc0
[&lt;c000000000538ce4&gt;] .dev_attr_store+0x64/0xa0
[&lt;c00000000030f4ec&gt;] .sysfs_kf_write+0x7c/0xb0
[&lt;c00000000030e574&gt;] .kernfs_fop_write+0x154/0x1e0
[&lt;c000000000268450&gt;] .vfs_write+0xe0/0x260
[&lt;c000000000269144&gt;] .SyS_write+0x64/0x110
[&lt;c000000000009ffc&gt;] syscall_exit+0x0/0x7c

[&lt;c000000001b18600&gt;] 0xc000000001b18600
[&lt;c000000000015044&gt;] .__switch_to+0x144/0x200
[&lt;c00000000030be14&gt;] .__kernfs_remove+0x204/0x300
[&lt;c00000000030d428&gt;] .kernfs_remove_by_name_ns+0x68/0xf0
[&lt;c00000000030fb38&gt;] .sysfs_remove_file_ns+0x38/0x60
[&lt;c000000000539354&gt;] .device_remove_attrs+0x54/0xc0
[&lt;c000000000539fd8&gt;] .device_del+0x158/0x250
[&lt;c00000000053a104&gt;] .device_unregister+0x34/0xa0
[&lt;c00000000055bc14&gt;] .unregister_memory_section+0x164/0x170
[&lt;c00000000024ee18&gt;] .__remove_pages+0x108/0x4c0
[&lt;c00000000004b590&gt;] .arch_remove_memory+0x60/0xc0
[&lt;c00000000026446c&gt;] .remove_memory+0x8c/0xe0
[&lt;c00000000007f9f4&gt;] .pseries_remove_memblock+0xd4/0x160
[&lt;c00000000007fcfc&gt;] .pseries_memory_notifier+0x27c/0x290
[&lt;c0000000008ae6cc&gt;] .notifier_call_chain+0x8c/0x100
[&lt;c0000000000d858c&gt;] .__blocking_notifier_call_chain+0x6c/0xe0
[&lt;c00000000071ddec&gt;] .of_property_notify+0x7c/0xc0
[&lt;c00000000071ed3c&gt;] .of_update_property+0x3c/0x1b0
[&lt;c0000000000756cc&gt;] .ofdt_write+0x3dc/0x740
[&lt;c0000000002f60fc&gt;] .proc_reg_write+0xac/0x110
[&lt;c000000000268450&gt;] .vfs_write+0xe0/0x260
[&lt;c000000000269144&gt;] .SyS_write+0x64/0x110
[&lt;c000000000009ffc&gt;] syscall_exit+0x0/0x7c

This patch uses lock_device_hotplug() to protect remove_memory() called
in pseries_remove_memblock(), which is also stated before function
remove_memory():

 * NOTE: The caller must call lock_device_hotplug() to serialize hotplug
 * and online/offline operations before this call, as required by
 * try_offline_node().
 */
void __ref remove_memory(int nid, u64 start, u64 size)

With this lock held, the other process(#1120 above) trying to online the
memory block will retry the system call when calling
lock_device_hotplug_sysfs(), and finally find No such device error.

Signed-off-by: Li Zhong &lt;zhong@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc/pseries: Use remove_memory() to remove memory</title>
<updated>2014-03-07T04:53:13+00:00</updated>
<author>
<name>Nathan Fontenot</name>
<email>nfont@linux.vnet.ibm.com</email>
</author>
<published>2014-01-27T16:54:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9ac8cde938481cd0e3f700b8f071c4eca989c9f6'/>
<id>9ac8cde938481cd0e3f700b8f071c4eca989c9f6</id>
<content type='text'>
The memory remove code for powerpc/pseries should call remove_memory()
so that we are holding the hotplug_memory lock during memory remove
operations.

This patch updates the memory node remove handler to call remove_memory()
and adds a ppc_md.remove_memory() entry to handle pseries specific work
that is called from arch_remove_memory().

During memory remove in pseries_remove_memblock() we have to stay with
removing memory one section at a time. This is needed because of how memory
resources are handled. During memory add for pseries (via the probe file in
sysfs) we add memory one section at a time which gives us a memory resource
for each section. Future patches will aim to address this so will not have
to remove memory one section at a time.

Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The memory remove code for powerpc/pseries should call remove_memory()
so that we are holding the hotplug_memory lock during memory remove
operations.

This patch updates the memory node remove handler to call remove_memory()
and adds a ppc_md.remove_memory() entry to handle pseries specific work
that is called from arch_remove_memory().

During memory remove in pseries_remove_memblock() we have to stay with
removing memory one section at a time. This is needed because of how memory
resources are handled. During memory add for pseries (via the probe file in
sysfs) we add memory one section at a time which gives us a memory resource
for each section. Future patches will aim to address this so will not have
to remove memory one section at a time.

Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc: add explicit OF includes</title>
<updated>2013-10-10T01:04:11+00:00</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2013-09-26T12:40:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=26a2056eb21fff26caf99d19ad5448e9403db55d'/>
<id>26a2056eb21fff26caf99d19ad5448e9403db55d</id>
<content type='text'>
When removing prom.h include by of.h, several OF headers will no longer
be implicitly included. Add explicit includes of of_*.h as needed.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Anatolij Gustschin &lt;agust@denx.de&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: linuxppc-dev@lists.ozlabs.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When removing prom.h include by of.h, several OF headers will no longer
be implicitly included. Add explicit includes of of_*.h as needed.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Anatolij Gustschin &lt;agust@denx.de&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: linuxppc-dev@lists.ozlabs.org
</pre>
</div>
</content>
</entry>
<entry>
<title>mm, hotplug: avoid compiling memory hotremove functions when disabled</title>
<updated>2013-04-29T22:54:37+00:00</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2013-04-29T22:08:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=4edd7ceff0662afde195da6f6c43e7cbe1ed2dc4'/>
<id>4edd7ceff0662afde195da6f6c43e7cbe1ed2dc4</id>
<content type='text'>
__remove_pages() is only necessary for CONFIG_MEMORY_HOTREMOVE.  PowerPC
pseries will return -EOPNOTSUPP if unsupported.

Adding an #ifdef causes several other functions it depends on to also
become unnecessary, which saves in .text when disabled (it's disabled in
most defconfigs besides powerpc, including x86).  remove_memory_block()
becomes static since it is not referenced outside of
drivers/base/memory.c.

Build tested on x86 and powerpc with CONFIG_MEMORY_HOTREMOVE both enabled
and disabled.

Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Acked-by: Toshi Kani &lt;toshi.kani@hp.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: Tang Chen &lt;tangchen@cn.fujitsu.com&gt;
Cc: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__remove_pages() is only necessary for CONFIG_MEMORY_HOTREMOVE.  PowerPC
pseries will return -EOPNOTSUPP if unsupported.

Adding an #ifdef causes several other functions it depends on to also
become unnecessary, which saves in .text when disabled (it's disabled in
most defconfigs besides powerpc, including x86).  remove_memory_block()
becomes static since it is not referenced outside of
drivers/base/memory.c.

Build tested on x86 and powerpc with CONFIG_MEMORY_HOTREMOVE both enabled
and disabled.

Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Acked-by: Toshi Kani &lt;toshi.kani@hp.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: Tang Chen &lt;tangchen@cn.fujitsu.com&gt;
Cc: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc+of: Add of node/property notification chain for adds and removes</title>
<updated>2012-11-15T01:56:41+00:00</updated>
<author>
<name>Nathan Fontenot</name>
<email>nfont@linux.vnet.ibm.com</email>
</author>
<published>2012-10-02T16:57:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=1cf3d8b3d24cd383ddfd5442c83ec5c355ffc2f7'/>
<id>1cf3d8b3d24cd383ddfd5442c83ec5c355ffc2f7</id>
<content type='text'>
This patch moves the notification chain for updates to the device tree
from the powerpc/pseries code to the base OF code. This makes this
functionality available to all architectures.

Additionally the notification chain is updated to allow notifications
for property add/remove/update. To make this work a pointer to a new
struct (of_prop_reconfig) is passed to the routines in the notification chain.
The of_prop_reconfig property contains a pointer to the node containing the
property and a pointer to the property itself. In the case of property
updates, the property pointer refers to the new property.

Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch moves the notification chain for updates to the device tree
from the powerpc/pseries code to the base OF code. This makes this
functionality available to all architectures.

Additionally the notification chain is updated to allow notifications
for property add/remove/update. To make this work a pointer to a new
struct (of_prop_reconfig) is passed to the routines in the notification chain.
The of_prop_reconfig property contains a pointer to the node containing the
property and a pointer to the property itself. In the case of property
updates, the property pointer refers to the new property.

Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arch/powerpc/platforms/pseries/hotplug-memory.c: section removal cleanups</title>
<updated>2012-10-10T23:50:14+00:00</updated>
<author>
<name>Yasuaki Ishimatsu</name>
<email>isimatu.yasuaki@jp.fujitsu.com</email>
</author>
<published>2012-10-10T22:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=1633dbbacbaa3a2f95ef901caf9d0b32728c10b6'/>
<id>1633dbbacbaa3a2f95ef901caf9d0b32728c10b6</id>
<content type='text'>
Followups to d760afd4d257 ("memory-hotplug: suppress "Trying to free
nonexistent resource &lt;XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY&gt;" warning").

 - use unsigned long type, as overflows are conceivable

 - rename `i' to the less-misleading and more informative `section'

Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followups to d760afd4d257 ("memory-hotplug: suppress "Trying to free
nonexistent resource &lt;XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY&gt;" warning").

 - use unsigned long type, as overflows are conceivable

 - rename `i' to the less-misleading and more informative `section'

Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arch/powerpc/platforms/pseries/hotplug-memory.c: fix section handling code</title>
<updated>2012-10-10T23:50:13+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2012-10-10T22:53:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=158544b165d362c23acdde0104d9aab505a262a6'/>
<id>158544b165d362c23acdde0104d9aab505a262a6</id>
<content type='text'>
Fix

  arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
  arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]

Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
nonexistent resource &lt;XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY&gt;" warning").

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Tested-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Tested-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Tested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix

  arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
  arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]

Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
nonexistent resource &lt;XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY&gt;" warning").

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Tested-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Tested-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Tested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>memory-hotplug: suppress "Trying to free nonexistent resource &lt;XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY&gt;" warning</title>
<updated>2012-10-09T07:23:04+00:00</updated>
<author>
<name>Yasuaki Ishimatsu</name>
<email>isimatu.yasuaki@jp.fujitsu.com</email>
</author>
<published>2012-10-08T23:34:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=d760afd4d2570653891f94e13b848e97150dc5a6'/>
<id>d760afd4d2570653891f94e13b848e97150dc5a6</id>
<content type='text'>
When our x86 box calls __remove_pages(), release_mem_region() shows many
warnings.  And x86 box cannot unregister iomem_resource.

  "Trying to free nonexistent resource &lt;XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY&gt;"

release_mem_region() has been changed to be called in each
PAGES_PER_SECTION by commit de7f0cba9678 ("memory hotplug: release
memory regions in PAGES_PER_SECTION chunks").  Because powerpc registers
iomem_resource in each PAGES_PER_SECTION chunk.  But when I hot add
memory on x86 box, iomem_resource is register in each _CRS not
PAGES_PER_SECTION chunk.  So x86 box unregisters iomem_resource.

The patch fixes the problem.

Signed-off-by: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Jiang Liu &lt;liuj97@gmail.com&gt;
Cc: Len Brown &lt;len.brown@intel.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Cc: Nathan Fontenot &lt;nfont@austin.ibm.com&gt;
Cc: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Cc: Yasunori Goto &lt;y-goto@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When our x86 box calls __remove_pages(), release_mem_region() shows many
warnings.  And x86 box cannot unregister iomem_resource.

  "Trying to free nonexistent resource &lt;XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY&gt;"

release_mem_region() has been changed to be called in each
PAGES_PER_SECTION by commit de7f0cba9678 ("memory hotplug: release
memory regions in PAGES_PER_SECTION chunks").  Because powerpc registers
iomem_resource in each PAGES_PER_SECTION chunk.  But when I hot add
memory on x86 box, iomem_resource is register in each _CRS not
PAGES_PER_SECTION chunk.  So x86 box unregisters iomem_resource.

The patch fixes the problem.

Signed-off-by: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Jiang Liu &lt;liuj97@gmail.com&gt;
Cc: Len Brown &lt;len.brown@intel.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Cc: Nathan Fontenot &lt;nfont@austin.ibm.com&gt;
Cc: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Cc: Yasunori Goto &lt;y-goto@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
