-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Hi kaiwan !
When I try to build and install the miscdrv (chapter 1) under usage of the lkm script, I receive following compilation error:
************** begin compilation error **************
miscdrv.c: In function ‘open_miscdrv’:
../../convenient.h:159:21: error: implicit declaration of function ‘in_irq’ [-Werror=implicit-function-declaration]
159 | if (in_irq() && in_softirq())
| ^~~~~~
miscdrv.c:52:9: note: in expansion of macro ‘PRINT_CTX’
52 | PRINT_CTX(); // displays process (or atomic) context info
| ^~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/home/andreas/Code/kernels/staging/scripts/Makefile.build:287: miscdrv.o] Error 1
************** end compilation error **************
In my opinion the main point is that the in_irq makro definition cannot be resolved. It seems to be no longer available in preempt.h.
My suggest would be to change in_irq to in_hardirq.
btw.: The usage of softirq is also marked as deprecated in /linux/preempt.h by a code comment.
Im running on a custom build of 6.19.0-rc1 from cloned from http://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
Thanks a lot
Andreas