<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/arch/powerpc/platforms/pseries/hotplug-memory.c, branch v4.18</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v4.18</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v4.18'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2018-01-16T12:26:29Z</updated>
<entry>
<title>powerpc: Move of_drconf_cell struct to asm/drmem.h</title>
<updated>2018-01-16T12:26:29Z</updated>
<author>
<name>Nathan Fontenot</name>
<email>nfont@linux.vnet.ibm.com</email>
</author>
<published>2017-12-01T16:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2c77721552e565e900705f4499067f8d37be3976'/>
<id>urn:sha1:2c77721552e565e900705f4499067f8d37be3976</id>
<content type='text'>
Now that the powerpc code parses dynamic reconfiguration memory
LMB information from the LMB array and not the device tree
directly we can move the of_drconf_cell struct to drmem.h where
it fits better.

In addition, the struct is renamed to of_drconf_cell_v1 in
anticipation of upcoming support for version 2 of the dynamic
reconfiguration property and the members are typed as __be*
values to reflect how they exist in the device tree.

Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Update memory hotplug code to use drmem LMB array</title>
<updated>2018-01-16T12:26:28Z</updated>
<author>
<name>Nathan Fontenot</name>
<email>nfont@linux.vnet.ibm.com</email>
</author>
<published>2017-12-01T16:47:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6195a5001f1d11e1ff6a7e47a865f4b42c1bb28c'/>
<id>urn:sha1:6195a5001f1d11e1ff6a7e47a865f4b42c1bb28c</id>
<content type='text'>
Update the pseries memory hotplug code to use the newly added
dynamic reconfiguration LMB array. Doing this is required for the
upcoming support of version 2 of the dynamic reconfiguration
device tree property.

In addition, making this change cleans up the code that parses the
LMB information as we no longer need to worry about device tree
format. This allows us to discard one of the first steps on memory
hotplug where we make a working copy of the device tree property and
convert the entire property to cpu format. Instead we just use the
LMB array directly while holding the memory hotplug lock.

This patch also moves the updating of the device tree property to
powerpc/mm/drmem.c. This allows to the hotplug code to work without
needing to know the device tree format and provides a single
routine for updating the device tree property. This new routine
will handle determination of the proper device tree format and
generate a properly formatted device tree property.

Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Don't attempt to acquire drc during memory hot add for assigned lmbs</title>
<updated>2017-08-31T10:02:23Z</updated>
<author>
<name>John Allen</name>
<email>jallen@linux.vnet.ibm.com</email>
</author>
<published>2017-08-23T17:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=afb5519fdb346201728040cab4e08ce53e7ff4fd'/>
<id>urn:sha1:afb5519fdb346201728040cab4e08ce53e7ff4fd</id>
<content type='text'>
Check if an LMB is assigned before attempting to call dlpar_acquire_drc
in order to avoid any unnecessary rtas calls. This substantially
reduces the running time of memory hot add on lpars with large amounts
of memory.

[mpe: We need to explicitly set rc to 0 in the success case, otherwise
 the compiler might think we use rc without initialising it.]

Fixes: c21f515c7436 ("powerpc/pseries: Make the acquire/release of the drc for memory a seperate step")
Cc: stable@vger.kernel.org # v4.11+
Signed-off-by: John Allen &lt;jallen@linux.vnet.ibm.com&gt;
Reviewed-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Check memory device state before onlining/offlining</title>
<updated>2017-08-10T12:30:00Z</updated>
<author>
<name>Nathan Fontenot</name>
<email>nfont@linux.vnet.ibm.com</email>
</author>
<published>2017-08-02T18:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=1a367063ca0c1c6f6f54b5abd7b4836b0866a07b'/>
<id>urn:sha1:1a367063ca0c1c6f6f54b5abd7b4836b0866a07b</id>
<content type='text'>
When DLPAR adding or removing memory we need to check the device
offline status before trying to online/offline the memory. This is
needed because calls to device_online() and device_offline() will
return non-zero for memory that is already online and offline
respectively.

This update resolves two scenarios. First, for a kernel built with
auto-online memory enabled (CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y),
memory will be onlined as part of calls to add_memory(). After adding
the memory the pseries DLPAR code tries to online it and fails since
the memory is already online. The DLPAR code then tries to remove the
memory which produces the oops message below because the memory is not
offline.

The second scenario occurs when removing memory that is already
offline, i.e. marking memory offline (via sysfs) and then trying to
remove that memory. This doesn't work because offlining the already
offline memory does not succeed and the DLPAR code then fails the
DLPAR remove operation.

The fix for both scenarios is to check the device.offline status
before making the calls to device_online() or device_offline().

  kernel BUG at mm/memory_hotplug.c:1936!
  ...
  NIP [c0000000002ca428] .remove_memory+0xb8/0xc0
  LR [c0000000002ca3cc] .remove_memory+0x5c/0xc0
  Call Trace:
    .remove_memory+0x5c/0xc0 (unreliable)
    .dlpar_add_lmb+0x384/0x400
    .dlpar_memory+0x5dc/0xca0
    .handle_dlpar_errorlog+0x74/0xe0
    .pseries_hp_work_fn+0x2c/0x90
    .process_one_work+0x17c/0x460
    .worker_thread+0x88/0x500
    .kthread+0x15c/0x1a0
    .ret_from_kernel_thread+0x58/0xc0

