Commit 191c5cf1 authored by Timur Tabi's avatar Timur Tabi Committed by Greg Kroah-Hartman

tty/powerpc: fix build break with ehv_bytechan.c on allyesconfig

The ePAPR hypervisor byte channel driver is supposed to work on all
ePAPR-compliant embedded PowerPC systems, but it had a reference to the MSR_GS
bit, which is available only on Book-E systems.

Also fix a couple integer-to-pointer typecast problems.
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent da4e40e2
...@@ -226,10 +226,6 @@ void __init udbg_init_ehv_bc(void) ...@@ -226,10 +226,6 @@ void __init udbg_init_ehv_bc(void)
unsigned int rx_count, tx_count; unsigned int rx_count, tx_count;
unsigned int ret; unsigned int ret;
/* Check if we're running as a guest of a hypervisor */
if (!(mfmsr() & MSR_GS))
return;
/* Verify the byte channel handle */ /* Verify the byte channel handle */
ret = ev_byte_channel_poll(CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE, ret = ev_byte_channel_poll(CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE,
&rx_count, &tx_count); &rx_count, &tx_count);
...@@ -286,7 +282,7 @@ static int ehv_bc_console_byte_channel_send(unsigned int handle, const char *s, ...@@ -286,7 +282,7 @@ static int ehv_bc_console_byte_channel_send(unsigned int handle, const char *s,
static void ehv_bc_console_write(struct console *co, const char *s, static void ehv_bc_console_write(struct console *co, const char *s,
unsigned int count) unsigned int count)
{ {
unsigned int handle = (unsigned int)co->data; unsigned int handle = (uintptr_t)co->data;
char s2[EV_BYTE_CHANNEL_MAX_BYTES]; char s2[EV_BYTE_CHANNEL_MAX_BYTES];
unsigned int i, j = 0; unsigned int i, j = 0;
char c; char c;
...@@ -352,7 +348,7 @@ static int __init ehv_bc_console_init(void) ...@@ -352,7 +348,7 @@ static int __init ehv_bc_console_init(void)
CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE); CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
#endif #endif
ehv_bc_console.data = (void *)stdout_bc; ehv_bc_console.data = (void *)(uintptr_t)stdout_bc;
/* add_preferred_console() must be called before register_console(), /* add_preferred_console() must be called before register_console(),
otherwise it won't work. However, we don't want to enumerate all the otherwise it won't work. However, we don't want to enumerate all the
......
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