Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1635186 > unrolled thread
| Started by | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| First post | 2017-05-03 20:20 +0200 |
| Last post | 2017-05-03 21:50 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/4] console: move console_init() out of tty_io.c Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-03 20:20 +0200
Re: [PATCH 1/4] console: move console_init() out of tty_io.c Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-03 21:10 +0200
Re: [PATCH 1/4] console: move console_init() out of tty_io.c Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-03 21:20 +0200
Re: [PATCH 1/4] console: move console_init() out of tty_io.c Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-03 21:50 +0200
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-05-03 20:20 +0200 |
| Subject | Re: [PATCH 1/4] console: move console_init() out of tty_io.c |
| Message-ID | <tD72x-wQ-5@gated-at.bofh.it> |
+Cc: Petr
On Thu, Apr 13, 2017 at 1:37 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> All the console driver handling code lives in printk.c.
> Move console_init() there as well so console support can still be used
> when the TTY code is configured out. No logical changes from this patch.
>
So, I missed cover letter.
The question is what is this all for and why it's not applied yet?
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
> ---
> drivers/tty/tty_io.c | 24 ------------------------
> include/linux/console.h | 2 ++
> include/linux/tty.h | 7 ++++---
> init/main.c | 2 +-
> kernel/printk/printk.c | 24 ++++++++++++++++++++++++
> 5 files changed, 31 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index e6d1a65108..2100295861 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -3578,30 +3578,6 @@ void tty_default_fops(struct file_operations *fops)
> *fops = tty_fops;
> }
>
> -/*
> - * Initialize the console device. This is called *early*, so
> - * we can't necessarily depend on lots of kernel help here.
> - * Just do some early initializations, and do the complex setup
> - * later.
> - */
> -void __init console_init(void)
> -{
> - initcall_t *call;
> -
> - /* Setup the default TTY line discipline. */
> - n_tty_init();
> -
> - /*
> - * set up the console device so that later boot sequences can
> - * inform about problems etc..
> - */
> - call = __con_initcall_start;
> - while (call < __con_initcall_end) {
> - (*call)();
> - call++;
> - }
> -}
> -
> static char *tty_devnode(struct device *dev, umode_t *mode)
> {
> if (!mode)
> diff --git a/include/linux/console.h b/include/linux/console.h
> index 5949d18555..b8920a031a 100644
> --- a/include/linux/console.h
> +++ b/include/linux/console.h
> @@ -212,4 +212,6 @@ extern bool vgacon_text_force(void);
> static inline bool vgacon_text_force(void) { return false; }
> #endif
>
> +extern void console_init(void);
> +
> #endif /* _LINUX_CONSOLE_H */
> diff --git a/include/linux/tty.h b/include/linux/tty.h
> index 1017e904c0..f1106d7c73 100644
> --- a/include/linux/tty.h
> +++ b/include/linux/tty.h
> @@ -390,7 +390,6 @@ static inline bool tty_throttled(struct tty_struct *tty)
> }
>
> #ifdef CONFIG_TTY
> -extern void console_init(void);
> extern void tty_kref_put(struct tty_struct *tty);
> extern struct pid *tty_get_pgrp(struct tty_struct *tty);
> extern void tty_vhangup_self(void);
> @@ -402,8 +401,6 @@ extern struct tty_struct *get_current_tty(void);
> extern int __init tty_init(void);
> extern const char *tty_name(const struct tty_struct *tty);
> #else
> -static inline void console_init(void)
> -{ }
> static inline void tty_kref_put(struct tty_struct *tty)
> { }
> static inline struct pid *tty_get_pgrp(struct tty_struct *tty)
> @@ -669,7 +666,11 @@ extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
>
> /* n_tty.c */
> extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops);
> +#ifdef CONFIG_TTY
> extern void __init n_tty_init(void);
> +#else
> +static inline void n_tty_init(void) { }
> +#endif
>
> /* tty_audit.c */
> #ifdef CONFIG_AUDIT
> diff --git a/init/main.c b/init/main.c
> index f9c9d99482..b9bd0edf21 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -27,7 +27,7 @@
> #include <linux/initrd.h>
> #include <linux/bootmem.h>
> #include <linux/acpi.h>
> -#include <linux/tty.h>
> +#include <linux/console.h>
> #include <linux/nmi.h>
> #include <linux/percpu.h>
> #include <linux/kmod.h>
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 2984fb0f02..3a09406526 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2611,6 +2611,30 @@ int unregister_console(struct console *console)
> EXPORT_SYMBOL(unregister_console);
>
> /*
> + * Initialize the console device. This is called *early*, so
> + * we can't necessarily depend on lots of kernel help here.
> + * Just do some early initializations, and do the complex setup
> + * later.
> + */
> +void __init console_init(void)
> +{
> + initcall_t *call;
> +
> + /* Setup the default TTY line discipline. */
> + n_tty_init();
> +
> + /*
> + * set up the console device so that later boot sequences can
> + * inform about problems etc..
> + */
> + call = __con_initcall_start;
> + while (call < __con_initcall_end) {
> + (*call)();
> + call++;
> + }
> +}
> +
> +/*
> * Some boot consoles access data that is in the init section and which will
> * be discarded after the initcalls have been run. To make sure that no code
> * will access this data, unregister the boot consoles in a late initcall.
> --
> 2.9.3
>
--
With Best Regards,
Andy Shevchenko
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-05-03 21:10 +0200 |
| Message-ID | <tD7OW-13Q-11@gated-at.bofh.it> |
| In reply to | #1635186 |
On Wed, May 03, 2017 at 09:13:51PM +0300, Andy Shevchenko wrote: > +Cc: Petr > > On Thu, Apr 13, 2017 at 1:37 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote: > > All the console driver handling code lives in printk.c. > > Move console_init() there as well so console support can still be used > > when the TTY code is configured out. No logical changes from this patch. > > > > So, I missed cover letter. > The question is what is this all for and why it's not applied yet? It's in my tty tree to go to Linus for 4.12-rc1, why do you think it is not applied? thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-05-03 21:20 +0200 |
| Message-ID | <tD7YC-18T-7@gated-at.bofh.it> |
| In reply to | #1635221 |
On Wed, May 3, 2017 at 10:06 PM, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > On Wed, May 03, 2017 at 09:13:51PM +0300, Andy Shevchenko wrote: >> +Cc: Petr >> >> On Thu, Apr 13, 2017 at 1:37 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote: >> > All the console driver handling code lives in printk.c. >> > Move console_init() there as well so console support can still be used >> > when the TTY code is configured out. No logical changes from this patch. >> > >> >> So, I missed cover letter. >> The question is what is this all for and why it's not applied yet? > > It's in my tty tree to go to Linus for 4.12-rc1, Ah, good. > why do you think it is > not applied? I have a tree based on top of most recent linux-next with (potentially) conflicting patches. Besides that I just grepped the code and found no changes in today's linux-next. -- With Best Regards, Andy Shevchenko
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-05-03 21:50 +0200 |
| Message-ID | <tD8rE-1jm-9@gated-at.bofh.it> |
| In reply to | #1635226 |
On Wed, May 03, 2017 at 10:16:00PM +0300, Andy Shevchenko wrote: > On Wed, May 3, 2017 at 10:06 PM, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > > On Wed, May 03, 2017 at 09:13:51PM +0300, Andy Shevchenko wrote: > >> +Cc: Petr > >> > >> On Thu, Apr 13, 2017 at 1:37 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote: > >> > All the console driver handling code lives in printk.c. > >> > Move console_init() there as well so console support can still be used > >> > when the TTY code is configured out. No logical changes from this patch. > >> > > >> > >> So, I missed cover letter. > >> The question is what is this all for and why it's not applied yet? > > > > It's in my tty tree to go to Linus for 4.12-rc1, > > Ah, good. > > > why do you think it is > > not applied? > > I have a tree based on top of most recent linux-next with > (potentially) conflicting patches. Besides that I just grepped the > code and found no changes in today's linux-next. Ah crap! I never pushed that tree out to the world, it was stuck on my laptop... Ugh, doing that now... greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web