]> git.baikalelectronics.ru Git - kernel.git/commitdiff
watchdog: diag288_wdt: fix __diag288() inline assembly
authorAlexander Egorenkov <egorenar@linux.ibm.com>
Fri, 27 Jan 2023 13:52:42 +0000 (14:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:50:27 +0000 (12:50 +0100)
commit 32e40f9506b9e32917eb73154f93037b443124d1 upstream.

The DIAG 288 statement consumes an EBCDIC string the address of which is
passed in a register. Use a "memory" clobber to tell the compiler that
memory is accessed within the inline assembly.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/watchdog/diag288_wdt.c

index f0b6d5eeee1baa917ad8b109f192212747f1d133..370f648cb4b1a13f7edfdf4b2e12aef9ed7e4ffe 100644 (file)
@@ -86,7 +86,7 @@ static int __diag288(unsigned int func, unsigned int timeout,
                "1:\n"
                EX_TABLE(0b, 1b)
                : "+d" (err) : "d"(__func), "d"(__timeout),
-                 "d"(__action), "d"(__len) : "1", "cc");
+                 "d"(__action), "d"(__len) : "1", "cc", "memory");
        return err;
 }