Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=53a0868cb4d77dcba8e95e1033361ffdb6e510e2
Commit:     53a0868cb4d77dcba8e95e1033361ffdb6e510e2
Parent:     cebe0fe70fbf033a1a6b7c5c8b79eb13060a4ab7
Author:     Michael Holzheu <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 12 16:11:44 2007 +0200
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 16:13:09 2007 +0200

    [S390] zcore: fix inline assembly in memcpy_real()
    
    memcpy_real uses the mvcle instruction. This instruction alters all used
    registers (source, destination and 2 x count). Therefore we have to flag
    those registers as input/output registers (+d). In addition to that, we
    have to specify, that we read from memory designated by "src" and write to
    memory designated by "dest".
    
    Signed-off-by: Michael Holzheu <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 drivers/s390/char/zcore.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c
index 3712ede..7073daf 100644
--- a/drivers/s390/char/zcore.c
+++ b/drivers/s390/char/zcore.c
@@ -141,15 +141,16 @@ static int memcpy_real(void *dest, unsigned long src, 
size_t count)
 
        if (count == 0)
                return 0;
-       flags = __raw_local_irq_stnsm(0xf8); /* switch to real mode */
+       flags = __raw_local_irq_stnsm(0xf8UL); /* switch to real mode */
        asm volatile (
                "0:     mvcle   %1,%2,0x0\n"
                "1:     jo      0b\n"
                "       lhi     %0,0x0\n"
                "2:\n"
                EX_TABLE(1b,2b)
-               : "+d" (rc)
-               : "d" (_dest), "d" (_src), "d" (_len1), "d" (_len2)
+               : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1),
+                 "+d" (_len2), "=m" (*((long*)dest))
+               : "m" (*((long*)src))
                : "cc", "memory");
        __raw_local_irq_ssm(flags);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to