<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/arch/m68k/lib, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-04T12:21:22+00:00</updated>
<entry>
<title>m68k: nommu: fix memmove() with differently aligned src and dest for 68000</title>
<updated>2026-03-04T12:21:22+00:00</updated>
<author>
<name>Daniel Palmer</name>
<email>daniel@thingy.jp</email>
</author>
<published>2025-12-13T12:04:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=edc3261ceb73d71efa156ef54cec5fa2769a199f'/>
<id>urn:sha1:edc3261ceb73d71efa156ef54cec5fa2769a199f</id>
<content type='text'>
[ Upstream commit 590fe2f46c8698bb758f9002cb247ca10ce95569 ]

68000 has different alignment needs to 68020+.
memcpy() checks if the destination is aligned and does a smaller copy
to fix the alignment and then critically for 68000 it checks if the
source is still unaligned and if it is reverts to smaller copies.

memmove() does not currently do the second part and malfunctions if
one of the pointers is aligned and the other isn't.

This is apparently getting triggered by printk. If I put breakpoints
into the new checks added by this commit the first hit looks like this:

memmove (n=205, src=0x2f3971 &lt;printk_shared_pbufs+205&gt;, dest=0x2f3980 &lt;printk_shared_pbufs+220&gt;) at arch/m68k/lib/memmove.c:82

Signed-off-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
Signed-off-by: Greg Ungerer &lt;gerg@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>m68k: lib: Include &lt;linux/libgcc.h&gt; for __muldi3()</title>
<updated>2023-10-16T12:30:40+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2023-10-11T07:16:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03191fb3db3d2585725bcffe0356d12fcfd27c4c'/>
<id>urn:sha1:03191fb3db3d2585725bcffe0356d12fcfd27c4c</id>
<content type='text'>
When building with W=1:

    arch/m68k/lib/muldi3.c:82:1: warning: no previous prototype for ‘__muldi3’ [-Wmissing-prototypes]
       82 | __muldi3 (DItype u, DItype v)
	  | ^~~~~~~~

Fix this by including &lt;linux/libgcc.h&gt;.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/160c1fd14b4798f576d9649334b1d2c77db5cb07.1697008341.git.geert@linux-m68k.org
</content>
</entry>
<entry>
<title>m68k: Use kernel's generic libgcc functions</title>
<updated>2023-10-06T08:03:01+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@linux-m68k.org</email>
</author>
<published>2023-09-13T07:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0938a8e2fb3de5f7d570f3f283e79d4a23b6fe5'/>
<id>urn:sha1:a0938a8e2fb3de5f7d570f3f283e79d4a23b6fe5</id>
<content type='text'>
The arch/m68k/lib versions of the libgcc functions: ashldi3, ashrdi3
and lshrdi3 were taken directly from an older version of gcc.
We can use the kernel's own generic lib versions of these - they are
virtually identical. Switch to those and remove the m68k local ones.

Signed-off-by: Greg Ungerer &lt;gerg@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20230913071350.1939818-1-gerg@kernel.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Replace #include &lt;asm/export.h&gt; with #include &lt;linux/export.h&gt;</title>
<updated>2023-08-21T11:27:43+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-08-07T15:36:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7547cbe20ee80d24f3e182b4dcd3e05c473fb10b'/>
<id>urn:sha1:7547cbe20ee80d24f3e182b4dcd3e05c473fb10b</id>
<content type='text'>
Commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost")
deprecated &lt;asm/export.h&gt;, which is now a wrapper of &lt;linux/export.h&gt;.

Replace #include &lt;asm/export.h&gt; with #include &lt;linux/export.h&gt;.

