<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/m68k/lib/Makefile, branch v4.3.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>m68k: Remove inline strcpy() and strcat() implementations</title>
<updated>2013-06-24T17:44:18+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2013-04-14T20:17:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d346a5db02fc16263b44eb511fcb260265e3ef77'/>
<id>d346a5db02fc16263b44eb511fcb260265e3ef77</id>
<content type='text'>
Gcc may replace calls to standard string functions by open code and/or
calls to other standard string functions. If the replacement function is
not available out-of-line, link errors will happen.

To avoid this, the out-of-line versions were provided by
arch/m68k/lib/string.c, but they were usually not linked in anymore as
typically none of its symbols are referenced by built-in code.
However, if any module would need them, they would not be available.

Hence remove the inline strcpy() and strcat() implementations, remove
arch/m68k/lib/string.c, and let the generic string library code handle it.

Impact on a typical kernel build seems minimal or nonexistent:

-      .text : 0x00001000 - 0x002aac74   (2728 KiB)
-      .data : 0x002ada48 - 0x00392148   ( 914 KiB)
+      .text : 0x00001000 - 0x002aacf4   (2728 KiB)
+      .data : 0x002adac8 - 0x00392148   ( 914 KiB)

See also commit e00c73ee05dc38ecaccced55d4f5fc58b0b769f7 ("m68k: Remove
inline strlen() implementation").

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gcc may replace calls to standard string functions by open code and/or
calls to other standard string functions. If the replacement function is
not available out-of-line, link errors will happen.

To avoid this, the out-of-line versions were provided by
arch/m68k/lib/string.c, but they were usually not linked in anymore as
typically none of its symbols are referenced by built-in code.
However, if any module would need them, they would not be available.

Hence remove the inline strcpy() and strcat() implementations, remove
arch/m68k/lib/string.c, and let the generic string library code handle it.

Impact on a typical kernel build seems minimal or nonexistent:

-      .text : 0x00001000 - 0x002aac74   (2728 KiB)
-      .data : 0x002ada48 - 0x00392148   ( 914 KiB)
+      .text : 0x00001000 - 0x002aacf4   (2728 KiB)
+      .data : 0x002adac8 - 0x00392148   ( 914 KiB)

See also commit e00c73ee05dc38ecaccced55d4f5fc58b0b769f7 ("m68k: Remove
inline strlen() implementation").

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: handle presence of 64bit mul/div instructions cleanly</title>
<updated>2011-12-24T11:47:57+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-11-11T05:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=84f3fb7a2aadeda3c0a34e61591a8eccf5e367b4'/>
<id>84f3fb7a2aadeda3c0a34e61591a8eccf5e367b4</id>
<content type='text'>
The traditional 68000 processors and the newer reduced instruction set
ColdFire processors do not support the 32*32-&gt;64 multiply or the 64/32-&gt;32
divide instructions. This is not a difference based on the presence of
a hardware MMU or not.

Create a new config symbol to mark that a CPU type doesn't support the
longer multiply/divide instructions. Use this then as a basis for using
the fast 64bit based divide (in div64.h) and for linking in the extra
libgcc functions that may be required (mulsi3, divsi3, etc).

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The traditional 68000 processors and the newer reduced instruction set
ColdFire processors do not support the 32*32-&gt;64 multiply or the 64/32-&gt;32
divide instructions. This is not a difference based on the presence of
a hardware MMU or not.

Create a new config symbol to mark that a CPU type doesn't support the
longer multiply/divide instructions. Use this then as a basis for using
the fast 64bit based divide (in div64.h) and for linking in the extra
libgcc functions that may be required (mulsi3, divsi3, etc).

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: simpler m68k and ColdFire CPU's can use generic csum code</title>
<updated>2011-12-24T11:47:57+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-10-18T05:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7f73bafc4630a450ebe8b021efa14781ffd992b1'/>
<id>7f73bafc4630a450ebe8b021efa14781ffd992b1</id>
<content type='text'>
We have two implementations of the IP checksuming code for the m68k arch.
One uses the more advanced instructions available in 68020 and above
processors, the other uses the simpler instructions available on the
original 68000 processors and the modern ColdFire processors.

This simpler code is pretty much the same as the generic lib implementation
of the IP csum functions. So lets just switch over to using that. That
means we can completely remove the checksum_no.c file, and only have the
local fast code used for the more complex 68k CPU family members.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have two implementations of the IP checksuming code for the m68k arch.
One uses the more advanced instructions available in 68020 and above
processors, the other uses the simpler instructions available on the
original 68000 processors and the modern ColdFire processors.

This simpler code is pretty much the same as the generic lib implementation
of the IP csum functions. So lets just switch over to using that. That
means we can completely remove the checksum_no.c file, and only have the
local fast code used for the more complex 68k CPU family members.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: merge and clean up delay.h files</title>
<updated>2011-07-25T01:20:41+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-07-01T06:47:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7c946199cd5eab2917bb053ca6fdc6997d27aa7a'/>
<id>7c946199cd5eab2917bb053ca6fdc6997d27aa7a</id>
<content type='text'>
The real difference between the mmu and non-mmu varients of the delay.h
files has nothing to do with having an mmu or not. It is processor family
differences that means slightly different code. Merge the delay_mm.h and
delay_no.h files back into a single file.

The primarly difference we need to deal with is whether the processor
supports a 32bit * 32bit -&gt; 64bit multiply. Without it we need to do some
shift scaling as well as use a 32bit * 32bit -&gt; 32bit multiply. If building
for a multi-CPU type kernel then we must use the simpler mult/shift scaling.

This version of delay code allows the CPU32 family to use a 64bit mul,
since it supports this instruction, the old code did not.

The changes use macros where appropriate to try and optimize constant sized
udelay times. And it removes the use of a fixed lib function for the non-mmu
case. Code size on typical kernel configurations is similar, or only larger
by a few tens of bytes.

Also removed the unused muldiv() code from delay_mm.h.

Build and run tested on ColdFire and ARAnyM. Build tested only on 68328
and 68360 (CPU32).

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The real difference between the mmu and non-mmu varients of the delay.h
files has nothing to do with having an mmu or not. It is processor family
differences that means slightly different code. Merge the delay_mm.h and
delay_no.h files back into a single file.

The primarly difference we need to deal with is whether the processor
supports a 32bit * 32bit -&gt; 64bit multiply. Without it we need to do some
shift scaling as well as use a 32bit * 32bit -&gt; 32bit multiply. If building
for a multi-CPU type kernel then we must use the simpler mult/shift scaling.

This version of delay code allows the CPU32 family to use a 64bit mul,
since it supports this instruction, the old code did not.

The changes use macros where appropriate to try and optimize constant sized
udelay times. And it removes the use of a fixed lib function for the non-mmu
case. Code size on typical kernel configurations is similar, or only larger
by a few tens of bytes.

Also removed the unused muldiv() code from delay_mm.h.

Build and run tested on ColdFire and ARAnyM. Build tested only on 68328
and 68360 (CPU32).

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: let Makefile sort out compiling mmu and non-mmu lib/checksum.c</title>
<updated>2011-05-24T00:03:50+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-04-18T05:27:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9461702d2a54cd4d9da09b7755c96815791a9d07'/>
<id>9461702d2a54cd4d9da09b7755c96815791a9d07</id>
<content type='text'>
We don't need an arch/m68k/lib/checksum.c wrapper to include the correct
mmu or non-mmu version of the checksum code. Let the Makefile just build
the appropriate one.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need an arch/m68k/lib/checksum.c wrapper to include the correct
mmu or non-mmu version of the checksum code. Let the Makefile just build
the appropriate one.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: remove duplicate memcpy() implementation</title>
<updated>2011-05-24T00:03:49+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-03-28T06:53:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=66d83ab32aec5d84d707d4d72717b9468ec33a96'/>
<id>66d83ab32aec5d84d707d4d72717b9468ec33a96</id>
<content type='text'>
Merging the mmu and non-mmu directories we ended up with duplicate
implementations of memcpy(). One is a little more optimized for the
&gt;= 68020 case, but that can easily be inserted into a single
implementation of memcpy(). Clean up the exporting of this symbol
too, otherwise we end up exporting it twice on a no-mmu build.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merging the mmu and non-mmu directories we ended up with duplicate
implementations of memcpy(). One is a little more optimized for the
&gt;= 68020 case, but that can easily be inserted into a single
implementation of memcpy(). Clean up the exporting of this symbol
too, otherwise we end up exporting it twice on a no-mmu build.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: remove duplicate memset() implementation</title>
<updated>2011-05-24T00:03:49+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-03-28T06:48:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d10ed2f5383cc6e6b7649f03540b8cb1838d5f67'/>
<id>d10ed2f5383cc6e6b7649f03540b8cb1838d5f67</id>
<content type='text'>
Merging the mmu and non-mmu directories we ended up with duplicate
implementations of memset(). One is a little more optimized for the
&gt;= 68020 case, but that can easily be inserted into a single
implementation of memset(). Clean up the exporting of this symbol
too, otherwise we end up exporting it twice on a no-mmu build.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merging the mmu and non-mmu directories we ended up with duplicate
implementations of memset(). One is a little more optimized for the
&gt;= 68020 case, but that can easily be inserted into a single
implementation of memset(). Clean up the exporting of this symbol
too, otherwise we end up exporting it twice on a no-mmu build.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: remove duplicate memmove() implementation</title>
<updated>2011-05-24T00:03:49+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-03-28T06:44:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=80160de89d0a7c9a93dfe91eef2b448cbc380cd0'/>
<id>80160de89d0a7c9a93dfe91eef2b448cbc380cd0</id>
<content type='text'>
Merging the mmu and non-mmu directories we ended up with duplicate
(and identical) implementations of memmove(). Remove one of them.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merging the mmu and non-mmu directories we ended up with duplicate
(and identical) implementations of memmove(). Remove one of them.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: merge mmu and non-mmu versions of lib/Makefile</title>
<updated>2011-05-24T00:03:49+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-03-28T05:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b82ed87e67b081e55608b86b3e6f6f9036cedbd3'/>
<id>b82ed87e67b081e55608b86b3e6f6f9036cedbd3</id>
<content type='text'>
We can easily support the slight differences in libs needed by the
mmu and non-mmu builds in a single Makefile, so merge them back into
a single file again.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can easily support the slight differences in libs needed by the
mmu and non-mmu builds in a single Makefile, so merge them back into
a single file again.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>m68k: merge m68k and m68knommu arch directories</title>
<updated>2011-03-25T04:05:13+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-03-22T03:39:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=66d857b08b8c3ed5c72c361f863cce77d2a978d7'/>
<id>66d857b08b8c3ed5c72c361f863cce77d2a978d7</id>
<content type='text'>
There is a lot of common code that could be shared between the m68k
and m68knommu arch branches. It makes sense to merge the two branches
into a single directory structure so that we can more easily share
that common code.

This is a brute force merge, based on a script from Stephen King
&lt;sfking@fdwdc.com&gt;, which was originally written by Arnd Bergmann
&lt;arnd@arndb.de&gt;.

&gt; The script was inspired by the script Sam Ravnborg used to merge the
&gt; includes from m68knommu. For those files common to both arches but
&gt; differing in content, the m68k version of the file is renamed to
&gt; &lt;file&gt;_mm.&lt;ext&gt; and the m68knommu version of the file is moved into the
&gt; corresponding m68k directory and renamed &lt;file&gt;_no.&lt;ext&gt; and a small
&gt; wrapper file &lt;file&gt;.&lt;ext&gt; is used to select between the two version. Files
&gt; that are common to both but don't differ are removed from the m68knommu
&gt; tree and files and directories that are unique to the m68knommu tree are
&gt; moved to the m68k tree. Finally, the arch/m68knommu tree is removed.
&gt;
&gt; To select between the the versions of the files, the wrapper uses
&gt;
&gt; #ifdef CONFIG_MMU
&gt; #include &lt;file&gt;_mm.&lt;ext&gt;
&gt; #else
&gt; #include &lt;file&gt;_no.&lt;ext&gt;
&gt; #endif

On top of this file merge I have done a simplistic merge of m68k and
m68knommu Kconfig, which primarily attempts to keep existing options and
menus in place. Other than a handful of options being moved it produces
identical .config outputs on m68k and m68knommu targets I tested it on.

With this in place there is now quite a bit of scope for merge cleanups
in future patches.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a lot of common code that could be shared between the m68k
and m68knommu arch branches. It makes sense to merge the two branches
into a single directory structure so that we can more easily share
that common code.

This is a brute force merge, based on a script from Stephen King
&lt;sfking@fdwdc.com&gt;, which was originally written by Arnd Bergmann
&lt;arnd@arndb.de&gt;.

&gt; The script was inspired by the script Sam Ravnborg used to merge the
&gt; includes from m68knommu. For those files common to both arches but
&gt; differing in content, the m68k version of the file is renamed to
&gt; &lt;file&gt;_mm.&lt;ext&gt; and the m68knommu version of the file is moved into the
&gt; corresponding m68k directory and renamed &lt;file&gt;_no.&lt;ext&gt; and a small
&gt; wrapper file &lt;file&gt;.&lt;ext&gt; is used to select between the two version. Files
&gt; that are common to both but don't differ are removed from the m68knommu
&gt; tree and files and directories that are unique to the m68knommu tree are
&gt; moved to the m68k tree. Finally, the arch/m68knommu tree is removed.
&gt;
&gt; To select between the the versions of the files, the wrapper uses
&gt;
&gt; #ifdef CONFIG_MMU
&gt; #include &lt;file&gt;_mm.&lt;ext&gt;
&gt; #else
&gt; #include &lt;file&gt;_no.&lt;ext&gt;
&gt; #endif

On top of this file merge I have done a simplistic merge of m68k and
m68knommu Kconfig, which primarily attempts to keep existing options and
menus in place. Other than a handful of options being moved it produces
identical .config outputs on m68k and m68knommu targets I tested it on.

With this in place there is now quite a bit of scope for merge cleanups
in future patches.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
