Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-18 Thread Sumit Garg
On Mon, 17 Aug 2020 at 20:02, Daniel Thompson wrote: > > On Mon, Aug 17, 2020 at 07:53:55PM +0530, Sumit Garg wrote: > > On Mon, 17 Aug 2020 at 19:27, Doug Anderson wrote: > > > > > > Hi, > > > > > > On Mon, Aug 17, 2020 at 5:27 AM Sumit Garg wrote: > > > > > > > > Thanks for your suggestion, ir

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-18 Thread Sumit Garg
On Mon, 17 Aug 2020 at 19:58, Daniel Thompson wrote: > > On Mon, Aug 17, 2020 at 05:57:03PM +0530, Sumit Garg wrote: > > On Fri, 14 Aug 2020 at 19:43, Daniel Thompson > > wrote: > > > On Fri, Aug 14, 2020 at 04:47:11PM +0530, Sumit Garg wrote: > > > Does it look better if you create a new type to

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-17 Thread Daniel Thompson
On Mon, Aug 17, 2020 at 07:53:55PM +0530, Sumit Garg wrote: > On Mon, 17 Aug 2020 at 19:27, Doug Anderson wrote: > > > > Hi, > > > > On Mon, Aug 17, 2020 at 5:27 AM Sumit Garg wrote: > > > > > > Thanks for your suggestion, irq_work_schedule() looked even better > > > without any overhead, see bel

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-17 Thread Daniel Thompson
On Mon, Aug 17, 2020 at 05:57:03PM +0530, Sumit Garg wrote: > On Fri, 14 Aug 2020 at 19:43, Daniel Thompson > wrote: > > On Fri, Aug 14, 2020 at 04:47:11PM +0530, Sumit Garg wrote: > > Does it look better if you create a new type to map the two structures > > together. Alternatively are there enou

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-17 Thread Sumit Garg
On Mon, 17 Aug 2020 at 19:27, Doug Anderson wrote: > > Hi, > > On Mon, Aug 17, 2020 at 5:27 AM Sumit Garg wrote: > > > > Thanks for your suggestion, irq_work_schedule() looked even better > > without any overhead, see below: > > > > diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-17 Thread Doug Anderson
Hi, On Mon, Aug 17, 2020 at 5:27 AM Sumit Garg wrote: > > Thanks for your suggestion, irq_work_schedule() looked even better > without any overhead, see below: > > diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h > index 3082378..1eade89 100644 > --- a/include/linux/irq_work.h > +

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-17 Thread Sumit Garg
On Fri, 14 Aug 2020 at 20:14, Doug Anderson wrote: > > Hi, > > On Fri, Aug 14, 2020 at 4:17 AM Sumit Garg wrote: > > > > On Thu, 13 Aug 2020 at 20:08, Doug Anderson wrote: > > > > > > Hi, > > > > > > On Thu, Aug 13, 2020 at 7:19 AM Sumit Garg wrote: > > > > > > > > On Thu, 13 Aug 2020 at 05:29,

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-17 Thread Sumit Garg
On Fri, 14 Aug 2020 at 19:43, Daniel Thompson wrote: > > On Fri, Aug 14, 2020 at 04:47:11PM +0530, Sumit Garg wrote: > > On Thu, 13 Aug 2020 at 20:08, Doug Anderson wrote: > > > > > > Hi, > > > > > > On Thu, Aug 13, 2020 at 7:19 AM Sumit Garg wrote: > > > > > > > > On Thu, 13 Aug 2020 at 05:29,

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-14 Thread Doug Anderson
Hi, On Fri, Aug 14, 2020 at 4:17 AM Sumit Garg wrote: > > On Thu, 13 Aug 2020 at 20:08, Doug Anderson wrote: > > > > Hi, > > > > On Thu, Aug 13, 2020 at 7:19 AM Sumit Garg wrote: > > > > > > On Thu, 13 Aug 2020 at 05:29, Doug Anderson wrote: > > > > > > > > Hi, > > > > > > > > On Tue, Jul 21,

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-14 Thread Daniel Thompson
On Fri, Aug 14, 2020 at 04:47:11PM +0530, Sumit Garg wrote: > On Thu, 13 Aug 2020 at 20:08, Doug Anderson wrote: > > > > Hi, > > > > On Thu, Aug 13, 2020 at 7:19 AM Sumit Garg wrote: > > > > > > On Thu, 13 Aug 2020 at 05:29, Doug Anderson wrote: > > > > > > > > Hi, > > > > > > > > On Tue, Jul 21

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-14 Thread Sumit Garg
On Thu, 13 Aug 2020 at 20:08, Doug Anderson wrote: > > Hi, > > On Thu, Aug 13, 2020 at 7:19 AM Sumit Garg wrote: > > > > On Thu, 13 Aug 2020 at 05:29, Doug Anderson wrote: > > > > > > Hi, > > > > > > On Tue, Jul 21, 2020 at 5:11 AM Sumit Garg wrote: > > > > > > > > Add NMI framework APIs in ser

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-13 Thread Doug Anderson
Hi, On Thu, Aug 13, 2020 at 7:19 AM Sumit Garg wrote: > > On Thu, 13 Aug 2020 at 05:29, Doug Anderson wrote: > > > > Hi, > > > > On Tue, Jul 21, 2020 at 5:11 AM Sumit Garg wrote: > > > > > > Add NMI framework APIs in serial core which can be leveraged by serial > > > drivers to have NMI driven

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-13 Thread Sumit Garg
On Thu, 13 Aug 2020 at 05:29, Doug Anderson wrote: > > Hi, > > On Tue, Jul 21, 2020 at 5:11 AM Sumit Garg wrote: > > > > Add NMI framework APIs in serial core which can be leveraged by serial > > drivers to have NMI driven serial transfers. These APIs are kept under > > CONFIG_CONSOLE_POLL as cur

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-12 Thread Doug Anderson
Hi, On Tue, Jul 21, 2020 at 5:11 AM Sumit Garg wrote: > > Add NMI framework APIs in serial core which can be leveraged by serial > drivers to have NMI driven serial transfers. These APIs are kept under > CONFIG_CONSOLE_POLL as currently kgdb initializing uart in polling mode > is the only known u

[RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-07-21 Thread Sumit Garg
Add NMI framework APIs in serial core which can be leveraged by serial drivers to have NMI driven serial transfers. These APIs are kept under CONFIG_CONSOLE_POLL as currently kgdb initializing uart in polling mode is the only known user to enable NMI driven serial port. The general idea is to inte