* [PATCH-tty-testing] tty/serial/8250: Add has_sysrq to plat_serial8250_port
@ 2019-12-18 4:01 Dmitry Safonov
2019-12-18 6:50 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Safonov @ 2019-12-18 4:01 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Dmitry Safonov, Dmitry Safonov, kbuild test robot,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
linuxppc-dev
In contrast to 8250/8250_of, legacy_serial on powerpc does fill
(struct plat_serial8250_port). The reason is likely that it's done on
device_initcall(), not on probe. So, 8250_core is not yet probed.
Propagate value from platform_device on 8250 probe - in case powepc
legacy driver it's initialized on initcall, in case 8250_of it will be
initialized later on of_platform_serial_setup().
Fixes: ea2683bf546c ("tty/serial: Migrate 8250_fsl to use has_sysrq").
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
---
It's probably better to squash this into the 8250_fsl patch.
I've added Fixes tag in case the branch won't be rebased.
Tested powerpc build manually with ppc64 cross-compiler.
drivers/tty/serial/8250/8250_core.c | 1 +
include/linux/serial_8250.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index e682390ce0de..0894a22fd702 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -816,6 +816,7 @@ static int serial8250_probe(struct platform_device *dev)
uart.port.flags = p->flags;
uart.port.mapbase = p->mapbase;
uart.port.hub6 = p->hub6;
+ uart.port.has_sysrq = p->has_sysrq;
uart.port.private_data = p->private_data;
uart.port.type = p->type;
uart.port.serial_in = p->serial_in;
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index bb2bc99388ca..6a8e8c48c882 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -25,6 +25,7 @@ struct plat_serial8250_port {
unsigned char regshift; /* register shift */
unsigned char iotype; /* UPIO_* */
unsigned char hub6;
+ unsigned char has_sysrq; /* supports magic SysRq */
upf_t flags; /* UPF_* flags */
unsigned int type; /* If UPF_FIXED_TYPE */
unsigned int (*serial_in)(struct uart_port *, int);
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH-tty-testing] tty/serial/8250: Add has_sysrq to plat_serial8250_port
2019-12-18 4:01 [PATCH-tty-testing] tty/serial/8250: Add has_sysrq to plat_serial8250_port Dmitry Safonov
@ 2019-12-18 6:50 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-18 6:50 UTC (permalink / raw)
To: Dmitry Safonov
Cc: linux-kernel, Dmitry Safonov, kbuild test robot,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
linuxppc-dev
On Wed, Dec 18, 2019 at 04:01:11AM +0000, Dmitry Safonov wrote:
> In contrast to 8250/8250_of, legacy_serial on powerpc does fill
> (struct plat_serial8250_port). The reason is likely that it's done on
> device_initcall(), not on probe. So, 8250_core is not yet probed.
>
> Propagate value from platform_device on 8250 probe - in case powepc
> legacy driver it's initialized on initcall, in case 8250_of it will be
> initialized later on of_platform_serial_setup().
>
> Fixes: ea2683bf546c ("tty/serial: Migrate 8250_fsl to use has_sysrq").
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Dmitry Safonov <dima@arista.com>
> ---
> It's probably better to squash this into the 8250_fsl patch.
> I've added Fixes tag in case the branch won't be rebased.
> Tested powerpc build manually with ppc64 cross-compiler.
I have squashed this into that original 8250_fsl patch now, and rebased
the series. Let's see what kbuild does...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-18 6:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 4:01 [PATCH-tty-testing] tty/serial/8250: Add has_sysrq to plat_serial8250_port Dmitry Safonov
2019-12-18 6:50 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).