aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/boot
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-10-04 16:57:00 -0400
committerArnd Bergmann <arnd@arndb.de>2012-10-04 16:57:51 -0400
commitc37d6154c0b9163c27e53cc1d0be3867b4abd760 (patch)
tree7a24522c56d1cb284dff1d3c225bbdaba0901bb5 /arch/s390/boot
parente7a570ff7dff9af6e54ff5e580a61ec7652137a0 (diff)
parent8a1ab3155c2ac7fbe5f2038d6e26efeb607a1498 (diff)
Merge branch 'disintegrate-asm-generic' of git://git.infradead.org/users/dhowells/linux-headers into asm-generic
Patches from David Howells <dhowells@redhat.com>: This is to complete part of the UAPI disintegration for which the preparatory patches were pulled recently. Note that there are some fixup patches which are at the base of the branch aimed at you, plus all arches get the asm-generic branch merged in too. * 'disintegrate-asm-generic' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: (Scripted) Disintegrate include/asm-generic UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k) c6x: remove c6x signal.h UAPI: Split compound conditionals containing __KERNEL__ in Arm64 UAPI: Fix the guards on various asm/unistd.h files Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/s390/boot')
-rw-r--r--arch/s390/boot/compressed/Makefile1
-rw-r--r--arch/s390/boot/compressed/misc.c45
2 files changed, 25 insertions, 21 deletions
diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile
index 10e22c4ec4a..3ad8f61c998 100644
--- a/arch/s390/boot/compressed/Makefile
+++ b/arch/s390/boot/compressed/Makefile
@@ -11,6 +11,7 @@ targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
11 sizes.h head$(BITS).o 11 sizes.h head$(BITS).o
12 12
13KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 13KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
14KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
14KBUILD_CFLAGS += $(cflags-y) 15KBUILD_CFLAGS += $(cflags-y)
15KBUILD_CFLAGS += $(call cc-option,-mpacked-stack) 16KBUILD_CFLAGS += $(call cc-option,-mpacked-stack)
16KBUILD_CFLAGS += $(call cc-option,-ffreestanding) 17KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c
index 465eca756fe..c4c6a1cf221 100644
--- a/arch/s390/boot/compressed/misc.c
+++ b/arch/s390/boot/compressed/misc.c
@@ -71,34 +71,37 @@ void *memset(void *s, int c, size_t n)
71{ 71{
72 char *xs; 72 char *xs;
73 73
74 if (c == 0) 74 xs = s;
75 return __builtin_memset(s, 0, n); 75 while (n--)
76 76 *xs++ = c;
77 xs = (char *) s;
78 if (n > 0)
79 do {
80 *xs++ = c;
81 } while (--n > 0);
82 return s; 77 return s;
83} 78}
84 79
85void *memcpy(void *__dest, __const void *__src, size_t __n) 80void *memcpy(void *dest, const void *src, size_t n)
86{ 81{
87 return __builtin_memcpy(__dest, __src, __n); 82 const char *s = src;
83 char *d = dest;
84
85 while (n--)
86 *d++ = *s++;
87 return dest;
88} 88}
89 89
90void *memmove(void *__dest, __const void *__src, size_t __n) 90void *memmove(void *dest, const void *src, size_t n)
91{ 91{
92 char *d; 92 const char *s = src;
93 const char *s; 93 char *d = dest;
94 94
95 if (__dest <= __src) 95 if (d <= s) {
96 return __builtin_memcpy(__dest, __src, __n); 96 while (n--)
97 d = __dest + __n; 97 *d++ = *s++;
98 s = __src + __n; 98 } else {
99 while (__n--) 99 d += n;
100 *--d = *--s; 100 s += n;
101 return __dest; 101 while (n--)
102 *--d = *--s;
103 }
104 return dest;
102} 105}
103 106
104static void error(char *x) 107static void error(char *x)