RE: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-06-11 Thread Chintakuntla, Radha

> -Original Message-
> From: Henrique de Moraes Holschuh [mailto:h...@hmh.eng.br]
> Sent: Saturday, May 28, 2016 4:49 AM
> To: Scot Doyle <lkm...@scotdoyle.com>
> Cc: Tomi Valkeinen <tomi.valkei...@ti.com>; Jean-Christophe Plagniol-
> Villard <plagn...@jcrosoft.com>; Greg Kroah-Hartman
> <gre...@linuxfoundation.org>; Jeremy Kerr <j...@ozlabs.org>; Ming Lei
> <ming@canonical.com>; Daney, David <david.da...@cavium.com>;
> Dann Frazier <dann.fraz...@canonical.com>; Peter Hurley
> <pe...@hurleysoftware.com>; Pavel Machek <pa...@ucw.cz>; Jonathan Liu
> <net...@gmail.com>; Alistair Popple <alist...@popple.id.au>; Jean-Philippe
> Brucker <jean-philippe.bruc...@arm.com>; Chintakuntla, Radha
> <radha.chintakun...@cavium.com>; Jiri Slaby <jsl...@suse.com>; David
> Airlie <airl...@linux.ie>; David Daney <ddaney.c...@gmail.com>; dri-
> de...@lists.freedesktop.org; linux-fb...@vger.kernel.org; Linux Kernel
> Mailing List <linux-kernel@vger.kernel.org>; stable
> <sta...@vger.kernel.org>
> Subject: Re: [PATCH] fbcon: warn on invalid cursor blink intervals
> 
> On Fri, 20 May 2016, Scot Doyle wrote:
> > On Fri, 20 May 2016, Jeremy Kerr wrote:
> > > >Then looks there are two fix patches acked & tested:
> > > >
> > > > - the patch in this thread
> > > > - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
> > > >blink timer."
> > > > https://lkml.org/lkml/2016/5/17/455
> > > >
> > > >So which one will be pushed to linus?
> > >
> > > Not that it's my call, but we may want both; the first as a safety
> > > measure to prevent an invalid cur_blink_jiffies ever being set, and the
> > > second one to actually fix the initialisation of vc_cur_blink_ms (and
> > > address the warning introduced by the first).
> >
> > Tomi / Greg,
> >
> > I'd suggest
> > - applying "tty: vt: Fix soft lockup in fbcon cursor blink timer." to 4.7 
> > and
> stable[4.2]
> > - applying "fbcon: warn on invalid cursor blink intervals" to 4.7
> > - ignoring "fbcon: use default if cursor blink interval is not valid"
> >
> > Note: the patches don't depend on each other
> 
> I applied both recommended patches on top of 4.4.11 for testing, and they
> made things a lot better here.
> 
> I suggest the second patch should be backported to stable too, might as well
> fix this thing for good *and keep the door closed*.

Is this patch available on some tree so that I can point to ?
And hope it will make it to linux-next soon ?

> 
> --
>   "One disk to rule them all, One disk to find them. One disk to bring
>   them all and in the darkness grind them. In the Land of Redmond
>   where the shadows lie." -- The Silicon Valley Tarot
>   Henrique Holschuh


RE: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-06-11 Thread Chintakuntla, Radha

