diff options
author | Frank Munzert <munzert@de.ibm.com> | 2009-03-26 10:24:45 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 10:24:27 -0400 |
commit | 159d1ff8f6c38086ed75f8e892790d0a4f3a6b71 (patch) | |
tree | e980fc9305c1d8a604d5af37e68807a306fed244 /arch | |
parent | 866ba28418d30122d863c50182a202741f4dcf3e (diff) |
[S390] Use csum_partial in checksum.h
The cksm function in system.h is duplicate to csum_partial in checksum.h.
Remove cksm and use csum_partial instead.
Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/system.h | 16 | ||||
-rw-r--r-- | arch/s390/kernel/ipl.c | 4 |
2 files changed, 3 insertions, 17 deletions
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h index 3f2ccb82b863..3a8b26eb1f2e 100644 --- a/arch/s390/include/asm/system.h +++ b/arch/s390/include/asm/system.h | |||
@@ -458,22 +458,6 @@ static inline unsigned short stap(void) | |||
458 | return cpu_address; | 458 | return cpu_address; |
459 | } | 459 | } |
460 | 460 | ||
461 | static inline u32 cksm(void *addr, unsigned long len) | ||
462 | { | ||
463 | register unsigned long _addr asm("0") = (unsigned long) addr; | ||
464 | register unsigned long _len asm("1") = len; | ||
465 | unsigned long accu = 0; | ||
466 | |||
467 | asm volatile( | ||
468 | "0:\n" | ||
469 | " cksm %0,%1\n" | ||
470 | " jnz 0b\n" | ||
471 | : "+d" (accu), "+d" (_addr), "+d" (_len) | ||
472 | : | ||
473 | : "cc", "memory"); | ||
474 | return accu; | ||
475 | } | ||
476 | |||
477 | extern void (*_machine_restart)(char *command); | 461 | extern void (*_machine_restart)(char *command); |
478 | extern void (*_machine_halt)(void); | 462 | extern void (*_machine_halt)(void); |
479 | extern void (*_machine_power_off)(void); | 463 | extern void (*_machine_power_off)(void); |
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 5663c1f8e46a..505fec06e634 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/reset.h> | 24 | #include <asm/reset.h> |
25 | #include <asm/sclp.h> | 25 | #include <asm/sclp.h> |
26 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
27 | #include <asm/checksum.h> | ||
27 | 28 | ||
28 | #define IPL_PARM_BLOCK_VERSION 0 | 29 | #define IPL_PARM_BLOCK_VERSION 0 |
29 | 30 | ||
@@ -1359,7 +1360,8 @@ static void dump_reipl_run(struct shutdown_trigger *trigger) | |||
1359 | "a" (&lowcore_ptr[smp_processor_id()]->ipib)); | 1360 | "a" (&lowcore_ptr[smp_processor_id()]->ipib)); |
1360 | #endif | 1361 | #endif |
1361 | asm volatile("stura %0,%1" | 1362 | asm volatile("stura %0,%1" |
1362 | :: "a" (cksm(reipl_block_actual, reipl_block_actual->hdr.len)), | 1363 | :: "a" (csum_partial(reipl_block_actual, |
1364 | reipl_block_actual->hdr.len, 0)), | ||
1363 | "a" (&lowcore_ptr[smp_processor_id()]->ipib_checksum)); | 1365 | "a" (&lowcore_ptr[smp_processor_id()]->ipib_checksum)); |
1364 | preempt_enable(); | 1366 | preempt_enable(); |
1365 | dump_run(trigger); | 1367 | dump_run(trigger); |