PERFORCE change 227289 for review

John Baldwin jhb at freebsd.org
Wed Apr 3 19:14:48 UTC 2013


On Monday, April 01, 2013 4:09:23 pm Brooks Davis wrote:
> http://p4web.freebsd.org/@@227289?ac=10
> 
> Change 227289 by brooks at brooks_zenith on 2013/04/01 20:08:35
> 
> 	Record the interrupt-parent of devices that have one in
> 	struct device.  Use this to improve reporting of interrupt-parents
> 	in two ways:
> 	
> 	Add an indication of the interrupt-parent when printing the
> 	child's resources:
> 	
> 	altera_jtag_uart0: <Altera JTAG UART> mem 0x900000007f000000-0x900000007f00003f irq 0 (beripic0) on simplebus0
> 	
> 	Extend struct u_device and the hw.bus.devices sysctl used
> 	by libdevinfo to include the device parent.  This is done
> 	in a fully foward and backward compatible manner.  The
> 	kernel can now return a partial structure when an old
> 	libdevinfo requests a u_device that is shorter than the
> 	current version.  Each new field or set of fields in
> 	u_device is indicated by a bit in the dv_fields entry.
> 	
> 	Use this new functionality to add a -i option to devinfo
> 	that shows the device tree by interrupt-parent rather than
> 	bus.  Resources described as "Interrupt" are always shown
> 	in -i mode

Hmm, is this really generically useful?  I would rather think that you might
want to export more information about interrupt sources that maps IRQ cookies
to (pic, pin) tuples or the like.  This seems like a very platform-specific
thing to be putting into 'struct device'.

-- 
John Baldwin


More information about the p4-projects mailing list