Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7006007ybh; Thu, 8 Aug 2019 08:52:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqymP4lN6FZyu4Q91XHo3IgN0fpOXVLQyAKXJIyyrIE8f6m0xQU2GjQd2jqsT7V0twLnUQef X-Received: by 2002:a62:2aca:: with SMTP id q193mr16517766pfq.209.1565279560901; Thu, 08 Aug 2019 08:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565279560; cv=none; d=google.com; s=arc-20160816; b=iycoycjF22b9D/z2cWoUb4LbcuFqHWsYv1naQCPmFpyPTLsKN45SziMZ2PWJg8O/aW vk6FoCNapyMOAc+Cclv79eQDWW5cOsiDwKlw6cMTJGzfFlGn13RPqJV6pprkX+ca1jJ7 yaTx3Sxt5DOWWQZFfpfWauc8YD9BAPcPdqeAnvhlX0wRiXlVGedkz11b3vn3QDe1FeGF JEXJ1s6VBv7HJDqExywwjf33ZHH7A1qUgnTURzpU65Tevla5V2tGal2JfVDon6+qvmNL slSPDTolzeGZtsS8WBR9lkiaEjoMU510TPzSTGL6CLz3lI7rsEnmspktCa3eZoiRxJOx 7CUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=V04LJKvCA0wB/HmsqcSMs/4DuagqVihnyf8uqYLL87Q=; b=vfPrjdYTyzkiY6ZUDojlBc0a/kJI1W96YxgM9rvaqhMqwrC0EpRimnHqaasItHunUA /cW3VumZLvH2osMu3DEtDoqjYdD1962CS4BvEWg8tHoxT++73PoQZvobqyqOWSw7igYf tKXcYatkfS7uc6AoRzcTP+r7v1oheOH4eaz/Kg8pGgvjKfYSQ+w8sUz8BNSXAToo9R/e l9iKQqQIll90KuhMYX0dI1d5i1YtZs5Tc5x8VWXqXpXNfGk7o7SmEEy3vpCd6vQNTWw+ SarJlkx6lpzTYqPsyBJI2prHHo8mJ4jKCv/dVJ3MIqLjBWl3nrIe9k+yCoEMGDjVs+hb cGZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Rjenc5zT; 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 x1si2125659pjq.98.2019.08.08.08.52.25; Thu, 08 Aug 2019 08:52:40 -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=Rjenc5zT; 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 S2403924AbfHHPuN (ORCPT + 99 others); Thu, 8 Aug 2019 11:50:13 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:40259 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403889AbfHHPuN (ORCPT ); Thu, 8 Aug 2019 11:50:13 -0400 Received: by mail-ot1-f68.google.com with SMTP id l15so63230694oth.7 for ; Thu, 08 Aug 2019 08:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=V04LJKvCA0wB/HmsqcSMs/4DuagqVihnyf8uqYLL87Q=; b=Rjenc5zTLUajzfiBedUaxjBiG1dhLJKjDLzS3UjIrusjrHXpf7CCE15NIbWxBhf6x2 nvKbbMmWa6RH+y0ZDTTvg77tQLFGuhNysOD/LNi+gRJHzyNfnmCeNRAC2GBGNBYKwvkH 5N8d26wze5KVYPDse72CjDU+ghlwcRp/l3VqNvx8ZGbaguxCbhKbpJiSp+K6FxJfgK7b SS/Fmvv8cDGxJyPEpHHTFTiuMIN3L1jaiNnLDgxkeZqxMJwaAMJwkjUNBjVJteC5wA7P LOqEzIFkuLAGC4F76tEqKI36IIfGJyTatKKeo17l0bIREcogBFOTbbhDG5gbK1LVQi9o ANYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=V04LJKvCA0wB/HmsqcSMs/4DuagqVihnyf8uqYLL87Q=; b=OdvStiAA3cvPFiTFoDppfLxCRBDQM4opwTJ33BmzoqkteRq0N9sPmTSykzsD3O+4hG 57YmcTNWSTiWR/d1WWQ2oBlJs1WjWfMRJ2QFRsL/X7AjLLsszyLx0y+pp+CNKSXvez8C X13k+77gJrIFQXQOKyR7L/cKsJ+rA/lo56AM2Lgly4M8a/qCn8Qzo7SBrLXaDjgzF1re H8cBZh39DDXKHB1QR8u2hBBjcQR3K4X6Mh+tu0wBL3UYy/XdZLZtgJlp2GQs0ft3tWBI P2OROJGhbpMgIbsMdsCaV2OpdK+nRCRov5/qMuAEWDgIoNa5tXfCTUloUUXPeOODlI20 7tAg== X-Gm-Message-State: APjAAAU1x2lFVjQeObFph6FUNSdPz41amFplPMOqI6BvlAlYrL6SeazA 2m8l+rDofSRKXIFvQB3SVgfW9A== X-Received: by 2002:a6b:6409:: with SMTP id t9mr4933342iog.270.1565279411935; Thu, 08 Aug 2019 08:50:11 -0700 (PDT) Received: from localhost (c-73-95-159-87.hsd1.co.comcast.net. [73.95.159.87]) by smtp.gmail.com with ESMTPSA id h18sm73180520iob.80.2019.08.08.08.50.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 08:50:09 -0700 (PDT) Date: Thu, 8 Aug 2019 08:50:09 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Anup Patel cc: Vincent Chen , Palmer Dabbelt , Albert Ou , linux-riscv , "linux-kernel@vger.kernel.org List" Subject: Re: [PATCH 1/2] riscv: Correct the initialized flow of FP register In-Reply-To: Message-ID: References: <1565251121-28490-1-git-send-email-vincent.chen@sifive.com> <1565251121-28490-2-git-send-email-vincent.chen@sifive.com> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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