After all the &lt;asm/export.h&gt; lines are converted, &lt;asm/export.h&gt; and
&lt;asm-generic/export.h&gt; will be removed.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20230807153654.997091-1-masahiroy@kernel.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>net: unexport csum_and_copy_{from,to}_user</title>
<updated>2022-04-29T21:37:59+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-04-29T21:37:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6308499b5e99c0c903fde2c605e41d9a86c4be6c'/>
<id>urn:sha1:6308499b5e99c0c903fde2c605e41d9a86c4be6c</id>
<content type='text'>
csum_and_copy_from_user and csum_and_copy_to_user are exported by a few
architectures, but not actually used in modular code.  Drop the exports.

Link: https://lkml.kernel.org/r/20220421070440.1282704-1-hch@lst.de
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt; (powerpc)
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>m68k: muldi3: Use semicolon instead of comma</title>
<updated>2021-09-24T11:35:23+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2021-09-14T07:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6621cb4a2d0a40c54adf378bf2a17a50f91cc831'/>
<id>urn:sha1:6621cb4a2d0a40c54adf378bf2a17a50f91cc831</id>
<content type='text'>
This code works, but it is cleaner to use a semicolon at the end of a
statement instead of a comma.

Extracted from a big anonymous patch by Julia Lawall
&lt;julia.lawall@inria.fr&gt;.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20210914073155.3883532-1-geert@linux-m68k.org
</content>
</entry>
<entry>
<title>m68k: get rid of zeroing destination on error in csum_and_copy_from_user()</title>
<updated>2020-08-20T19:45:17+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2020-07-13T03:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66aa38801a5d1ea58b208d9d41374b9fac2088d3'/>
<id>urn:sha1:66aa38801a5d1ea58b208d9d41374b9fac2088d3</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>saner calling conventions for csum_and_copy_..._user()</title>
<updated>2020-08-20T19:45:15+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2020-07-11T04:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c693cc4676a055c4126e487b30b0a96ea7ec9936'/>
<id>urn:sha1:c693cc4676a055c4126e487b30b0a96ea7ec9936</id>
<content type='text'>
All callers of these primitives will
	* discard anything we might've copied in case of error
	* ignore the csum value in case of error
	* always pass 0xffffffff as the initial sum, so the
resulting csum value (in case of success, that is) will never be 0.

That suggest the following calling conventions:
	* don't pass err_ptr - just return 0 on error.
	* don't bother with zeroing destination, etc. in case of error
	* don't pass the initial sum - just use 0xffffffff.

This commit does the minimal conversion in the instances of csum_and_copy_...();
the changes of actual asm code behind them are done later in the series.
Note that this asm code is often shared with csum_partial_copy_nocheck();
the difference is that csum_partial_copy_nocheck() passes 0 for initial
sum while csum_and_copy_..._user() pass 0xffffffff.  Fortunately, we are
free to pass 0xffffffff in all cases and subsequent patches will use that
freedom without any special comments.

A part that could be split off: parisc and uml/i386 claimed to have
csum_and_copy_to_user() instances of their own, but those were identical
to the generic one, so we simply drop them.  Not sure if it's worth
a separate commit...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>csum_partial_copy_nocheck(): drop the last argument</title>
<updated>2020-08-20T19:45:14+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2020-07-11T04:12:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc44c17baf7f3f833d36b2f2a1edb1cc0b6f2cc4'/>
<id>urn:sha1:cc44c17baf7f3f833d36b2f2a1edb1cc0b6f2cc4</id>
<content type='text'>
It's always 0.  Note that we theoretically could use ~0U as well -
result will be the same modulo 0xffff, _if_ the damn thing did the
right thing for any value of initial sum; later we'll make use of
that when convenient.

However, unlike csum_and_copy_..._user(), there are instances that
did not work for arbitrary initial sums; c6x is one such.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>m68k: convert to csum_and_copy_from_user()</title>
<updated>2020-05-29T20:11:49+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2020-02-18T19:15:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8084c99b9af68621ff15562732bfc9f8e7cce93c'/>
<id>urn:sha1:8084c99b9af68621ff15562732bfc9f8e7cce93c</id>
<content type='text'>
trivial access_ok() there...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
