* [PATCH] tty/vt: Remove printable variable
@ 2022-08-26 20:24 Daniel Vetter
2022-08-26 21:00 ` Sam Ravnborg
2022-08-29 8:21 ` Jiri Slaby
0 siblings, 2 replies; 6+ messages in thread
From: Daniel Vetter @ 2022-08-26 20:24 UTC (permalink / raw)
To: LKML
Cc: Yangxi Xiang, Daniel Vetter, Daniel Vetter, Xuezhi Zhang,
nick black, DRI Development, Tetsuo Handa, Greg Kroah-Hartman,
Ilpo Järvinen, Jiri Slaby
Every since the 0.99.7A release when console_register() was introduced
it's become impossible to call vt_console_print (called
console_print() back then still) directly. Which means the
initialization issue this variable protected against is no more.
Give it a send off with style and let it rest in peace.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: nick black <dankamongmen@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Yangxi Xiang <xyangxi5@gmail.com>
Cc: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
---
drivers/tty/vt/vt.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index ae9c926acd6f..4d29e4a17db7 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -157,7 +157,6 @@ static void set_palette(struct vc_data *vc);
#define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)
-static int printable; /* Is console ready for printing? */
int default_utf8 = true;
module_param(default_utf8, int, S_IRUGO | S_IWUSR);
int global_cursor_default = -1;
@@ -3085,8 +3084,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
int kmsg_console;
/* console busy or not yet initialized */
- if (!printable)
- return;
if (!spin_trylock(&printing_lock))
return;
@@ -3537,7 +3534,6 @@ static int __init con_init(void)
pr_info("Console: %s %s %dx%d\n",
vc->vc_can_do_color ? "colour" : "mono",
display_desc, vc->vc_cols, vc->vc_rows);
- printable = 1;
console_unlock();
--
2.37.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] tty/vt: Remove printable variable
2022-08-26 20:24 [PATCH] tty/vt: Remove printable variable Daniel Vetter
@ 2022-08-26 21:00 ` Sam Ravnborg
2022-08-29 8:21 ` Jiri Slaby
1 sibling, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2022-08-26 21:00 UTC (permalink / raw)
To: Daniel Vetter
Cc: Yangxi Xiang, Tetsuo Handa, Greg Kroah-Hartman, nick black,
DRI Development, LKML, Xuezhi Zhang, Daniel Vetter, Jiri Slaby,
Ilpo Järvinen
Hi Daniel,
On Fri, Aug 26, 2022 at 10:24:19PM +0200, Daniel Vetter wrote:
> Every since the 0.99.7A release when console_register() was introduced
> it's become impossible to call vt_console_print (called
> console_print() back then still) directly. Which means the
> initialization issue this variable protected against is no more.
>
> Give it a send off with style and let it rest in peace.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
> Cc: nick black <dankamongmen@gmail.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: Yangxi Xiang <xyangxi5@gmail.com>
> Cc: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
> ---
> drivers/tty/vt/vt.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index ae9c926acd6f..4d29e4a17db7 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -157,7 +157,6 @@ static void set_palette(struct vc_data *vc);
>
> #define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)
>
> -static int printable; /* Is console ready for printing? */
> int default_utf8 = true;
> module_param(default_utf8, int, S_IRUGO | S_IWUSR);
> int global_cursor_default = -1;
> @@ -3085,8 +3084,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
> int kmsg_console;
>
> /* console busy or not yet initialized */
> - if (!printable)
> - return;
> if (!spin_trylock(&printing_lock))
> return;
Speaking on locks - it the printing_lock necessary. Or will the caller
serialize the calls to write()?
Sam
>
> @@ -3537,7 +3534,6 @@ static int __init con_init(void)
> pr_info("Console: %s %s %dx%d\n",
> vc->vc_can_do_color ? "colour" : "mono",
> display_desc, vc->vc_cols, vc->vc_rows);
> - printable = 1;
>
> console_unlock();
>
> --
> 2.37.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tty/vt: Remove printable variable
2022-08-26 20:24 [PATCH] tty/vt: Remove printable variable Daniel Vetter
2022-08-26 21:00 ` Sam Ravnborg
@ 2022-08-29 8:21 ` Jiri Slaby
1 sibling, 0 replies; 6+ messages in thread
From: Jiri Slaby @ 2022-08-29 8:21 UTC (permalink / raw)
To: Daniel Vetter, LKML
Cc: Yangxi Xiang, Tetsuo Handa, Greg Kroah-Hartman, Xuezhi Zhang,
nick black, DRI Development, Ilpo Järvinen, Daniel Vetter
On 26. 08. 22, 22:24, Daniel Vetter wrote:
> Every since the 0.99.7A release when console_register() was introduced
> it's become impossible to call vt_console_print (called
> console_print() back then still) directly. Which means the
> initialization issue this variable protected against is no more.
>
> Give it a send off with style and let it rest in peace.
FWIW:
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
In hopes, nothing breaks.
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
> Cc: nick black <dankamongmen@gmail.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: Yangxi Xiang <xyangxi5@gmail.com>
> Cc: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
> ---
> drivers/tty/vt/vt.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index ae9c926acd6f..4d29e4a17db7 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -157,7 +157,6 @@ static void set_palette(struct vc_data *vc);
>
> #define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)
>
> -static int printable; /* Is console ready for printing? */
> int default_utf8 = true;
> module_param(default_utf8, int, S_IRUGO | S_IWUSR);
> int global_cursor_default = -1;
> @@ -3085,8 +3084,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
> int kmsg_console;
>
> /* console busy or not yet initialized */
> - if (!printable)
> - return;
> if (!spin_trylock(&printing_lock))
> return;
>
> @@ -3537,7 +3534,6 @@ static int __init con_init(void)
> pr_info("Console: %s %s %dx%d\n",
> vc->vc_can_do_color ? "colour" : "mono",
> display_desc, vc->vc_cols, vc->vc_rows);
> - printable = 1;
>
> console_unlock();
>
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tty/vt: Remove printable variable
2022-08-30 13:41 ` [PATCH] tty/vt: Remove printable variable Daniel Vetter
2022-08-30 14:51 ` Daniel Vetter
@ 2022-08-30 17:13 ` Sam Ravnborg
1 sibling, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2022-08-30 17:13 UTC (permalink / raw)
To: Daniel Vetter
Cc: Yangxi Xiang, Tetsuo Handa, Greg Kroah-Hartman, nick black,
DRI Development, LKML, Xuezhi Zhang, Daniel Vetter, Jiri Slaby,
Ilpo Järvinen
Hi Daniel,
On Tue, Aug 30, 2022 at 03:41:17PM +0200, Daniel Vetter wrote:
> Every since the 0.99.7A release when console_register() was introduced
> it's become impossible to call vt_console_print (called
> console_print() back then still) directly. Which means the
> initialization issue this variable protected against is no more.
>
> Give it a send off with style and let it rest in peace.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
> Cc: nick black <dankamongmen@gmail.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: Yangxi Xiang <xyangxi5@gmail.com>
> Cc: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
I saw this was sent again on accident, but that sdoes not prevent me
from adding a:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
I was a bit reluctant to r-b it, but well this looks obviously correct,
so ...
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tty/vt: Remove printable variable
2022-08-30 13:41 ` [PATCH] tty/vt: Remove printable variable Daniel Vetter
@ 2022-08-30 14:51 ` Daniel Vetter
2022-08-30 17:13 ` Sam Ravnborg
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2022-08-30 14:51 UTC (permalink / raw)
To: LKML
Cc: Yangxi Xiang, Daniel Vetter, Daniel Vetter, Xuezhi Zhang,
nick black, DRI Development, Tetsuo Handa, Greg Kroah-Hartman,
Ilpo Järvinen, Jiri Slaby
On Tue, Aug 30, 2022 at 03:41:17PM +0200, Daniel Vetter wrote:
> Every since the 0.99.7A release when console_register() was introduced
> it's become impossible to call vt_console_print (called
> console_print() back then still) directly. Which means the
> initialization issue this variable protected against is no more.
>
> Give it a send off with style and let it rest in peace.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
> Cc: nick black <dankamongmen@gmail.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: Yangxi Xiang <xyangxi5@gmail.com>
> Cc: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
Please disregard this, sent it accidentally instead of v2 of "tty/vt: Add
console_lock check to vt_console_print()".
-Daniel
> ---
> drivers/tty/vt/vt.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index ae9c926acd6f..4d29e4a17db7 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -157,7 +157,6 @@ static void set_palette(struct vc_data *vc);
>
> #define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)
>
> -static int printable; /* Is console ready for printing? */
> int default_utf8 = true;
> module_param(default_utf8, int, S_IRUGO | S_IWUSR);
> int global_cursor_default = -1;
> @@ -3085,8 +3084,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
> int kmsg_console;
>
> /* console busy or not yet initialized */
> - if (!printable)
> - return;
> if (!spin_trylock(&printing_lock))
> return;
>
> @@ -3537,7 +3534,6 @@ static int __init con_init(void)
> pr_info("Console: %s %s %dx%d\n",
> vc->vc_can_do_color ? "colour" : "mono",
> display_desc, vc->vc_cols, vc->vc_rows);
> - printable = 1;
>
> console_unlock();
>
> --
> 2.37.2
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] tty/vt: Remove printable variable
2022-08-30 13:28 [PATCH] tty/vt: Add console_lock check to vt_console_print() Daniel Vetter
@ 2022-08-30 13:41 ` Daniel Vetter
2022-08-30 14:51 ` Daniel Vetter
2022-08-30 17:13 ` Sam Ravnborg
0 siblings, 2 replies; 6+ messages in thread
From: Daniel Vetter @ 2022-08-30 13:41 UTC (permalink / raw)
To: LKML
Cc: Yangxi Xiang, Daniel Vetter, Daniel Vetter, Xuezhi Zhang,
nick black, DRI Development, Tetsuo Handa, Greg Kroah-Hartman,
Ilpo Järvinen, Jiri Slaby
Every since the 0.99.7A release when console_register() was introduced
it's become impossible to call vt_console_print (called
console_print() back then still) directly. Which means the
initialization issue this variable protected against is no more.
Give it a send off with style and let it rest in peace.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: nick black <dankamongmen@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Yangxi Xiang <xyangxi5@gmail.com>
Cc: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
---
drivers/tty/vt/vt.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index ae9c926acd6f..4d29e4a17db7 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -157,7 +157,6 @@ static void set_palette(struct vc_data *vc);
#define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)
-static int printable; /* Is console ready for printing? */
int default_utf8 = true;
module_param(default_utf8, int, S_IRUGO | S_IWUSR);
int global_cursor_default = -1;
@@ -3085,8 +3084,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
int kmsg_console;
/* console busy or not yet initialized */
- if (!printable)
- return;
if (!spin_trylock(&printing_lock))
return;
@@ -3537,7 +3534,6 @@ static int __init con_init(void)
pr_info("Console: %s %s %dx%d\n",
vc->vc_can_do_color ? "colour" : "mono",
display_desc, vc->vc_cols, vc->vc_rows);
- printable = 1;
console_unlock();
--
2.37.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-30 17:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 20:24 [PATCH] tty/vt: Remove printable variable Daniel Vetter
2022-08-26 21:00 ` Sam Ravnborg
2022-08-29 8:21 ` Jiri Slaby
2022-08-30 13:28 [PATCH] tty/vt: Add console_lock check to vt_console_print() Daniel Vetter
2022-08-30 13:41 ` [PATCH] tty/vt: Remove printable variable Daniel Vetter
2022-08-30 14:51 ` Daniel Vetter
2022-08-30 17:13 ` Sam Ravnborg
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).