summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/arch/microblaze/lib/memset.c
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/arch/microblaze/lib/memset.c
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/arch/microblaze/lib/memset.c')
-rw-r--r--ANDROID_3.4.5/arch/microblaze/lib/memset.c97
1 files changed, 0 insertions, 97 deletions
diff --git a/ANDROID_3.4.5/arch/microblaze/lib/memset.c b/ANDROID_3.4.5/arch/microblaze/lib/memset.c
deleted file mode 100644
index ddf67939..00000000
--- a/ANDROID_3.4.5/arch/microblaze/lib/memset.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
- * Copyright (C) 2008-2009 PetaLogix
- * Copyright (C) 2007 John Williams
- *
- * Reasonably optimised generic C-code for memset on Microblaze
- * This is generic C code to do efficient, alignment-aware memcpy.
- *
- * It is based on demo code originally Copyright 2001 by Intel Corp, taken from
- * http://www.embedded.com/showArticle.jhtml?articleID=19205567
- *
- * Attempts were made, unsuccessfully, to contact the original
- * author of this code (Michael Morrow, Intel). Below is the original
- * copyright notice.
- *
- * This software has been developed by Intel Corporation.
- * Intel specifically disclaims all warranties, express or
- * implied, and all liability, including consequential and
- * other indirect damages, for the use of this program, including
- * liability for infringement of any proprietary rights,
- * and including the warranties of merchantability and fitness
- * for a particular purpose. Intel does not assume any
- * responsibility for and errors which may appear in this program
- * not any responsibility to update it.
- */
-
-#include <linux/types.h>
-#include <linux/stddef.h>
-#include <linux/compiler.h>
-#include <linux/module.h>
-#include <linux/string.h>
-
-#ifdef __HAVE_ARCH_MEMSET
-#ifndef CONFIG_OPT_LIB_FUNCTION
-void *memset(void *v_src, int c, __kernel_size_t n)
-{
- char *src = v_src;
-
- /* Truncate c to 8 bits */
- c = (c & 0xFF);
-
- /* Simple, byte oriented memset or the rest of count. */
- while (n--)
- *src++ = c;
-
- return v_src;
-}
-#else /* CONFIG_OPT_LIB_FUNCTION */
-void *memset(void *v_src, int c, __kernel_size_t n)
-{
- char *src = v_src;
- uint32_t *i_src;
- uint32_t w32 = 0;
-
- /* Truncate c to 8 bits */
- c = (c & 0xFF);
-
- if (unlikely(c)) {
- /* Make a repeating word out of it */
- w32 = c;
- w32 |= w32 << 8;
- w32 |= w32 << 16;
- }
-
- if (likely(n >= 4)) {
- /* Align the destination to a word boundary */
- /* This is done in an endian independent manner */
- switch ((unsigned) src & 3) {
- case 1:
- *src++ = c;
- --n;
- case 2:
- *src++ = c;
- --n;
- case 3:
- *src++ = c;
- --n;
- }
-
- i_src = (void *)src;
-
- /* Do as many full-word copies as we can */
- for (; n >= 4; n -= 4)
- *i_src++ = w32;
-
- src = (void *)i_src;
- }
-
- /* Simple, byte oriented memset or the rest of count. */
- while (n--)
- *src++ = c;
-
- return v_src;
-}
-#endif /* CONFIG_OPT_LIB_FUNCTION */
-EXPORT_SYMBOL(memset);
-#endif /* __HAVE_ARCH_MEMSET */