Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4076211rdb; Mon, 11 Dec 2023 08:11:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4eBwk1dx3DAbIy+9g61v5MTc9PjcZUHa0fazV9elAKTZGKrNix1yvG0zDaBmsrj7SxMB5 X-Received: by 2002:a05:6a00:4601:b0:6cb:a0dc:3d56 with SMTP id ko1-20020a056a00460100b006cba0dc3d56mr2419237pfb.0.1702311105747; Mon, 11 Dec 2023 08:11:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702311105; cv=none; d=google.com; s=arc-20160816; b=scTqh7OXnYjAcIxencasrxLctCGPUDF0s5u3h7feMVfUryXNC4nhxYka5ehy061uZ7 hs+Tp+hERPZAswyZCvMMuIlHKbo3JZBC4InfDkImZU2HpGuegXhvsH841ubbgTi5oB73 ZOKrhse43n+czg5kRtV8uchNqJrQtQRzilYafBXFONO+noHPpEtTfyBblFEDQTfxzcHg F5X4+tnfJ2jQtcYWc1wxhXHHKb3lgC0ueKhCTqZMqvr4NroK5wssf8LRXOmLNaz/ua6O Krdf/9Xmid3FLH9XBVwN770Y8hwTyvhaZvdpiz6YZN5gymwq5PoMGwXffqPXQq8VAJt8 dkSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OpglHNMJJzSYx4T/kW665rmi/jtAX7GsOChv2TFobqY=; fh=OevFo9Y8b6VWlN8gOZgHQ5SOL7D8FdqY64kpk8wzQ58=; b=hEAjJWqIQEZJb1rlJ9v8MrYtH4sNxiPAxrU+0OK6R4KZj1rydHPuPSqsjCymS+ouD0 8mNv+qPi0DjD/xe68knTNtmVTEDQkUKNlkO07iZIPYbTpV9OAdpoz1ptgjIdUrX4adM2 eZxkXGjTnrwz0dSTXu3ppasQP+yF6X7QPeWIlbPRycYnDNVD1mbqff/yo3TDF4c7AZ+e R1IKKUkT9NRh39VgBjp5bc5rMcK8evNawn5aNnPKq5Ud7bWPxeyxKrJjk2vIelqas/n7 L19w2ZYzM0Z1tDLq+Mbek4wuTjfvMq5NtsQfJDT/9unXhuCfWR70aX4ArCDJObBsBFdD a1Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ZBI0pwfX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id e9-20020a63e009000000b005c218df2842si6053787pgh.900.2023.12.11.08.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 08:11:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ZBI0pwfX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 50ECE804E33A; Mon, 11 Dec 2023 08:11:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343941AbjLKQLV (ORCPT + 99 others); Mon, 11 Dec 2023 11:11:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343886AbjLKQLV (ORCPT ); Mon, 11 Dec 2023 11:11:21 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAD8E8E; Mon, 11 Dec 2023 08:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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; bh=OpglHNMJJzSYx4T/kW665rmi/jtAX7GsOChv2TFobqY=; b=ZBI0pwfXyKO4WzDr/GoqiD07Co m9H1p0cuX7jyp3zfEsid8e96EHf+FruxRo/h9Z7aOTec1EOYzK3w7twOUDO+5r7Uvy7TgMg4AhN5A XPpQFSaIDNbG/IBqRqkMg8PSNXaQJhQT+kmZwtDwtvsmC5rBu6G0SQKuKeXZ7OMu9/F0IkykBurtB EEhOu4Snnpdf9XEFPoOtR5CXbfp/Nzs620D3v3x75LY3An5m3oy0jj0x0sxyL/OfsYUpD8097DPzd N08o8m6dQi9yotKcqJ65fCfFOrsa2THZBmM8Ys+fEUKATZ5MecKZO9sg24Lt1Q188iC+k4EOk+doJ ZqUnAXFg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1rCisO-005gRx-1R; Mon, 11 Dec 2023 16:11:24 +0000 Date: Mon, 11 Dec 2023 08:11:24 -0800 From: Christoph Hellwig To: Samuel Holland Cc: linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-riscv@lists.infradead.org, Christoph Hellwig , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-arch@vger.kernel.org Subject: Re: [RFC PATCH 09/12] riscv: Add support for kernel-mode FPU Message-ID: References: <20231208055501.2916202-1-samuel.holland@sifive.com> <20231208055501.2916202-10-samuel.holland@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231208055501.2916202-10-samuel.holland@sifive.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 11 Dec 2023 08:11:43 -0800 (PST) > +#ifdef __riscv_f > + > +#define kernel_fpu_begin() \ > + static_assert(false, "floating-point code must use a separate translation unit") > +#define kernel_fpu_end() kernel_fpu_begin() > + > +#else > + > +void kernel_fpu_begin(void); > +void kernel_fpu_end(void); > + > +#endif I'll assume this is related to trick that places code in a separate translation unit, but I fail to understand it. Can you add a comment explaining it?