Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9da5cad6 authored by Haren Myneni's avatar Haren Myneni Committed by Paul Mackerras
Browse files

[PATCH] powerpc: Fix search for the main interrupt controller



At present, we are not looking at all interrupt controller nodes in the
device tree even though the proper node was not found. This is causing
the system panic. The attached patch will scan all nodes until it finds
the proper interrupt controller type.

Signed-off-by: default avatarHaren Myneni <haren@us.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 79e7bac0
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -324,16 +324,19 @@ static void __init pSeries_discover_pic(void)
	ppc64_interrupt_controller = IC_INVALID;
	for (np = NULL; (np = of_find_node_by_name(np, "interrupt-controller"));) {
		typep = (char *)get_property(np, "compatible", NULL);
		if (strstr(typep, "open-pic"))
		if (strstr(typep, "open-pic")) {
			ppc64_interrupt_controller = IC_OPEN_PIC;
		else if (strstr(typep, "ppc-xicp"))
			break;
		} else if (strstr(typep, "ppc-xicp")) {
			ppc64_interrupt_controller = IC_PPC_XIC;
		else
			printk("pSeries_discover_pic: failed to recognize"
			       " interrupt-controller\n");
			break;
		}
	}
	if (ppc64_interrupt_controller == IC_INVALID)
		printk("pSeries_discover_pic: failed to recognize"
			" interrupt-controller\n");

}

static void pSeries_mach_cpu_die(void)
{