linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console
@ 2017-08-23 11:20 Shubhrajyoti Datta
  2017-08-23 23:24 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Shubhrajyoti Datta @ 2017-08-23 11:20 UTC (permalink / raw)
  To: linux-serial, linux-kernel
  Cc: gregkh, michal.simek, shubhrajyoti.datta, Shubhrajyoti Datta

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
 drivers/tty/serial/xilinx_uartps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index ff1b115..a239343 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1647,7 +1647,7 @@ static void __exit cdns_uart_exit(void)
 	uart_unregister_driver(&cdns_uart_uart_driver);
 }
 
-module_init(cdns_uart_init);
+arch_initcall(cdns_uart_init);
 module_exit(cdns_uart_exit);
 
 MODULE_DESCRIPTION("Driver for Cadence UART");
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console
  2017-08-23 11:20 [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console Shubhrajyoti Datta
@ 2017-08-23 23:24 ` Greg KH
  2017-08-24  9:32   ` Michal Simek
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2017-08-23 23:24 UTC (permalink / raw)
  To: Shubhrajyoti Datta
  Cc: linux-serial, linux-kernel, michal.simek, shubhrajyoti.datta

On Wed, Aug 23, 2017 at 04:50:21PM +0530, Shubhrajyoti Datta wrote:
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

I can't take patches without any changelog text at all :(

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console
  2017-08-23 23:24 ` Greg KH
@ 2017-08-24  9:32   ` Michal Simek
  2017-08-31 12:59     ` Linus Walleij
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Simek @ 2017-08-24  9:32 UTC (permalink / raw)
  To: Greg KH, Shubhrajyoti Datta, Linus Walleij
  Cc: linux-serial, linux-kernel, michal.simek, shubhrajyoti.datta

Hi, +Linus

On 24.8.2017 01:24, Greg KH wrote:
> On Wed, Aug 23, 2017 at 04:50:21PM +0530, Shubhrajyoti Datta wrote:
>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> 
> I can't take patches without any changelog text at all :(

ok. I see you have also commented this.

Anyway this is kind of old discussion about moving serial drivers to
arch_initcall from module_init.

There is one patch in the tree.

commit 4dd9e742df98f8f600b4302d3adbb087a68237f7
Author:     Alessandro Rubini <rubini@gnudd.com>
AuthorDate: Tue May 5 05:54:13 2009 +0100
Commit:     Russell King <rmk+kernel@arm.linux.org.uk>
CommitDate: Sun May 31 14:58:11 2009 +0100

    [ARM] 5505/1: serial amba-pl011: move to arch_initcall for earlier
console

    Signed-off-by: Alessandro Rubini <rubini@unipv.it>"
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


and then there was one patch (also sent to linux-serial but don't have link)
https://patches.linaro.org/patch/14633/

where that discussion wasn't finished.


There is one more patch which does that without real description for
this change.
commit ce87122911f8db59d3c2bc355c694c7a38940804
Author:     Vladimir Murzin <vladimir.murzin@arm.com>
AuthorDate: Tue Jun 7 16:02:37 2016 +0100
Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CommitDate: Sat Jun 25 14:01:57 2016 -0700

    serial: mps2-uart: make driver explicitly non-modular


Most of drivers are using module_init and only some of them arch_initcall.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console
  2017-08-24  9:32   ` Michal Simek
@ 2017-08-31 12:59     ` Linus Walleij
  2017-09-06 12:43       ` Michal Simek
  0 siblings, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2017-08-31 12:59 UTC (permalink / raw)
  To: Michal Simek
  Cc: Greg KH, Shubhrajyoti Datta, linux-serial, linux-kernel,
	shubhrajyoti.datta

On Thu, Aug 24, 2017 at 11:32 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> On 24.8.2017 01:24, Greg KH wrote:
>> On Wed, Aug 23, 2017 at 04:50:21PM +0530, Shubhrajyoti Datta wrote:
>>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
>>
>> I can't take patches without any changelog text at all :(
>
> ok. I see you have also commented this.
>
> Anyway this is kind of old discussion about moving serial drivers to
> arch_initcall from module_init.
>
> There is one patch in the tree.
>
> commit 4dd9e742df98f8f600b4302d3adbb087a68237f7
> Author:     Alessandro Rubini <rubini@gnudd.com>
> AuthorDate: Tue May 5 05:54:13 2009 +0100
> Commit:     Russell King <rmk+kernel@arm.linux.org.uk>
> CommitDate: Sun May 31 14:58:11 2009 +0100
>
>     [ARM] 5505/1: serial amba-pl011: move to arch_initcall for earlier
> console
>
>     Signed-off-by: Alessandro Rubini <rubini@unipv.it>"
>     Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
>
> and then there was one patch (also sent to linux-serial but don't have link)
> https://patches.linaro.org/patch/14633/
>
> where that discussion wasn't finished.

Yeah Alessandro never came back on that.

I *guess* it is to get the console up really early, simply becaus it is
quite helpful for spotting early boot problems.

It is not for earlydebug, because for that we use another routine
that hammers out the characters on the console. That is what we use
before even going to console, with printascii(), I usually use a patch
like this:

--- a/init/main.c
+++ b/init/main.c
@@ -515,6 +515,12 @@ asmlinkage __visible void __init start_kernel(void)
        smp_setup_processor_id();
        debug_objects_early_init();

+#ifdef CONFIG_ARM
+       {
+         extern void printascii(char *);
+         printascii("start_kernel\n");
+       }
+#endif
        /*
         * Set up the initial canary ASAP:
         */
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index fc47863f629c..85edd1401406 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1726,6 +1726,13 @@ asmlinkage int vprintk_emit(int facility, int level,
                lflags |= LOG_NEWLINE;
        }

+#ifdef CONFIG_ARM
+       {
+               extern void printascii(char *);
+               printascii(textbuf);
+       }
+#endif
+
        /* strip kernel syslog prefix and extract log level or control flags */
        if (facility == 0) {
                int kern_level;


Yours,
Linus Walleij

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console
  2017-08-31 12:59     ` Linus Walleij
@ 2017-09-06 12:43       ` Michal Simek
  2017-09-07  6:10         ` Shubhrajyoti Datta
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Simek @ 2017-09-06 12:43 UTC (permalink / raw)
  To: Linus Walleij, Michal Simek
  Cc: Greg KH, Shubhrajyoti Datta, linux-serial, linux-kernel,
	shubhrajyoti.datta

On 31.8.2017 14:59, Linus Walleij wrote:
> On Thu, Aug 24, 2017 at 11:32 AM, Michal Simek <michal.simek@xilinx.com> wrote:
>> On 24.8.2017 01:24, Greg KH wrote:
>>> On Wed, Aug 23, 2017 at 04:50:21PM +0530, Shubhrajyoti Datta wrote:
>>>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
>>>
>>> I can't take patches without any changelog text at all :(
>>
>> ok. I see you have also commented this.
>>
>> Anyway this is kind of old discussion about moving serial drivers to
>> arch_initcall from module_init.
>>
>> There is one patch in the tree.
>>
>> commit 4dd9e742df98f8f600b4302d3adbb087a68237f7
>> Author:     Alessandro Rubini <rubini@gnudd.com>
>> AuthorDate: Tue May 5 05:54:13 2009 +0100
>> Commit:     Russell King <rmk+kernel@arm.linux.org.uk>
>> CommitDate: Sun May 31 14:58:11 2009 +0100
>>
>>     [ARM] 5505/1: serial amba-pl011: move to arch_initcall for earlier
>> console
>>
>>     Signed-off-by: Alessandro Rubini <rubini@unipv.it>"
>>     Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>>
>>
>> and then there was one patch (also sent to linux-serial but don't have link)
>> https://patches.linaro.org/patch/14633/
>>
>> where that discussion wasn't finished.
> 
> Yeah Alessandro never came back on that.
> 
> I *guess* it is to get the console up really early, simply becaus it is
> quite helpful for spotting early boot problems.


ok. It means no concern about the move to arch_initcall.
Shubhrajyoti: Please send v2 with changelog.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console
  2017-09-06 12:43       ` Michal Simek
@ 2017-09-07  6:10         ` Shubhrajyoti Datta
  0 siblings, 0 replies; 7+ messages in thread
From: Shubhrajyoti Datta @ 2017-09-07  6:10 UTC (permalink / raw)
  To: Michal Simek
  Cc: Linus Walleij, Greg KH, Shubhrajyoti Datta, linux-serial, linux-kernel

...
>>
>> I *guess* it is to get the console up really early, simply becaus it is
>> quite helpful for spotting early boot problems.
>
>
> ok. It means no concern about the move to arch_initcall.
> Shubhrajyoti: Please send v2 with changelog.

Will do thanks for the review.

>
> Thanks,
> Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console
       [not found] <1503485752-12888-1-git-send-email-shubhrajyoti.datta@xilinx.com>
@ 2017-08-24  5:55 ` Michal Simek
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2017-08-24  5:55 UTC (permalink / raw)
  To: Shubhrajyoti Datta, linux-serial, linux-kernel
  Cc: gregkh, michal.simek, shubhrajyoti.datta

On 23.8.2017 12:55, Shubhrajyoti Datta wrote:
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

Empty commit message?
What's the reason for this change?

M

> ---
>  drivers/tty/serial/xilinx_uartps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
> index ff1b115..a239343 100644
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -1647,7 +1647,7 @@ static void __exit cdns_uart_exit(void)
>  	uart_unregister_driver(&cdns_uart_uart_driver);
>  }
>  
> -module_init(cdns_uart_init);
> +arch_initcall(cdns_uart_init);
>  module_exit(cdns_uart_exit);
>  
>  MODULE_DESCRIPTION("Driver for Cadence UART");
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-07  6:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 11:20 [PATCH] tty: xilinx_uartps: move to arch_initcall for earlier console Shubhrajyoti Datta
2017-08-23 23:24 ` Greg KH
2017-08-24  9:32   ` Michal Simek
2017-08-31 12:59     ` Linus Walleij
2017-09-06 12:43       ` Michal Simek
2017-09-07  6:10         ` Shubhrajyoti Datta
     [not found] <1503485752-12888-1-git-send-email-shubhrajyoti.datta@xilinx.com>
2017-08-24  5:55 ` Michal Simek

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).