Skip to content

Commit

Permalink
ARM64 requires some tweaks; different header & kernel_neon_begin|end()
Browse files Browse the repository at this point in the history
Reported-by: eibisidi
  • Loading branch information
kaiwan committed Nov 26, 2024
1 parent 6d800a8 commit 068f0c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ch5/fp_in_lkm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ ifeq (${MYDEBUG}, y)
else
ccflags-y += -UDEBUG
endif
ccflags-remove-y += -mgeneral-regs-only

# We always keep the dynamic debug facility enabled; this allows us to turn
# dynamically turn on/off debug printk's later... To disable it simply comment
# out the following line
Expand Down
9 changes: 8 additions & 1 deletion ch5/fp_in_lkm/fp_in_lkm.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@

#include <linux/init.h>
#include <linux/module.h>
//#include <linux/kernel.h>
#ifdef CONFIG_X86
#include <asm/fpu/api.h>
#endif

#ifdef CONFIG_ARM64
#include <asm/neon.h>
#define kernel_fpu_begin kernel_neon_begin
#define kernel_fpu_end kernel_neon_end
#endif

MODULE_AUTHOR("<insert your name here>");
MODULE_DESCRIPTION("LKP2E book:ch5/fp_in_lkm: no performing FP \
Expand Down

0 comments on commit 068f0c3

Please sign in to comment.