How L4Linux Linked the header file?

Youren Shen <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <CAHu4ykhT+nmLGS1euzV6dVRdC6W2VazsE7kzcTgon2=z772fVQ@mail.gmail.com>
Hi,

I'm trying to port L4Linux 3.14 to Linux Kernel 3.4. But when I complied
the kernel, this error happened:
/home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/kernel/main.c:
In function 'cpu0_startup':
/home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/kernel/main.c:2124:2:
error: implicit declaration of function 'set_my_cpu_offset'
[-Werror=implicit-function-declaration]

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
/home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/include/asm/arch-arm/,
however this error still happened.

Then I add the definition of this function to
/home/shenyouren/workspace/kernel/kernel_exynos5250/include/linux/percpu.h,
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
</home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/include/asm/arch-arm/percpu.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
error.
Now this problem occurs to me again, when complied the
arch/l4/kernel/timer.c file, this error happened:

/home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/kernel/timer.c:153:35:
warning: 'struct clock_event_device' declared inside parameter list
[enabled by default]
/home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/kernel/timer.c:153:35:
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.

_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.