mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 14:02:10 +00:00
tty/hvc_opal: powerpc: Make OPAL HVC device tree accesses endian safe
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
99fc1d91b8
commit
5c94913c5f
@ -329,7 +329,7 @@ static void udbg_init_opal_common(void)
|
||||
void __init hvc_opal_init_early(void)
|
||||
{
|
||||
struct device_node *stdout_node = NULL;
|
||||
const u32 *termno;
|
||||
const __be32 *termno;
|
||||
const char *name = NULL;
|
||||
const struct hv_ops *ops;
|
||||
u32 index;
|
||||
@ -371,7 +371,7 @@ void __init hvc_opal_init_early(void)
|
||||
if (!stdout_node)
|
||||
return;
|
||||
termno = of_get_property(stdout_node, "reg", NULL);
|
||||
index = termno ? *termno : 0;
|
||||
index = termno ? be32_to_cpup(termno) : 0;
|
||||
if (index >= MAX_NR_HVC_CONSOLES)
|
||||
return;
|
||||
hvc_opal_privs[index] = &hvc_opal_boot_priv;
|
||||
|
Loading…
Reference in New Issue
Block a user