Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1750150imm; Thu, 9 Aug 2018 01:04:06 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz97lvY0TbQqPf7SYQ7zlVyUlh4YuF6rEI/YtDXkul+IMKJ1rIQ39I1UhWhtOynVV6ju3dc X-Received: by 2002:a63:f309:: with SMTP id l9-v6mr1064429pgh.369.1533801846383; Thu, 09 Aug 2018 01:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533801846; cv=none; d=google.com; s=arc-20160816; b=tStwieVSEb8NLipw+dzT4GqCoDc8UyS32lTrXM2FqiEUmoLTravD2ByZH/+yb/5pxJ 2H7ARoReuLroWYa1oTgEIznsdJ3s8Yj1dhU4LGTZSJus/6205Xfda1XXpXNOkCWoCaaW X/izhoAk1FHNsWxtnecnR0BReTXv1/TSeY4i37HZNFRbTtZBm9GIu2l/BpIXuGfON7P1 g0Md8O+VU1qAn7+w3Npo5G091jH6hd6IgiHpwOF74BVIx84+vdKHwSqjXVEpje+etpk9 GU/4VC1u3qZEg+sYuhCfW/1tYD/7cE91m+GpEj5KajEVQi3xiyLfrPW58OgoyCgl8kLA lTgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=C0LPNkV29zNVeKpwBYVnF3Exn8RbmaFDT0mSzH/vOIM=; b=S2hxR3/ngEdMDnllDgZu28TQb9ZqFHXgi+dQEXs7cOjI7hHZJQdWWOVYH4zqnHpiEy mLcjc0TIESh91LPGQZ91QRNJedLb56OYJIM46yhEoHEeHcBmh6qj8TzmLBIvU9ipyWBV Gvte3cKAEaEwP8CACHqiURIEy5HfSCJuyh252rwEvQdVfwVX87ODJjj4r3L/orV2yT6C I4mzaqlJbbb4XSbUQlXfFc/mQBooDZoVJ0n7dAP8Ll8OGc71CedqelZYPSzD1EZzuKMJ Aey+2hBADJvTNG50QUrwM+lrouaV/uotr40m5fiQqKSop5tN0RnWyus+SHp2NbV7g1OY uA/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Xc3su7Ud; 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 k10-v6si5961866pfe.41.2018.08.09.01.03.50; Thu, 09 Aug 2018 01:04:06 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Xc3su7Ud; 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 S1728351AbeHIK02 (ORCPT + 99 others); Thu, 9 Aug 2018 06:26:28 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57760 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727786AbeHIK02 (ORCPT ); Thu, 9 Aug 2018 06:26:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=C0LPNkV29zNVeKpwBYVnF3Exn8RbmaFDT0mSzH/vOIM=; b=Xc3su7UdxbqgNRJ1U8iU57Cy8 LWWsN7YXVruksbeIvjz5qhV9Sfw3Y190y1LU7WKjGI68Dqo5I+BLDAPVAkPwi5zTGfO1JqjTNfPbo m7fTy49S+5thXvvKKzpC/HQXK2kSDzZyDYnn7q1xsa/8j3M7NgEpp/Tt9lvR/HFR3S7uHw4VMuqvf JCS2X2UkUCd6gB8X8PevzGSNBi3ZdV73Lgp30k1lgYlSpCuh6ommbxDr6CO6WKYluhuGqMJFv+EhF nHfZnDJ8CarCzwhNjkYrZ03BHU/5lnU9t5W/QceN9sx5Dy0sb9oUM2agbwTZd2Orwd+0uYe2g7wRO NDcXe3kUg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fnfuD-000202-2v; Thu, 09 Aug 2018 08:02:49 +0000 Date: Thu, 9 Aug 2018 01:02:48 -0700 From: Christoph Hellwig To: Alan Kao Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Palmer Dabbelt , Albert Ou , Christoph Hellwig , Andrew Waterman , Arnd Bergmann , Darius Rad , greentime@andestech.com, vincentc@andestech.com, zong@andestech.com, nickhu@andestech.com Subject: Re: [PATCH v6 5/5] Auto-detect whether a FPU exists Message-ID: <20180809080248.GA7600@infradead.org> References: <1533800680-3653-1-git-send-email-alankao@andestech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1533800680-3653-1-git-send-email-alankao@andestech.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 09, 2018 at 03:44:40PM +0800, Alan Kao wrote: > We expect that a kernel with CONFIG_FPU=y can still support no-FPU > machines. To do so, the kernel should first examine the existence of a > FPU, then do nothing if a FPU does exist; otherwise, it should > disable/bypass all FPU-related functions. > > In this patch, a new global variable, has_fpu, is created and determined > when parsing the hardware capability from device tree during booting. > This variable is used in those FPU-related functions. > > Signed-off-by: Alan Kao > Cc: Greentime Hu > Cc: Vincent Chen > Cc: Zong Li > Cc: Nick Hu Looks good, Reviewed-by: Christoph Hellwig