Skip to content

Commit

Permalink
Revert "console(lpc/fsp-console): Use only stdout-path property on P9…
Browse files Browse the repository at this point in the history
… and above"

This reverts commit 20f685a.

We've hit problems on Zaius machines and the needed petitboot changes
haven't made it upstream yet.

Let's revert for the time being while we sort everything out.

We probably have to keep both around for a few years.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
stewartsmith committed Mar 7, 2018
1 parent b1190f4 commit 217f74b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 35 deletions.
16 changes: 7 additions & 9 deletions core/console.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2013-2018 IBM Corp.
/* Copyright 2013-2014 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -427,18 +427,16 @@ static void dummy_console_poll(void *data __unused)

void dummy_console_add_nodes(void)
{
struct dt_property *p;

add_opal_console_node(0, "raw", memcons.obuf_size);

/* Mambo might have left a crap one, clear it */
dt_check_del_prop(dt_chosen, "stdout-path");
dt_check_del_prop(dt_chosen, "linux,stdout-path");

if (proc_gen < proc_gen_p9) {
dt_add_property_string(dt_chosen, "linux,stdout-path",
"/ibm,opal/consoles/serial@0");
}
p = __dt_find_property(dt_chosen, "linux,stdout-path");
if (p)
dt_del_property(dt_chosen, p);

dt_add_property_string(dt_chosen, "stdout-path",
dt_add_property_string(dt_chosen, "linux,stdout-path",
"/ibm,opal/consoles/serial@0");

opal_add_poller(dummy_console_poll, NULL);
Expand Down
5 changes: 1 addition & 4 deletions core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,7 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
cpu_set_ipi_enable(false);

/* Dump the selected console */
if (proc_gen >= proc_gen_p9)
stdoutp = dt_prop_get_def(dt_chosen, "stdout-path", NULL);
else
stdoutp = dt_prop_get_def(dt_chosen, "linux,stdout-path", NULL);
stdoutp = dt_prop_get_def(dt_chosen, "linux,stdout-path", NULL);
prlog(PR_DEBUG, "INIT: stdout-path: %s\n", stdoutp ? stdoutp : "");


Expand Down
14 changes: 3 additions & 11 deletions hw/fsp/fsp-console.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2013-2018 IBM Corp.
/* Copyright 2013-2014 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1072,22 +1072,14 @@ void fsp_console_select_stdout(void)
*/
}
}

dt_check_del_prop(dt_chosen, "linux,stdout-path");
dt_check_del_prop(dt_chosen, "stdout-path");

if (fsp_serials[1].open && use_serial) {
if (proc_gen < proc_gen_p9)
dt_add_property_string(dt_chosen, "linux,stdout-path",
"/ibm,opal/consoles/serial@1");
dt_add_property_string(dt_chosen, "stdout-path",
dt_add_property_string(dt_chosen, "linux,stdout-path",
"/ibm,opal/consoles/serial@1");
prlog(PR_NOTICE, "FSPCON: default console set to serial A\n");
} else {
if (proc_gen < proc_gen_p9)
dt_add_property_string(dt_chosen, "linux,stdout-path",
"/ibm,opal/consoles/serial@0");
dt_add_property_string(dt_chosen, "stdout-path",
dt_add_property_string(dt_chosen, "linux,stdout-path",
"/ibm,opal/consoles/serial@0");
prlog(PR_NOTICE, "FSPCON: default console set to SOL/DVS\n");
}
Expand Down
14 changes: 3 additions & 11 deletions hw/lpc-uart.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2013-2018 IBM Corp.
/* Copyright 2013-2014 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -438,12 +438,7 @@ static void uart_setup_os_passthrough(void)

dt_add_property_strings(uart_node, "status", "ok");
path = dt_get_path(uart_node);


dt_add_property_string(dt_chosen, "stdout-path", path);
if (proc_gen < proc_gen_p9)
dt_add_property_string(dt_chosen, "linux,stdout-path", path);

dt_add_property_string(dt_chosen, "linux,stdout-path", path);
free(path);

/* Setup LPC client for OS interrupts */
Expand All @@ -465,11 +460,8 @@ static void uart_setup_opal_console(void)
/* Add the opal console node */
add_opal_console_node(0, "raw", OUT_BUF_SIZE);

dt_add_property_string(dt_chosen, "stdout-path",
dt_add_property_string(dt_chosen, "linux,stdout-path",
"/ibm,opal/consoles/serial@0");
if (proc_gen < proc_gen_p9)
dt_add_property_string(dt_chosen, "linux,stdout-path",
"/ibm,opal/consoles/serial@0");

/*
* We mark the UART as reserved since we don't want the
Expand Down

0 comments on commit 217f74b

Please sign in to comment.