<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/rtas.c, 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>2022-04-13T18:03:00Z</updated>
<entry>
<title>powerpc: Set crashkernel offset to mid of RMA region</title>
<updated>2022-04-13T18:03:00Z</updated>
<author>
<name>Sourabh Jain</name>
</author>
<published>2022-02-04T08:56:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cdedff5cc66e3d6fbaac3659e169daea8a5e218c'/>
<id>urn:sha1:cdedff5cc66e3d6fbaac3659e169daea8a5e218c</id>
<content type='text'>
[ Upstream commit 7c5ed82b800d8615cdda00729e7b62e5899f0b13 ]

On large config LPARs (having 192 and more cores), Linux fails to boot
due to insufficient memory in the first memblock. It is due to the
memory reservation for the crash kernel which starts at 128MB offset of
the first memblock. This memory reservation for the crash kernel doesn't
leave enough space in the first memblock to accommodate other essential
system resources.

The crash kernel start address was set to 128MB offset by default to
ensure that the crash kernel get some memory below the RMA region which
is used to be of size 256MB. But given that the RMA region size can be
512MB or more, setting the crash kernel offset to mid of RMA size will
leave enough space for the kernel to allocate memory for other system
resources.

Since the above crash kernel offset change is only applicable to the LPAR
platform, the LPAR feature detection is pushed before the crash kernel
reservation. The rest of LPAR specific initialization will still
be done during pseries_probe_fw_features as usual.

This patch is dependent on changes to paca allocation for boot CPU. It
expect boot CPU to discover 1T segment support which is introduced by
the patch posted here:
https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-January/239175.html

Reported-by: Abdul haleem &lt;abdhalee@linux.vnet.ibm.com&gt;
Signed-off-by: Sourabh Jain &lt;sourabhjain@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220204085601.107257-1-sourabhjain@linux.ibm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>isystem: ship and use stdarg.h</title>
<updated>2021-08-19T00:02:55Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2021-08-02T20:40:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0891ac15f0428ffa81b2e818d416bdf3cb74ab6'/>
<id>urn:sha1:c0891ac15f0428ffa81b2e818d416bdf3cb74ab6</id>
<content type='text'>
Ship minimal stdarg.h (1 type, 4 macros) as &lt;linux/stdarg.h&gt;.
stdarg.h is the only userspace header commonly used in the kernel.

GPL 2 version of &lt;stdarg.h&gt; can be extracted from
http://archive.debian.org/debian/pool/main/g/gcc-4.2/gcc-4.2_4.2.4.orig.tar.gz

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/64s: avoid reloading (H)SRR registers if they are still valid</title>
<updated>2021-06-24T14:06:55Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2021-06-17T15:51:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59dc5bfca0cb6a29db1a50847684eb5c19f8f400'/>
<id>urn:sha1:59dc5bfca0cb6a29db1a50847684eb5c19f8f400</id>
<content type='text'>
When an interrupt is taken, the SRR registers are set to return to where
it left off. Unless they are modified in the meantime, or the return
address or MSR are modified, there is no need to reload these registers
when returning from interrupt.

Introduce per-CPU flags that track the validity of SRR and HSRR
registers. These are cleared when returning from interrupt, when
using the registers for something else (e.g., OPAL calls), when
adjusting the return address or MSR of a context, and when context
switching (which changes the return address and MSR).

This improves the performance of interrupt returns.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Fold in fixup patch from Nick]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210617155116.2167984-5-npiggin@gmail.com

</content>
</entry>
<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/rtas: move syscall filter setup into separate function</title>
<updated>2021-04-14T13:04:16Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2021-04-08T14:06:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0649cdc8237943c15fc977e96033dc8ae28cc2bd'/>
<id>urn:sha1:0649cdc8237943c15fc977e96033dc8ae28cc2bd</id>
<content type='text'>
Reduce conditionally compiled sections within rtas_initialize() by
moving the filter table initialization into its own function already
guarded by CONFIG_PPC_RTAS_FILTER. No behavior change intended.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Reviewed-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Acked-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-5-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: remove ibm_suspend_me_token</title>
<updated>2021-04-14T13:04:16Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2021-04-08T14:06:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ab1c929ae38262c4deb18b4a2e03a4f0cb5c5ed'/>
<id>urn:sha1:0ab1c929ae38262c4deb18b4a2e03a4f0cb5c5ed</id>
<content type='text'>
There's not a compelling reason to cache the value of the token for
the ibm,suspend-me function. Just look it up when needed in the RTAS
syscall's special case for it.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Reviewed-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&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-4-nathanl@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/rtas: Fix typo of ibm,open-errinjct in RTAS filter</title>
<updated>2020-12-09T02:36:51Z</updated>
<author>
<name>Tyrel Datwyler</name>
</author>
<published>2020-12-08T19:54:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f10881a46f8914428110d110140a455c66bdf27b'/>
<id>urn:sha1:f10881a46f8914428110d110140a455c66bdf27b</id>
<content type='text'>
Commit bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace")
introduced the following error when invoking the errinjct userspace
tool:

  [root@ltcalpine2-lp5 librtas]# errinjct open
  [327884.071171] sys_rtas: RTAS call blocked - exploit attempt?
  [327884.071186] sys_rtas: token=0x26, nargs=0 (called by errinjct)
  errinjct: Could not open RTAS error injection facility
  errinjct: librtas: open: Unexpected I/O error

The entry for ibm,open-errinjct in rtas_filter array has a typo where
the "j" is omitted in the rtas call name. After fixing this typo the
errinjct tool functions again as expected.

  [root@ltcalpine2-lp5 linux]# errinjct open
  RTAS error injection facility open, token = 1

Fixes: bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace")
Cc: stable@vger.kernel.org
Signed-off-by: Tyrel Datwyler &lt;tyreld@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20201208195434.8289-1-tyreld@linux.ibm.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>
</feed>
