Page MenuHomeFreeBSD

arm/ti: include sys/intr.h where INTRNG types are used
Needs ReviewPublic

Authored by rick_sloservers.com on Sun, Aug 23, 8:02 AM.
Tags
Referenced Files
F167912530: D59118.id184769.diff
Tue, Aug 25, 9:51 AM
F167878513: D59118.id.diff
Tue, Aug 25, 5:07 AM
Unknown Object (File)
Sun, Aug 23, 4:31 PM
Unknown Object (File)
Sun, Aug 23, 1:36 PM
Unknown Object (File)
Sun, Aug 23, 1:33 PM
Unknown Object (File)
Sun, Aug 23, 9:39 AM
Unknown Object (File)
Sun, Aug 23, 9:31 AM
Subscribers

Details

Reviewers
imp
oh
manu
andrew
Summary

sys/arm/include/intr.h no longer includes <sys/intr.h>, so drivers that
use INTRNG types must include it themselves. Two TI drivers were missed
and no longer compile:

sys/arm/ti/ti_gpio.h:41:21: error: field has incomplete type 'struct intr_irqsrc'

ti_gpio.h declares struct ti_gpio_irqsrc containing a struct intr_irqsrc,
and both aintc.c and ti_gpio.c use INTRNG interfaces while including only
<machine/intr.h>.

These files were missed because nothing in the tree builds them: AM335x
was removed from the armv7 GENERIC config in 3416e102c4e9, so the compiler
has not checked this code since. The sources were left in place, which is
why the breakage went unnoticed.

Includes are placed per style(9): sys/param.h and sys/systm.h first, the
remainder alphabetical.

Test Plan

No in-tree armv7 config currently builds these files, so compile coverage
requires an AM335x kernel configuration (see D46703).

Verified by building KERNCONF=AM335X for TARGET=arm TARGET_ARCH=armv7 on
stable/15 with D46703 applied: the errors above are resolved and the
kernel links. The resulting kernel boots to multi-user on a BeagleBone
Black Rev B3, with aintc and ti_gpio both attaching; gpioctl -lv
enumerates all four GPIO banks and pin direction/value changes read back
correctly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped