diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2016-02-12 06:40:31 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-02-17 03:05:04 -0500 |
commit | 52499d93d6dec3872de3b982219af6d4c182a452 (patch) | |
tree | 4565561ab51516a02a27bf26438b5de2bd2fc5db /arch/s390/mm | |
parent | f6c9b160233f9b5afe926b91b55589b706076640 (diff) |
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: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/maccess.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c index 350b0acd7f52..792f9c63fbca 100644 --- a/arch/s390/mm/maccess.c +++ b/arch/s390/mm/maccess.c | |||
@@ -93,15 +93,17 @@ static int __memcpy_real(void *dest, void *src, size_t count) | |||
93 | */ | 93 | */ |
94 | int memcpy_real(void *dest, void *src, size_t count) | 94 | int memcpy_real(void *dest, void *src, size_t count) |
95 | { | 95 | { |
96 | int irqs_disabled, rc; | ||
96 | unsigned long flags; | 97 | unsigned long flags; |
97 | int rc; | ||
98 | 98 | ||
99 | if (!count) | 99 | if (!count) |
100 | return 0; | 100 | return 0; |
101 | local_irq_save(flags); | 101 | flags = __arch_local_irq_stnsm(0xf8UL); |
102 | __arch_local_irq_stnsm(0xfbUL); | 102 | irqs_disabled = arch_irqs_disabled_flags(flags); |
103 | if (!irqs_disabled) | ||
104 | trace_hardirqs_off(); | ||
103 | rc = __memcpy_real(dest, src, count); | 105 | rc = __memcpy_real(dest, src, count); |
104 | if (!arch_irqs_disabled_flags(flags)) | 106 | if (!irqs_disabled) |
105 | trace_hardirqs_on(); | 107 | trace_hardirqs_on(); |
106 | __arch_local_irq_ssm(flags); | 108 | __arch_local_irq_ssm(flags); |
107 | return rc; | 109 | return rc; |