aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-03-05 06:37:09 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-03-05 06:37:17 -0500
commit98c7b388afffdc5699095261b437b286d718270c (patch)
tree0d299b3a8e03c90963a95e44da0057892a490310 /arch/s390/kernel
parent5ccd0e43bb916872022df974d0f39337797d9277 (diff)
[S390] Get rid of memcpy gcc warning workaround.
Compile smp.o with -Wno-nonnull so gcc stops warning about memcpy being used with a null parameter. Also remove the workaround code and use a char * cast instead of a void * cast to do computations. Cc: Bastian Blank <bastian@waldi.eu.org> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/Makefile5
-rw-r--r--arch/s390/kernel/smp.c10
2 files changed, 7 insertions, 8 deletions
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index b3b650a93c7c..4d3e38392cb1 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -4,6 +4,11 @@
4 4
5EXTRA_AFLAGS := -traditional 5EXTRA_AFLAGS := -traditional
6 6
7#
8# Passing null pointers is ok for smp code, since we access the lowcore here.
9#
10CFLAGS_smp.o := -Wno-nonnull
11
7obj-y := bitmap.o traps.o time.o process.o base.o early.o \ 12obj-y := bitmap.o traps.o time.o process.o base.o early.o \
8 setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ 13 setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
9 semaphore.o s390_ext.o debug.o irq.o ipl.o dis.o diag.o 14 semaphore.o s390_ext.o debug.o irq.o ipl.o dis.o diag.o
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 818bd09c0260..8f894d380a62 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -629,14 +629,8 @@ static int __cpuinit smp_alloc_lowcore(int cpu)
629 panic_stack = __get_free_page(GFP_KERNEL); 629 panic_stack = __get_free_page(GFP_KERNEL);
630 if (!panic_stack || !async_stack) 630 if (!panic_stack || !async_stack)
631 goto out; 631 goto out;
632 /* 632 memcpy(lowcore, &S390_lowcore, 512);
633 * Only need to copy the first 512 bytes from address 0. But since 633 memset((char *)lowcore + 512, 0, sizeof(*lowcore) - 512);
634 * the compiler emits a warning if src == NULL for memcpy use copy_page
635 * instead. Copies more than needed but this code is not performance
636 * critical.
637 */
638 copy_page(lowcore, &S390_lowcore);
639 memset((void *)lowcore + 512, 0, sizeof(*lowcore) - 512);
640 lowcore->async_stack = async_stack + ASYNC_SIZE; 634 lowcore->async_stack = async_stack + ASYNC_SIZE;
641 lowcore->panic_stack = panic_stack + PAGE_SIZE; 635 lowcore->panic_stack = panic_stack + PAGE_SIZE;
642 636