From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Robert Moore <robert.moore@intel.com>,
Bob Moore <bob.moore@intel.com>, Len Brown <len.brown@intel.com>
Subject: [PATCH 21/65] ACPICA: Store GPE number instead of bitmask
Date: Fri, 24 Nov 2006 02:18:31 -0500 [thread overview]
Message-ID: <11643527832869-git-send-email-len.brown@intel.com> (raw)
Message-ID: <50ae4c050de1b4052c93bb7c2501877e2ae2d383.1164352294.git.len.brown@intel.com> (raw)
In-Reply-To: <11643527821346-git-send-email-len.brown@intel.com>
In-Reply-To: <410c2f0190f74c35505beda6ff3f2da7819f8bac.1164352285.git.len.brown@intel.com>
From: Robert Moore <robert.moore@intel.com>
Update internal GPE data structure to simplify
debug, use gpe_number instead of register bitmask.
Signed-off-by: Bob Moore <bob.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/events/evgpe.c | 7 ++++---
drivers/acpi/events/evgpeblk.c | 3 ++-
drivers/acpi/hardware/hwgpe.c | 13 +++++++++++--
drivers/acpi/utilities/utglobal.c | 2 --
include/acpi/acglobal.h | 1 -
include/acpi/aclocal.h | 2 +-
6 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index df92c9e..35933be 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -121,7 +121,9 @@ acpi_ev_update_gpe_enable_masks(struct a
if (!gpe_register_info) {
return_ACPI_STATUS(AE_NOT_EXIST);
}
- register_bit = gpe_event_info->register_bit;
+ register_bit = (u8)
+ (1 <<
+ (gpe_event_info->gpe_number - gpe_register_info->base_gpe_number));
/* 1) Disable case. Simply clear all enable bits */
@@ -458,8 +460,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_x
/* Examine one GPE bit */
- if (enabled_status_byte &
- acpi_gbl_decode_to8bit[j]) {
+ if (enabled_status_byte & (1 << j)) {
/*
* Found an active GPE. Dispatch the event to a handler
* or method.
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index bb0eb50..8a6f01a 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -819,7 +819,8 @@ acpi_ev_create_gpe_info_blocks(struct ac
/* Init the event_info for each GPE within this register */
for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) {
- this_event->register_bit = acpi_gbl_decode_to8bit[j];
+ this_event->gpe_number =
+ (u8) (this_register->base_gpe_number + j);
this_event->register_info = this_register;
this_event++;
}
diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c
index 608a3a6..3d548b5 100644
--- a/drivers/acpi/hardware/hwgpe.c
+++ b/drivers/acpi/hardware/hwgpe.c
@@ -105,14 +105,20 @@ acpi_hw_write_gpe_enable_reg(struct acpi
acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)
{
acpi_status status;
+ u8 register_bit;
ACPI_FUNCTION_ENTRY();
+ register_bit = (u8)
+ (1 <<
+ (gpe_event_info->gpe_number -
+ gpe_event_info->register_info->base_gpe_number));
+
/*
* Write a one to the appropriate bit in the status register to
* clear this GPE.
*/
- status = acpi_hw_low_level_write(8, gpe_event_info->register_bit,
+ status = acpi_hw_low_level_write(8, register_bit,
&gpe_event_info->register_info->
status_address);
@@ -155,7 +161,10 @@ acpi_hw_get_gpe_status(struct acpi_gpe_e
/* Get the register bitmask for this GPE */
- register_bit = gpe_event_info->register_bit;
+ register_bit = (u8)
+ (1 <<
+ (gpe_event_info->gpe_number -
+ gpe_event_info->register_info->base_gpe_number));
/* GPE currently enabled? (enabled for runtime?) */
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index 855bc8f..5b83f86 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -164,8 +164,6 @@ u32 acpi_gbl_startup_flags = 0;
u8 acpi_gbl_shutdown = TRUE;
-const u8 acpi_gbl_decode_to8bit[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
-
const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] = {
"\\_S0_",
"\\_S1_",
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h
index a2b8340..3ebf42d 100644
--- a/include/acpi/acglobal.h
+++ b/include/acpi/acglobal.h
@@ -239,7 +239,6 @@ ACPI_EXTERN u8 acpi_gbl_system_awake_and
extern u8 acpi_gbl_shutdown;
extern u32 acpi_gbl_startup_flags;
-extern const u8 acpi_gbl_decode_to8bit[8];
extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];
extern const char *acpi_gbl_highest_dstate_names[4];
extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index a870484..553763d 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -367,7 +367,7 @@ struct acpi_gpe_event_info {
union acpi_gpe_dispatch_info dispatch; /* Either Method or Handler */
struct acpi_gpe_register_info *register_info; /* Backpointer to register info */
u8 flags; /* Misc info about this GPE */
- u8 register_bit; /* This GPE bit within the register */
+ u8 gpe_number; /* This GPE */
};
/* Information about a GPE register pair, one per each status/enable pair in an array */
--
1.4.4.1
next prev parent reply other threads:[~2006-11-24 7:15 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-24 7:18 contents of the acpica branch Len Brown
2006-11-24 7:18 ` [PATCH 1/65] ACPICA: Update function header Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 2/65] ACPICA: Handle mis-matched package length Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 3/65] ACPICA: Handle case NumElements > Package length Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 4/65] ACPICA: Delete recursive feature of ACPI Global Lock Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 5/65] ACPICA: Release global lock from interrupt handler Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 6/65] ACPICA: Cast acpi_thread_id to UINT32 for debug output only Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 7/65] ACPICA: fix for object premature deletion Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 8/65] ACPICA: Temporary fix for BankValue parameter Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 9/65] ACPICA: Update version to 20060721 Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 10/65] ACPICA: Update debug output Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 12/65] ACPICA: misc fixes for new Table Manager: Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 13/65] ACPICA: Update comments for individual table fields Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 14/65] ACPICA: Fix for FADT conversion in 64-bit mode Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 15/65] ACPICA: Lint changes Len Brown
2006-11-24 7:18 ` Len Brown
[not found] ` <1164352776767-git-send-email-len.brown@intel.com>
2006-11-24 7:18 ` [PATCH 17/65] ACPICA: Add support for DMAR table Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 18/65] ACPICA: Add acpi_gpe_count global to track the number of GPE events Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 19/65] ACPICA: Disable all wake GPEs after first one recieved Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 20/65] ACPICA: Fix unalignment in acpi_ut_repair_name Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` Len Brown [this message]
2006-11-24 7:18 ` [PATCH 21/65] ACPICA: Store GPE number instead of bitmask Len Brown
2006-11-24 7:18 ` [PATCH 22/65] ACPICA: Split acpi_format_exception into two parts Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 23/65] ACPICA: Update version to 20060831 Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 24/65] ACPICA: Cleanup of FADT verification function Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 25/65] ACPICA: Create tbfadt.c to hold all FADT-related functions Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 26/65] ACPICA: Re-implement interpreters' "serialized mode" Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 27/65] ACPICA: Delete stale FADT functions outside tbfadt.c Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 28/65] ACPICA: Update comments in tbfadt.c Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 29/65] ACPICA: add ASF comment Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 30/65] ACPICA: re-factor table init routines for benefit of iASL Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 31/65] ACPICA: Allow type ANY to be the target of the Scope operator Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 32/65] ACPICA: IsResourceTemplate now returns ACPI_STATUS Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 33/65] ACPICA: Add declarations for ASF! sub-tables Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 34/65] ACPICA: FADT verification is now table driven Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 35/65] ACPICA: Report error if method creates 2 objects with the same name Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 36/65] ACPICA: New common routine for creating and verifying a local FADT Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 37/65] ACPICA: Fix memory leak in table load error path Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 38/65] ACPICA: Fix trace output name and whitespace Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 39/65] ACPICA: Update version to 20060912 Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 40/65] ACPICA: Add full table name to disassembler output Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 41/65] ACPICA: Fix for Global Lock semaphore Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 42/65] ACPICA: Remove obsolete Flags parameter Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 43/65] ACPICA: Use faster ByIndex interface to get FACS Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 44/65] ACPICA: On AML mutex force-release, set depth to zero (was 1) Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 45/65] ACPICA: Update interpreter error paths to always report the error Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 46/65] ACPICA: Fix for possible memory leak and fault Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 47/65] ACPICA: Add new subsystem state bit that is set after SubsystemInitialize is called Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 48/65] ACPICA: Update version to 20060927 Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:18 ` [PATCH 49/65] ACPICA: Restructured module into multiple functions Len Brown
2006-11-24 7:18 ` Len Brown
2006-11-24 7:19 ` [PATCH 50/65] ACPICA: Eliminate control method 2-pass parse/execute Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 51/65] ACPICA: Fix race condition with AcpiWalkNamespace Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 52/65] ACPICA: _CID support for PCI Root Bridge detection Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 53/65] ACPICA: Use manifest constants for parse pass number Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 54/65] ACPICA: Update comments Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 55/65] ACPICA: Abort downward walk on temporary node detection Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 56/65] ACPICA: Fixes for parameter validation Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 57/65] ACPICA: Update version to 20061011 Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 58/65] ACPICA: Update debug output routines for data structure changes Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 59/65] ACPICA: Miscellaneous table manager updates and optimizations Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 60/65] ACPICA: Fixes for load() operator Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 61/65] ACPICA: Ensure that all structures in acobject.h are aligned, via #pragma Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 62/65] ACPICA: Add ACPI_MAX macro Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 63/65] ACPICA: Fail AcpiEnable if ACPI tables not loaded Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 64/65] ACPICA: Add include of actables.h Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 7:19 ` [PATCH 65/65] ACPICA: version update Len Brown
2006-11-24 7:19 ` Len Brown
2006-11-24 20:32 ` contents of the acpica branch Rafael J. Wysocki
2006-11-24 22:25 ` Rafael J. Wysocki
2006-11-27 2:12 ` Len Brown
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=11643527832869-git-send-email-len.brown@intel.com \
--to=len.brown@intel.com \
--cc=bob.moore@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=robert.moore@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.