to support the device tree binding for the "apple,admac" controller.
ok visa@, patrick@
-/* $OpenBSD: intr.c,v 1.24 2022/01/02 01:01:04 jsg Exp $ */
+/* $OpenBSD: intr.c,v 1.25 2022/07/27 20:26:17 kettenis Exp $ */
/*
* Copyright (c) 2011 Dale Rahn <drahn@openbsd.org>
*
if (extended) {
phandle = cell[0];
+ /* Handle "empty" phandle reference. */
+ if (phandle == 0) {
+ cell++;
+ ncells--;
+ continue;
+ }
+
LIST_FOREACH(ic, &interrupt_controllers, ic_list) {
if (ic->ic_phandle == phandle)
break;
-/* $OpenBSD: intr.c,v 1.20 2022/01/02 01:01:04 jsg Exp $ */
+/* $OpenBSD: intr.c,v 1.21 2022/07/27 20:26:17 kettenis Exp $ */
/*
* Copyright (c) 2011 Dale Rahn <drahn@openbsd.org>
*
if (extended) {
phandle = cell[0];
+ /* Handle "empty" phandle reference. */
+ if (phandle == 0) {
+ cell++;
+ ncells--;
+ continue;
+ }
+
LIST_FOREACH(ic, &interrupt_controllers, ic_list) {
if (ic->ic_phandle == phandle)
break;
-/* $OpenBSD: intr.c,v 1.9 2020/09/26 17:56:54 kettenis Exp $ */
+/* $OpenBSD: intr.c,v 1.10 2022/07/27 20:26:17 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
if (extended) {
phandle = cell[0];
+ /* Handle "empty" phandle reference. */
+ if (phandle == 0) {
+ cell++;
+ ncells--;
+ continue;
+ }
+
LIST_FOREACH(ic, &interrupt_controllers, ic_list) {
if (ic->ic_phandle == phandle)
break;
-/* $OpenBSD: intr.c,v 1.9 2022/01/02 01:01:04 jsg Exp $ */
+/* $OpenBSD: intr.c,v 1.10 2022/07/27 20:26:17 kettenis Exp $ */
/*
* Copyright (c) 2011 Dale Rahn <drahn@openbsd.org>
if (extended) {
phandle = cell[0];
+ /* Handle "empty" phandle reference. */
+ if (phandle == 0) {
+ cell++;
+ ncells--;
+ continue;
+ }
+
LIST_FOREACH(ic, &interrupt_controllers, ic_list) {
if (ic->ic_phandle == phandle)
break;