mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
Merge branch 'acpica'
* acpica: ACPICA: Events: Enable APIs to allow interrupt/polling adaptive request based GPE handling model ACPICA: Events: Introduce acpi_set_gpe()/acpi_finish_gpe() to reduce divergences ACPICA: Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix 2 issues for the current GPE APIs ACPICA: Update version to 20150204 ACPICA: Update Copyright headers to 2015 ACPICA: Hardware: Cast GPE enable_mask before storing ACPICA: Events: Cleanup GPE dispatcher type obtaining code ACPICA: Events: Cleanup to move acpi_gbl_global_event_handler invocation out of acpi_ev_gpe_dispatch() ACPICA: Events: Cleanup of resetting the GPE handler to NULL before removing ACPICA: Events: Fix uninitialized variable ACPICA: Events: Remove acpi_ev_valid_gpe_event() due to current restriction ACPICA: Events: Remove duplicated sanity check in acpi_ev_enable_gpe() ACPICA: Events: Back port "ACPICA: Save current masks of enabled GPEs after enable register writes" ACPICA: Resources: Provide common part for struct acpi_resource_address structures. ACPI: Introduce acpi_unload_parent_table() usages in Linux kernel ACPICA: take ACPI_MTX_INTERPRETER in acpi_unload_table_id()
This commit is contained in:
commit
55c39fc2b1
@ -69,10 +69,10 @@ static acpi_status find_csr_space(struct acpi_resource *resource, void *data)
|
||||
status = acpi_resource_to_address64(resource, &addr);
|
||||
if (ACPI_SUCCESS(status) &&
|
||||
addr.resource_type == ACPI_MEMORY_RANGE &&
|
||||
addr.address_length &&
|
||||
addr.address.address_length &&
|
||||
addr.producer_consumer == ACPI_CONSUMER) {
|
||||
space->base = addr.minimum;
|
||||
space->length = addr.address_length;
|
||||
space->base = addr.address.minimum;
|
||||
space->length = addr.address.address_length;
|
||||
return AE_CTRL_TERMINATE;
|
||||
}
|
||||
return AE_OK; /* keep looking */
|
||||
|
@ -188,12 +188,12 @@ static u64 add_io_space(struct pci_root_info *info,
|
||||
|
||||
name = (char *)(iospace + 1);
|
||||
|
||||
min = addr->minimum;
|
||||
max = min + addr->address_length - 1;
|
||||
min = addr->address.minimum;
|
||||
max = min + addr->address.address_length - 1;
|
||||
if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION)
|
||||
sparse = 1;
|
||||
|
||||
space_nr = new_space(addr->translation_offset, sparse);
|
||||
space_nr = new_space(addr->address.translation_offset, sparse);
|
||||
if (space_nr == ~0)
|
||||
goto free_resource;
|
||||
|
||||
@ -247,7 +247,7 @@ static acpi_status resource_to_window(struct acpi_resource *resource,
|
||||
if (ACPI_SUCCESS(status) &&
|
||||
(addr->resource_type == ACPI_MEMORY_RANGE ||
|
||||
addr->resource_type == ACPI_IO_RANGE) &&
|
||||
addr->address_length &&
|
||||
addr->address.address_length &&
|
||||
addr->producer_consumer == ACPI_PRODUCER)
|
||||
return AE_OK;
|
||||
|
||||
@ -284,7 +284,7 @@ static acpi_status add_window(struct acpi_resource *res, void *data)
|
||||
if (addr.resource_type == ACPI_MEMORY_RANGE) {
|
||||
flags = IORESOURCE_MEM;
|
||||
root = &iomem_resource;
|
||||
offset = addr.translation_offset;
|
||||
offset = addr.address.translation_offset;
|
||||
} else if (addr.resource_type == ACPI_IO_RANGE) {
|
||||
flags = IORESOURCE_IO;
|
||||
root = &ioport_resource;
|
||||
@ -297,8 +297,8 @@ static acpi_status add_window(struct acpi_resource *res, void *data)
|
||||
resource = &info->res[info->res_num];
|
||||
resource->name = info->name;
|
||||
resource->flags = flags;
|
||||
resource->start = addr.minimum + offset;
|
||||
resource->end = resource->start + addr.address_length - 1;
|
||||
resource->start = addr.address.minimum + offset;
|
||||
resource->end = resource->start + addr.address.address_length - 1;
|
||||
info->res_offset[info->res_num] = offset;
|
||||
|
||||
if (insert_resource(root, resource)) {
|
||||
|
@ -231,23 +231,23 @@ static acpi_status resource_to_addr(struct acpi_resource *resource,
|
||||
case ACPI_RESOURCE_TYPE_MEMORY24:
|
||||
memory24 = &resource->data.memory24;
|
||||
addr->resource_type = ACPI_MEMORY_RANGE;
|
||||
addr->minimum = memory24->minimum;
|
||||
addr->address_length = memory24->address_length;
|
||||
addr->maximum = addr->minimum + addr->address_length - 1;
|
||||
addr->address.minimum = memory24->minimum;
|
||||
addr->address.address_length = memory24->address_length;
|
||||
addr->address.maximum = addr->address.minimum + addr->address.address_length - 1;
|
||||
return AE_OK;
|
||||
case ACPI_RESOURCE_TYPE_MEMORY32:
|
||||
memory32 = &resource->data.memory32;
|
||||
addr->resource_type = ACPI_MEMORY_RANGE;
|
||||
addr->minimum = memory32->minimum;
|
||||
addr->address_length = memory32->address_length;
|
||||
addr->maximum = addr->minimum + addr->address_length - 1;
|
||||
addr->address.minimum = memory32->minimum;
|
||||
addr->address.address_length = memory32->address_length;
|
||||
addr->address.maximum = addr->address.minimum + addr->address.address_length - 1;
|
||||
return AE_OK;
|
||||
case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
|
||||
fixed_memory32 = &resource->data.fixed_memory32;
|
||||
addr->resource_type = ACPI_MEMORY_RANGE;
|
||||
addr->minimum = fixed_memory32->address;
|
||||
addr->address_length = fixed_memory32->address_length;
|
||||
addr->maximum = addr->minimum + addr->address_length - 1;
|
||||
addr->address.minimum = fixed_memory32->address;
|
||||
addr->address.address_length = fixed_memory32->address_length;
|
||||
addr->address.maximum = addr->address.minimum + addr->address.address_length - 1;
|
||||
return AE_OK;
|
||||
case ACPI_RESOURCE_TYPE_ADDRESS16:
|
||||
case ACPI_RESOURCE_TYPE_ADDRESS32:
|
||||
@ -256,7 +256,7 @@ static acpi_status resource_to_addr(struct acpi_resource *resource,
|
||||
if (ACPI_SUCCESS(status) &&
|
||||
(addr->resource_type == ACPI_MEMORY_RANGE ||
|
||||
addr->resource_type == ACPI_IO_RANGE) &&
|
||||
addr->address_length > 0) {
|
||||
addr->address.address_length > 0) {
|
||||
return AE_OK;
|
||||
}
|
||||
break;
|
||||
@ -298,8 +298,8 @@ static acpi_status setup_resource(struct acpi_resource *acpi_res, void *data)
|
||||
} else
|
||||
return AE_OK;
|
||||
|
||||
start = addr.minimum + addr.translation_offset;
|
||||
orig_end = end = addr.maximum + addr.translation_offset;
|
||||
start = addr.address.minimum + addr.address.translation_offset;
|
||||
orig_end = end = addr.address.maximum + addr.address.translation_offset;
|
||||
|
||||
/* Exclude non-addressable range or non-addressable portion of range */
|
||||
end = min(end, (u64)iomem_resource.end);
|
||||
@ -320,7 +320,7 @@ static acpi_status setup_resource(struct acpi_resource *acpi_res, void *data)
|
||||
res->flags = flags;
|
||||
res->start = start;
|
||||
res->end = end;
|
||||
info->res_offset[info->res_num] = addr.translation_offset;
|
||||
info->res_offset[info->res_num] = addr.address.translation_offset;
|
||||
info->res_num++;
|
||||
|
||||
if (!pci_use_crs)
|
||||
|
@ -397,12 +397,12 @@ static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data)
|
||||
|
||||
status = acpi_resource_to_address64(res, &address);
|
||||
if (ACPI_FAILURE(status) ||
|
||||
(address.address_length <= 0) ||
|
||||
(address.address.address_length <= 0) ||
|
||||
(address.resource_type != ACPI_MEMORY_RANGE))
|
||||
return AE_OK;
|
||||
|
||||
if ((mcfg_res->start >= address.minimum) &&
|
||||
(mcfg_res->end < (address.minimum + address.address_length))) {
|
||||
if ((mcfg_res->start >= address.address.minimum) &&
|
||||
(mcfg_res->end < (address.address.minimum + address.address.address_length))) {
|
||||
mcfg_res->flags = 1;
|
||||
return AE_CTRL_TERMINATE;
|
||||
}
|
||||
|
@ -101,8 +101,8 @@ acpi_memory_get_resource(struct acpi_resource *resource, void *context)
|
||||
/* Can we combine the resource range information? */
|
||||
if ((info->caching == address64.info.mem.caching) &&
|
||||
(info->write_protect == address64.info.mem.write_protect) &&
|
||||
(info->start_addr + info->length == address64.minimum)) {
|
||||
info->length += address64.address_length;
|
||||
(info->start_addr + info->length == address64.address.minimum)) {
|
||||
info->length += address64.address.address_length;
|
||||
return AE_OK;
|
||||
}
|
||||
}
|
||||
@ -114,8 +114,8 @@ acpi_memory_get_resource(struct acpi_resource *resource, void *context)
|
||||
INIT_LIST_HEAD(&new->list);
|
||||
new->caching = address64.info.mem.caching;
|
||||
new->write_protect = address64.info.mem.write_protect;
|
||||
new->start_addr = address64.minimum;
|
||||
new->length = address64.address_length;
|
||||
new->start_addr = address64.address.minimum;
|
||||
new->length = address64.address.address_length;
|
||||
list_add_tail(&new->list, &mem_device->res_list);
|
||||
|
||||
return AE_OK;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -47,7 +47,7 @@
|
||||
/* Common info for tool signons */
|
||||
|
||||
#define ACPICA_NAME "Intel ACPI Component Architecture"
|
||||
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2014 Intel Corporation"
|
||||
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2015 Intel Corporation"
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 64
|
||||
#define ACPI_WIDTH "-64"
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -143,8 +143,6 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
|
||||
acpi_status
|
||||
acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback, void *context);
|
||||
|
||||
u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block, void *context);
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -7,7 +7,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -114,17 +114,6 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
|
||||
|
||||
ACPI_FUNCTION_TRACE(ev_enable_gpe);
|
||||
|
||||
/*
|
||||
* We will only allow a GPE to be enabled if it has either an associated
|
||||
* method (_Lxx/_Exx) or a handler, or is using the implicit notify
|
||||
* feature. Otherwise, the GPE will be immediately disabled by
|
||||
* acpi_ev_gpe_dispatch the first time it fires.
|
||||
*/
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_NONE) {
|
||||
return_ACPI_STATUS(AE_NO_HANDLER);
|
||||
}
|
||||
|
||||
/* Clear the GPE (of stale events) */
|
||||
|
||||
status = acpi_hw_clear_gpe(gpe_event_info);
|
||||
@ -339,7 +328,11 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list)
|
||||
{
|
||||
acpi_status status;
|
||||
struct acpi_gpe_block_info *gpe_block;
|
||||
struct acpi_namespace_node *gpe_device;
|
||||
struct acpi_gpe_register_info *gpe_register_info;
|
||||
struct acpi_gpe_event_info *gpe_event_info;
|
||||
u32 gpe_number;
|
||||
struct acpi_gpe_handler_info *gpe_handler_info;
|
||||
u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
|
||||
u8 enabled_status_byte;
|
||||
u32 status_reg;
|
||||
@ -367,6 +360,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list)
|
||||
|
||||
gpe_block = gpe_xrupt_list->gpe_block_list_head;
|
||||
while (gpe_block) {
|
||||
gpe_device = gpe_block->node;
|
||||
|
||||
/*
|
||||
* Read all of the 8-bit GPE status and enable registers in this GPE
|
||||
* block, saving all of them. Find all currently active GP events.
|
||||
@ -442,16 +437,68 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list)
|
||||
|
||||
/* Examine one GPE bit */
|
||||
|
||||
gpe_event_info =
|
||||
&gpe_block->
|
||||
event_info[((acpi_size) i *
|
||||
ACPI_GPE_REGISTER_WIDTH) + j];
|
||||
gpe_number =
|
||||
j + gpe_register_info->base_gpe_number;
|
||||
|
||||
if (enabled_status_byte & (1 << j)) {
|
||||
/*
|
||||
* Found an active GPE. Dispatch the event to a handler
|
||||
* or method.
|
||||
*/
|
||||
int_status |=
|
||||
acpi_ev_gpe_dispatch(gpe_block->
|
||||
node,
|
||||
&gpe_block->
|
||||
event_info[((acpi_size) i * ACPI_GPE_REGISTER_WIDTH) + j], j + gpe_register_info->base_gpe_number);
|
||||
|
||||
/* Invoke global event handler if present */
|
||||
|
||||
acpi_gpe_count++;
|
||||
if (acpi_gbl_global_event_handler) {
|
||||
acpi_gbl_global_event_handler
|
||||
(ACPI_EVENT_TYPE_GPE,
|
||||
gpe_device, gpe_number,
|
||||
acpi_gbl_global_event_handler_context);
|
||||
}
|
||||
|
||||
/* Found an active GPE */
|
||||
|
||||
if (ACPI_GPE_DISPATCH_TYPE
|
||||
(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER) {
|
||||
|
||||
/* Dispatch the event to a raw handler */
|
||||
|
||||
gpe_handler_info =
|
||||
gpe_event_info->dispatch.
|
||||
handler;
|
||||
|
||||
/*
|
||||
* There is no protection around the namespace node
|
||||
* and the GPE handler to ensure a safe destruction
|
||||
* because:
|
||||
* 1. The namespace node is expected to always
|
||||
* exist after loading a table.
|
||||
* 2. The GPE handler is expected to be flushed by
|
||||
* acpi_os_wait_events_complete() before the
|
||||
* destruction.
|
||||
*/
|
||||
acpi_os_release_lock
|
||||
(acpi_gbl_gpe_lock, flags);
|
||||
int_status |=
|
||||
gpe_handler_info->
|
||||
address(gpe_device,
|
||||
gpe_number,
|
||||
gpe_handler_info->
|
||||
context);
|
||||
flags =
|
||||
acpi_os_acquire_lock
|
||||
(acpi_gbl_gpe_lock);
|
||||
} else {
|
||||
/*
|
||||
* Dispatch the event to a standard handler or
|
||||
* method.
|
||||
*/
|
||||
int_status |=
|
||||
acpi_ev_gpe_dispatch
|
||||
(gpe_device, gpe_event_info,
|
||||
gpe_number);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -484,52 +531,15 @@ unlock_and_exit:
|
||||
static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
|
||||
{
|
||||
struct acpi_gpe_event_info *gpe_event_info = context;
|
||||
acpi_status status;
|
||||
struct acpi_gpe_event_info *local_gpe_event_info;
|
||||
acpi_status status = AE_OK;
|
||||
struct acpi_evaluate_info *info;
|
||||
struct acpi_gpe_notify_info *notify;
|
||||
|
||||
ACPI_FUNCTION_TRACE(ev_asynch_execute_gpe_method);
|
||||
|
||||
/* Allocate a local GPE block */
|
||||
|
||||
local_gpe_event_info =
|
||||
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_event_info));
|
||||
if (!local_gpe_event_info) {
|
||||
ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY, "while handling a GPE"));
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_FREE(local_gpe_event_info);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
/* Must revalidate the gpe_number/gpe_block */
|
||||
|
||||
if (!acpi_ev_valid_gpe_event(gpe_event_info)) {
|
||||
status = acpi_ut_release_mutex(ACPI_MTX_EVENTS);
|
||||
ACPI_FREE(local_gpe_event_info);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
/*
|
||||
* Take a snapshot of the GPE info for this level - we copy the info to
|
||||
* prevent a race condition with remove_handler/remove_block.
|
||||
*/
|
||||
ACPI_MEMCPY(local_gpe_event_info, gpe_event_info,
|
||||
sizeof(struct acpi_gpe_event_info));
|
||||
|
||||
status = acpi_ut_release_mutex(ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_FREE(local_gpe_event_info);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
/* Do the correct dispatch - normal method or implicit notify */
|
||||
|
||||
switch (local_gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) {
|
||||
switch (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags)) {
|
||||
case ACPI_GPE_DISPATCH_NOTIFY:
|
||||
/*
|
||||
* Implicit notify.
|
||||
@ -542,7 +552,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
|
||||
* June 2012: Expand implicit notify mechanism to support
|
||||
* notifies on multiple device objects.
|
||||
*/
|
||||
notify = local_gpe_event_info->dispatch.notify_list;
|
||||
notify = gpe_event_info->dispatch.notify_list;
|
||||
while (ACPI_SUCCESS(status) && notify) {
|
||||
status =
|
||||
acpi_ev_queue_notify_request(notify->device_node,
|
||||
@ -566,7 +576,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
|
||||
* _Lxx/_Exx control method that corresponds to this GPE
|
||||
*/
|
||||
info->prefix_node =
|
||||
local_gpe_event_info->dispatch.method_node;
|
||||
gpe_event_info->dispatch.method_node;
|
||||
info->flags = ACPI_IGNORE_RETURN_VALUE;
|
||||
|
||||
status = acpi_ns_evaluate(info);
|
||||
@ -576,25 +586,27 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_EXCEPTION((AE_INFO, status,
|
||||
"while evaluating GPE method [%4.4s]",
|
||||
acpi_ut_get_node_name
|
||||
(local_gpe_event_info->dispatch.
|
||||
method_node)));
|
||||
acpi_ut_get_node_name(gpe_event_info->
|
||||
dispatch.
|
||||
method_node)));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
return_VOID; /* Should never happen */
|
||||
goto error_exit; /* Should never happen */
|
||||
}
|
||||
|
||||
/* Defer enabling of GPE until all notify handlers are done */
|
||||
|
||||
status = acpi_os_execute(OSL_NOTIFY_HANDLER,
|
||||
acpi_ev_asynch_enable_gpe,
|
||||
local_gpe_event_info);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_FREE(local_gpe_event_info);
|
||||
acpi_ev_asynch_enable_gpe, gpe_event_info);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
error_exit:
|
||||
acpi_ev_asynch_enable_gpe(gpe_event_info);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
@ -622,7 +634,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_enable_gpe(void *context)
|
||||
(void)acpi_ev_finish_gpe(gpe_event_info);
|
||||
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
|
||||
|
||||
ACPI_FREE(gpe_event_info);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -692,15 +703,6 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
|
||||
|
||||
ACPI_FUNCTION_TRACE(ev_gpe_dispatch);
|
||||
|
||||
/* Invoke global event handler if present */
|
||||
|
||||
acpi_gpe_count++;
|
||||
if (acpi_gbl_global_event_handler) {
|
||||
acpi_gbl_global_event_handler(ACPI_EVENT_TYPE_GPE, gpe_device,
|
||||
gpe_number,
|
||||
acpi_gbl_global_event_handler_context);
|
||||
}
|
||||
|
||||
/*
|
||||
* Always disable the GPE so that it does not keep firing before
|
||||
* any asynchronous activity completes (either from the execution
|
||||
@ -741,7 +743,7 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
|
||||
* If there is neither a handler nor a method, leave the GPE
|
||||
* disabled.
|
||||
*/
|
||||
switch (gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) {
|
||||
switch (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags)) {
|
||||
case ACPI_GPE_DISPATCH_HANDLER:
|
||||
|
||||
/* Invoke the installed handler (at interrupt level) */
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -474,10 +474,12 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
* Ignore GPEs that have no corresponding _Lxx/_Exx method
|
||||
* and GPEs that are used to wake the system
|
||||
*/
|
||||
if (((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
if ((ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_NONE)
|
||||
|| ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)
|
||||
== ACPI_GPE_DISPATCH_HANDLER)
|
||||
|| (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER)
|
||||
|| (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER)
|
||||
|| (gpe_event_info->flags & ACPI_GPE_CAN_WAKE)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -401,15 +401,17 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) {
|
||||
if ((ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER)) {
|
||||
|
||||
/* If there is already a handler, ignore this GPE method */
|
||||
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_METHOD) {
|
||||
/*
|
||||
* If there is already a method, ignore this method. But check
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -106,53 +106,6 @@ unlock_and_exit:
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ev_valid_gpe_event
|
||||
*
|
||||
* PARAMETERS: gpe_event_info - Info for this GPE
|
||||
*
|
||||
* RETURN: TRUE if the gpe_event is valid
|
||||
*
|
||||
* DESCRIPTION: Validate a GPE event. DO NOT CALL FROM INTERRUPT LEVEL.
|
||||
* Should be called only when the GPE lists are semaphore locked
|
||||
* and not subject to change.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info)
|
||||
{
|
||||
struct acpi_gpe_xrupt_info *gpe_xrupt_block;
|
||||
struct acpi_gpe_block_info *gpe_block;
|
||||
|
||||
ACPI_FUNCTION_ENTRY();
|
||||
|
||||
/* No need for spin lock since we are not changing any list elements */
|
||||
|
||||
/* Walk the GPE interrupt levels */
|
||||
|
||||
gpe_xrupt_block = acpi_gbl_gpe_xrupt_list_head;
|
||||
while (gpe_xrupt_block) {
|
||||
gpe_block = gpe_xrupt_block->gpe_block_list_head;
|
||||
|
||||
/* Walk the GPE blocks on this interrupt level */
|
||||
|
||||
while (gpe_block) {
|
||||
if ((&gpe_block->event_info[0] <= gpe_event_info) &&
|
||||
(&gpe_block->event_info[gpe_block->gpe_count] >
|
||||
gpe_event_info)) {
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
gpe_block = gpe_block->next;
|
||||
}
|
||||
|
||||
gpe_xrupt_block = gpe_xrupt_block->next;
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ev_get_gpe_device
|
||||
@ -371,8 +324,10 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
ACPI_GPE_REGISTER_WIDTH)
|
||||
+ j];
|
||||
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) {
|
||||
if ((ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER)) {
|
||||
|
||||
/* Delete an installed handler block */
|
||||
|
||||
@ -380,10 +335,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
gpe_event_info->dispatch.handler = NULL;
|
||||
gpe_event_info->flags &=
|
||||
~ACPI_GPE_DISPATCH_MASK;
|
||||
} else
|
||||
if ((gpe_event_info->
|
||||
flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_NOTIFY) {
|
||||
} else if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags)
|
||||
== ACPI_GPE_DISPATCH_NOTIFY) {
|
||||
|
||||
/* Delete the implicit notification device list */
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -51,6 +51,16 @@
|
||||
|
||||
#define _COMPONENT ACPI_EVENTS
|
||||
ACPI_MODULE_NAME("evxface")
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
/* Local prototypes */
|
||||
static acpi_status
|
||||
acpi_ev_install_gpe_handler(acpi_handle gpe_device,
|
||||
u32 gpe_number,
|
||||
u32 type,
|
||||
u8 is_raw_handler,
|
||||
acpi_gpe_handler address, void *context);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -76,6 +86,7 @@ ACPI_MODULE_NAME("evxface")
|
||||
* handlers.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
acpi_status
|
||||
acpi_install_notify_handler(acpi_handle device,
|
||||
u32 handler_type,
|
||||
@ -717,32 +728,37 @@ ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_install_gpe_handler
|
||||
* FUNCTION: acpi_ev_install_gpe_handler
|
||||
*
|
||||
* PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT
|
||||
* defined GPEs)
|
||||
* gpe_number - The GPE number within the GPE block
|
||||
* type - Whether this GPE should be treated as an
|
||||
* edge- or level-triggered interrupt.
|
||||
* is_raw_handler - Whether this GPE should be handled using
|
||||
* the special GPE handler mode.
|
||||
* address - Address of the handler
|
||||
* context - Value passed to the handler on each GPE
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Install a handler for a General Purpose Event.
|
||||
* DESCRIPTION: Internal function to install a handler for a General Purpose
|
||||
* Event.
|
||||
*
|
||||
******************************************************************************/
|
||||
acpi_status
|
||||
acpi_install_gpe_handler(acpi_handle gpe_device,
|
||||
u32 gpe_number,
|
||||
u32 type, acpi_gpe_handler address, void *context)
|
||||
static acpi_status
|
||||
acpi_ev_install_gpe_handler(acpi_handle gpe_device,
|
||||
u32 gpe_number,
|
||||
u32 type,
|
||||
u8 is_raw_handler,
|
||||
acpi_gpe_handler address, void *context)
|
||||
{
|
||||
struct acpi_gpe_event_info *gpe_event_info;
|
||||
struct acpi_gpe_handler_info *handler;
|
||||
acpi_status status;
|
||||
acpi_cpu_flags flags;
|
||||
|
||||
ACPI_FUNCTION_TRACE(acpi_install_gpe_handler);
|
||||
ACPI_FUNCTION_TRACE(ev_install_gpe_handler);
|
||||
|
||||
/* Parameter validation */
|
||||
|
||||
@ -775,8 +791,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
|
||||
|
||||
/* Make sure that there isn't a handler there already */
|
||||
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) {
|
||||
if ((ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER)) {
|
||||
status = AE_ALREADY_EXISTS;
|
||||
goto free_and_exit;
|
||||
}
|
||||
@ -793,9 +811,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
|
||||
* automatically during initialization, in which case it has to be
|
||||
* disabled now to avoid spurious execution of the handler.
|
||||
*/
|
||||
if (((handler->original_flags & ACPI_GPE_DISPATCH_METHOD) ||
|
||||
(handler->original_flags & ACPI_GPE_DISPATCH_NOTIFY)) &&
|
||||
gpe_event_info->runtime_count) {
|
||||
if (((ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
|
||||
ACPI_GPE_DISPATCH_METHOD) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
|
||||
ACPI_GPE_DISPATCH_NOTIFY)) && gpe_event_info->runtime_count) {
|
||||
handler->originally_enabled = TRUE;
|
||||
(void)acpi_ev_remove_gpe_reference(gpe_event_info);
|
||||
|
||||
@ -816,7 +835,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
|
||||
|
||||
gpe_event_info->flags &=
|
||||
~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
|
||||
gpe_event_info->flags |= (u8)(type | ACPI_GPE_DISPATCH_HANDLER);
|
||||
gpe_event_info->flags |=
|
||||
(u8)(type |
|
||||
(is_raw_handler ? ACPI_GPE_DISPATCH_RAW_HANDLER :
|
||||
ACPI_GPE_DISPATCH_HANDLER));
|
||||
|
||||
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
|
||||
|
||||
@ -830,8 +852,76 @@ free_and_exit:
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_install_gpe_handler
|
||||
*
|
||||
* PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT
|
||||
* defined GPEs)
|
||||
* gpe_number - The GPE number within the GPE block
|
||||
* type - Whether this GPE should be treated as an
|
||||
* edge- or level-triggered interrupt.
|
||||
* address - Address of the handler
|
||||
* context - Value passed to the handler on each GPE
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Install a handler for a General Purpose Event.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
acpi_status
|
||||
acpi_install_gpe_handler(acpi_handle gpe_device,
|
||||
u32 gpe_number,
|
||||
u32 type, acpi_gpe_handler address, void *context)
|
||||
{
|
||||
acpi_status status;
|
||||
|
||||
ACPI_FUNCTION_TRACE(acpi_install_gpe_handler);
|
||||
|
||||
status =
|
||||
acpi_ev_install_gpe_handler(gpe_device, gpe_number, type, FALSE,
|
||||
address, context);
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_install_gpe_raw_handler
|
||||
*
|
||||
* PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT
|
||||
* defined GPEs)
|
||||
* gpe_number - The GPE number within the GPE block
|
||||
* type - Whether this GPE should be treated as an
|
||||
* edge- or level-triggered interrupt.
|
||||
* address - Address of the handler
|
||||
* context - Value passed to the handler on each GPE
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Install a handler for a General Purpose Event.
|
||||
*
|
||||
******************************************************************************/
|
||||
acpi_status
|
||||
acpi_install_gpe_raw_handler(acpi_handle gpe_device,
|
||||
u32 gpe_number,
|
||||
u32 type, acpi_gpe_handler address, void *context)
|
||||
{
|
||||
acpi_status status;
|
||||
|
||||
ACPI_FUNCTION_TRACE(acpi_install_gpe_raw_handler);
|
||||
|
||||
status = acpi_ev_install_gpe_handler(gpe_device, gpe_number, type, TRUE,
|
||||
address, context);
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL(acpi_install_gpe_raw_handler)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_remove_gpe_handler
|
||||
@ -880,8 +970,10 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
|
||||
|
||||
/* Make sure that a handler is indeed installed */
|
||||
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) !=
|
||||
ACPI_GPE_DISPATCH_HANDLER) {
|
||||
if ((ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
|
||||
ACPI_GPE_DISPATCH_HANDLER) &&
|
||||
(ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER)) {
|
||||
status = AE_NOT_EXIST;
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
@ -896,6 +988,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
|
||||
/* Remove the handler */
|
||||
|
||||
handler = gpe_event_info->dispatch.handler;
|
||||
gpe_event_info->dispatch.handler = NULL;
|
||||
|
||||
/* Restore Method node (if any), set dispatch flags */
|
||||
|
||||
@ -909,9 +1002,10 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
|
||||
* enabled, it should be enabled at this point to restore the
|
||||
* post-initialization configuration.
|
||||
*/
|
||||
if (((handler->original_flags & ACPI_GPE_DISPATCH_METHOD) ||
|
||||
(handler->original_flags & ACPI_GPE_DISPATCH_NOTIFY)) &&
|
||||
handler->originally_enabled) {
|
||||
if (((ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
|
||||
ACPI_GPE_DISPATCH_METHOD) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
|
||||
ACPI_GPE_DISPATCH_NOTIFY)) && handler->originally_enabled) {
|
||||
(void)acpi_ev_add_gpe_reference(gpe_event_info);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -132,7 +132,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
|
||||
*/
|
||||
gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
|
||||
if (gpe_event_info) {
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) !=
|
||||
if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
|
||||
ACPI_GPE_DISPATCH_NONE) {
|
||||
status = acpi_ev_add_gpe_reference(gpe_event_info);
|
||||
} else {
|
||||
@ -183,6 +183,77 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number)
|
||||
|
||||
ACPI_EXPORT_SYMBOL(acpi_disable_gpe)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_set_gpe
|
||||
*
|
||||
* PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
|
||||
* gpe_number - GPE level within the GPE block
|
||||
* action - ACPI_GPE_ENABLE or ACPI_GPE_DISABLE
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Enable or disable an individual GPE. This function bypasses
|
||||
* the reference count mechanism used in the acpi_enable_gpe(),
|
||||
* acpi_disable_gpe() interfaces.
|
||||
* This API is typically used by the GPE raw handler mode driver
|
||||
* to switch between the polling mode and the interrupt mode after
|
||||
* the driver has enabled the GPE.
|
||||
* The APIs should be invoked in this order:
|
||||
* acpi_enable_gpe() <- Ensure the reference count > 0
|
||||
* acpi_set_gpe(ACPI_GPE_DISABLE) <- Enter polling mode
|
||||
* acpi_set_gpe(ACPI_GPE_ENABLE) <- Leave polling mode
|
||||
* acpi_disable_gpe() <- Decrease the reference count
|
||||
*
|
||||
* Note: If a GPE is shared by 2 silicon components, then both the drivers
|
||||
* should support GPE polling mode or disabling the GPE for long period
|
||||
* for one driver may break the other. So use it with care since all
|
||||
* firmware _Lxx/_Exx handlers currently rely on the GPE interrupt mode.
|
||||
*
|
||||
******************************************************************************/
|
||||
acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action)
|
||||
{
|
||||
struct acpi_gpe_event_info *gpe_event_info;
|
||||
acpi_status status;
|
||||
acpi_cpu_flags flags;
|
||||
|
||||
ACPI_FUNCTION_TRACE(acpi_set_gpe);
|
||||
|
||||
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
|
||||
|
||||
/* Ensure that we have a valid GPE number */
|
||||
|
||||
gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
|
||||
if (!gpe_event_info) {
|
||||
status = AE_BAD_PARAMETER;
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
/* Perform the action */
|
||||
|
||||
switch (action) {
|
||||
case ACPI_GPE_ENABLE:
|
||||
|
||||
status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE);
|
||||
break;
|
||||
|
||||
case ACPI_GPE_DISABLE:
|
||||
|
||||
status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
status = AE_BAD_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
unlock_and_exit:
|
||||
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL(acpi_set_gpe)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -313,7 +384,7 @@ acpi_setup_gpe_for_wake(acpi_handle wake_device,
|
||||
* known as an "implicit notify". Note: The GPE is assumed to be
|
||||
* level-triggered (for windows compatibility).
|
||||
*/
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_NONE) {
|
||||
/*
|
||||
* This is the first device for implicit notify on this GPE.
|
||||
@ -327,7 +398,7 @@ acpi_setup_gpe_for_wake(acpi_handle wake_device,
|
||||
* If we already have an implicit notify on this GPE, add
|
||||
* this device to the notify list.
|
||||
*/
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) ==
|
||||
ACPI_GPE_DISPATCH_NOTIFY) {
|
||||
|
||||
/* Ensure that the device is not already in the list */
|
||||
@ -530,6 +601,49 @@ unlock_and_exit:
|
||||
|
||||
ACPI_EXPORT_SYMBOL(acpi_get_gpe_status)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_finish_gpe
|
||||
*
|
||||
* PARAMETERS: gpe_device - Namespace node for the GPE Block
|
||||
* (NULL for FADT defined GPEs)
|
||||
* gpe_number - GPE level within the GPE block
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Clear and conditionally reenable a GPE. This completes the GPE
|
||||
* processing. Intended for use by asynchronous host-installed
|
||||
* GPE handlers. The GPE is only reenabled if the enable_for_run bit
|
||||
* is set in the GPE info.
|
||||
*
|
||||
******************************************************************************/
|
||||
acpi_status acpi_finish_gpe(acpi_handle gpe_device, u32 gpe_number)
|
||||
{
|
||||
struct acpi_gpe_event_info *gpe_event_info;
|
||||
acpi_status status;
|
||||
acpi_cpu_flags flags;
|
||||
|
||||
ACPI_FUNCTION_TRACE(acpi_finish_gpe);
|
||||
|
||||
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
|
||||
|
||||
/* Ensure that we have a valid GPE number */
|
||||
|
||||
gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
|
||||
if (!gpe_event_info) {
|
||||
status = AE_BAD_PARAMETER;
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
status = acpi_ev_finish_gpe(gpe_event_info);
|
||||
|
||||
unlock_and_exit:
|
||||
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL(acpi_finish_gpe)
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_disable_all_gpes
|
||||
@ -604,7 +718,6 @@ ACPI_EXPORT_SYMBOL(acpi_enable_all_runtime_gpes)
|
||||
* all GPE blocks.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
acpi_status acpi_enable_all_wakeup_gpes(void)
|
||||
{
|
||||
acpi_status status;
|
||||
|
@ -6,7 +6,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -54,6 +54,10 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block,
|
||||
void *context);
|
||||
|
||||
static acpi_status
|
||||
acpi_hw_gpe_enable_write(u8 enable_mask,
|
||||
struct acpi_gpe_register_info *gpe_register_info);
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_hw_get_gpe_register_bit
|
||||
@ -146,7 +150,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)
|
||||
|
||||
status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
|
||||
if (ACPI_SUCCESS(status) && (action & ACPI_GPE_SAVE_MASK)) {
|
||||
gpe_register_info->enable_mask = enable_mask;
|
||||
gpe_register_info->enable_mask = (u8)enable_mask;
|
||||
}
|
||||
return (status);
|
||||
}
|
||||
@ -221,7 +225,7 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
|
||||
|
||||
/* GPE currently handled? */
|
||||
|
||||
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) !=
|
||||
if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
|
||||
ACPI_GPE_DISPATCH_NONE) {
|
||||
local_event_status |= ACPI_EVENT_FLAG_HAS_HANDLER;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -6,7 +6,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* Copyright (C) 2000 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user