Fixes: 943db62c316c ("powerpc/pseries: Revert 'Auto-online hotplugged memory'")
Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
[mpe: Use bool, add explicit rc=0 case, change log typos &amp; formatting]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes' into next</title>
<updated>2017-07-03T13:05:43Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2017-07-03T13:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=218ea31039e84901b449c3769035456688f6e17d'/>
<id>urn:sha1:218ea31039e84901b449c3769035456688f6e17d</id>
<content type='text'>
Merge our fixes branch, a few of them are tripping people up while
working on top of next, and we also have a dependency between the CXL
fixes and new CXL code we want to merge into next.
</content>
</entry>
<entry>
<title>powerpc/fadump: avoid holes in boot memory area when fadump is registered</title>
<updated>2017-06-28T03:08:09Z</updated>
<author>
<name>Hari Bathini</name>
<email>hbathini@linux.vnet.ibm.com</email>
</author>
<published>2017-06-01T17:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=eae0dfcc44320c79a05637534d59af4643b2ee7b'/>
<id>urn:sha1:eae0dfcc44320c79a05637534d59af4643b2ee7b</id>
<content type='text'>
To register fadump, boot memory area - the size of low memory chunk that
is required for a kernel to boot successfully when booted with restricted
memory, is assumed to have no holes. But this memory area is currently
not protected from hot-remove operations. So, fadump could fail to
re-register after a memory hot-remove operation, if memory is removed
from boot memory area. To avoid this, ensure that memory from boot
memory area is not hot-removed when fadump is registered.

Signed-off-by: Hari Bathini &lt;hbathini@linux.vnet.ibm.com&gt;
Reviewed-by: Mahesh J Salgaonkar &lt;mahesh@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/hotplug-mem: Fix missing endian conversion of aa_index</title>
<updated>2017-06-01T09:54:41Z</updated>
<author>
<name>Michael Bringmann</name>
<email>mwb@linux.vnet.ibm.com</email>
</author>
<published>2017-05-22T20:44:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=dc421b200f91930c9c6a9586810ff8c232cf10fc'/>
<id>urn:sha1:dc421b200f91930c9c6a9586810ff8c232cf10fc</id>
<content type='text'>
When adding or removing memory, the aa_index (affinity value) for the
memblock must also be converted to match the endianness of the rest
of the 'ibm,dynamic-memory' property.  Otherwise, subsequent retrieval
of the attribute will likely lead to non-existent nodes, followed by
using the default node in the code inappropriately.

Fixes: 5f97b2a0d176 ("powerpc/pseries: Implement memory hotplug add in the kernel")
Cc: stable@vger.kernel.org # v4.1+
Signed-off-by: Michael Bringmann &lt;mwb@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Revert 'Auto-online hotplugged memory'</title>
<updated>2017-02-21T01:57:01Z</updated>
<author>
<name>Nathan Fontenot</name>
<email>nfont@linux.vnet.ibm.com</email>
</author>
<published>2017-02-15T18:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=943db62c316c578f8e2cc6fb81a5f641096b29bf'/>
<id>urn:sha1:943db62c316c578f8e2cc6fb81a5f641096b29bf</id>
<content type='text'>
This reverts commit ec999072442a ("powerpc/pseries: Auto-online
hotplugged memory"), and 9dc512819e4b ("powerpc: Fix unused function
warning 'lmb_to_memblock'").

Using the auto-online acpability does online added memory but does not
update the associated device struct to indicate that the memory is
online. This causes the pseries memory DLPAR code to fail when trying to
remove a LMB that was previously removed and added back. This happens
when validating that the LMB is removable.

This patch reverts to the previous behavior of calling device_online()
to online the LMB when it is DLPAR added and moves the lmb_to_memblock()
routine out of CONFIG_MEMORY_HOTREMOVE now that we call it for add.

Fixes: ec999072442a ("powerpc/pseries: Auto-online hotplugged memory")
Cc: stable@vger.kernel.org # v4.8+
Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Implement indexed-count hotplug memory remove</title>
<updated>2017-02-17T06:57:46Z</updated>
<author>
<name>Sahil Mehta</name>
<email>sahilmehta17@gmail.com</email>
</author>
<published>2017-02-15T18:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=753843471cbbaeca25a5cab51981ee721ad272f7'/>
<id>urn:sha1:753843471cbbaeca25a5cab51981ee721ad272f7</id>
<content type='text'>
Indexed-count remove for memory hotplug guarantees that a contiguous block
of &lt;count&gt; lmbs beginning at a specified &lt;index&gt; will be unassigned (NOT
that &lt;count&gt; lmbs will be removed). Because of Qemu's per-DIMM memory
management, the removal of a contiguous block of memory currently
requires a series of individual calls. Indexed-count remove reduces
this series into a single call.

Signed-off-by: Sahil Mehta &lt;sahilmehta17@gmail.com&gt;
Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Implement indexed-count hotplug memory add</title>
<updated>2017-02-17T06:57:30Z</updated>
<author>
<name>Sahil Mehta</name>
<email>sahilmehta17@gmail.com</email>
</author>
<published>2017-02-15T18:45:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=333f7b76865bec24c66710cf352f892d69e3ba0a'/>
<id>urn:sha1:333f7b76865bec24c66710cf352f892d69e3ba0a</id>
<content type='text'>
Indexed-count add for memory hotplug guarantees that a contiguous block
of &lt;count&gt; lmbs beginning at a specified &lt;drc index&gt; will be assigned,
any LMBs in this range that are not already assigned will be DLPAR added.
Because of Qemu's per-DIMM memory management, the addition of a contiguous
block of memory currently requires a series of individual calls to add
each LMB in the block. Indexed-count add reduces this series of calls to
a single call for the entire block.

Signed-off-by: Sahil Mehta &lt;sahilmehta17@gmail.com&gt;
Signed-off-by: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
