<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/sparc, branch linux-5.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.10.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.10.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-03-04T12:19:54Z</updated>
<entry>
<title>sparc: don't reference obsolete termio struct for TC* constants</title>
<updated>2026-03-04T12:19:54Z</updated>
<author>
<name>Sam James</name>
<email>sam@gentoo.org</email>
</author>
<published>2026-02-04T13:40:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=208de5af915bbe01224f84a00a4c0e56293a66ce'/>
<id>urn:sha1:208de5af915bbe01224f84a00a4c0e56293a66ce</id>
<content type='text'>
[ Upstream commit be0bccffcde3308150d2a90e55fc10e249098909 ]

Similar in nature to commit ab107276607a ("powerpc: Fix struct termio related ioctl macros").

glibc-2.42 drops the legacy termio struct, but the ioctls.h header still
defines some TC* constants in terms of termio (via sizeof). Hardcode the
values instead.

This fixes building Python for example, which falls over like:
  ./Modules/termios.c:1119:16: error: invalid application of 'sizeof' to incomplete type 'struct termio'

Link: https://bugs.gentoo.org/961769
Link: https://bugs.gentoo.org/962600
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc: Synchronize user stack on fork and clone</title>
<updated>2026-03-04T12:19:54Z</updated>
<author>
<name>Andreas Larsson</name>
<email>andreas@gaisler.com</email>
</author>
<published>2026-01-19T14:47:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2172a4b03c1b03e1af33b124a9a7ff39cf7e69bf'/>
<id>urn:sha1:2172a4b03c1b03e1af33b124a9a7ff39cf7e69bf</id>
<content type='text'>
[ Upstream commit e38eba3b77878ada327a572a41596a3b0b44e522 ]

Flush all uncommitted user windows before calling the generic syscall
handlers for clone, fork, and vfork.

Prior to entering the arch common handlers sparc_{clone|fork|vfork}, the
arch-specific syscall wrappers for these syscalls will attempt to flush
all windows (including user windows).

In the window overflow trap handlers on both SPARC{32|64},
if the window can't be stored (i.e due to MMU related faults) the routine
backups the user window and increments a thread counter (wsaved).

By adding a synchronization point after the flush attempt, when fault
handling is enabled, any uncommitted user windows will be flushed.

Link: https://sourceware.org/bugzilla/show_bug.cgi?id=31394
Closes: https://lore.kernel.org/sparclinux/fe5cc47167430007560501aabb28ba154985b661.camel@physik.fu-berlin.de/
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Ludwig Rydberg &lt;ludwig.rydberg@gaisler.com&gt;
Tested-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Link: https://lore.kernel.org/r/20260119144753.27945-2-ludwig.rydberg@gaisler.com
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc/module: Add R_SPARC_UA64 relocation handling</title>
<updated>2025-12-06T21:08:14Z</updated>
<author>
<name>Koakuma</name>
<email>koachan@protonmail.com</email>
</author>
<published>2025-06-09T13:53:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3ece871e9c513e5a2c4ca0f08757ddb114a28df8'/>
<id>urn:sha1:3ece871e9c513e5a2c4ca0f08757ddb114a28df8</id>
<content type='text'>
[ Upstream commit 05457d96175d25c976ab6241c332ae2eb5e07833 ]

This is needed so that the kernel can handle R_SPARC_UA64 relocations,
which is emitted by LLVM's IAS.

Signed-off-by: Koakuma &lt;koachan@protonmail.com&gt;
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc: fix error handling in scan_one_device()</title>
<updated>2025-10-29T13:01:12Z</updated>
<author>
<name>Ma Ke</name>
<email>make24@iscas.ac.cn</email>
</author>
<published>2025-09-20T12:53:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5f258ee43be1c620c1a47895b46b228c0eac890c'/>
<id>urn:sha1:5f258ee43be1c620c1a47895b46b228c0eac890c</id>
<content type='text'>
commit 302c04110f0ce70d25add2496b521132548cd408 upstream.

Once of_device_register() failed, we should call put_device() to
decrement reference count for cleanup. Or it could cause memory leak.
So fix this by calling put_device(), then the name can be freed in
kobject_cleanup().

