From edaa70b5ba2427ef9496732ff46f5526eab02a4d Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Mon, 23 May 2022 14:35:21 +0100 Subject: [PATCH 1/2] riscv scaffolding for codegen Signed-off-by: Dave Tucker --- aya/src/generated/linux_bindings_riscv64.rs | 1 + aya/src/generated/mod.rs | 5 +++++ bpf/aya-bpf-bindings/src/riscv64/bindings.rs | 0 bpf/aya-bpf-bindings/src/riscv64/getters.rs | 0 bpf/aya-bpf-bindings/src/riscv64/helpers.rs | 0 bpf/aya-bpf-bindings/src/riscv64/mod.rs | 4 ++++ 6 files changed, 10 insertions(+) create mode 100644 aya/src/generated/linux_bindings_riscv64.rs create mode 100644 bpf/aya-bpf-bindings/src/riscv64/bindings.rs create mode 100644 bpf/aya-bpf-bindings/src/riscv64/getters.rs create mode 100644 bpf/aya-bpf-bindings/src/riscv64/helpers.rs create mode 100644 bpf/aya-bpf-bindings/src/riscv64/mod.rs diff --git a/aya/src/generated/linux_bindings_riscv64.rs b/aya/src/generated/linux_bindings_riscv64.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/aya/src/generated/linux_bindings_riscv64.rs @@ -0,0 +1 @@ + diff --git a/aya/src/generated/mod.rs b/aya/src/generated/mod.rs index 68d119af..54a99ffc 100644 --- a/aya/src/generated/mod.rs +++ b/aya/src/generated/mod.rs @@ -11,6 +11,8 @@ mod btf_internal_bindings; mod linux_bindings_aarch64; #[cfg(target_arch = "arm")] mod linux_bindings_armv7; +#[cfg(target_arch = "riscv64")] +mod linux_bindings_riscv64; #[cfg(target_arch = "x86_64")] mod linux_bindings_x86_64; @@ -24,3 +26,6 @@ pub use linux_bindings_armv7::*; #[cfg(target_arch = "aarch64")] pub use linux_bindings_aarch64::*; + +#[cfg(target_arch = "riscv64")] +pub use linux_bindings_riscv64::*; diff --git a/bpf/aya-bpf-bindings/src/riscv64/bindings.rs b/bpf/aya-bpf-bindings/src/riscv64/bindings.rs new file mode 100644 index 00000000..e69de29b diff --git a/bpf/aya-bpf-bindings/src/riscv64/getters.rs b/bpf/aya-bpf-bindings/src/riscv64/getters.rs new file mode 100644 index 00000000..e69de29b diff --git a/bpf/aya-bpf-bindings/src/riscv64/helpers.rs b/bpf/aya-bpf-bindings/src/riscv64/helpers.rs new file mode 100644 index 00000000..e69de29b diff --git a/bpf/aya-bpf-bindings/src/riscv64/mod.rs b/bpf/aya-bpf-bindings/src/riscv64/mod.rs new file mode 100644 index 00000000..52febe70 --- /dev/null +++ b/bpf/aya-bpf-bindings/src/riscv64/mod.rs @@ -0,0 +1,4 @@ +#![allow(clippy::all, dead_code)] +pub mod bindings; +pub mod getters; +pub mod helpers; From 8b7950bb0f25a2fa5718e212416b783c7088428e Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Mon, 23 May 2022 14:45:35 +0100 Subject: [PATCH 2/2] .github: use nightly for codegen Signed-off-by: Dave Tucker --- .github/workflows/gen.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/gen.yml b/.github/workflows/gen.yml index 8de74f23..43225f3a 100644 --- a/.github/workflows/gen.yml +++ b/.github/workflows/gen.yml @@ -18,6 +18,11 @@ jobs: working-directory: libbpf run: echo "LIBBPF_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - uses: Swatinem/rust-cache@v1 - name: Install headers