<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/include/asm/rtas.h, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-04-14T13:04:16Z</updated>
<entry>
<title>powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE</title>
<updated>2021-04-14T13:04:16Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2021-04-08T14:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5d56763525e65417dad0d46572b234fa0008e40'/>
<id>urn:sha1:e5d56763525e65417dad0d46572b234fa0008e40</id>
<content type='text'>
RTAS_RMOBUF_MAX doesn't actually describe a "maximum" value in any
sense. It represents the size of an area of memory set aside for user
space to use as work areas for certain RTAS calls.

Rename it to RTAS_USER_REGION_SIZE.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Reviewed-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210408140630.205502-6-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc: remove unneeded semicolons</title>
<updated>2021-02-08T13:10:50Z</updated>
<author>
<name>Chengyang Fan</name>
</author>
<published>2021-01-25T09:53:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c6fdbb2b7002aa04e418b5d2b26df1c5ba5ab80'/>
<id>urn:sha1:6c6fdbb2b7002aa04e418b5d2b26df1c5ba5ab80</id>
<content type='text'>
Remove superfluous semicolons after function definitions.

Signed-off-by: Chengyang Fan &lt;cy.fan@huawei.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210125095338.1719405-1-cy.fan@huawei.com
</content>
</entry>
<entry>
<title>powerpc/rtas: remove unused rtas_suspend_last_cpu()</title>
<updated>2020-12-08T10:41:01Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2020-12-07T21:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b2488176ea56e299d2b084772daeb5ecbfc16d1'/>
<id>urn:sha1:1b2488176ea56e299d2b084772daeb5ecbfc16d1</id>
<content type='text'>
rtas_suspend_last_cpu() is now unused, remove it and
__rtas_suspend_last_cpu() which also becomes unused.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201207215200.1785968-24-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: remove rtas_suspend_cpu()</title>
<updated>2020-12-08T10:41:01Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2020-12-07T21:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=395b2c090907975c627902ba8fda0bdb04c7cad3'/>
<id>urn:sha1:395b2c090907975c627902ba8fda0bdb04c7cad3</id>
<content type='text'>
rtas_suspend_cpu() no longer has users; remove it and
__rtas_suspend_cpu() which now becomes unused as well.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201207215200.1785968-22-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: remove rtas_ibm_suspend_me_unsafe()</title>
<updated>2020-12-08T10:40:59Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2020-12-07T21:51:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f6665e400569de479733677e77862542aebb6cc'/>
<id>urn:sha1:5f6665e400569de479733677e77862542aebb6cc</id>
<content type='text'>
rtas_ibm_suspend_me_unsafe() is now unused; remove it and
rtas_percpu_suspend_me() which becomes unused as a result.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201207215200.1785968-17-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: dispatch partition migration requests to pseries</title>
<updated>2020-12-08T10:40:59Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2020-12-07T21:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d756894ba75f1afe7945ccafe9afebff50484b6'/>
<id>urn:sha1:4d756894ba75f1afe7945ccafe9afebff50484b6</id>
<content type='text'>
sys_rtas() cannot call ibm,suspend-me directly in the same way it
handles other inputs. Instead it must dispatch the request to code
that can first perform the H_JOIN sequence before any call to
ibm,suspend-me can succeed. Over time kernel/rtas.c has accreted a fair
amount of platform-specific code to implement this.

Since a different, more robust implementation of the suspend sequence
is now in the pseries platform code, we want to dispatch the request
there.

Note that invoking ibm,suspend-me via the RTAS syscall is all but
deprecated; this change preserves ABI compatibility for old programs
while providing to them the benefit of the new partition suspend
implementation. This is a behavior change in that the kernel performs
the device tree update and firmware activation before returning, but
experimentation indicates this is tolerated fine by legacy user space.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201207215200.1785968-16-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: add rtas_activate_firmware()</title>
<updated>2020-12-08T10:40:55Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2020-12-07T21:51:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f485a66f4d0693a535e4ab38ffc3538716d2c2b'/>
<id>urn:sha1:5f485a66f4d0693a535e4ab38ffc3538716d2c2b</id>
<content type='text'>
Provide a documented wrapper function for the ibm,activate-firmware
service, which must be called after a partition migration or
hibernation.

If the function is absent or the call fails, the OS will continue to
run normally with the current firmware, so there is no need to perform
any recovery. Just log it and continue.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201207215200.1785968-6-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: add rtas_ibm_suspend_me()</title>
<updated>2020-12-08T10:40:55Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2020-12-07T21:51:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=701ba68342412ae9be99a7c7f3badebf95271403'/>
<id>urn:sha1:701ba68342412ae9be99a7c7f3badebf95271403</id>
<content type='text'>
Now that the name is available, provide a simple wrapper for
ibm,suspend-me which returns both a Linux errno and optionally the
actual RTAS status to the caller.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201207215200.1785968-5-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: rtas_ibm_suspend_me -&gt; rtas_ibm_suspend_me_unsafe</title>
<updated>2020-12-08T10:40:54Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2020-12-07T21:51:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7049b288ea8c95f270ec8fe643e3c3187938d5af'/>
<id>urn:sha1:7049b288ea8c95f270ec8fe643e3c3187938d5af</id>
<content type='text'>
The pseries partition suspend sequence requires that all active CPUs
call H_JOIN, which suspends all but one of them with interrupts
disabled. The "chosen" CPU is then to call ibm,suspend-me to complete
the suspend. Upon returning from ibm,suspend-me, the chosen CPU is to
use H_PROD to wake the joined CPUs.

Using on_each_cpu() for this, as rtas_ibm_suspend_me() does to
implement partition migration, is susceptible to deadlock with other
users of on_each_cpu() and with users of stop_machine APIs. The
callback passed to on_each_cpu() is not allowed to synchronize with
other CPUs in the way it is used here.

Complicating the fix is the fact that rtas_ibm_suspend_me() also
occupies the function name that should be used to provide a more
conventional wrapper for ibm,suspend-me. Rename rtas_ibm_suspend_me()
to rtas_ibm_suspend_me_unsafe() to free up the name and indicate that
it should not gain users.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201207215200.1785968-4-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: complete ibm,suspend-me status codes</title>
<updated>2020-12-08T10:40:54Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2020-12-07T21:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=970e453ea4ecdd7a16a46c229294547148d1c7b6'/>
<id>urn:sha1:970e453ea4ecdd7a16a46c229294547148d1c7b6</id>
<content type='text'>
We don't completely account for the possible return codes for
ibm,suspend-me. Add definitions for these.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201207215200.1785968-3-nathanl@linux.ibm.com
</content>
</entry>
</feed>