Calling path: of_device_register() -&gt; of_device_add() -&gt; device_add().
As comment of device_add() says, 'if device_add() succeeds, you should
call device_del() when you want to get rid of it. If device_add() has
not succeeded, use only put_device() to drop the reference count'.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: cf44bbc26cf1 ("[SPARC]: Beginnings of generic of_device framework.")
Signed-off-by: Ma Ke &lt;make24@iscas.ac.cn&gt;
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sparc64: fix hugetlb for sun4u</title>
<updated>2025-10-29T13:01:12Z</updated>
<author>
<name>Anthony Yznaga</name>
<email>anthony.yznaga@oracle.com</email>
</author>
<published>2025-07-16T01:24:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3215ab6a3ab99ca5d788ef20cefc885a307c9968'/>
<id>urn:sha1:3215ab6a3ab99ca5d788ef20cefc885a307c9968</id>
<content type='text'>
commit 6fd44a481b3c6111e4801cec964627791d0f3ec5 upstream.

An attempt to exercise sparc hugetlb code in a sun4u-based guest
running under qemu results in the guest hanging due to being stuck
in a trap loop. This is due to invalid hugetlb TTEs being installed
that do not have the expected _PAGE_PMD_HUGE and page size bits set.
Although the breakage has gone apparently unnoticed for several years,
fix it now so there is the option to exercise sparc hugetlb code under
qemu. This can be useful because sun4v support in qemu does not support
linux guests currently and sun4v-based hardware resources may not be
readily available.

Fix tested with a 6.15.2 and 6.16-rc6 kernels by running libhugetlbfs
tests on a qemu guest running Debian 13.

Fixes: c7d9f77d33a7 ("sparc64: Multi-page size support")
Cc: stable@vger.kernel.org
Signed-off-by: Anthony Yznaga &lt;anthony.yznaga@oracle.com&gt;
Tested-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Reviewed-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Link: https://lore.kernel.org/r/20250716012446.10357-1-anthony.yznaga@oracle.com
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sparc: fix accurate exception reporting in copy_{from,to}_user for M7</title>
<updated>2025-10-29T13:01:07Z</updated>
<author>
<name>Michael Karcher</name>
<email>kernel@mkarcher.dialup.fu-berlin.de</email>
</author>
<published>2025-09-04T22:03:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bcaa635651bf4df57a282292d940d4a4a3673bae'/>
<id>urn:sha1:bcaa635651bf4df57a282292d940d4a4a3673bae</id>
<content type='text'>
[ Upstream commit 936fb512752af349fc30ccbe0afe14a2ae6d7159 ]

The referenced commit introduced exception handlers on user-space memory
references in copy_from_user and copy_to_user. These handlers return from
the respective function and calculate the remaining bytes left to copy
using the current register contents. This commit fixes a couple of bad
calculations. This will fix the return value of copy_from_user and
copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.

Fixes: 34060b8fffa7 ("arch/sparc: Add accurate exception reporting in M7memcpy")
Tested-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt; # on Oracle SPARC S7
Tested-by: Tony Rodriguez &lt;unixpro1970@gmail.com&gt; # S7, see https://lore.kernel.org/r/98564e2e68df2dda0e00c67a75c7f7dfedb33c7e.camel@physik.fu-berlin.de
Signed-off-by: Michael Karcher &lt;kernel@mkarcher.dialup.fu-berlin.de&gt;
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-5-1ca72dda195b@mkarcher.dialup.fu-berlin.de
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc: fix accurate exception reporting in copy_to_user for Niagara 4</title>
<updated>2025-10-29T13:01:06Z</updated>
<author>
<name>Michael Karcher</name>
<email>kernel@mkarcher.dialup.fu-berlin.de</email>
</author>
<published>2025-09-04T22:03:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9fdbc0e26bec4a18f5f8bc97631f0f1d33d01014'/>
<id>urn:sha1:9fdbc0e26bec4a18f5f8bc97631f0f1d33d01014</id>
<content type='text'>
[ Upstream commit 5a746c1a2c7980de6c888b6373299f751ad7790b ]

The referenced commit introduced exception handlers on user-space memory
references in copy_from_user and copy_to_user. These handlers return from
the respective function and calculate the remaining bytes left to copy
using the current register contents. This commit fixes a bad calculation.
This will fix the return value of copy_to_user in a specific faulting case.
The behaviour of memcpy stays unchanged.

Fixes: 957077048009 ("sparc64: Convert NG4copy_{from,to}_user to accurate exception reporting.")
Tested-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt; # on Oracle SPARC T4-1
Signed-off-by: Michael Karcher &lt;kernel@mkarcher.dialup.fu-berlin.de&gt;
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-4-1ca72dda195b@mkarcher.dialup.fu-berlin.de
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara</title>
<updated>2025-10-29T13:01:06Z</updated>
<author>
<name>Michael Karcher</name>
<email>kernel@mkarcher.dialup.fu-berlin.de</email>
</author>
<published>2025-09-04T22:03:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7823fc4d8ab5e57f8db7806ff2530c03c166c4bb'/>
<id>urn:sha1:7823fc4d8ab5e57f8db7806ff2530c03c166c4bb</id>
<content type='text'>
[ Upstream commit 0b67c8fc10b13a9090340c5f8a37d308f4e1571c ]

