Re: [PATCH 1/3] acpi: Provide default GPE handler if the firmware doesn't

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 09 November 2009, Matthew Garrett wrote:
> Firmware may support using GPEs for system wakeup without providing any
> runtime GPE handlers. This prevents the use runtime power management on
> these devices even if the hardware supports it. This patch adds support
> for providing default GPE handlers if the firmware doesn't, allowing us
> to implement runtime power management on machines where it would be
> otherwise impossible.
> 
> This implementation adds basic support for Intel chipsets.

Do I think correctly it's based on top of the run-time PM patches?

> Signed-off-by: Matthew Garrett <mjg@xxxxxxxxxx>
> ---
>  drivers/pci/pci-acpi.c |  119 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 119 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index dae90cc..7fff59c 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -879,6 +879,124 @@ static struct acpi_bus_type acpi_pci_bus = {
>  	.find_bridge = acpi_pci_find_root_bridge,
>  };
>  
...
> +
> +static acpi_status acpi_pci_pme_notify(void *context)
> +{
> +	struct work_struct *work = kzalloc(sizeof(struct work_struct),
> +					   GFP_ATOMIC);

kzalloc(sizeof(*work), ...) would save you a few characters. :-)

> +
> +	if (work) {
> +		INIT_WORK(work, context);
> +		schedule_work(work);

Hmm.  Not sure if putting that into pm_wq wouldn't be better.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux