History log of /linux-master/drivers/acpi/acpica/utdelete.c
Revision Date Author Comments
# 1cdfe9e3 22-Dec-2021 Rafael J. Wysocki <rafael.j.wysocki@intel.com>

ACPICA: Utilities: Avoid deleting the same object twice in a row

ACPICA commit c11af67d8f7e3d381068ce7771322f2b5324d687

If original_count is 0 in acpi_ut_update_ref_count (),
acpi_ut_delete_internal_obj () is invoked for the target object, which is
incorrect, because that object has been deleted once already and the
memory allocated to store it may have been reclaimed and allocated
for a different purpose by the host OS. Moreover, a confusing debug
message following the "Reference Count is already zero, cannot
decrement" warning is printed in that case.

To fix this issue, make acpi_ut_update_ref_count () return after finding
that original_count is 0 and printing the above warning.

Link: https://github.com/acpica/acpica/commit/c11af67d
Link: https://github.com/acpica/acpica/pull/652
Reported-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# e4dfe108 21-May-2021 Erik Kaneda <erik.kaneda@intel.com>

ACPICA: Clean up context mutex during object deletion

ACPICA commit bc43c878fd4ff27ba75b1d111b97ee90d4a82707

Fixes: c27f3d011b08 ("Fix race in GenericSerialBus (I2C) and GPIO OpRegion parameter handling")
Link: https://github.com/acpica/acpica/commit/bc43c878
Reported-by: John Garry <john.garry@huawei.com>
Reported-by: Xiang Chen <chenxiang66@hisilicon.com>
Tested-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# c1a7c2ce 21-Jan-2021 Nick Desaulniers <ndesaulniers@google.com>

ACPICA: fix -Wfallthrough

ACPICA commit 4b9135f5774caa796ddf826448811e8e7f08ef2f

GCC 7.1 gained -Wimplicit-fallthrough to warn on implicit fallthrough,
as well as __attribute__((__fallthrough__)) and comments to explicitly
denote that cases of fallthrough were intentional. Clang also supports
this warning and statement attribute, but not the comment form.

Robert Moore provides additional context about the lint comments being
removed. They were for "an old version of PC-Lint, which we don't use
anymore." Drop those.

This will help us enable -Wimplicit-fallthrough throughout the Linux
kernel.

Suggested-by: Robert Moore <robert.moore@intel.com>
Reported-by: Jon Hunter <jonathanh@nvidia.com>

Link: https://github.com/acpica/acpica/commit/4b9135f5
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 6a54ebae 20-Jul-2020 Erik Kaneda <erik.kaneda@intel.com>

ACPICA: Do not increment operation_region reference counts for field units

ACPICA commit e17b28cfcc31918d0db9547b6b274b09c413eb70

Object reference counts are used as a part of ACPICA's garbage
collection mechanism. This mechanism keeps track of references to
heap-allocated structures such as the ACPI operand objects.

Recent server firmware has revealed that this reference count can
overflow on large servers that declare many field units under the
same operation_region. This occurs because each field unit declaration
will add a reference count to the source operation_region.

This change solves the reference count overflow for operation_regions
objects by preventing fieldunits from incrementing their
operation_region's reference count. Each operation_region's reference
count will not be changed by named objects declared under the Field
operator. During namespace deletion, the operation_region namespace
node will be deleted and each fieldunit will be deleted without
touching the deleted operation_region object.

Link: https://github.com/acpica/acpica/commit/e17b28cf
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 9a1ae804 27-Mar-2020 Bob Moore <robert.moore@intel.com>

ACPICA: Fixes for acpiExec namespace init file

This is the result of squashing the following ACPICA commit ID's:
6803997e5b4f3635cea6610b51ff69e29d251de3
f31cdf8bfda22fe265c1a176d0e33d311c82a7f7

This change fixes several problems with the support for the
acpi_exec namespace init file (-fi option). Specifically, it
fixes AE_ALREADY_EXISTS errors, as well as various seg faults.

Link: https://github.com/acpica/acpica/commit/f31cdf8b
Link: https://github.com/acpica/acpica/commit/6803997e
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# aa6ec56b 22-Feb-2019 Erik Kaneda <erik.kaneda@intel.com>

ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter

