Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-28 Thread Darren Hart
On Wed, Jun 28, 2017 at 06:30:44AM +0200, Michał Kępień wrote: > > On Sat, Jun 24, 2017 at 02:25:46AM +0200, Rafael Wysocki wrote: > > > On Wednesday, June 21, 2017 11:15:43 AM Darren Hart wrote: > > > > On Fri, Jun 16, 2017 at 06:40:52AM +0200, Michał Kępień wrote: > > > > > All ACPI device notify

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-27 Thread Michał Kępień
> On Sat, Jun 24, 2017 at 02:25:46AM +0200, Rafael Wysocki wrote: > > On Wednesday, June 21, 2017 11:15:43 AM Darren Hart wrote: > > > On Fri, Jun 16, 2017 at 06:40:52AM +0200, Michał Kępień wrote: > > > > All ACPI device notify callbacks are invoked using acpi_os_execute(), > > > > which causes th

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-27 Thread Jonathan Woithe
On Mon, Jun 26, 2017 at 05:07:18PM -0700, Darren Hart wrote: > On Sat, Jun 24, 2017 at 02:25:46AM +0200, Rafael Wysocki wrote: > > > Rafael, the above rationale appears sound to me. Do you have any concerns? > > > > I actually do. > > > > While this is the case today, making the driver code depen

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-26 Thread Darren Hart
On Sat, Jun 24, 2017 at 02:25:46AM +0200, Rafael Wysocki wrote: > On Wednesday, June 21, 2017 11:15:43 AM Darren Hart wrote: > > On Fri, Jun 16, 2017 at 06:40:52AM +0200, Michał Kępień wrote: > > > All ACPI device notify callbacks are invoked using acpi_os_execute(), > > > which causes the supplied

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-23 Thread Rafael J. Wysocki
On Wednesday, June 21, 2017 11:15:43 AM Darren Hart wrote: > On Fri, Jun 16, 2017 at 06:40:52AM +0200, Michał Kępień wrote: > > All ACPI device notify callbacks are invoked using acpi_os_execute(), > > which causes the supplied callback to be queued to a static workqueue > > which always executes o

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-22 Thread Darren Hart
On Fri, Jun 23, 2017 at 09:44:58AM +0930, Jonathan Woithe wrote: > On Thu, Jun 22, 2017 at 04:58:09PM -0700, Darren Hart wrote: > > On Thu, Jun 22, 2017 at 10:46:19PM +0200, Micha?? K??pie?? wrote: > > > > The events seen by userspace with the original code would be "A-press", > > > > "B-press", "A

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-22 Thread Jonathan Woithe
On Thu, Jun 22, 2017 at 04:58:09PM -0700, Darren Hart wrote: > On Thu, Jun 22, 2017 at 10:46:19PM +0200, Micha?? K??pie?? wrote: > > > The events seen by userspace with the original code would be "A-press", > > > "B-press", "A-release", "B-release". With the revised code the order of > > > the >

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-22 Thread Darren Hart
On Thu, Jun 22, 2017 at 10:46:19PM +0200, Michał Kępień wrote: > > The events seen by userspace with the original code would be "A-press", > > "B-press", "A-release", "B-release". With the revised code the order of the > > release events would be reversed compared to the previous behaviour. That

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-22 Thread Michał Kępień
> Hi Darren > > On Wed, Jun 21, 2017 at 07:44:13PM -0700, Darren Hart wrote: > > > I think the buffer size could probably be reduced a little without > > > impacting > > > on functionality. I suspect the value was chosen so as to be well above > > > the > > > number of events which could be gen

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-22 Thread Michał Kępień
> On Fri, Jun 16, 2017 at 06:40:52AM +0200, Michał Kępień wrote: > > All ACPI device notify callbacks are invoked using acpi_os_execute(), > > which causes the supplied callback to be queued to a static workqueue > > which always executes on CPU 0. This means that there is no possibility > > for a

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-21 Thread Jonathan Woithe
Hi Darren On Wed, Jun 21, 2017 at 07:44:13PM -0700, Darren Hart wrote: > > I think the buffer size could probably be reduced a little without impacting > > on functionality. I suspect the value was chosen so as to be well above the > > number of events which could be generated ahead of a button r

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-21 Thread Darren Hart
On Thu, Jun 22, 2017 at 09:20:21AM +0930, Jonathan Woithe wrote: > On Wed, Jun 21, 2017 at 11:15:43AM -0700, Darren Hart wrote: > > On Fri, Jun 16, 2017 at 06:40:52AM +0200, Micha?? K??pie?? wrote: > > > -#define RINGBUFFERSIZE 40 > > > > > > /* Debugging */ > > > #define FUJLAPTOP_DBG_ERROR

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-21 Thread Jonathan Woithe
On Wed, Jun 21, 2017 at 11:15:43AM -0700, Darren Hart wrote: > On Fri, Jun 16, 2017 at 06:40:52AM +0200, Micha?? K??pie?? wrote: > > -#define RINGBUFFERSIZE 40 > > > > /* Debugging */ > > #define FUJLAPTOP_DBG_ERROR 0x0001 > > @@ -146,8 +144,8 @@ struct fujitsu_laptop { > > struct

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-21 Thread Darren Hart
On Fri, Jun 16, 2017 at 06:40:52AM +0200, Michał Kępień wrote: > All ACPI device notify callbacks are invoked using acpi_os_execute(), > which causes the supplied callback to be queued to a static workqueue > which always executes on CPU 0. This means that there is no possibility > for any ACPI de

[PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes

2017-06-15 Thread Michał Kępień
All ACPI device notify callbacks are invoked using acpi_os_execute(), which causes the supplied callback to be queued to a static workqueue which always executes on CPU 0. This means that there is no possibility for any ACPI device notify callback to be concurrently executed on multiple CPUs, whic