The referenced commit introduced exception handlers on user-space memory
references in copy_from_user and copy_to_user. These handlers return from
the respective function and calculate the remaining bytes left to copy
using the current register contents. This commit fixes a couple of bad
calculations and a broken epilogue in the exception handlers. This will
prevent crashes and ensure correct return values of copy_from_user and
copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.

Fixes: 7ae3aaf53f16 ("sparc64: Convert NGcopy_{from,to}_user to accurate exception reporting.")
Tested-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt; # on SPARC T4 with modified kernel to use Niagara 1 code
Tested-by: Magnus Lindholm &lt;linmag7@gmail.com&gt; # on Sun Fire T2000
Signed-off-by: Michael Karcher &lt;kernel@mkarcher.dialup.fu-berlin.de&gt;
Tested-by: Ethan Hawke &lt;ehawk@ember.systems&gt; # on Sun Fire T2000
Tested-by: Ken Link &lt;iissmart@numberzero.org&gt; # on Sun Fire T1000
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-3-1ca72dda195b@mkarcher.dialup.fu-berlin.de
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III</title>
<updated>2025-10-29T13:01:06Z</updated>
<author>
<name>Michael Karcher</name>
<email>kernel@mkarcher.dialup.fu-berlin.de</email>
</author>
<published>2025-09-04T22:03:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1198077606aeffb102587c6ea079ce99641c99d4'/>
<id>urn:sha1:1198077606aeffb102587c6ea079ce99641c99d4</id>
<content type='text'>
[ Upstream commit 47b49c06eb62504075f0f2e2227aee2e2c2a58b3 ]

Anthony Yznaga tracked down that a BUG_ON in ext4 code with large folios
enabled resulted from copy_from_user() returning impossibly large values
greater than the size to be copied. This lead to __copy_from_iter()
returning impossible values instead of the actual number of bytes it was
able to copy.

The BUG_ON has been reported in
https://lore.kernel.org/r/b14f55642207e63e907965e209f6323a0df6dcee.camel@physik.fu-berlin.de

The referenced commit introduced exception handlers on user-space memory
references in copy_from_user and copy_to_user. These handlers return from
the respective function and calculate the remaining bytes left to copy
using the current register contents. The exception handlers expect that
%o2 has already been masked during the bulk copy loop, but the masking was
performed after that loop. This will fix the return value of copy_from_user
and copy_to_user in the faulting case. The behaviour of memcpy stays
unchanged.

Fixes: ee841d0aff64 ("sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.")
Tested-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt; # on Sun Netra 240
Reviewed-by: Anthony Yznaga &lt;anthony.yznaga@oracle.com&gt;
Tested-by: René Rebe &lt;rene@exactcode.com&gt; # on UltraSparc III+ and UltraSparc IIIi
Signed-off-by: Michael Karcher &lt;kernel@mkarcher.dialup.fu-berlin.de&gt;
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-2-1ca72dda195b@mkarcher.dialup.fu-berlin.de
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC</title>
<updated>2025-10-29T13:01:06Z</updated>
<author>
<name>Michael Karcher</name>
<email>kernel@mkarcher.dialup.fu-berlin.de</email>
</author>
<published>2025-09-04T22:03:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=41c18baee66134e6ef786eb075c1b6adb22432b0'/>
<id>urn:sha1:41c18baee66134e6ef786eb075c1b6adb22432b0</id>
<content type='text'>
[ Upstream commit 4fba1713001195e59cfc001ff1f2837dab877efb ]

The referenced commit introduced exception handlers on user-space memory
references in copy_from_user and copy_to_user. These handlers return from
the respective function and calculate the remaining bytes left to copy
using the current register contents. This commit fixes a couple of bad
calculations. This will fix the return value of copy_from_user and
copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.

Fixes: cb736fdbb208 ("sparc64: Convert U1copy_{from,to}_user to accurate exception reporting.")
Tested-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt; # on QEMU 10.0.3
Tested-by: René Rebe &lt;rene@exactcode.com&gt; # on Ultra 5 UltraSparc IIi
Tested-by: Jonathan 'theJPster' Pallant &lt;kernel@thejpster.org.uk&gt; # on Sun Netra T1
Signed-off-by: Michael Karcher &lt;kernel@mkarcher.dialup.fu-berlin.de&gt;
Reviewed-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-1-1ca72dda195b@mkarcher.dialup.fu-berlin.de
Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
