How L4Linux Linked the header file?

Youren Shen shenyouren at
Sat Apr 18 16:26:15 CEST 2015


I'm trying to port L4Linux 3.14 to Linux Kernel 3.4. But when I complied
the kernel, this error happened:
In function 'cpu0_startup':
error: implicit declaration of function 'set_my_cpu_offset'

I checked main.c file:

#include <asm/unistd.h>
#include <asm/percpu.h>
#include <asm/generic/l4lib.h>

So I add one percpu.h file with definition of 'set_my_cpu_offset' in
however this error still happened.

Then I add the definition of this function to
then the error message will not show.

Also, discard the change in $(src)/include/linux/percpu.h, then I change
the main.c file to include  absolute path of percpu.h.

#include <asm/unistd.h>
#include <asm/generic/l4lib.h>

It passed the complied to.

So that is say, the #include <asm/percpu.h> is reference to
src/include/linux/percpu.h. That really strange.

I do not change the Makefile in arch/l4, and I really confused about this
Now this problem occurs to me again, when complied the
arch/l4/kernel/timer.c file, this error happened:

warning: 'struct clock_event_device' declared inside parameter list
[enabled by default]
warning: its scope is only this definition or declaration, which is
probably not what you want [enabled by default]

but the definition of this to file should be defined in clockchips.h which
is include in timer.c:

#include <linux/timex.h>
#include <linux/clockchips.h>
#include <linux/irq.h>

Thank you for your reading, I just want to know what's the rule of L4Linux
header file linking, and solve this problem.
I'd be so appreciated if anyone can give me some help!

Best Regards.
Youren Shen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the l4-hackers mailing list