> -Original Message-
> From: Henrique de Moraes Holschuh [mailto:h...@hmh.eng.br]
> Sent: Saturday, May 28, 2016 4:49 AM
> To: Scot Doyle 
> Cc: Tomi Valkeinen ; Jean-Christophe Plagniol-
> Villard ; Greg Kroah-Hartman
> ; Jeremy Kerr ; Ming Lei
> ; Daney, David ;
> Dann Frazier ; Peter Hurley
> ; Pavel Machek ; Jonathan Liu
> ; Alistair Popple ; Jean-Philippe
> Brucker ; Chintakuntla, Radha
> ; Jiri Slaby ; David
> Airlie ; David Daney ; dri-
> de...@lists.freedesktop.org; linux-fb...@vger.kernel.org; Linux Kernel
> Mailing List ; stable
> 
> Subject: Re: [PATCH] fbcon: warn on invalid cursor blink intervals
> 
> On Fri, 20 May 2016, Scot Doyle wrote:
> > On Fri, 20 May 2016, Jeremy Kerr wrote:
> > > >Then looks there are two fix patches acked & tested:
> > > >
> > > > - the patch in this thread
> > > > - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
> > > >blink timer."
> > > > https://lkml.org/lkml/2016/5/17/455
> > > >
> > > >So which one will be pushed to linus?
> > >
> > > Not that it's my call, but we may want both; the first as a safety
> > > measure to prevent an invalid cur_blink_jiffies ever being set, and the
> > > second one to actually fix the initialisation of vc_cur_blink_ms (and
> > > address the warning introduced by the first).
> >
> > Tomi / Greg,
> >
> > I'd suggest
> > - applying "tty: vt: Fix soft lockup in fbcon cursor blink timer." to 4.7 
> > and
> stable[4.2]
> > - applying "fbcon: warn on invalid cursor blink intervals" to 4.7
> > - ignoring "fbcon: use default if cursor blink interval is not valid"
> >
> > Note: the patches don't depend on each other
> 
> I applied both recommended patches on top of 4.4.11 for testing, and they
> made things a lot better here.
> 
> I suggest the second patch should be backported to stable too, might as well
> fix this thing for good *and keep the door closed*.

Is this patch available on some tree so that I can point to ?
And hope it will make it to linux-next soon ?

> 
> --
>   "One disk to rule them all, One disk to find them. One disk to bring
>   them all and in the darkness grind them. In the Land of Redmond
>   where the shadows lie." -- The Silicon Valley Tarot
>   Henrique Holschuh


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-28 Thread Henrique de Moraes Holschuh
On Fri, 20 May 2016, Scot Doyle wrote:
> On Fri, 20 May 2016, Jeremy Kerr wrote:
> > >Then looks there are two fix patches acked & tested:
> > >
> > > - the patch in this thread
> > > - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
> > >blink timer."
> > > https://lkml.org/lkml/2016/5/17/455
> > >
> > >So which one will be pushed to linus?
> > 
> > Not that it's my call, but we may want both; the first as a safety
> > measure to prevent an invalid cur_blink_jiffies ever being set, and the
> > second one to actually fix the initialisation of vc_cur_blink_ms (and
> > address the warning introduced by the first).
> 
> Tomi / Greg,
> 
> I'd suggest
> - applying "tty: vt: Fix soft lockup in fbcon cursor blink timer." to 4.7 and 
> stable[4.2]
> - applying "fbcon: warn on invalid cursor blink intervals" to 4.7
> - ignoring "fbcon: use default if cursor blink interval is not valid"
> 
> Note: the patches don't depend on each other

I applied both recommended patches on top of 4.4.11 for testing, and they
made things a lot better here.

I suggest the second patch should be backported to stable too, might as well
fix this thing for good *and keep the door closed*.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-28 Thread Henrique de Moraes Holschuh
On Fri, 20 May 2016, Scot Doyle wrote:
> On Fri, 20 May 2016, Jeremy Kerr wrote:
> > >Then looks there are two fix patches acked & tested:
> > >
> > > - the patch in this thread
> > > - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
> > >blink timer."
> > > https://lkml.org/lkml/2016/5/17/455
> > >
> > >So which one will be pushed to linus?
> > 
> > Not that it's my call, but we may want both; the first as a safety
> > measure to prevent an invalid cur_blink_jiffies ever being set, and the
> > second one to actually fix the initialisation of vc_cur_blink_ms (and
> > address the warning introduced by the first).
> 
> Tomi / Greg,
> 
> I'd suggest
> - applying "tty: vt: Fix soft lockup in fbcon cursor blink timer." to 4.7 and 
> stable[4.2]
> - applying "fbcon: warn on invalid cursor blink intervals" to 4.7
> - ignoring "fbcon: use default if cursor blink interval is not valid"
> 
> Note: the patches don't depend on each other

I applied both recommended patches on top of 4.4.11 for testing, and they
made things a lot better here.

I suggest the second patch should be backported to stable too, might as well
fix this thing for good *and keep the door closed*.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-28 Thread Henrique de Moraes Holschuh
On Thu, 19 May 2016, Scot Doyle wrote:
> Two systems are locking on boot [1] because ops->cur_blink_jiffies
> is set to zero from vc->vc_cur_blink_ms.
> 
> Ignore such invalid intervals and log a warning.
> 
> [1] https://bugs.launchpad.net/bugs/1574814
> 
> Suggested-by: David Daney 
> Signed-off-by: Scot Doyle 
> Cc:  [v4.2]

FWIW:
Tested-by: Henrique de Moraes Holschuh  on top of 4.4.11.

And nothing caused it to issue warnings here, so far (with the other
recommended patch applied first).

> ---
>  drivers/video/console/fbcon.c | 14 --
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> index 6e92917..fad5b89 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
>   con_copy_unimap(vc, svc);
>  
>   ops = info->fbcon_par;
> - ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> +
> + if (vc->vc_cur_blink_ms >= 50)
> + ops->cur_blink_jiffies =
> + msecs_to_jiffies(vc->vc_cur_blink_ms);
> + else
> + WARN_ONCE(1, "blink interval < 50 ms");
> +
>   p->con_rotate = initial_rotation;
>   set_blitting_type(vc, info);
>  
> @@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
>   int y;
>   int c = scr_readw((u16 *) vc->vc_pos);
>  
> - ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> + if (vc->vc_cur_blink_ms >= 50)
> + ops->cur_blink_jiffies =
> + msecs_to_jiffies(vc->vc_cur_blink_ms);
> + else
> + WARN_ONCE(1, "blink interval < 50 ms");
>  
>   if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
>   return;

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-28 Thread Henrique de Moraes Holschuh
On Thu, 19 May 2016, Scot Doyle wrote:
> Two systems are locking on boot [1] because ops->cur_blink_jiffies
> is set to zero from vc->vc_cur_blink_ms.
> 
> Ignore such invalid intervals and log a warning.
> 
> [1] https://bugs.launchpad.net/bugs/1574814
> 
> Suggested-by: David Daney 
> Signed-off-by: Scot Doyle 
> Cc:  [v4.2]

FWIW:
Tested-by: Henrique de Moraes Holschuh  on top of 4.4.11.

And nothing caused it to issue warnings here, so far (with the other
recommended patch applied first).

> ---
>  drivers/video/console/fbcon.c | 14 --
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> index 6e92917..fad5b89 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
>   con_copy_unimap(vc, svc);
>  
>   ops = info->fbcon_par;
> - ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> +
> + if (vc->vc_cur_blink_ms >= 50)
> + ops->cur_blink_jiffies =
> + msecs_to_jiffies(vc->vc_cur_blink_ms);
> + else
> + WARN_ONCE(1, "blink interval < 50 ms");
> +
>   p->con_rotate = initial_rotation;
>   set_blitting_type(vc, info);
>  
> @@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
>   int y;
>   int c = scr_readw((u16 *) vc->vc_pos);
>  
> - ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> + if (vc->vc_cur_blink_ms >= 50)
> + ops->cur_blink_jiffies =
> + msecs_to_jiffies(vc->vc_cur_blink_ms);
> + else
> + WARN_ONCE(1, "blink interval < 50 ms");
>  
>   if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
>   return;

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-23 Thread Scot Doyle
On Fri, 20 May 2016, Scot Doyle wrote:
> On Fri, 20 May 2016, Jeremy Kerr wrote:
> > Hi Ming,
> > 
> > >Then looks there are two fix patches acked & tested:
> > >
> > > - the patch in this thread
> > > - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
> > >blink timer."
> > > https://lkml.org/lkml/2016/5/17/455
> > >
> > >So which one will be pushed to linus?
> > 
> > Not that it's my call, but we may want both; the first as a safety
> > measure to prevent an invalid cur_blink_jiffies ever being set, and the
> > second one to actually fix the initialisation of vc_cur_blink_ms (and
> > address the warning introduced by the first).
> 
> Tomi / Greg,
> 
> I'd suggest
> - applying "tty: vt: Fix soft lockup in fbcon cursor blink timer." to 4.7 and 
> stable[4.2]
> - applying "fbcon: warn on invalid cursor blink intervals" to 4.7
> - ignoring "fbcon: use default if cursor blink interval is not valid"
> 
> Note: the patches don't depend on each other

"tty: vt: Fix soft lockup..." should be applied first in order to avoid 
unnecessary reports due to the log warning in "fbcon: warn on invalid..."

> 
> > I guess we could just go with the latter for stable...
> >
> > Cheers,
> > 
> > Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-23 Thread Scot Doyle
On Fri, 20 May 2016, Scot Doyle wrote:
> On Fri, 20 May 2016, Jeremy Kerr wrote:
> > Hi Ming,
> > 
> > >Then looks there are two fix patches acked & tested:
> > >
> > > - the patch in this thread
> > > - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
> > >blink timer."
> > > https://lkml.org/lkml/2016/5/17/455
> > >
> > >So which one will be pushed to linus?
> > 
> > Not that it's my call, but we may want both; the first as a safety
> > measure to prevent an invalid cur_blink_jiffies ever being set, and the
> > second one to actually fix the initialisation of vc_cur_blink_ms (and
> > address the warning introduced by the first).
> 
> Tomi / Greg,
> 
> I'd suggest
> - applying "tty: vt: Fix soft lockup in fbcon cursor blink timer." to 4.7 and 
> stable[4.2]
> - applying "fbcon: warn on invalid cursor blink intervals" to 4.7
> - ignoring "fbcon: use default if cursor blink interval is not valid"
> 
> Note: the patches don't depend on each other

"tty: vt: Fix soft lockup..." should be applied first in order to avoid 
unnecessary reports due to the log warning in "fbcon: warn on invalid..."

> 
> > I guess we could just go with the latter for stable...
> >
> > Cheers,
> > 
> > Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-20 Thread Scot Doyle
On Fri, 20 May 2016, Jeremy Kerr wrote:
> Hi Ming,
> 
> >Then looks there are two fix patches acked & tested:
> >
> > - the patch in this thread
> > - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
> >blink timer."
> > https://lkml.org/lkml/2016/5/17/455
> >
> >So which one will be pushed to linus?
> 
> Not that it's my call, but we may want both; the first as a safety
> measure to prevent an invalid cur_blink_jiffies ever being set, and the
> second one to actually fix the initialisation of vc_cur_blink_ms (and
> address the warning introduced by the first).

Tomi / Greg,

I'd suggest
- applying "tty: vt: Fix soft lockup in fbcon cursor blink timer." to 4.7 and 
stable[4.2]
- applying "fbcon: warn on invalid cursor blink intervals" to 4.7
- ignoring "fbcon: use default if cursor blink interval is not valid"

Note: the patches don't depend on each other


> I guess we could just go with the latter for stable...
>
> Cheers,
> 
> Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-20 Thread Scot Doyle
On Fri, 20 May 2016, Jeremy Kerr wrote:
> Hi Ming,
> 
> >Then looks there are two fix patches acked & tested:
> >
> > - the patch in this thread
> > - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
> >blink timer."
> > https://lkml.org/lkml/2016/5/17/455
> >
> >So which one will be pushed to linus?
> 
> Not that it's my call, but we may want both; the first as a safety
> measure to prevent an invalid cur_blink_jiffies ever being set, and the
> second one to actually fix the initialisation of vc_cur_blink_ms (and
> address the warning introduced by the first).

Tomi / Greg,

I'd suggest
- applying "tty: vt: Fix soft lockup in fbcon cursor blink timer." to 4.7 and 
stable[4.2]
- applying "fbcon: warn on invalid cursor blink intervals" to 4.7
- ignoring "fbcon: use default if cursor blink interval is not valid"

Note: the patches don't depend on each other


> I guess we could just go with the latter for stable...
>
> Cheers,
> 
> Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Jeremy Kerr
Hi Ming,

>Then looks there are two fix patches acked & tested:
>
> - the patch in this thread
> - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
>blink timer."
> https://lkml.org/lkml/2016/5/17/455
>
>So which one will be pushed to linus?

Not that it's my call, but we may want both; the first as a safety
measure to prevent an invalid cur_blink_jiffies ever being set, and the
second one to actually fix the initialisation of vc_cur_blink_ms (and
address the warning introduced by the first).

I guess we could just go with the latter for stable...

Cheers,


Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Jeremy Kerr
Hi Ming,

>Then looks there are two fix patches acked & tested:
>
> - the patch in this thread
> - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
>blink timer."
> https://lkml.org/lkml/2016/5/17/455
>
>So which one will be pushed to linus?

Not that it's my call, but we may want both; the first as a safety
measure to prevent an invalid cur_blink_jiffies ever being set, and the
second one to actually fix the initialisation of vc_cur_blink_ms (and
address the warning introduced by the first).

I guess we could just go with the latter for stable...

Cheers,


Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Ming Lei
On Fri, May 20, 2016 at 10:26 AM, Jeremy Kerr  wrote:
> Hi Ming,
>
>> Not sure this one is needed for stable because it justs dumps
>> a warning, and not set a valid period to ops->cur_blink_jiffies.
>>
>> So I guess other fix patch is still required for the soft lockup
>> issue, right?
>
> The main thing is that we don't set cur_blink_jiffies to the < 50ms
> value. As far as I can tell, it means we'll still get the original
> default, set in fbcon_startup():
>
> ops->cur_blink_jiffies = HZ / 5;
>
> And so don't end up spinning on the timer expiry.

Jeremy, your theory is correct, thanks for your clarification! And my test
just shows that this patch does fix the soft lockup too, so

  Tested-by: Ming Lei 

Then looks there are two fix patches acked & tested:

 - the patch in this thread
 - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
blink timer."
 https://lkml.org/lkml/2016/5/17/455

So which one will be pushed to linus?

Thanks,
Ming

>
> Cheers,
>
>
> Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Ming Lei
On Fri, May 20, 2016 at 10:26 AM, Jeremy Kerr  wrote:
> Hi Ming,
>
>> Not sure this one is needed for stable because it justs dumps
>> a warning, and not set a valid period to ops->cur_blink_jiffies.
>>
>> So I guess other fix patch is still required for the soft lockup
>> issue, right?
>
> The main thing is that we don't set cur_blink_jiffies to the < 50ms
> value. As far as I can tell, it means we'll still get the original
> default, set in fbcon_startup():
>
> ops->cur_blink_jiffies = HZ / 5;
>
> And so don't end up spinning on the timer expiry.

Jeremy, your theory is correct, thanks for your clarification! And my test
just shows that this patch does fix the soft lockup too, so

  Tested-by: Ming Lei 

Then looks there are two fix patches acked & tested:

 - the patch in this thread
 - another one "[PATCH] tty: vt: Fix soft lockup in fbcon cursor
blink timer."
 https://lkml.org/lkml/2016/5/17/455

So which one will be pushed to linus?

Thanks,
Ming

>
> Cheers,
>
>
> Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Jeremy Kerr
Hi Ming,

> Not sure this one is needed for stable because it justs dumps
> a warning, and not set a valid period to ops->cur_blink_jiffies.
> 
> So I guess other fix patch is still required for the soft lockup
> issue, right?

The main thing is that we don't set cur_blink_jiffies to the < 50ms
value. As far as I can tell, it means we'll still get the original
default, set in fbcon_startup():

ops->cur_blink_jiffies = HZ / 5;

And so don't end up spinning on the timer expiry.

Cheers,


Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Jeremy Kerr
Hi Ming,

> Not sure this one is needed for stable because it justs dumps
> a warning, and not set a valid period to ops->cur_blink_jiffies.
> 
> So I guess other fix patch is still required for the soft lockup
> issue, right?

The main thing is that we don't set cur_blink_jiffies to the < 50ms
value. As far as I can tell, it means we'll still get the original
default, set in fbcon_startup():

ops->cur_blink_jiffies = HZ / 5;

And so don't end up spinning on the timer expiry.

Cheers,


Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Ming Lei
On Fri, May 20, 2016 at 6:31 AM, Scot Doyle  wrote:
> Two systems are locking on boot [1] because ops->cur_blink_jiffies
> is set to zero from vc->vc_cur_blink_ms.
>
> Ignore such invalid intervals and log a warning.
>
> [1] https://bugs.launchpad.net/bugs/1574814
>
> Suggested-by: David Daney 
> Signed-off-by: Scot Doyle 
> Cc:  [v4.2]

Not sure this one is needed for stable because it justs dumps
a warning, and not set a valid period to ops->cur_blink_jiffies.

So I guess other fix patch is still required for the soft lockup issue, right?

Thanks,

> ---
>  drivers/video/console/fbcon.c | 14 --
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> index 6e92917..fad5b89 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
> con_copy_unimap(vc, svc);
>
> ops = info->fbcon_par;
> -   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> +
> +   if (vc->vc_cur_blink_ms >= 50)
> +   ops->cur_blink_jiffies =
> +   msecs_to_jiffies(vc->vc_cur_blink_ms);
> +   else
> +   WARN_ONCE(1, "blink interval < 50 ms");
> +
> p->con_rotate = initial_rotation;
> set_blitting_type(vc, info);
>
> @@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
> int y;
> int c = scr_readw((u16 *) vc->vc_pos);
>
> -   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> +   if (vc->vc_cur_blink_ms >= 50)
> +   ops->cur_blink_jiffies =
> +   msecs_to_jiffies(vc->vc_cur_blink_ms);
> +   else
> +   WARN_ONCE(1, "blink interval < 50 ms");
>
> if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
> return;
> --
> 2.1.4
>


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Ming Lei
On Fri, May 20, 2016 at 6:31 AM, Scot Doyle  wrote:
> Two systems are locking on boot [1] because ops->cur_blink_jiffies
> is set to zero from vc->vc_cur_blink_ms.
>
> Ignore such invalid intervals and log a warning.
>
> [1] https://bugs.launchpad.net/bugs/1574814
>
> Suggested-by: David Daney 
> Signed-off-by: Scot Doyle 
> Cc:  [v4.2]

Not sure this one is needed for stable because it justs dumps
a warning, and not set a valid period to ops->cur_blink_jiffies.

So I guess other fix patch is still required for the soft lockup issue, right?

Thanks,

> ---
>  drivers/video/console/fbcon.c | 14 --
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> index 6e92917..fad5b89 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
> con_copy_unimap(vc, svc);
>
> ops = info->fbcon_par;
> -   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> +
> +   if (vc->vc_cur_blink_ms >= 50)
> +   ops->cur_blink_jiffies =
> +   msecs_to_jiffies(vc->vc_cur_blink_ms);
> +   else
> +   WARN_ONCE(1, "blink interval < 50 ms");
> +
> p->con_rotate = initial_rotation;
> set_blitting_type(vc, info);
>
> @@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
> int y;
> int c = scr_readw((u16 *) vc->vc_pos);
>
> -   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> +   if (vc->vc_cur_blink_ms >= 50)
> +   ops->cur_blink_jiffies =
> +   msecs_to_jiffies(vc->vc_cur_blink_ms);
> +   else
> +   WARN_ONCE(1, "blink interval < 50 ms");
>
> if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
> return;
> --
> 2.1.4
>


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Jeremy Kerr
Hi Scot,

> Two systems are locking on boot [1] because ops->cur_blink_jiffies
> is set to zero from vc->vc_cur_blink_ms.
> 
> Ignore such invalid intervals and log a warning.

This prevents a lockup on AST BMC machines, but (as expected) generates
a warning against the fbcon driver, which is a significantly better
result.

Tested-by: Jeremy Kerr 

[now to sort out the issue in the ast driver...]

Cheers,


Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Jeremy Kerr
Hi Scot,

> Two systems are locking on boot [1] because ops->cur_blink_jiffies
> is set to zero from vc->vc_cur_blink_ms.
> 
> Ignore such invalid intervals and log a warning.

This prevents a lockup on AST BMC machines, but (as expected) generates
a warning against the fbcon driver, which is a significantly better
result.

Tested-by: Jeremy Kerr 

[now to sort out the issue in the ast driver...]

Cheers,


Jeremy


Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread David Daney

On 05/19/2016 03:31 PM, Scot Doyle wrote:

Two systems are locking on boot [1] because ops->cur_blink_jiffies
is set to zero from vc->vc_cur_blink_ms.

Ignore such invalid intervals and log a warning.

[1] https://bugs.launchpad.net/bugs/1574814

Suggested-by: David Daney 
Signed-off-by: Scot Doyle 
Cc:  [v4.2]


This seems better. I didn't test it, but...

Acked-by: David Daney 



---
  drivers/video/console/fbcon.c | 14 --
  1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 6e92917..fad5b89 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
con_copy_unimap(vc, svc);

ops = info->fbcon_par;
-   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+
+   if (vc->vc_cur_blink_ms >= 50)
+   ops->cur_blink_jiffies =
+   msecs_to_jiffies(vc->vc_cur_blink_ms);
+   else
+   WARN_ONCE(1, "blink interval < 50 ms");
+
p->con_rotate = initial_rotation;
set_blitting_type(vc, info);

@@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
int y;
int c = scr_readw((u16 *) vc->vc_pos);

