Skip to contentSkip to conversation

ppc64: Fix find_udbg_vterm()

PATCH New Benjamin Herrenschmidt 1 participant 1 message Oct 7, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc64: Fix find_udbg_vterm()

Hi !

The find_udbg_vterm() used to initialize the early boot console on LPAR machines will not work properly on some recent pSeries because the firmware is playing tricks with the "phandle" values used to identify firmware nodes. This patch fixes that by using the full path instead.

===== arch/ppc64/kernel/pSeries_lpar.c 1.42 vs edited =====

arch/ppc64/kernel/pSeries_lpar.c +3 -4
@@ -135,7 +135,6 @@
 int find_udbg_vterm(void)
 {
 	struct device_node *stdout_node;
-	phandle *stdout_ph;
 	u32 *termno;
 	char *name;
 	int found = 0;
@@ -143,10 +142,10 @@
 	/* find the boot console from /chosen/stdout */
 	if (!of_chosen)
 		return 0;
-	stdout_ph = (phandle *)get_property(of_chosen, "linux,stdout-package", NULL);
-	if (stdout_ph == NULL)
+	name = (char *)get_property(of_chosen, "linux,stdout-path", NULL);
+	if (name == NULL)
 		return 0;
-	stdout_node = of_find_node_by_phandle(*stdout_ph);
+	stdout_node = of_find_node_by_path(name);
 	if (!stdout_node)
 		return 0;