Page MenuHomeFreeBSD

vchiq: fix another logging format string for 32/64 bit
ClosedPublic

Authored by adrian on Oct 26 2025, 11:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 5, 4:54 AM
Unknown Object (File)
Fri, Nov 28, 9:53 AM
Unknown Object (File)
Nov 26 2025, 12:57 AM
Unknown Object (File)
Nov 25 2025, 4:44 AM
Unknown Object (File)
Nov 22 2025, 2:33 AM
Unknown Object (File)
Nov 19 2025, 7:29 AM
Unknown Object (File)
Nov 18 2025, 1:42 PM
Unknown Object (File)
Nov 15 2025, 12:38 PM

Details

Summary

This is from work from https://reviews.freebsd.org/D37878.

Submitted by: Marco Devesas Campos <devesas.campos@gmail.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Oct 26 2025, 11:28 PM

(sigh how'd I convince it that /i/ approved it)

This revision now requires review to proceed.Oct 26 2025, 11:50 PM
emaste added inline comments.
sys/arm/broadcom/bcm2835/bcm2835_audio.c
264
This revision is now accepted and ready to land.Oct 27 2025, 12:05 AM
sys/arm/broadcom/bcm2835/bcm2835_audio.c
264

oh h0 h0 i will have a lot of lines to fix first. :-) I went and added spaces everywhere!

Break out some more of the debug changes into this file

This revision now requires review to proceed.Oct 28 2025, 6:06 AM

One question but otherwise looks OK

sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
208

(size_t) cast on g_slot_phys also?

sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
208

i'll check but i don't think the upstream patch that this is based on changes this!

This revision was not accepted when it landed; it landed in state Needs Review.Oct 30 2025, 12:49 AM
This revision was automatically updated to reflect the committed changes.
markmi_dsl-only.net added inline comments.
sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
549

The armv7 builds have been broken since thus was submitted:

Building /usr/obj/usr/src/arm.armv7/sys/GENERIC/vchiq_shim.o
--- vchiq_2835_arm.o ---
/usr/src/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:549:71: error: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Werror,-Wformat]
 549 |                 "free_pagelist - %zx, %d (%u bytes @%p)", (size_t)pagelist, actual, pagelist->length, bi->buf);
     |                                           ~~                                        ^~~~~~~~~~~~~~~~
     |                                           %lu
/usr/src/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h:73:39: note: expanded from macro 'vchiq_log_trace'
  73 |                 printf(VCHIQ_LOG_PREFIX fmt "\n", ##__VA_ARGS__); } while (0)
     |                                         ~~~         ^~~~~~~~~~~
1 error generated.
*** [vchiq_2835_arm.o] Error code 1
sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
549

The armv7 builds have been broken since thus was submitted:

Building /usr/obj/usr/src/arm.armv7/sys/GENERIC/vchiq_shim.o
--- vchiq_2835_arm.o ---
/usr/src/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:549:71: error: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Werror,-Wformat]
 549 |                 "free_pagelist - %zx, %d (%u bytes @%p)", (size_t)pagelist, actual, pagelist->length, bi->buf);
     |                                           ~~                                        ^~~~~~~~~~~~~~~~
     |                                           %lu
/usr/src/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h:73:39: note: expanded from macro 'vchiq_log_trace'
  73 |                 printf(VCHIQ_LOG_PREFIX fmt "\n", ##__VA_ARGS__); } while (0)
     |                                         ~~~         ^~~~~~~~~~~
1 error generated.
*** [vchiq_2835_arm.o] Error code 1

Can you please share how you're building it? I tried it locally and it passes each time for me;

#!/bin/sh

OBJ_BASE="/home/adrian/work/freebsd/head/freebsd-obj-arm"
SRC_BASE="/home/adrian/work/freebsd/head/freebsd-src-arm"
PORTS_BASE="/home/adrian/work/freebsd/head/freebsd-ports-arm"
MAKE_FLAGS="-j8 -s"
X_TARGET_ARCH="armv7"
KERN_CONFIG="GENERIC"
BUILD_FLAGS="NO_CLEAN=1"

env MAKEOBJDIRPREFIX="${OBJ_BASE}" make ${MAKE_FLAGS} buildkernel KERNCONF=${KERN_CONFIG} ${BUILD_FLAGS} TARGET_ARCH=${X_TARGET_ARCH}
sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
549

The official Continuous Integration builds fail with what I reported. https://ci.freebsd.org/job/FreeBSD-main-armv7-build/26157/

There are multiple reports on the lists as well.