mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
headers/vmlinux: Add arch specific vmlinux.h defines
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This commit is contained in:
@@ -9,10 +9,6 @@
|
||||
*/
|
||||
#ifndef __VMLINUX_H__
|
||||
#define __VMLINUX_H__
|
||||
/*
|
||||
* Notice: Defining __VMLINUX_H__ (or __KERNEL__) cause <bpf/bpf_tracing.h>
|
||||
* header file to define architecture specific PT_REGS_PARM's.
|
||||
*/
|
||||
|
||||
#include <linux/types.h> /* Needed for __uNN in vmlinux/vmlinux_types.h */
|
||||
|
||||
@@ -24,6 +20,22 @@
|
||||
#include "vmlinux/vmlinux_common.h"
|
||||
#include "vmlinux/vmlinux_net.h"
|
||||
|
||||
/*
|
||||
* Notice: Defining __VMLINUX_H__ (or __KERNEL__) cause <bpf/bpf_tracing.h>
|
||||
* header file to define architecture specific PT_REGS_PARM's.
|
||||
*
|
||||
* When using '-target bpf' the fallback mechanism doesn't detect right arch
|
||||
* via compiler defines.
|
||||
*
|
||||
* Makefile system in lib/common.mk detect ARCH and defines the
|
||||
* defines __TARGET_ARCH_$(ARCH) matched on below.
|
||||
*/
|
||||
#if defined(__TARGET_ARCH_x86)
|
||||
#include "vmlinux/arch/x86/vmlinux.h"
|
||||
#else
|
||||
#warning "Makefile for BPF-tracing on this arch: not supported yet"
|
||||
#endif
|
||||
|
||||
#ifndef BPF_NO_PRESERVE_ACCESS_INDEX
|
||||
#pragma clang attribute pop
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user