Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
Re: sys/octeon: accept linux,phandle for IRQs
To:
Kirill A. Korinsky <kirill@korins.ky>
Cc:
tech@openbsd.org
Date:
Mon, 20 Apr 2026 00:11:29 +0200

Download raw body.

Thread
> Date: Sun, 19 Apr 2026 23:39:19 +0200
> From: Kirill A. Korinsky <kirill@korins.ky>
> 
> tech@,
> 
> SRX300 firmware DT describes the CIU root and several CIB interrupt
> controllers with linux,phandle, but omits phandle.
> 
> octeon_intr_register() consumed only the latter; the controllers
> therefore never entered the interrupt controller registry, and every
> later interrupt-parent lookup for CIB, AHCI, and xHCI failed.
> 
> Thus, dev/ofw/fdt lookup code already treats phandle and linux,phandle
> as equivalent; so the Octeon interrupt layer should do the same when
> registering interrupt controllers.
> 
> Full DTS is here: https://kirill.korins.ky/pub/srx_300.dts
> 
> Ok?

ok kettenis@

> Index: sys/arch/octeon/dev/octeon_intr.c
> ===================================================================
> RCS file: /home/cvs/src/sys/arch/octeon/dev/octeon_intr.c,v
> diff -u -p -r1.25 octeon_intr.c
> --- sys/arch/octeon/dev/octeon_intr.c	17 Mar 2019 05:25:06 -0000	1.25
> +++ sys/arch/octeon/dev/octeon_intr.c	19 Apr 2026 21:14:54 -0000
> @@ -60,6 +60,8 @@ octeon_intr_register(struct intr_control
>  
>  	ic->ic_phandle = OF_getpropint(ic->ic_node, "phandle", 0);
>  	if (ic->ic_phandle == 0)
> +		ic->ic_phandle = OF_getpropint(ic->ic_node, "linux,phandle", 0);
> +	if (ic->ic_phandle == 0)
>  		return;
>  
>  	LIST_FOREACH(tmp, &octeon_ic_list, ic_list) {
> 
> 
> -- 
> wbr, Kirill
> 
>