Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp20147828ybl; Sat, 4 Jan 2020 18:53:24 -0800 (PST) X-Google-Smtp-Source: APXvYqx4yYh7T5m/uJL8aD2DuK/MMueD6cEKFzt58GLDBmvsQYwKfobiu6zIJrRs+TcNiqz1XkTM X-Received: by 2002:a05:6830:1d7b:: with SMTP id l27mr13276459oti.251.1578192804676; Sat, 04 Jan 2020 18:53:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578192804; cv=none; d=google.com; s=arc-20160816; b=dSGHlh6UJAmfdmKlZXhy88fdNn9oQIBD5l+M/DmwbuKDbKnZCVEwgS3P+IsLOW97gP POH9ipqAzePMHFEBzTsAGYM/voj1uyZEFE145QDtRAMkMD00b9VAX2tvE9CCfoYcJpbO aiXLq6+xFgFABDsFh5cEUxCrXLqfCsbC02niSwk5PLXhuzXJuVyOfvghDZs5t2quNotJ 5DkSr8AFIQgDF271noKx8B3q1XBkc12AeDXkKRONQI7ViHVX5trX0z9P9on/CBdTHuXs KROP/tDJvzeEbqtXrIv4Q15tLip+CLSU7wJp83KxhxC45yRR6CjQFOSGgGxpPiiN2X1h uM1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=TKP9+3FRATdkzatF5psXupfInHGzo8rl0jxRHyNFyDI=; b=fWGCoqSU+eqAam9v2G2T1mQjsOpxlJ9Dkr7ut5EbrMyUtCHJz+Tgp8DIpJJSUyq8iA yEEGqoB/0t80IoGJwU2CEOPZueNwtSE8Z9mQjkU6NZyH4ocbU3QApd3db5rBW2ztN0tD LUAmCDZ541WbkCK3Ib8XL2JJB4khgryLIv8t9Oqy/FwWTSQnhvQcdoccEZDk6es6JiWz 0pBCW8UpmqvQrkASdM1mH3Ur1FLrWnSNTn8XUW55dB3dYmIWzaADG/XqaJoTEwohAI1n ecACuFenfYPgcPeXcTL9FbT+WlQG+cjARKn1EOMGw0zT01s465WVpm3wboeKtypFWlnt pSCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UYYAYWFG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si33610129ota.300.2020.01.04.18.53.10; Sat, 04 Jan 2020 18:53:24 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=UYYAYWFG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726391AbgAECw0 (ORCPT + 99 others); Sat, 4 Jan 2020 21:52:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:42272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbgAECw0 (ORCPT ); Sat, 4 Jan 2020 21:52:26 -0500 Received: from localhost.localdomain (89.208.247.74.16clouds.com [89.208.247.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2DA31215A4; Sun, 5 Jan 2020 02:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578192746; bh=14ajwVbMlY0SfFFuMpMoc9Aw5UqL29m6fRijmZpEQCY=; h=From:To:Cc:Subject:Date:From; b=UYYAYWFGK/QyuziUyK+QU8wQ1n3K8ToZplVGhLa2n2Kc2aqyLcQp92Cheif2CajGy X7XGulwYMsGiiu7Z1JRaA8xujippXhXXxmeu3i4X73zfrZbMvFW/sUwwWdiKCr5RE0 20JZhuQv664UIt1DPTDMGmiLsIwyCiZuOjuACS7M= From: guoren@kernel.org To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, Anup.Patel@wdc.com, vincent.chen@sifive.com, zong.li@sifive.com, greentime.hu@sifive.com, bmeng.cn@gmail.com, atish.patra@wdc.com Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, arnd@arndb.de, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren Subject: [PATCH 1/2] riscv: Fixup obvious bug for fp-regs reset Date: Sun, 5 Jan 2020 10:52:14 +0800 Message-Id: <20200105025215.2522-1-guoren@kernel.org> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guo Ren CSR_MISA is defined in Privileged Architectures' spec: 3.1.1 Machine ISA Register misa. Every bit:1 indicate a feature, so we should beqz reset_done when there is no F/D bit in csr_msia register. Signed-off-by: Guo Ren --- arch/riscv/kernel/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index 797802c73dee..2227db63f895 100644 --- a/arch/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -251,7 +251,7 @@ ENTRY(reset_regs) #ifdef CONFIG_FPU csrr t0, CSR_MISA andi t0, t0, (COMPAT_HWCAP_ISA_F | COMPAT_HWCAP_ISA_D) - bnez t0, .Lreset_regs_done + beqz t0, .Lreset_regs_done li t1, SR_FS csrs CSR_STATUS, t1 -- 2.17.0