Skip to content

Patch Release 7.2.2

Choose a tag to compare

@ruck314 ruck314 released this 11 May 01:41
· 140 commits to main since this release
6ae492d

Pull Requests Since 7.2.1

Unlabeled

  1. #272 - axistreamdma: report real Git Version in /proc/axi_stream_dma_0
  2. #274 - axis_gen2: fix TX continue-bit drop + drop unused label/dead code

Pull Request Details

axistreamdma: report real Git Version in /proc/axi_stream_dma_0

Author: Larry Ruckman ruckman@slac.stanford.edu
Date: Sun May 10 07:28:15 2026 -0700
Pull: #272 (36 additions, 2 deletions, 2 files changed)
Branch: slaclab/axi_stream_dma-version-number

Notes:

Summary

Make the Yocto-built axi_stream_dma kernel module report its real Git Version
in /proc/axi_stream_dma_0 — matching the format already produced by the host
data_dev driver (tag, tag-dirty, short-SHA, short-SHA-dirty, or emulator).

Before this change, cat /proc/axi_stream_dma_0 on a Yocto-baked image showed:
DMA Driver's Git Version : yocto (the literal placeholder string hardcoded in
the Yocto Makefile).

After this change, it shows the real upstream version, e.g.:
DMA Driver's Git Version : 7.2.1-2-gf55ab44.

Commits

  1. axistreamdma: honor GITV override and use git-describe fallback
    Replaces the hardcoded GITV := yocto line in
    Yocto/recipes-kernel/axistreamdma/files/Makefile with the same
    ifndef GITV / git describe / rev-parse --short HEAD / emulator
    fallback chain used by data_dev/driver/Makefile:57-67. Verbatim copy of the
    reference block — behavior matches the host build byte-for-byte.

  2. axistreamdma: resolve GITV at recipe parse time and pass to oe_runmake
    Adds a python __anonymous hook in axistreamdma.bb that resolves the
    aes-stream-drivers repo version (describe → rev-parse --short HEAD →
    emulator, with -dirty suffix when the working tree is modified) against
    \${THISDIR}/../../.. at recipe-parse time, then passes GITV=\"\${GITV}\"
    to oe_runmake in do_compile. Parse-time resolution is required because
    by the time do_configure runs, sources have been copied to WORKDIR and the
    .git directory of the aes-stream-drivers checkout is no longer reachable
    from the build's working directory.

Why parse-time, not configure-time

Yocto's file:// SRC_URI strips git metadata when copying sources to WORKDIR,
so any in-Makefile git describe would always fall back to `emulator`. The
recipe must inject the version from a context where the aes-stream-drivers
checkout is still reachable — and `${THISDIR}` only points at the repo
during recipe parse (it points at WORKDIR after `do_unpack`). The Makefile
honors the injected GITV via the new `ifndef GITV` guard, so when GITV is
passed through, no `git` is invoked inside the Yocto build at all.

Scope

  • Only `axistreamdma.bb` and `axistreamdma/files/Makefile` change.
  • Sibling recipes (`aximemorymap`, `axidmasamples`) and the host
    `data_dev` driver are intentionally untouched.
  • No new dependencies; uses Python stdlib (`subprocess`) inside the recipe
    hook, which is always available in the BitBake parser context.

Test plan

  • Host: `make HOME=$(pwd) GITV=test-override -p -n clean` shows
    `GITV = test-override` (override path).
  • Host: `make HOME=$(pwd) -p -n clean` shows
    `GITV := ` (fallback path).
  • `bitbake -e axistreamdma | grep ^GITV=` shows the parse-time
    resolved version.
  • Yocto-baked image booted on RFSoC 4x2:
    `cat /proc/axi_stream_dma_0` reports
    `DMA Driver's Git Version : 7.2.1-2-gf55ab44` (real `git describe`
    output, formatted identically to the host `data_dev` driver's
    `/proc/datadev_0` output).

axis_gen2: fix TX continue-bit drop + drop unused label/dead code

Author: Larry Ruckman ruckman@slac.stanford.edu
Date: Sun May 10 18:25:27 2026 -0700
Pull: #274 (4 additions, 8 deletions, 3 files changed)
Branch: slaclab/err_free_hwdata-patch

Notes:

Summary

Three small, separable commits:

  1. axis_gen2: drop unused err_free_hwdata label — silences the -Wunused-label warning emitted on every build of AxisG2_Init. No goto ever targeted err_free_hwdata:; it was reached only by fallthrough from err_free_wrqueue:. Removing the label preserves the cleanup statements (and their fallthrough order) — pure dead-syntax removal.

  2. axis_gen2: preserve continue bit in AxisG2_WriteTx — real bug fix. Lines 178–179 both used = instead of the second using |=, so the continue bit (bit[3]) was silently overwritten by the timeout bit (bit[4]) before either reached the descriptor. Lines 180–181 already use |=. Net effect on main/pre-release today: every TX submission ships with the continue flag forced to 0 regardless of buff->flags. One-character fix (= → |=).

  3. common/driver: drop dead var and redundant kfree NULL guards — pure cleanup. Removes an unused size_t rem in Dma_Read (compiler-confirmed -Wunused-but-set-variable), and three redundant if (x != NULL) kfree(x); guards in dmaAllocBuffers's cleanup chain. kfree(NULL) is documented kernel-safe; verified dmaFreeBuffersList does not touch the freed arrays so no double-free risk either way.

Net diff: +4 / −8 across axis_gen2.c, dma_common.c, dma_buffer.c.

Reviewer please also look at

While auditing for the same class of issue I noticed a parallel sloppy spot I left out of scope so this PR stays narrow:

  • common/driver/dma_buffer.c:255-258 in dmaFreeBuffers — same if (list->indexed != NULL) kfree(list->indexed); if (list->sorted != NULL) kfree(list->sorted); pattern as the cleanup path I just trimmed in dmaAllocBuffers. Drop the guards here too for parity, or push back if you'd rather keep the defensive style and have me restore the guards in commit 3 instead. Either is fine; I just wanted both cleanup functions to read the same way and didn't want to silently expand scope.

Test plan

  • make clean && make in data_dev/driver/ — clean build, only the pre-existing toolchain "compiler differs" notice remains; the -Wunused-label err_free_hwdata warning is gone
  • CI trailing-whitespace / tab gate — clean on all three edited files
  • cpplint on the three edited files — clean
  • Full CI pipeline (CPU + GPU matrix across 5 distros, DKMS smoke) — will run on push
  • On-hardware smoke: insmod datadev.ko on a target board and confirm a TX path that sets the continue flag actually delivers a continued frame (the bug fix changes observable hardware behavior — worth a quick bench check before merge if a board is available)