Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp23269ybm; Tue, 21 May 2019 21:44:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbTJ0EDLLdGcbddl7aWUlQMRgdEwnpToXB6OxRYUvrt+f0PXSZINbnG8Cap75MiT28CmvT X-Received: by 2002:aa7:808d:: with SMTP id v13mr61829233pff.198.1558500243713; Tue, 21 May 2019 21:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558500243; cv=none; d=google.com; s=arc-20160816; b=EUgUFIAlI6tqCbOZin6RWK44S62cV2EC/zqc9cmQK1PtZUHMtabqrXSmkQJopRJOeE s5bjKd69zP9JdgEKhEJv+0N1dOoFOYoTP84/pmtQYANcyYiCImnlj6/HwsPobpUTZfg5 p/f79uq5nct01GS30aCSzPRG3oFMBQ+n++NgToPYhuCfEjCU0GhPit98Tmf6zXcw6l5N YpM7QQYxZUO2hW0iOS+eH++Iphr5GUjYNcMOCP1LErNJmsRHz1ML1e04BuLTecfpVuhG TaIoiDz6d1m/01BKqChqQo6MwdmxmVQKOlKKSyM7in9VgW3j2m7HFaQZg+IcgwHuBWFX /D5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=c2M4Oq6QJ5a/3W3+r8AGuklgaCSq5ZaL+Nr0st9+Orw=; b=xs8MmngXBvGKFk7d6PxSbS3csjpXtF6bbmkUnf9ALFZh/OoK+AmifcVTJyMbdJ91cI H+6EO0xRRrocvbfkZM2B3SNpYfa95sq/rKdd9FZeQdyo0jfKMilBtB6rCdwtsNi1x+cg dcdp2e/49RE3YTZsP907L3Ub+E43HC47h1VBgpWa0CIbg3lxX5mJUum4+iQvnm5xscBJ M8/WX7c9cIJ7ypNeXdy0JeCOOSJApc2NJuILto0Qom09cny67WIUKMQ9HfR+TJ/dkbXf DAwxuR/XbI+Uh0keD9et01dl8D72+MJTkxQ/FXP59xiWNOLHAVejw/0NBL4RsNLoz4aJ W4kQ== ARC-Authentication-Results: i=1; mx.google.com; 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 u24si5775422pfa.245.2019.05.21.21.43.48; Tue, 21 May 2019 21:44:03 -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; 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 S1726217AbfEVEmo (ORCPT + 99 others); Wed, 22 May 2019 00:42:44 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:49220 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbfEVEmn (ORCPT ); Wed, 22 May 2019 00:42:43 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 278EBA0142; Wed, 22 May 2019 06:42:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id E0yK-RppxpLv; Wed, 22 May 2019 06:42:24 +0200 (CEST) From: Aleksa Sarai To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Cc: Aleksa Sarai , "Jason A. Donenfeld" , Rik van Riel , Nicolai Stange , Sebastian Andrzej Siewior , zfs-devel@list.zfsonlinux.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86/fpu: allow kernel_fpu_{begin,end} to be used by non-GPL modules Date: Wed, 22 May 2019 14:42:04 +1000 Message-Id: <20190522044204.24207-1-cyphar@cyphar.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prior to [1], all non-GPL modules were able to make use of SIMD on x86 by making use of the __kernel_fpu_* API. Given that __kernel_fpu_* were both EXPORT_SYMBOL'd and kernel_fpu_* are such trivial wrappers around the now-static __kernel_fpu_*, it seems to me that there is no reason to have different licensing rules for them. In the case of OpenZFS, the lack of SIMD on newer Linux kernels has caused significant performance problems (since ZFS uses SIMD for calculation of blkptr checksums as well as raidz calculations). [1]: commit 12209993e98c ("x86/fpu: Don't export __kernel_fpu_{begin,end}()") Cc: "Jason A. Donenfeld" Signed-off-by: Aleksa Sarai --- arch/x86/kernel/fpu/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index 2e5003fef51a..8de5687a470d 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -127,14 +127,14 @@ void kernel_fpu_begin(void) preempt_disable(); __kernel_fpu_begin(); } -EXPORT_SYMBOL_GPL(kernel_fpu_begin); +EXPORT_SYMBOL(kernel_fpu_begin); void kernel_fpu_end(void) { __kernel_fpu_end(); preempt_enable(); } -EXPORT_SYMBOL_GPL(kernel_fpu_end); +EXPORT_SYMBOL(kernel_fpu_end); /* * Save the FPU state (mark it for reload if necessary): -- 2.21.0