Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761083AbXJDLhU (ORCPT ); Thu, 4 Oct 2007 07:37:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757483AbXJDL3I (ORCPT ); Thu, 4 Oct 2007 07:29:08 -0400 Received: from mtagate2.de.ibm.com ([195.212.29.151]:51251 "EHLO mtagate2.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753075AbXJDL2c (ORCPT ); Thu, 4 Oct 2007 07:28:32 -0400 Message-Id: <20071004112833.125116380@de.ibm.com> References: <20071004112706.574737175@de.ibm.com> User-Agent: quilt/0.46-1 Date: Thu, 04 Oct 2007 13:27:36 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Michael Holzheu , Martin Schwidefsky Subject: [patch 30/34] zcore: fix inline assembly in memcpy_real() Content-Disposition: inline; filename=030-zcore-inline.diff Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1674 Lines: 51 From: Michael Holzheu 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 Signed-off-by: Martin Schwidefsky --- drivers/s390/char/zcore.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) Index: quilt-2.6/drivers/s390/char/zcore.c =================================================================== --- quilt-2.6.orig/drivers/s390/char/zcore.c +++ quilt-2.6/drivers/s390/char/zcore.c @@ -141,15 +141,16 @@ static int memcpy_real(void *dest, unsig 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); -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/