All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Block <bebl@mageta.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Lan Tianyu <tianyu.lan@intel.com>
Cc: lenb@kernel.org, davem@davemloft.net, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: Run fixed button devices' notify callback in the process context
Date: Fri, 22 Aug 2014 19:59:50 +0200	[thread overview]
Message-ID: <53F78516.3040607@mageta.org> (raw)
In-Reply-To: <3313221.quKCYo2xmm@vostro.rjw.lan>

[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]

On 08/22/2014 07:33 PM, Rafael J. Wysocki wrote:
> On Friday, August 22, 2014 03:37:55 PM Lan Tianyu wrote:
>> Currently fixed button devices' notify callbacks are running in the
>> interrupt context. It's not necessary and prevent calling functions
>> with mutex lock(E,G evaluating ACPI method). Otherwise, it's different
>> with non-fixed button device whose notify callback is running in the process
>> context. This patch is to make fixed button device's notify
>> callback in the process context and this also can avoid dead lock
>> when using netlink to report button event to user space.
> 
> I guess this is the main reason for the patch?
> 
> Is there a bug report regarding this?
>

There is: https://lkml.org/lkml/2014/8/21/606

> 
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>> ---
>>  drivers/acpi/scan.c | 9 +++++++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
>> index 0a817ad..bfb7fc5 100644
>> --- a/drivers/acpi/scan.c
>> +++ b/drivers/acpi/scan.c
>> @@ -922,12 +922,17 @@ static void acpi_device_notify(acpi_handle handle, u32 event, void *data)
>>  	device->driver->ops.notify(device, event);
>>  }
>>  
>> -static acpi_status acpi_device_notify_fixed(void *data)
>> +static void acpi_device_notify_fixed_run(void *data)
>>  {
>>  	struct acpi_device *device = data;
>>  
>> -	/* Fixed hardware devices have no handles */
>>  	acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device);
>> +}
>> +
>> +static acpi_status acpi_device_notify_fixed(void *data)
>> +{
>> +	/* Fixed hardware devices have no handles */
>> +	acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_device_notify_fixed_run, data);
>>  	return AE_OK;
>>  }
>>  
>>
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 648 bytes --]

  reply	other threads:[~2014-08-22 18:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22  7:37 [PATCH] ACPI: Run fixed button devices' notify callback in the process context Lan Tianyu
2014-08-22  7:41 ` Lan Tianyu
2014-08-22 17:33 ` Rafael J. Wysocki
2014-08-22 17:59   ` Benjamin Block [this message]
2014-08-25 23:33     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53F78516.3040607@mageta.org \
    --to=bebl@mageta.org \
    --cc=davem@davemloft.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tianyu.lan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.