Commit a6da83f9 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fix from Ben Herrenschmidt:
 "Here's one regression fix for 3.13 that I would appreciate if you
  could still pull in.  It was an "interesting" one to debug, basically
  it's an old bug that got somewhat "exposed" by new code breaking the
  boot on PA Semi boards (yes, it does appear that some people are still
  using these!)"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Check return value of instance-to-package OF call
parents 061f49ec 10348f59
...@@ -1986,19 +1986,23 @@ static void __init prom_init_stdout(void) ...@@ -1986,19 +1986,23 @@ static void __init prom_init_stdout(void)
/* Get the full OF pathname of the stdout device */ /* Get the full OF pathname of the stdout device */
memset(path, 0, 256); memset(path, 0, 256);
call_prom("instance-to-path", 3, 1, prom.stdout, path, 255); call_prom("instance-to-path", 3, 1, prom.stdout, path, 255);
prom_printf("OF stdout device is: %s\n", of_stdout_device);
prom_setprop(prom.chosen, "/chosen", "linux,stdout-path",
path, strlen(path) + 1);
/* instance-to-package fails on PA-Semi */
stdout_node = call_prom("instance-to-package", 1, 1, prom.stdout); stdout_node = call_prom("instance-to-package", 1, 1, prom.stdout);
if (stdout_node != PROM_ERROR) {
val = cpu_to_be32(stdout_node); val = cpu_to_be32(stdout_node);
prom_setprop(prom.chosen, "/chosen", "linux,stdout-package", prom_setprop(prom.chosen, "/chosen", "linux,stdout-package",
&val, sizeof(val)); &val, sizeof(val));
prom_printf("OF stdout device is: %s\n", of_stdout_device);
prom_setprop(prom.chosen, "/chosen", "linux,stdout-path",
path, strlen(path) + 1);
/* If it's a display, note it */ /* If it's a display, note it */
memset(type, 0, sizeof(type)); memset(type, 0, sizeof(type));
prom_getprop(stdout_node, "device_type", type, sizeof(type)); prom_getprop(stdout_node, "device_type", type, sizeof(type));
if (strcmp(type, "display") == 0) if (strcmp(type, "display") == 0)
prom_setprop(stdout_node, path, "linux,boot-display", NULL, 0); prom_setprop(stdout_node, path, "linux,boot-display", NULL, 0);
}
} }
static int __init prom_find_machine_type(void) static int __init prom_find_machine_type(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment