Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1996182imm; Thu, 2 Aug 2018 04:42:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc2tWOvOPno/ettjBhWl6V8umCE+luEqVrbkTTKwtg9zgxIarKts/7jk1/Rck7dxduZT1ib X-Received: by 2002:a17:902:1665:: with SMTP id g92-v6mr2083403plg.293.1533210175726; Thu, 02 Aug 2018 04:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533210175; cv=none; d=google.com; s=arc-20160816; b=g6wurrOcd0FVO7h+1ZTSab78UeDKzyah26Arh+nDCjxSmrxAvBaGXg58ejp3h776s0 ebO/zH32oggMudCWkgqTqBZJtA39jNEaVnuNPVwNbe7J3A9KNEKZPvQAnlY6z9aplId8 71J1hrfBJBr+JaGfcTiHDucdAD9BBGWRyvuezDTZOADQQAIPGylB/b5nM0e6WYi8+osf mlwK2TLajXx7bMVMT5+q+LEhvYcFFD+0rsU4tJM01LfzsWfNqFjyXKbOfPcSPdwfdLLA W/Km0TuQvEj5KbGARAyqiijV24iPfzzlm+ov25sAY5Io904hFZ25hhEAy/ninCO9FMVm gdWg== 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=ijbEhmpxwkpZkOPKenTjQE02EV/4P0JsXYWDsjbaXEo=; b=jZApDGcTVnMPmw4qjgS9VhqC1wmBMt/itLIB1AT1wY7Bvf7p+AwjoS150HUcql83Fa +3Juo5wnNafLl0RWzllt+p35pjr/C4sHft7XPZG+d8qbJbxXQgglHARU5w9IGitRWVyS z5NhTTjqvYNiCq9QRnMmQvPUK6P0qztmqolL27GYJ4fwJM+IMG5jl+V9bD2Ocvj8/hjA xjuXWAQhImXYV87SWk81FYHlyksy4Yz5Q30gaYa+qEqLoVCO1w5be4pyg6if9w0ufhtc DjCRLwsN3LH1hpl7KBad42GZrttZVF9B9iVr2EwyktfqzjDyxU4ZDikkf394QPqRw/UO 6pZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NQU3XENP; 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 b7-v6si1963338pfj.245.2018.08.02.04.42.41; Thu, 02 Aug 2018 04:42:55 -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=NQU3XENP; 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 S1732272AbeHBNcf (ORCPT + 99 others); Thu, 2 Aug 2018 09:32:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:56422 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732126AbeHBNcf (ORCPT ); Thu, 2 Aug 2018 09:32:35 -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=ijbEhmpxwkpZkOPKenTjQE02EV/4P0JsXYWDsjbaXEo=; b=NQU3XENPejSXM/cXRn+uBtLl+ 4IamX6REAWRFKJ40T95PYcG7EdTX+j9tGE1ng6pxaQrHfumg/8jEGmdlOChzQsS2mmavSpg68s/Om +ma/xMKghwW/51UtoYeB7Ko3o3Dd4lR86IRed7wrJcI7AVMGmBY/pdtHf8pXapjprBCDQKo99IsDJ txV28+6oPRl0f55euD4JUthdiYrQ4kcr/eOLbMcOBQeFrRtpFYLbIvDtKszjwDKNab8rFkI7uG1lG AtSFpq6onDTrSDQT+Hrvo66lskpwae6uXngySIyF8tLN+7Ks6iEhQvukrQhvae7/XTxe2K2nfixvt QL+6/AIzg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1flBzI-0000aS-IO; Thu, 02 Aug 2018 11:41:48 +0000 Date: Thu, 2 Aug 2018 04:41: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 , Vincent Chen , Zong Li , Nick Hu , Greentime Hu Subject: Re: [PATCH v3 4/4] Add an option to support no-FPU systems Message-ID: <20180802114148.GD17108@infradead.org> References: <1533188391-5932-1-git-send-email-alankao@andestech.com> <1533188391-5932-5-git-send-email-alankao@andestech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1533188391-5932-5-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 02, 2018 at 01:39:51PM +0800, Alan Kao wrote: > FP codes have been separated from common part in previous patches. > This patch add the CONFIG_FPU option and some stubs to support > no-FPU systems. I think the subject should be 'allow to disable FPU support'. As discussed in the other thread we should be able to detect systems without FPU and handle them fine even with FPU support built in. Even with that I think this patch is otherwise fine and the detection can be layered on top. One more nitpick below: > +#else > +#define save_fp_state(task, regs) (0) > +#define restore_fp_state(task, regs) (0) > +#define fstate_save(task, regs) do { } while (0) > +#define fstate_restore(task, regs) do { } while (0) > +#define __switch_to_aux(__prev, __next) do { } while (0) > +#define DEFAULT_SSTATUS (SR_SPIE | SR_FS_OFF) > +#endif Please move the stubs for functions that are static in signal.c into signal.c as well - you already have a CONFIG_FPU ifdef block in that file anyway.