Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp397455img; Thu, 21 Mar 2019 23:59:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzSdK+x0YbIZqNfngOIo6gO0yg27wHXIGXSkAzRQycDQPgKF9Fg6tLvTc+LwG5AOHbwV3G X-Received: by 2002:a17:902:e40a:: with SMTP id ci10mr7918051plb.77.1553237976140; Thu, 21 Mar 2019 23:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553237976; cv=none; d=google.com; s=arc-20160816; b=vmyeBQ31G9zl6lY4wsLqNayK8AsInhC1oy+/hsI+XUMSkqBks/7Etf7aH9avo4zS4q H3wJjM2+OcrBAPatren+50oZNdIoN75Q5r6cmgtgKfox3O7RQOVX+Off1xnhAWubxyzB cy3k4AKL0Y1v/uCkPSBMQ70XQ4NxgTgCM7DFAiVt3q1whi9LhatIOFtHS9hCrFogsa+P UnpMTxxjXPMgNQ7JJoEBeY9Oh3QLdnDJC2meecCp9Wh9/zRKjZ/EP3YDlzlTWzhiibt1 qYPSshlWrITc4jwo3wQspMxPhUoQiGS4FBH86pEOFVZXcS/EZYh/NRAf1+x/ARu+yPK7 ta6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=nMMCkJ3SP06iri7ReRA1/6J6qZ+IhPX0E4jK8Kb02a0=; b=yDooEXatIZfHMDx8HzNmf4p+vWL8Es0VW6878i1igWSQ83Aoyi2WNErxozoFdxOR5N ENvDD+rIipV40M5GEnamON0USwPxor3zccOsnGlZqt5LcJ1M8IlzlFyRm4HiZ6klQtCg ZemiPYioAWUwHwAFpHqXYu4HDpCfDHJasqnjKZadUR9HBlcQKl4si3wgDrGNlxJ9nDjz uhWx4NoL0EHwzugfA6wcgw98LPY0RtL4SsJjJkcMN9pywFv5WMSF2ckmBYATnoaEa6iZ ArT37pSJ1wsmIbWMAHSKqkRE/+tjU4bP67jdS44EfA/BIwPlB+njMuRAttEBiRV+wkfU 3Q8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h24si5935502pgv.67.2019.03.21.23.59.16; Thu, 21 Mar 2019 23:59:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727633AbfCVG4p (ORCPT + 99 others); Fri, 22 Mar 2019 02:56:45 -0400 Received: from 59-120-53-16.HINET-IP.hinet.net ([59.120.53.16]:16084 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727375AbfCVG4p (ORCPT ); Fri, 22 Mar 2019 02:56:45 -0400 X-Greylist: delayed 1156 seconds by postgrey-1.27 at vger.kernel.org; Fri, 22 Mar 2019 02:56:44 EDT Received: from ATCSQR.andestech.com (localhost [127.0.0.2] (may be forged)) by ATCSQR.andestech.com with ESMTP id x2M6bEqu036883 for ; Fri, 22 Mar 2019 14:37:14 +0800 (GMT-8) (envelope-from alankao@andestech.com) Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id x2M6arHW036844; Fri, 22 Mar 2019 14:36:53 +0800 (GMT-8) (envelope-from alankao@andestech.com) Received: from atcsqa06.andestech.com (10.0.15.65) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Fri, 22 Mar 2019 14:37:05 +0800 From: Alan Kao To: , , CC: Alan Kao , Greentime Hu , Vincent Chen Subject: [PATCH] riscv: fix accessing 8-byte variable from RV32 Date: Fri, 22 Mar 2019 14:37:04 +0800 Message-ID: <1553236624-31275-1-git-send-email-alankao@andestech.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.15.65] X-DNSRBL: X-MAIL: ATCSQR.andestech.com x2M6arHW036844 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A memory save operation to 8-byte variable in RV32 is divided into two sw instructions in the put_user macro. The current fixup returns execution flow to the second sw instead of the one after it. This patch fixes this fixup code according to the load access part. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Vincent Chen --- arch/riscv/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h index a00168b..fb53a80 100644 --- a/arch/riscv/include/asm/uaccess.h +++ b/arch/riscv/include/asm/uaccess.h @@ -300,7 +300,7 @@ do { \ " .balign 4\n" \ "4:\n" \ " li %0, %6\n" \ - " jump 2b, %1\n" \ + " jump 3b, %1\n" \ " .previous\n" \ " .section __ex_table,\"a\"\n" \ " .balign " RISCV_SZPTR "\n" \ -- 2.7.4