Repository navigation
Patch Release 7.2.2
Pull Requests Since 7.2.1
Unlabeled
- #272 - axistreamdma: report real Git Version in /proc/axi_stream_dma_0
- #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_dmakernel module report its real Git Version
in/proc/axi_stream_dma_0— matching the format already produced by the host
data_devdriver (tag, tag-dirty, short-SHA, short-SHA-dirty, oremulator).Before this change,
cat /proc/axi_stream_dma_0on 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
axistreamdma: honor GITV override and use git-describe fallback
Replaces the hardcodedGITV := yoctoline in
Yocto/recipes-kernel/axistreamdma/files/Makefilewith the same
ifndef GITV/git describe/rev-parse --short HEAD/emulator
fallback chain used bydata_dev/driver/Makefile:57-67. Verbatim copy of the
reference block — behavior matches the host build byte-for-byte.
axistreamdma: resolve GITV at recipe parse time and pass to oe_runmake
Adds apython __anonymoushook inaxistreamdma.bbthat resolves the
aes-stream-driversrepo version (describe→rev-parse --short HEAD→
emulator, with-dirtysuffix when the working tree is modified) against
\${THISDIR}/../../..at recipe-parse time, then passesGITV=\"\${GITV}\"
tooe_runmakeindo_compile. Parse-time resolution is required because
by the timedo_configureruns, sources have been copied to WORKDIR and the
.gitdirectory 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-Makefilegit describewould 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:
axis_gen2: drop unused err_free_hwdata label— silences the-Wunused-labelwarning emitted on every build ofAxisG2_Init. No goto ever targetederr_free_hwdata:; it was reached only by fallthrough fromerr_free_wrqueue:. Removing the label preserves the cleanup statements (and their fallthrough order) — pure dead-syntax removal.
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 onmain/pre-releasetoday: every TX submission ships with the continue flag forced to 0 regardless ofbuff->flags. One-character fix (=→|=).
common/driver: drop dead var and redundant kfree NULL guards— pure cleanup. Removes an unusedsize_t reminDma_Read(compiler-confirmed-Wunused-but-set-variable), and three redundantif (x != NULL) kfree(x);guards indmaAllocBuffers's cleanup chain.kfree(NULL)is documented kernel-safe; verifieddmaFreeBuffersListdoes not touch the freed arrays so no double-free risk either way.Net diff:
+4 / −8acrossaxis_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-258indmaFreeBuffers— sameif (list->indexed != NULL) kfree(list->indexed); if (list->sorted != NULL) kfree(list->sorted);pattern as the cleanup path I just trimmed indmaAllocBuffers. 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 && makeindata_dev/driver/— clean build, only the pre-existing toolchain "compiler differs" notice remains; the-Wunused-label err_free_hwdatawarning is gone- CI trailing-whitespace / tab gate — clean on all three edited files
cpplinton 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.koon 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)