* [PATCH 1/2] serial: bfin_5xx: add missing spin_lock init
@ 2009-06-13 0:48 Mike Frysinger
2009-06-13 0:48 ` [PATCH 2/2] serial: bfin_5xx: fix building as module when early printk is enabled Mike Frysinger
2009-06-22 21:53 ` [PATCH 1/2] serial: bfin_5xx: add missing spin_lock init Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-06-13 0:48 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel, uclinux-dist-devel
The Blackfin serial driver never initialized the spin_lock that is part of
the serial core structure, but we never noticed because spin_lock's are
rarely enabled on UP systems. Yeah lockdep and friends.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/serial/bfin_5xx.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index e2f6b1b..d7fcca1 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -1110,6 +1110,7 @@ static void __init bfin_serial_init_ports(void)
bfin_serial_hw_init();
for (i = 0; i < nr_active_ports; i++) {
+ spin_lock_init(&bfin_serial_ports[i].port.lock);
bfin_serial_ports[i].port.uartclk = get_sclk();
bfin_serial_ports[i].port.fifosize = BFIN_UART_TX_FIFO_SIZE;
bfin_serial_ports[i].port.ops = &bfin_serial_pops;
--
1.6.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] serial: bfin_5xx: fix building as module when early printk is enabled
2009-06-13 0:48 [PATCH 1/2] serial: bfin_5xx: add missing spin_lock init Mike Frysinger
@ 2009-06-13 0:48 ` Mike Frysinger
2009-06-22 21:54 ` Andrew Morton
2009-06-22 21:53 ` [PATCH 1/2] serial: bfin_5xx: add missing spin_lock init Andrew Morton
1 sibling, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2009-06-13 0:48 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel, uclinux-dist-devel
Since early printk only makes sense/works when the serial driver is built
into the kernel, disable the option for this driver when it is going to be
built as a module. Otherwise we get build failures due to the ifdef
handling.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/serial/bfin_5xx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index d7fcca1..b4a7650 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -38,6 +38,10 @@
#include <asm/cacheflush.h>
#endif
+#ifdef CONFIG_SERIAL_BFIN_MODULE
+# undef CONFIG_EARLY_PRINTK
+#endif
+
/* UART name and device definitions */
#define BFIN_SERIAL_NAME "ttyBF"
#define BFIN_SERIAL_MAJOR 204
--
1.6.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] serial: bfin_5xx: add missing spin_lock init
2009-06-13 0:48 [PATCH 1/2] serial: bfin_5xx: add missing spin_lock init Mike Frysinger
2009-06-13 0:48 ` [PATCH 2/2] serial: bfin_5xx: fix building as module when early printk is enabled Mike Frysinger
@ 2009-06-22 21:53 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2009-06-22 21:53 UTC (permalink / raw)
To: Mike Frysinger; +Cc: alan, linux-kernel, uclinux-dist-devel
On Fri, 12 Jun 2009 20:48:12 -0400
Mike Frysinger <vapier@gentoo.org> wrote:
> The Blackfin serial driver never initialized the spin_lock that is part of
> the serial core structure, but we never noticed because spin_lock's are
> rarely enabled on UP systems. Yeah lockdep and friends.
>
I'm sitting here wondering if we need this in -stable, but the changlog
failed to provide sufficient information to determine this.
> drivers/serial/bfin_5xx.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
> index e2f6b1b..d7fcca1 100644
> --- a/drivers/serial/bfin_5xx.c
> +++ b/drivers/serial/bfin_5xx.c
> @@ -1110,6 +1110,7 @@ static void __init bfin_serial_init_ports(void)
> bfin_serial_hw_init();
>
> for (i = 0; i < nr_active_ports; i++) {
> + spin_lock_init(&bfin_serial_ports[i].port.lock);
> bfin_serial_ports[i].port.uartclk = get_sclk();
> bfin_serial_ports[i].port.fifosize = BFIN_UART_TX_FIFO_SIZE;
> bfin_serial_ports[i].port.ops = &bfin_serial_pops;
It _should_ be possible to do this initialisation at compile-time. But
I expect it would be hard and/or ugly.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] serial: bfin_5xx: fix building as module when early printk is enabled
2009-06-13 0:48 ` [PATCH 2/2] serial: bfin_5xx: fix building as module when early printk is enabled Mike Frysinger
@ 2009-06-22 21:54 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2009-06-22 21:54 UTC (permalink / raw)
To: Mike Frysinger; +Cc: alan, linux-kernel, uclinux-dist-devel
On Fri, 12 Jun 2009 20:48:13 -0400
Mike Frysinger <vapier@gentoo.org> wrote:
> Since early printk only makes sense/works when the serial driver is built
> into the kernel, disable the option for this driver when it is going to be
> built as a module. Otherwise we get build failures due to the ifdef
> handling.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> drivers/serial/bfin_5xx.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
> index d7fcca1..b4a7650 100644
> --- a/drivers/serial/bfin_5xx.c
> +++ b/drivers/serial/bfin_5xx.c
> @@ -38,6 +38,10 @@
> #include <asm/cacheflush.h>
> #endif
>
> +#ifdef CONFIG_SERIAL_BFIN_MODULE
> +# undef CONFIG_EARLY_PRINTK
> +#endif
> +
> /* UART name and device definitions */
> #define BFIN_SERIAL_NAME "ttyBF"
> #define BFIN_SERIAL_MAJOR 204
And that _does_ look like -stable material.
Alan, I queued both these as to-be-merged-by-you. So if you want me to
stfu and merge them, please let me know.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-22 21:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-13 0:48 [PATCH 1/2] serial: bfin_5xx: add missing spin_lock init Mike Frysinger
2009-06-13 0:48 ` [PATCH 2/2] serial: bfin_5xx: fix building as module when early printk is enabled Mike Frysinger
2009-06-22 21:54 ` Andrew Morton
2009-06-22 21:53 ` [PATCH 1/2] serial: bfin_5xx: add missing spin_lock init Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox