RE: [PATCH 1/2] tty: serial: imx: add lock for registers save/restore

2018-09-04 Thread Anson Huang
x > > Subject: Re: [PATCH 1/2] tty: serial: imx: add lock for registers save/restore > > Hello, > > On Thu, Aug 09, 2018 at 06:06:08PM +0800, Anson Huang wrote: > > In noirq suspend/resume stage with no_console_suspend enabled, > > .imx_console_write() may be ca

RE: [PATCH 1/2] tty: serial: imx: add lock for registers save/restore

2018-09-04 Thread Anson Huang
x > > Subject: Re: [PATCH 1/2] tty: serial: imx: add lock for registers save/restore > > Hello, > > On Thu, Aug 09, 2018 at 06:06:08PM +0800, Anson Huang wrote: > > In noirq suspend/resume stage with no_console_suspend enabled, > > .imx_console_write() may be ca

Re: [PATCH 1/2] tty: serial: imx: add lock for registers save/restore

2018-09-04 Thread Uwe Kleine-König
Hello, On Thu, Aug 09, 2018 at 06:06:08PM +0800, Anson Huang wrote: > In noirq suspend/resume stage with no_console_suspend enabled, > .imx_console_write() may be called to print out log_buf > message by .printk(), so there will be race condition between > .imx_console_write() and

Re: [PATCH 1/2] tty: serial: imx: add lock for registers save/restore

2018-09-04 Thread Uwe Kleine-König
Hello, On Thu, Aug 09, 2018 at 06:06:08PM +0800, Anson Huang wrote: > In noirq suspend/resume stage with no_console_suspend enabled, > .imx_console_write() may be called to print out log_buf > message by .printk(), so there will be race condition between > .imx_console_write() and

[PATCH 1/2] tty: serial: imx: add lock for registers save/restore

2018-08-09 Thread Anson Huang
In noirq suspend/resume stage with no_console_suspend enabled, .imx_console_write() may be called to print out log_buf message by .printk(), so there will be race condition between .imx_console_write() and .serial_imx_save/restore_context(), need to add lock to protect the registers save/restore

[PATCH 1/2] tty: serial: imx: add lock for registers save/restore

2018-08-09 Thread Anson Huang
In noirq suspend/resume stage with no_console_suspend enabled, .imx_console_write() may be called to print out log_buf message by .printk(), so there will be race condition between .imx_console_write() and .serial_imx_save/restore_context(), need to add lock to protect the registers save/restore