Commit 52499d93 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/maccess: reduce stnsm instructions

When fixing the DAT off bug ("s390: fix DAT off memory access, e.g.
on kdump") both Christian and I missed that we can save an additional
stnsm instruction.

This saves us a couple of cycles which could improve the speed of
memcpy_real.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent f6c9b160
...@@ -93,15 +93,17 @@ static int __memcpy_real(void *dest, void *src, size_t count) ...@@ -93,15 +93,17 @@ static int __memcpy_real(void *dest, void *src, size_t count)
*/ */
int memcpy_real(void *dest, void *src, size_t count) int memcpy_real(void *dest, void *src, size_t count)
{ {
int irqs_disabled, rc;
unsigned long flags; unsigned long flags;
int rc;
if (!count) if (!count)
return 0; return 0;
local_irq_save(flags); flags = __arch_local_irq_stnsm(0xf8UL);
__arch_local_irq_stnsm(0xfbUL); irqs_disabled = arch_irqs_disabled_flags(flags);
if (!irqs_disabled)
trace_hardirqs_off();
rc = __memcpy_real(dest, src, count); rc = __memcpy_real(dest, src, count);
if (!arch_irqs_disabled_flags(flags)) if (!irqs_disabled)
trace_hardirqs_on(); trace_hardirqs_on();
__arch_local_irq_ssm(flags); __arch_local_irq_ssm(flags);
return rc; return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment