Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4081459rdb; Mon, 11 Dec 2023 08:18:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IH40WF+yagMM8rwibzIgM41wCgbg4A4Zq8BHdAEhc7jfKkYjOl75na5ECzDt48CaTXIqoJy X-Received: by 2002:a05:6a00:2c8a:b0:6ce:4853:beaf with SMTP id ef10-20020a056a002c8a00b006ce4853beafmr1804719pfb.56.1702311539116; Mon, 11 Dec 2023 08:18:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702311539; cv=none; d=google.com; s=arc-20160816; b=qvH/1zXcncDsiPuxj0TwfMBan+Ngdhr4T4OnAoPLxCuN/Hnp9bsIxIk+VW486Zq0Yp A3AjlMBSFefIRRncO7gQX+L1sDOnOEirXudFQqHu8huNApflgK8lYm186zQMBiClIkPd FktnxcIWxHjAxJYT5wxwWcFc7Z+hG0GfhpQuD36wL3liLxj1oPRxPR4Mxxn3/N94HPgL tSs4XHCOMmNa1KVYgBLW7+XKAyIbZn5NhoQAn8ZoRdaxw1I0RnRnmm/BYgoe0WGenfhO H6JSnc6o40k5EZ7/fSJhkN2zxKOdA3YOq5eHtFVlS11g5iQawZORxCt6uMcXmz6OnnG2 5P7w== 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=MPLySSIA+ntdrvXPY6WLPHcSeoOpRBMJKsLFdEaHpkU=; fh=2E5tzMRBwoeNZcvgw3B5fAJpVt45DEQ8eFurCGbahWU=; b=SE7UeeURkoA5p1P9u7/YXANKpkLqwDBd5gn+tPUTgfMiKtlDJ03xUOHhw7L9MZ39Hm voSw/KHQmugAeR/AZRpdXfqVH4hib2VdG3Mg0n1oyutG6B4mxzRXS3pdPPE/oY+zF8wL lYddAQJxwe5Zba4SYRz9m+7cR6fr9+71rtDxEe11qRF6H/vEYtrVWC71Q3rb2EUQGaTI BEkDleOpkBhZq5upzZXWQw3HeMNja0IBMjtrnwXgZ2EkWcazUEEFSmJDbbxPeeQHX4Bb 9ToQNMHMZvS++cFvepNSE5y8VU9+B27RxnTZvnmnwVNwHN1GoiQ4b3DyjSC+nKmGvJR6 AMwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=FiucfIPo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id ei7-20020a056a0080c700b006ce7343f066si6193725pfb.372.2023.12.11.08.18.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 08:18:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=FiucfIPo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 456A180AD08C; Mon, 11 Dec 2023 08:18:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344057AbjLKQSj (ORCPT + 99 others); Mon, 11 Dec 2023 11:18:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344200AbjLKQSb (ORCPT ); Mon, 11 Dec 2023 11:18:31 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A381A9; Mon, 11 Dec 2023 08:18:38 -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=MPLySSIA+ntdrvXPY6WLPHcSeoOpRBMJKsLFdEaHpkU=; b=FiucfIPo+cO11SUxoMH1rJdvqv wfEC5yblDCMXDQY0OixUw0haAM61OP7SSA+pSzbjWuXecVi10RyVfeyqeXMWZTJMJZPMW8UyiE+2t g+svd17tDKounF/vNcRa5yoyPjucT8XLCCZHwrXjUSfmzvhY1vpFNOoT7PvEuwde+WUSmxCEc7p0W 1ul+M4tqKhhUj05i/GCzaLechyYXXE9C2thbHs8lQwUjgWOUkHceRkV3o+/DWL9yx1/GW852FAwWG KrNQQTP3w4OIETUwxzlphh61g0cIqWK5xeXd6eOjjmlarE2bnEbyzACmkdhG3zoz3cwFtTRQv51bT rmQymT4g==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1rCizL-005k47-1J; Mon, 11 Dec 2023 16:18:35 +0000 Date: Mon, 11 Dec 2023 08:18:35 -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, Masahiro Yamada , Nathan Chancellor , linux-kbuild@vger.kernel.org Subject: Re: [RFC PATCH 11/12] selftests/fpu: Move FP code to a separate translation unit Message-ID: References: <20231208055501.2916202-1-samuel.holland@sifive.com> <20231208055501.2916202-12-samuel.holland@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231208055501.2916202-12-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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 08:18:56 -0800 (PST) > obj-$(CONFIG_TEST_FPU) += test_fpu.o > -CFLAGS_test_fpu.o += $(FPU_CFLAGS) > +test_fpu-y := test_fpu_glue.o test_fpu_impl.o > +CFLAGS_test_fpu_impl.o += $(FPU_CFLAGS) Btw, I really wonder if having a modname-fpu += foo.o syntax in kbuild wouldn't be preferable to this. Of coure that requires someone who understands kbuild inside out. > +int test_fpu(void); This needs to go into a header. And I think I underatand your way to enforce the use of a separate compilation unit in the riscv patch now. Can we just make that generic, e.g. have a that wraps that does the guard based on a -D_LINUX_FPU_COMPILATION_UNIT=1 on the command line so that all the code becomes fully portable? Any legacy arch specific fpu users not using would not be affected by it, although it would be great to eventually migrate them to the common scheme.