Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue of building bitesize_kern.c under kenrel source tree #2

Open
zmj64351508 opened this issue Jul 12, 2018 · 0 comments
Open

issue of building bitesize_kern.c under kenrel source tree #2

zmj64351508 opened this issue Jul 12, 2018 · 0 comments

Comments

@zmj64351508
Copy link

bitesize_kern.c includes <linux/blkdev.h> which includes many "asm" files that are not compatible with bpf build. I'm wondering how do you fix these issues or could you share the Makefile for me?

Thanks.

The error reported is like:

In file included from /work/zmj/android/kernel/msm-4.9/../../bpftool/bitesize_kern.c:15:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/blkdev.h:4:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/sched.h:19:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/timex.h:56:
In file included from /work/zmj/android/kernel/msm-4.9/include/uapi/linux/timex.h:56:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/time.h:5:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/seqlock.h:35:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/spinlock.h:50:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/preempt.h:59:
In file included from ./arch/arm64/include/generated/asm/preempt.h:1:
In file included from /work/zmj/android/kernel/msm-4.9/include/asm-generic/preempt.h:4:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/thread_info.h:25:
In file included from /work/zmj/android/kernel/msm-4.9/arch/arm64/include/asm/thread_info.h:33:
/work/zmj/android/kernel/msm-4.9/arch/arm64/include/asm/stack_pointer.h:7:51: error: register 'sp' unsuitable for global register variables on this target
register unsigned long current_stack_pointer asm ("sp");
                                                  ^
In file included from /work/zmj/android/kernel/msm-4.9/../../bpftool/bitesize_kern.c:15:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/blkdev.h:4:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/sched.h:19:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/timex.h:56:
In file included from /work/zmj/android/kernel/msm-4.9/include/uapi/linux/timex.h:56:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/time.h:5:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/seqlock.h:35:
In file included from /work/zmj/android/kernel/msm-4.9/include/linux/spinlock.h:87:
/work/zmj/android/kernel/msm-4.9/arch/arm64/include/asm/spinlock.h:119:28: error: value '65536' out of range for constraint 'I'
        : "Q" (lock->owner), "I" (1 << TICKET_SHIFT)
                                  ^~~~~~~~~~~~~~~~~
/work/zmj/android/kernel/msm-4.9/arch/arm64/include/asm/spinlock.h:147:9: error: value '65536' out of range for constraint 'I'
        : "I" (1 << TICKET_SHIFT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant