History log of /drivers/acpi/acpica/hwregs.c
Revision Date Author Comments
7d3e83bdb44ce725970253cbefd5e824efc0aab2 08-Jul-2014 Lv Zheng <lv.zheng@intel.com> ACPICA: Hardware: back port of a recursive locking fix

This patch is a back port result of the following Linux commit:
Commit: f7f71cfbf0c276ee3d8d856d0f35a41aed997fa4
Author: Rakib Mullick <rakib.mullick@gmail.com>
Subject: ACPI: Fix possible recursive locking in hwregs.c

As a result of different coding style rules, the back ported code generates
source code differences between the Linux kernel and the ACPICA upstream.
This patch reduces such source code differences.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
fbb7a2dc2be493c87399550bdc2ddaa510cdf450 08-Feb-2014 Bob Moore <robert.moore@intel.com> ACPICA: Update ACPICA copyrights to 2014.

Update ACPICA copyrights to 2014. Includes all source headers and
signons for the various tools.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10622bf8ce432e6a53fd3c37163e99e99c9e43ee 29-Oct-2013 Lv Zheng <lv.zheng@intel.com> ACPICA: Linuxize: Change indentation of C labels.

It is reported by kernel build test systems that all ACPICA source
files in the kernel tree have incorrect label indentation. This
patch changes default indent option used in the release process to
fix this bug. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1d1ea1b723d9f239f736b8cf284327cbbf9d15d1 08-Jun-2013 Chao Guan <chao.guan@intel.com> ACPICA: Standardize all switch() blocks

After many years, different formatting for switch() has crept in.
This change makes every switch block identical. Chao Guan.
ACPICA bugzilla 997.

References: https://bugs.acpica.org/show_bug.cgi?id=997
Signed-off-by: Chao Guan <chao.guan@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
25f044e64568dd83de34c16c837a96bbb2b0cecb 25-Jan-2013 Bob Moore <robert.moore@intel.com> ACPICA: Update ACPICA copyrights to 2013

Includes all source headers and signons for the various tools.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3e8214e5c2bd449b30109d4a098597ab1b7c9fb9 19-Dec-2012 Lv Zheng <lv.zheng@intel.com> ACPICA: Cleanup indentation to reduce differences between Linux and ACPICA.

This is a cosmetic patch only. Comparison of the resulting binary showed
only line number differences.

This patch does not affect the generation of the Linux binary.
This patch decreases 210 lines of 20121018 divergence.diff.

The ACPICA source codes uses a totally different indentation style from the
Linux to be compatible with other users (operating systems or BIOS).

Indentation differences are critical to the release automation. There are
two causes related to the "indentation" that are affecting the release
automation:
1. The ACPICA -> Linux release process is:
ACPICA source -- acpisrc - hierarchy - indent ->
linuxized ACPICA source -- diff ->
linuxized ACPICA patch (x) -- human intervention ->
linuxized ACPICA patch (o)
Where
'x' means "cannot be directly applied to the Linux"
'o' means "can be directly applied to the Linux"
Different "indent" version or "indent" options used in the "indent"
step will lead to different divergences.
The version of "indent" used for the current release process is:
GNU indent 2.2.11
The options of "indent" used for the current release process is:
-npro -kr -i8 -ts8 -sob -l80 -ss -ncs
2. Manual indentation prettifying work in the Linux side will also harm the
automatically generated linuxized ACPICA patches, making them impossible
to apply directly.

This patch fixes source code differences caused by the two causes so that
the "human intervention" can be reduced in the future.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
739dcbb90a347a66f25cc0c3ef4eef3d4558f409 20-Dec-2012 Lv Zheng <lv.zheng@intel.com> ACPICA: Cleanup source to reduce differences between Linux and ACPICA.

This is a cosmetic patch only. Comparison of the resulting binary showed
only line number differences.

This patch does not affect the generation of the Linux binary.
This patch decreases 389 lines of 20121018 divergence.diff.

This patch reduces source code diff caused by the simple code maintenance
work:
1. Deletion of the unused include files.
2. Deletion of the deprecated codes blocks.
3. Repositioning of the code blocks.
4. Replacing the values with the well defined macros.
5. Replacing the types with the equivalent types.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
75c8044fb38051713000e0d151852f5f9614f77b 19-Dec-2012 Lv Zheng <lv.zheng@intel.com> ACPICA: Cleanup updated comments.

This is a cosmetic patch only. Comparison of the resulting binary showed
only line number differences.

This patch does not affect the generation of the Linux binary.
This patch decreases 558 lines of 20121018 divergence.diff.

This patch reduces the source code diff between Linux and ACPICA by
cleaning the comments that already have been updated in ACPICA.

There is no extra indentation done in this patch. Even the empty line
deletions and insertions are also splitted into another cleanup patch so
that this patch can be easily reviewed, and the binary differences can be
held to a lowest level.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4f3ca640e97ba54df42789a7c3085c75630e863c 31-Oct-2012 Bob Moore <robert.moore@intel.com> ACPICA: ACPICA core: Cleanup empty lines at file start and end

Maintenance for source code consistency.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ba494beeaa69bc0fb01eb89464ad5d57d26e3901 12-Jul-2012 Bob Moore <robert.moore@intel.com> ACPICA: AcpiSrc: Fix some translation issues for Linux conversion

Fixes issues like this:

i_aSL -> iASL
00-7_f -> 00-7F
local_fADT -> local_FADT
execute_oSI -> execute_OSI

Also, in function headers, the parameters are now translated to
lower case (with underscores if necessary.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
653f4b538f66d37db560e0f56af08117136d29b7 14-Feb-2012 Bob Moore <robert.moore@intel.com> ACPICA: Expand OSL memory read/write interfaces to 64 bits

This change expands acpi_os_read_memory and acpi_os_write_memory to a
full 64 bits. This allows 64 bit transfers via the acpi_read and
acpi_write interfaces. Note: The internal acpi_hw_read and acpi_hw_write
interfaces remain at 32 bits, because 64 bits is not needed to
access the standard ACPI registers.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
33620c5419e8a11814dd11e02a80e6ef77a43407 14-Feb-2012 Bob Moore <robert.moore@intel.com> ACPICA: Support for custom ACPICA build for ACPI 5 reduced hardware

Add ACPI_REDUCED_HARDWARE flag that removes all hardware-related
code (about 10% code, 5% static data).

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
77848130e53b06c22fe37a7b6acbb82bb3e9bfba 12-Jan-2012 Bob Moore <robert.moore@intel.com> ACPICA: Update all copyrights to 2012

Update all copyrights to 2012.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
f7f71cfbf0c276ee3d8d856d0f35a41aed997fa4 06-Nov-2011 Rakib Mullick <rakib.mullick@gmail.com> ACPI: Fix possible recursive locking in hwregs.c

Calling pm-suspend might trigger a recursive lock in it's code path.
In function acpi_hw_clear_acpi_status, acpi_os_acquire_lock holds
the lock acpi_gbl_hardware_lock before calling acpi_hw_register_write(),
then without releasing acpi_gbl_hardware_lock, this function calls
acpi_ev_walk_gpe_list, which tries to hold acpi_gbl_gpe_lock.
Both acpi_gbl_hardware_lock and acpi_gbl_gpe_lock are at same
lock-class and which might cause lock recursion deadlock.

Following patch fixes this scenario by just releasing
acpi_gbl_hardware_lock before calling acpi_ev_walk_gpe_list.

Changes since v0(https://lkml.org/lkml/2011/9/21/355):
- Fix changelog, thanks to Lin Ming.

Changes since v1 (https://lkml.org/lkml/2011/11/3/89):
- Update changelog and rename goto label, courtesy Srivatsa S. Bhat.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
b4e104eaeb8cd4329a23e0e4ebf166681b1d182d 17-Jan-2011 Bob Moore <robert.moore@intel.com> ACPICA: Update all ACPICA copyrights and signons to 2011

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
f6a22b0bc417042e83117f52ab1a03696af185ab 05-Mar-2010 Bob Moore <robert.moore@intel.com> ACPICA: Standardize integer output for ACPICA warnings/errors

Always use 0x prefix for hex output, use %u for integer output
(all integers are unsigned.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
a8357b0c95484b46944728712f8810d3b37bf588 22-Jan-2010 Bob Moore <robert.moore@intel.com> ACPICA: Update all ACPICA copyrights and signons to 2010

Add 2010 copyright to all module headers and signons, including
the Linux header. This affects virtually every file in the ACPICA
core subsystem, iASL compiler, and all utilities.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
c6b5774caafa4c12b6019366e2fdaaff117e95a4 24-Jun-2009 Bob Moore <robert.moore@intel.com> ACPICA: Add 64-bit support to acpi_read and acpi_write

Needed by drivers for new ACPi tables. Internal versions of
these functions still use 32-bit max transfers, in order to
minimize disruption and stack use for the standard ACPI registers
(FADT-based).

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
8eb7b2477c4e4fec4788605e4edb5f7acafb59ff 22-Apr-2009 Bob Moore <robert.moore@intel.com> ACPICA: Fix a few warnings for gcc 3.4.4

Mostly for acpiexec, one in the core subsystem.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
c3dd25f4c1ca84baa170c0a3a15a884f4f06297e 19-Mar-2009 Lin Ming <ming.m.lin@intel.com> ACPICA: Clear PM register write-only bits on reading

Affects PM1 Control register only. When reading the register, zero
the write-only bits as per the ACPI spec. ACPICA BZ 443. Lin Ming.

http://www.acpica.org/bugzilla/show_bug.cgi?id=443

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
7f0719039085cc40114abce84cf29fe57da226f4 19-Mar-2009 Bob Moore <robert.moore@intel.com> ACPICA: New: I/O port protection

Protect certain I/O ports from reads/writes. Provides MS
compatibility. New module, hwvalid.c

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
20869dcfde204e1c21b642608d708d82472fee2b 13-Mar-2009 Bob Moore <robert.moore@intel.com> ACPICA: Preserve all PM control reserved and ignored bits

As per the ACPI specification, preserve (read/modify/write) all
bits that are defined as either reserved or ignored (PM control
control registers only.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
8636f8d257b3edf5a1529df93119cdc630ed85c7 09-Mar-2009 Bob Moore <robert.moore@intel.com> ACPICA: Change handling of PM1 Status register ignored bit

Ignored bits must be preserved according to the ACPI spec.
Usually this means a read/modify/write when writing to the
register. However, for status registers, writing a one means
clear the event. Writing a zero means preserve the event (do not
clear.) This behavior is clarified in the ACPI 4.0 spec, and the
ACPICA code now simply always writes a zero to the ignored bit.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
32c9ef994d91352b710b948ec369cd18d6bca51b 18-Feb-2009 Bob Moore <robert.moore@intel.com> ACPICA: Add function to handle PM1 control registers

Added acpi_hw_write_pm1_control. This function writes both of the PM1
control registers (A/B). These registers are different than than
the PM1 A/B status and enable registers in that different values
can be written to the A/B registers. Most notably, the SLP_TYP
bits can be different, as per the values returned from the _Sx
predefined methods.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
aefc7f9a0220a40beff9b6b3b320cbeae128d0e3 18-Feb-2009 Bob Moore <robert.moore@intel.com> ACPICA: For PM1B registers, do not shift value read or written

The PM1B registers are mirrors of the PM1A registers with
different bits actually implemented. From the ACPI specification:
"Although the bits can be split between the two register blocks
(each register block has a unique pointer within the FADT), the bit
positions are maintained. The register block with unimplemented
bits (that is, those implemented in the other register block)
always returns zeros, and writes have no side effects"

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
227243a04d645377d09eda0dc8501e0d9c26ab89 18-Feb-2009 Bob Moore <robert.moore@intel.com> ACPICA: Remove extra write for acpi_hw_clear_acpi_status

This function was writing an optional PM1B status register
twice. The existing call to the low-level acpi_hw_register_write
automatically handles a possibly split PM1 A/B register.
ACPICA BZ 751.

http://www.acpica.org/bugzilla/show_bug.cgi?id=751

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
c520abadbc56a2740021910d2c6412f826a10059 18-Feb-2009 Bob Moore <robert.moore@intel.com> ACPICA: Fix writes to optional PM1B registers

On read, shift B register bits above the A bits. On write,
shift B bits down to zero before writing the B register. New:
acpi_hw_read_multiple, acpi_hw_write_multiple. These two functions now
transparently handle the (possible) split registers for PM1 Status,
Enable, and Control.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
531c633d2be8e79087335a46d3c017ca5837e588 18-Feb-2009 Bob Moore <robert.moore@intel.com> ACPICA: Split out PM1 status registers from the FADT

Add new globals for the PM1 status registers (A/B), similar to the
way the PM1 enable registers are handled. Instead of overloading
the FADT Event Register blocks. This makes the code clearer and
less prone to error.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
e2f7a7772880458edff1b1cc5a988947229fac26 09-Jan-2009 Len Brown <len.brown@intel.com> ACPICA: hide private headers

Signed-off-by: Len Brown <len.brown@intel.com>
95b482a8d31116f3f5c2a5089569393234d06385 09-Jan-2009 Len Brown <len.brown@intel.com> ACPICA: create acpica/ directory

also, delete sleep/ and delete ACPI_CFLAGS from Makefile

Signed-off-by: Len Brown <len.brown@intel.com>