-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: set flow handler for secondary interrupt controller of 5249 m68knommu: remove use of IRQ_FLG_LOCK from 68360 platform support m68knommu: fix dereference of port.tty m68knommu: add missing linker __modver section m68knommu: fix mis-named variable int set_irq_chip loop m68knommu: add optimize memmove() function m68k: remove arch specific non-optimized memcmp() m68knommu: fix use of un-defined _TIF_WORK_MASK m68knommu: Rename m548x_wdt.c to m54xx_wdt.c m68knommu: fix m548x_wdt.c compilation after headers renaming m68knommu: Remove dependencies on nonexistent M68KNOMMU
- Loading branch information
Showing
18 changed files
with
165 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file COPYING in the main directory of this archive | ||
* for more details. | ||
*/ | ||
|
||
#define __IN_STRING_C | ||
|
||
#include <linux/module.h> | ||
#include <linux/string.h> | ||
|
||
void *memmove(void *dest, const void *src, size_t n) | ||
{ | ||
void *xdest = dest; | ||
size_t temp; | ||
|
||
if (!n) | ||
return xdest; | ||
|
||
if (dest < src) { | ||
if ((long)dest & 1) { | ||
char *cdest = dest; | ||
const char *csrc = src; | ||
*cdest++ = *csrc++; | ||
dest = cdest; | ||
src = csrc; | ||
n--; | ||
} | ||
if (n > 2 && (long)dest & 2) { | ||
short *sdest = dest; | ||
const short *ssrc = src; | ||
*sdest++ = *ssrc++; | ||
dest = sdest; | ||
src = ssrc; | ||
n -= 2; | ||
} | ||
temp = n >> 2; | ||
if (temp) { | ||
long *ldest = dest; | ||
const long *lsrc = src; | ||
temp--; | ||
do | ||
*ldest++ = *lsrc++; | ||
while (temp--); | ||
dest = ldest; | ||
src = lsrc; | ||
} | ||
if (n & 2) { | ||
short *sdest = dest; | ||
const short *ssrc = src; | ||
*sdest++ = *ssrc++; | ||
dest = sdest; | ||
src = ssrc; | ||
} | ||
if (n & 1) { | ||
char *cdest = dest; | ||
const char *csrc = src; | ||
*cdest = *csrc; | ||
} | ||
} else { | ||
dest = (char *)dest + n; | ||
src = (const char *)src + n; | ||
if ((long)dest & 1) { | ||
char *cdest = dest; | ||
const char *csrc = src; | ||
*--cdest = *--csrc; | ||
dest = cdest; | ||
src = csrc; | ||
n--; | ||
} | ||
if (n > 2 && (long)dest & 2) { | ||
short *sdest = dest; | ||
const short *ssrc = src; | ||
*--sdest = *--ssrc; | ||
dest = sdest; | ||
src = ssrc; | ||
n -= 2; | ||
} | ||
temp = n >> 2; | ||
if (temp) { | ||
long *ldest = dest; | ||
const long *lsrc = src; | ||
temp--; | ||
do | ||
*--ldest = *--lsrc; | ||
while (temp--); | ||
dest = ldest; | ||
src = lsrc; | ||
} | ||
if (n & 2) { | ||
short *sdest = dest; | ||
const short *ssrc = src; | ||
*--sdest = *--ssrc; | ||
dest = sdest; | ||
src = ssrc; | ||
} | ||
if (n & 1) { | ||
char *cdest = dest; | ||
const char *csrc = src; | ||
*--cdest = *--csrc; | ||
} | ||
} | ||
return xdest; | ||
} | ||
EXPORT_SYMBOL(memmove); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.