ACPICA commit a4849944e80f97970e99843f4975850753584a4e

This change adds PCC operation region support in the AML interpreter
and a default handler for acpiexec. According to the specification,
the PCC operation region performs a transaction when the COMD field
is written. This allows ASL to write data to other fields before
sending the data.

In order to accommodate this protocol, a temorary buffer is added
to the regionfield object to accumulate writes. If any offset that
spans COMD is written, the temporary buffer is sent to the PCC
operation region handler to be processed.

This change also renames the PCC keyword to platform_comm_channel.

Link: https://github.com/acpica/acpica/commit/a4849944
Reviewed-by: Kyle Pelton <kyle.d.pelton@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# ff5340f8 10-Aug-2018 Erik Kaneda <erik.kaneda@intel.com>

ACPICA: Reference count: add additional debugging details

Make reference counting diagnostics provide more information on
what has happened.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 95857638 14-Mar-2018 Erik Kaneda <erik.kaneda@intel.com>

ACPICA: adding SPDX headers

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 1ef63231 15-Feb-2018 Bob Moore <robert.moore@intel.com>

ACPICA: Update for some debug output. No functional change

ACPICA commit 3a08436fe3bff297a6de162252964e955946c7d3

Improve/simplify some of the debug messages.

Link: https://github.com/acpica/acpica/commit/3a08436f
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# da6f8320 04-Jan-2018 Bob Moore <robert.moore@intel.com>

ACPICA: All acpica: Update copyrights to 2018

including tool signons.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 7735ca0e 07-Feb-2017 Bob Moore <robert.moore@intel.com>

ACPICA: Source tree: Update copyright notices to 2017

ACPICA commit 16577e5265923f4999b4d2c0addb2343b18135e1

Affects all files.

Link: https://github.com/acpica/acpica/commit/16577e52
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>


# 7225d046 28-Dec-2016 Bob Moore <robert.moore@intel.com>

ACPICA: Utilities: Update debug output

ACPICA commit 082b5b3ee31f74735e166858eeda025288604a5a

Enhancement of miscellaneous debug output.

Link: https://github.com/acpica/acpica/commit/082b5b3e
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>


# c8100dc4 14-Jan-2016 Bob Moore <robert.moore@intel.com>

ACPICA: Additional 2016 copyright changes

All tool/utility signons.
Dual-license module header.

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>


# 1fad8738 28-Dec-2015 Bob Moore <robert.moore@intel.com>

ACPICA: Core: Major update for code formatting, no functional changes

ACPICA commit dfa394471f6c01b2ee9433dbc143ec70cb9bca72

Mostly indentation inconsistencies across the code. Split
some long lines, etc.

Link: https://github.com/acpica/acpica/commit/dfa39447
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>


# 07b9c912 22-Jul-2015 Lv Zheng <lv.zheng@intel.com>

ACPICA: Executer: Add back pointing reference of method operand

ACPICA commit 9dcd124e914e87495fbd1786d9484b962e0823e0

This patch adds back pointing reference of the namespace node for a method
operand. The namespace node then can be used in
acpi_ds_terminate_control_method() to obtain method full path to be used by
tracing facilities. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/9dcd124e
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>


# 82a80941 05-Feb-2015 David E. Box <david.e.box@linux.intel.com>

ACPICA: Update Copyright headers to 2015

ACPICA commit 8990e73ab2aa15d6a0068b860ab54feff25bee36

Link: https://github.com/acpica/acpica/commit/8990e73a
Signed-off-by: David E. Box <david.e.box@linux.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>


# f953529f 25-Feb-2014 Bob Moore <robert.moore@intel.com>

ACPICA: Prevent infinite loops when traversing corrupted lists.

This change hardens the ACPICA code to detect circular linked object
lists and prevent an infinite loop if such corruption exists.

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>


# fbb7a2dc 07-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>


# 10622bf8 28-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>


# 1d1ea1b7 07-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>


# 58892c96 11-Apr-2013 Bob Moore <robert.moore@intel.com>

ACPICA: Add a lock to the internal object reference count mechanism

