public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] ppc64: Fix find_udbg_vterm()
Date: Thu, 07 Oct 2004 11:28:48 +1000	[thread overview]
Message-ID: <1097112528.11702.14.camel@gaston> (raw)

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.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

===== arch/ppc64/kernel/pSeries_lpar.c 1.42 vs edited =====
--- 1.42/arch/ppc64/kernel/pSeries_lpar.c	2004-09-27 16:20:05 +10:00
+++ edited/arch/ppc64/kernel/pSeries_lpar.c	2004-10-07 11:26:19 +10:00
@@ -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;
 



                 reply	other threads:[~2004-10-07  1:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1097112528.11702.14.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox