HomeFreeBSD

powerpc/powermac: Fix macgpio(4) child interrupt resource handling

Description

powerpc/powermac: Fix macgpio(4) child interrupt resource handling

The 'interrupts' property is actually 2 words, not one, on macgpio child
nodes. Open Firmware's getprop function might be returning the value
copied, not the total size of the property, but FDT's returns the total
size. Prior to this patch, this would cause the SYS_RES_IRQ resource list
to not be populated when running with the 'usefdt' loader variable set, to
convert the OFW device tree to a FDT. Since the property is always 2 words,
read both words, and ignore the second.

Tested by: Dennis Clarke (previous attempt)
MFC after: 2 weeks

Details

Provenance
jhibbitsAuthored on Dec 6 2018, 4:25 AM
Parents
rGbdd6b77e1fbe: If the vfs.ffs.dotrimcons sysctl option is enabled while a file
Branches
Unknown
Tags
Unknown

Event Timeline