Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1374499ybl; Wed, 14 Aug 2019 16:01:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVhE2hW/Tgwva2vnrxYNdK6LGZupZwqxQEsIPEFTQQ93RxL/JFuSApBP6lqrIKbGWz1QGV X-Received: by 2002:a63:5402:: with SMTP id i2mr1218361pgb.414.1565823664578; Wed, 14 Aug 2019 16:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565823664; cv=none; d=google.com; s=arc-20160816; b=0XT8fluqqfmEhZuxEH3qj3JYIkwtd1qkPiBS/PC4XUE2AHF3ueZfgBguFbi1mknpjZ n128cyIgCB4GpF5c+GV/RLp1ILJO/zXBqS+v9Pg5kMIwCqcs0Wqa7MzTDLjb/KlXc2yw RqqLiVAjCPEDmnJPPmZrkArEnKlFpbexgtFoAD19mAU7QFFD/Y91a3t+0FhK7USgP/+m EVO1xJzItiraneOEIeZPJeRuhZkAm6HUCkShw0ERAbTLDSOs5Xr0yQeGI+NbFEdOOpHr MdhOgzYbLfXlBjv/+W4uLPtTwig3rO4Crfd4OZWAX3XsyGp5c3GLXzAkoM0mbwunJ22t yghA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=Q0GTf4SXd8ap/7eYvtbqWOyb5FQdhVMHgC+xfCGpXSQ=; b=mP93U7fuo8ugXP8vhXBs+hhFEG3Qjr+VuEBasGTPDzrVwFl6tBMfwkEp0/3Dy/fU1f MJ5bmRDTX20sRgb1jvq60lKfoZwryMJrGYwDpvn65Tufvygrq3yHOZfT72oYwx7QmISt u7K5Gv8CjcuDk6heA7Ds1odBz05So9m4v5lDooPRNvfvIm2c2YAwQIGaakePqqgli2c5 QSLC/zSkSrNGpaSSKbPILYPdcC2vCSH97/dhAlIKPPgNxxWCSNqVWNF0zDw6T5NnBgDO GpTQ5RR+gPEe+UhgehJYVTMTj7oKq2FOpBFk+5QyquNfs4wTh5V8DmOtWEi1RY2eyqcJ +ROA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=kea+s0+E; 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 a10si649570pfo.179.2019.08.14.16.00.48; Wed, 14 Aug 2019 16:01:04 -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; dkim=pass header.i=@sifive.com header.s=google header.b=kea+s0+E; 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 S1729283AbfHNV30 (ORCPT + 99 others); Wed, 14 Aug 2019 17:29:26 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:32937 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfHNV30 (ORCPT ); Wed, 14 Aug 2019 17:29:26 -0400 Received: by mail-pl1-f194.google.com with SMTP id c14so190335plo.0 for ; Wed, 14 Aug 2019 14:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=Q0GTf4SXd8ap/7eYvtbqWOyb5FQdhVMHgC+xfCGpXSQ=; b=kea+s0+EM0lH1QLqsZDsOn4sDOH41D3HRfCTW2cUvdWSICMhItatHtT/A6rHXo016S dCgfKALNbA888bZcw0h4uCtKVYxn8NHdwVsxi7iy8+79qiZQP3Q8ch5WvlR/i6L2rNZY sw8fYzM2F4Oby5/oXCn61+X+DqFP6g+PZ8jeCiPzmHzVxyK37+YvHxzJGSbVFpIILVJu ziqN7bbph16MtF6C+mDT0f5G8DI5VnpxilEiIvBPBFEPF+HJRQDwsg4JXnCcrcWRobhm SrxmxBgxMeoP6hfXkBI5tZ/YE+6BXtUTa3ZE8i4LjkqIDfqjv4/L8yLaLE66kGJtU1ez JrJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=Q0GTf4SXd8ap/7eYvtbqWOyb5FQdhVMHgC+xfCGpXSQ=; b=IYCU4sGMKavFtOByLInq/EpOHLkcxeU2Yz0Pz2crLqe8JeQntFkL422RZ72DaENVl6 f6YvuQOq9C7JqcGGV54Bf4CSZgtz9dbmlXpA4EpsE+PZN8Nf4UQdDo7xybBNf2MNJ29Q ST5iDNnt3Q7F/kupjeI0GlaQzK8nu6YoWc4XDgqygHRTY+rop4GezE/QYcGDx2GMXCOs NELJL4g09Vb2UI7ZeeIxXMgWIk9laQ7h3YvxLOQBtbnq8sfThXMvY5Abj0xsp2G86mE3 HQNXQj68/6XMYjHGg/sxDpmctWEZqwTysyaOxGmew7lDthqejM3biWcOb+qDoXqksxjL /Kpg== X-Gm-Message-State: APjAAAV8ESdu9wMQYnmp+gXI2y4L+d7WvrD8dREaoalpJHkxTvIWuv7s JqNbSRYSvEf/uFNrxG3EuPPcIQ== X-Received: by 2002:a17:902:9a8d:: with SMTP id w13mr1279338plp.157.1565818165383; Wed, 14 Aug 2019 14:29:25 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id k5sm709566pjl.32.2019.08.14.14.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2019 14:29:24 -0700 (PDT) Date: Wed, 14 Aug 2019 14:29:24 -0700 (PDT) X-Google-Original-Date: Wed, 14 Aug 2019 14:15:32 PDT (-0700) Subject: Re: [PATCH v2 2/2] riscv: Make __fstate_clean() work correctly. In-Reply-To: CC: vincent.chen@sifive.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org From: Palmer Dabbelt To: Paul Walmsley Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Aug 2019 13:32:50 PDT (-0700), Paul Walmsley wrote: > On Wed, 14 Aug 2019, Vincent Chen wrote: > >> Make the __fstate_clean() function correctly set the >> state of sstatus.FS in pt_regs to SR_FS_CLEAN. >> >> Fixes: 7db91e5 ("RISC-V: Task implementation") >> Cc: linux-stable >> Signed-off-by: Vincent Chen >> Reviewed-by: Anup Patel >> Reviewed-by: Christoph Hellwig > > Thanks, I extended the "Fixes" commit ID to 12 digits, as is the usual > practice here, and have queued the following for v5.3-rc. For reference, something like "git config core.abbrev=12" (or whatever you write to get this in your .gitconfig) https://github.com/palmer-dabbelt/home/blob/master/.gitconfig.in#L23 causes git to do the right thing. > - Paul > > From: Vincent Chen > Date: Wed, 14 Aug 2019 16:23:53 +0800 > Subject: [PATCH] riscv: Make __fstate_clean() work correctly. > > Make the __fstate_clean() function correctly set the > state of sstatus.FS in pt_regs to SR_FS_CLEAN. > > Fixes: 7db91e57a0acd ("RISC-V: Task implementation") > Cc: linux-stable > Signed-off-by: Vincent Chen > Reviewed-by: Anup Patel > Reviewed-by: Christoph Hellwig > [paul.walmsley@sifive.com: expanded "Fixes" commit ID] > Signed-off-by: Paul Walmsley > --- > arch/riscv/include/asm/switch_to.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h > index 949d9cd91dec..f0227bdce0f0 100644 > --- a/arch/riscv/include/asm/switch_to.h > +++ b/arch/riscv/include/asm/switch_to.h > @@ -16,7 +16,7 @@ extern void __fstate_restore(struct task_struct *restore_from); > > static inline void __fstate_clean(struct pt_regs *regs) > { > - regs->sstatus |= (regs->sstatus & ~(SR_FS)) | SR_FS_CLEAN; > + regs->sstatus = (regs->sstatus & ~SR_FS) | SR_FS_CLEAN; > } > > static inline void fstate_off(struct task_struct *task,