Messages in this thread | | | Date | Fri, 10 Mar 2023 14:33:16 +0800 | Subject | Re: [PATCH V4] LoongArch: Provide kernel fpu functions | From | WANG Xuerui <> |
| |
On 2023/3/10 10:51, Huacai Chen wrote: > Provide kernel_fpu_begin()/kernel_fpu_end() to allow the kernel itself > to use fpu. They can be used by some other kernel components, e.g., the > AMDGPU graphic driver for DCN.
Actually, as Christoph suggested earlier, you should probably send this together with the amdgpu modifications so that "actual usage" of the interface is established.
> > Reported-by: WANG Xuerui <kernel@xen0n.name> > Tested-by: WANG Xuerui <kernel@xen0n.name> > Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> > --- > V2: Use non-GPL exports and update commit messages. > V3: Add spaces for coding style. > V4: WARN_ON unexpected requests and use GPL exports again.
We should probably provide more archaeology or legal evidence as to why the in-kernel FPU ops must be GPL-only. After all the status quo is that among all arches that provide such ops, only the x86 ones are exported GPL, so if loongarch should go GPL for this interface then probably everyone else should too. It's not only affecting loongarch IMO.
> > arch/loongarch/include/asm/fpu.h | 3 +++ > arch/loongarch/kernel/Makefile | 2 +- > arch/loongarch/kernel/kfpu.c | 43 ++++++++++++++++++++++++++++++++ > 3 files changed, 47 insertions(+), 1 deletion(-) > create mode 100644 arch/loongarch/kernel/kfpu.c >
-- WANG "xen0n" Xuerui
Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/
| |