Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp195389ybl; Tue, 13 Aug 2019 18:48:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpV3PvP2lipX7lbL8Jm9ub+mwhfAV16/bASADutigRmSlGfOcCYjDD4Zh1/Mp6cvbsu5FQ X-Received: by 2002:aa7:8b10:: with SMTP id f16mr427142pfd.44.1565747322236; Tue, 13 Aug 2019 18:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565747322; cv=none; d=google.com; s=arc-20160816; b=HtxjubG8ONnpDxy65HaV3sN+rCHoDEU2VdLL/Sset6/zwGQAXKyLWYfmf+mUWxvcXD rLBex7jA0ggH2N3GA8P51TdJxNefFTJigouV+CPAJk2HOGWFuWdQzVg0NelzUsCbo/Yw L8IR0VW8sGkeH0k/YxtJ3C5E5OhdYWhuzppZF+/W+fv08+Xld3vD5y74rOGZSZeNAArz 7os7mpy/64S1qpS5IaV06KemnCydGAeM6MGZgqToAHq4mkw710P6ONmJZvd1BsENdidG VvRH2vTCWM0Wk6AGc3USWTH/6FOUCWZVYLPzHyNeJ+Y3o0Wyh0KXsKLEiA0o2/G90wrF 6QfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9fZGGflcHSO6++NhFYLpIqwxfvqbffISbsrAMMT2Dzk=; b=D0gJlMCOt0PRZ4A5AcrTQXteC71ODkBWI77LaMFH143B1r/V3WGCUquwpFFhBiWT+V /TLEIhwtEagOq2lX8nQEALY4+6FFUMKTtOZ2YgF+AhORDw8ByGk/3msYhyYE6wMoyija XqJ/sA0AiNpUldqliH1gldufioYd46wk73mzzkkrzjTb7pzoZjltnWtBSu1ZrIvAotU+ YycAqaCSIQAg6GzO4OdbQAN+3HEtTARG+AVu4BW2a7HpOnjm8MmVWDaRrOFtXe+XqebA 8Nl+PAw1IP0OXzabQNqPl0V/KKvAk22mcQ/Nimo+frvjxWnCl24Yhxi74hLpFTzYq8N+ kHqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ksZ5YGUj; 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 y5si59799875plk.338.2019.08.13.18.48.24; Tue, 13 Aug 2019 18:48:42 -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=ksZ5YGUj; 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 S1726975AbfHNBpt (ORCPT + 99 others); Tue, 13 Aug 2019 21:45:49 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:41405 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726843AbfHNBpt (ORCPT ); Tue, 13 Aug 2019 21:45:49 -0400 Received: by mail-oi1-f193.google.com with SMTP id g7so70668108oia.8 for ; Tue, 13 Aug 2019 18:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9fZGGflcHSO6++NhFYLpIqwxfvqbffISbsrAMMT2Dzk=; b=ksZ5YGUjNXobZyPLfwAAQMKGG8OGkzL5xNvBSPDRQVxxsPqDOYDlQJPpZcxXmKgCL0 IW7G2Z/WCnAjH+mnJzQFhjKsz5jXULbm9rNlirMr32SZJeoyKd1lnYvFhDgqtG/Ho7Dh HP126MRyLkQTxd3tCozy6FwqMN7VTAE39GUQTZl/R6qFq4maEqJecfRZEX7WKzjLNTsp dhvh8buW+JavLizx/kuQV4NJ9q3GKdIpr3w1HpFq6Oshe21aY9PM3zxVtvP+FjANyQ4b MhIbA6PwzgoRiSvbdQfxJOEgYayZXwrPd85HZ9dwfKp/mh/YLOf0sc8nczy5Nt4bpbmj DgFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9fZGGflcHSO6++NhFYLpIqwxfvqbffISbsrAMMT2Dzk=; b=n/yng6XSRFrdZ8P+Fugp7IsxD+3+/Spo7YOCv+wqsKY8eaW1ejcRQ+cmldK6q6SlEe PdcNWzvWpGHD5k4/lTAE0edv1XZSQyxD5pv9/xhAqWtqaMbGAl+v8L2BOybD0Gvc/iQk vCPOjp4U1lerGwRwMxUhoMTGDtyKEVODIVXWonmlt5SJk+LvvzRQzP+lfLkUZMXrXDmJ e4D+dmEgDi+uKtcbh7N7JrRLqaNI6fog9+nOA0FGH7TOeOdJbnlZ8xN4bBQIhtHnhNQf U1n72D7ELvJQKjwqOU9Wf0gnNdJj/AgY8yXX+nVKBDwJumOao2CYvEt62wSduQtcSHsH vfgA== X-Gm-Message-State: APjAAAVyX04iB0WrUSUqHR/UoWoUZG108sX2btdNdzbN2gBRpk50SCHM bXX6PWfNUamUwn4UWEYPtriKXcp5Tq/HglVm1rdq5w== X-Received: by 2002:a02:2384:: with SMTP id u126mr858943jau.30.1565747148032; Tue, 13 Aug 2019 18:45:48 -0700 (PDT) MIME-Version: 1.0 References: <1565251121-28490-1-git-send-email-vincent.chen@sifive.com> <1565251121-28490-2-git-send-email-vincent.chen@sifive.com> In-Reply-To: From: Vincent Chen Date: Wed, 14 Aug 2019 09:45:36 +0800 Message-ID: Subject: Re: [PATCH 1/2] riscv: Correct the initialized flow of FP register To: Paul Walmsley , Anup Patel Cc: Palmer Dabbelt , Albert Ou , linux-riscv , "linux-kernel@vger.kernel.org List" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 8, 2019 at 11:50 PM Paul Walmsley wrote: > > On Thu, 8 Aug 2019, Anup Patel wrote: > > > On Thu, Aug 8, 2019 at 1:30 PM Vincent Chen wrote: > > > > > > +static inline void fstate_off(struct task_struct *task, > > > + struct pt_regs *regs) > > > +{ > > > + regs->sstatus = (regs->sstatus & ~(SR_FS)) | SR_FS_OFF; > > > > The SR_FS_OFF is 0x0 so no need for ORing it. > > That one looks OK to me, since it makes it more obvious to humans what's > happening here - reviewers won't need to know that "off" is 0x0. The > compiler should drop it internally, so it won't affect the generated > code. > Thanks for Paul's comment My thought is the same as Paul. > > Apart from above minor comment, looks good to me. > > > > Reviewed-by: Anup Patel > > Will add your Reviewed-by: tag - let us know if you want me to drop it or > caveat it. > > > - Paul Dear Anup, I suppose you can accept our thought about using the SR_FS_OFF flag because I didn't receive any reply from you. Thanks for your review and comments. Regards, Vincent