diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-03-05 11:37:09 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-03-05 11:37:17 (GMT) |
commit | 98c7b388afffdc5699095261b437b286d718270c (patch) | |
tree | 0d299b3a8e03c90963a95e44da0057892a490310 /arch/s390 | |
parent | 5ccd0e43bb916872022df974d0f39337797d9277 (diff) | |
download | linux-fsl-qoriq-98c7b388afffdc5699095261b437b286d718270c.tar.xz |
[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')
-rw-r--r-- | arch/s390/kernel/Makefile | 5 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index b3b650a..4d3e383 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile @@ -4,6 +4,11 @@ EXTRA_AFLAGS := -traditional +# +# Passing null pointers is ok for smp code, since we access the lowcore here. +# +CFLAGS_smp.o := -Wno-nonnull + obj-y := bitmap.o traps.o time.o process.o base.o early.o \ setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ 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 818bd09..8f894d3 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) panic_stack = __get_free_page(GFP_KERNEL); if (!panic_stack || !async_stack) goto out; - /* - * Only need to copy the first 512 bytes from address 0. But since - * the compiler emits a warning if src == NULL for memcpy use copy_page - * instead. Copies more than needed but this code is not performance - * critical. - */ - copy_page(lowcore, &S390_lowcore); - memset((void *)lowcore + 512, 0, sizeof(*lowcore) - 512); + memcpy(lowcore, &S390_lowcore, 512); + memset((char *)lowcore + 512, 0, sizeof(*lowcore) - 512); lowcore->async_stack = async_stack + ASYNC_SIZE; lowcore->panic_stack = panic_stack + PAGE_SIZE; |