-   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+   if (vc->vc_cur_blink_ms >= 50)
+   ops->cur_blink_jiffies =
+   msecs_to_jiffies(vc->vc_cur_blink_ms);
+   else
+   WARN_ONCE(1, "blink interval < 50 ms");

if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
return;





Re: [PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread David Daney

On 05/19/2016 03:31 PM, Scot Doyle wrote:

Two systems are locking on boot [1] because ops->cur_blink_jiffies
is set to zero from vc->vc_cur_blink_ms.

Ignore such invalid intervals and log a warning.

[1] https://bugs.launchpad.net/bugs/1574814

Suggested-by: David Daney 
Signed-off-by: Scot Doyle 
Cc:  [v4.2]


This seems better. I didn't test it, but...

Acked-by: David Daney 



---
  drivers/video/console/fbcon.c | 14 --
  1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 6e92917..fad5b89 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
con_copy_unimap(vc, svc);

ops = info->fbcon_par;
-   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+
+   if (vc->vc_cur_blink_ms >= 50)
+   ops->cur_blink_jiffies =
+   msecs_to_jiffies(vc->vc_cur_blink_ms);
+   else
+   WARN_ONCE(1, "blink interval < 50 ms");
+
p->con_rotate = initial_rotation;
set_blitting_type(vc, info);

@@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
int y;
int c = scr_readw((u16 *) vc->vc_pos);

-   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+   if (vc->vc_cur_blink_ms >= 50)
+   ops->cur_blink_jiffies =
+   msecs_to_jiffies(vc->vc_cur_blink_ms);
+   else
+   WARN_ONCE(1, "blink interval < 50 ms");

if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
return;





[PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Scot Doyle
Two systems are locking on boot [1] because ops->cur_blink_jiffies
is set to zero from vc->vc_cur_blink_ms.

Ignore such invalid intervals and log a warning.

[1] https://bugs.launchpad.net/bugs/1574814

Suggested-by: David Daney 
Signed-off-by: Scot Doyle 
Cc:  [v4.2]
---
 drivers/video/console/fbcon.c | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 6e92917..fad5b89 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
con_copy_unimap(vc, svc);
 
ops = info->fbcon_par;
-   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+
+   if (vc->vc_cur_blink_ms >= 50)
+   ops->cur_blink_jiffies =
+   msecs_to_jiffies(vc->vc_cur_blink_ms);
+   else
+   WARN_ONCE(1, "blink interval < 50 ms");
+
p->con_rotate = initial_rotation;
set_blitting_type(vc, info);
 
@@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
int y;
int c = scr_readw((u16 *) vc->vc_pos);
 
-   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+   if (vc->vc_cur_blink_ms >= 50)
+   ops->cur_blink_jiffies =
+   msecs_to_jiffies(vc->vc_cur_blink_ms);
+   else
+   WARN_ONCE(1, "blink interval < 50 ms");
 
if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
return;
-- 
2.1.4



[PATCH] fbcon: warn on invalid cursor blink intervals

2016-05-19 Thread Scot Doyle
Two systems are locking on boot [1] because ops->cur_blink_jiffies
is set to zero from vc->vc_cur_blink_ms.

Ignore such invalid intervals and log a warning.

[1] https://bugs.launchpad.net/bugs/1574814

Suggested-by: David Daney 
Signed-off-by: Scot Doyle 
Cc:  [v4.2]
---
 drivers/video/console/fbcon.c | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 6e92917..fad5b89 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
con_copy_unimap(vc, svc);
 
ops = info->fbcon_par;
-   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+
+   if (vc->vc_cur_blink_ms >= 50)
+   ops->cur_blink_jiffies =
+   msecs_to_jiffies(vc->vc_cur_blink_ms);
+   else
+   WARN_ONCE(1, "blink interval < 50 ms");
+
p->con_rotate = initial_rotation;
set_blitting_type(vc, info);
 
@@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
int y;
int c = scr_readw((u16 *) vc->vc_pos);
 
-   ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+   if (vc->vc_cur_blink_ms >= 50)
+   ops->cur_blink_jiffies =
+   msecs_to_jiffies(vc->vc_cur_blink_ms);
+   else
+   WARN_ONCE(1, "blink interval < 50 ms");
 
if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
return;
-- 
2.1.4