Certain external interfaces need to update object references
without holding the interpreter or namespace mutex objects. To
prevent race conditions, add a spinlock around the increment
and decrement of the reference counts for internal ACPI
objects. Reported by Andriy Gapon (avg@FreeBSD.org).

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Andriy Gapon <avg@FreeBSD.org>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 60f3deb5 11-Apr-2013 Bob Moore <robert.moore@intel.com>

ACPICA: Remove FORCE_DELETE option for global reference count mechanism

This option is not used and is obsolete.

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>


# 25f044e6 24-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>


# c8d586f8 30-Dec-2012 Bob Moore <robert.moore@intel.com>

ACPICA: Lint changes, no functional change.

Some changes from lint.

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>


# 0e770b32 18-Dec-2012 Bob Moore <robert.moore@intel.com>

ACPICA: Performance: Remove function tracing from critical allocation functions.

Tracing is no longer needed for many of the low-level function.
Removing the trace mechanism from these functions improves
performance a small amount, also simplifies the debug trace output.

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>


# 53938551 18-Dec-2012 Chao Guan <chao.guan@intel.com>

ACPICA: Performance enhancement for ACPI package objects.

This change greatly increases the performance of package objects
within the interpreter. It changes the processing of reference
counts for packages by optimizing for the most common case where
the package subobjects are either integers, strings, or buffers.
Increases the performance of the ASLTS test suite by 1.5X.
Chao Guan. ACPICA BZ 943.
https://www.acpica.org/bugzilla/show_bug.cgi?id=943

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>


# ba494bee 11-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>


# 86ed4bc8 02-May-2012 Bob Moore <robert.moore@intel.com>

ACPICA: Add support for multiple notify handlers

This change adds support to allow multiple notify handlers on
Device, ThermalZone, and Processor objects. Also re-worked
and restructured the entire notify support code for handler
installation, handler removal, notify event queuing, and notify
dispatch to handler.

Extends and updates original commit 3f0be67("ACPI / ACPICA: Multiple
system notify handlers per device") by Rafael Wysocki.

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>


# 77848130 11-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>


# f654c0fe 11-Jan-2012 Lin Ming <ming.m.lin@intel.com>

ACPICA: Add support for region address conflict checking

Allows drivers to determine if any memory or I/O addresses
will conflict with addresses used by ACPI operation regions.
Introduces a new interface, acpi_check_address_range.

http://marc.info/?t=132251388700002&r=1&w=2

Reported-and-tested-by: Luca Tettamanti <kronos.it@gmail.com>
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>


# b4e104ea 16-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>


# f6a22b0b 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>


# a8357b0c 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>


# a5fe1a03 12-Aug-2009 Lin Ming <ming.m.lin@intel.com>

ACPICA: fix leak of acpi_os_validate_address

http://bugzilla.kernel.org/show_bug.cgi?id=13620

If the dynamic region is created and added to resource list over and over again,
it has the potential to be a memory leak by growing the list every time.

This patch fixes the memory leak, as below

1) add a new field "count" to struct acpi_res_list.

When inserting, if the region(addr, len) is already in the resource
list, we just increase "count", otherwise, the region is inserted
with count=1.

When deleting, the "count" is decreased, if it's decreased to 0,
the region is deleted from the resource list.

With "count", the region with same address and length can only be
inserted to the resource list once, so prevent potential memory leak.

2) add a new function acpi_os_invalidate_address, which is called when
region is deleted.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 3362a6ba 20-May-2009 Lin Ming <ming.m.lin@intel.com>

ACPICA: Region deletion: Ensure region object is removed from handler list

Prevents a possible fault when a dynamic operation region is
deleted. ACPICA BZ 507.

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

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>


# 3371c19c 17-Feb-2009 Bob Moore <robert.moore@intel.com>

ACPICA: Remove ACPI_GET_OBJECT_TYPE macro

Remove all instances of this obsolete macro, since it is now a
simple reference to ->common.type. There were about 150 invocations
of the macro across 41 files. ACPICA BZ 755.

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

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>


# e2f7a777 08-Jan-2009 Len Brown <len.brown@intel.com>

ACPICA: hide private headers

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


# 95b482a8 08-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>