* [PATCH 0/6] ACPICA release 20200430
@ 2020-05-05 0:46 Erik Kaneda
2020-05-05 0:46 ` [PATCH 1/6] ACPICA: Make acpi_protocol_lengths static Erik Kaneda
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Erik Kaneda @ 2020-05-05 0:46 UTC (permalink / raw)
To: Rafael J . Wysocki, linux-acpi; +Cc: Erik Kaneda
This series contains the linux-ized patches of the 20200430 ACPICA
release. There are two patches to fix sparse warnings that are
generated from global variables, and a fix to avoid null pointer
dereferences in the dispatcher. Aside from that, there is a fix to
correct the required parameters for the predefined ACPI methods _NIH
and _NIG.
Bob Moore (1):
ACPICA: Update version to 20200430
Erik Kaneda (4):
ACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h
ACPICA: Disassembler: ignore AE_ALREADY_EXISTS status when parsing
create operators
ACPICA: Dispatcher: add status checks to avoid NULL pointer
dereference on field objects
ACPICA: Fix required parameters for _NIG and _NIH
Yue Haibing (1):
ACPICA: Make acpi_protocol_lengths static
drivers/acpi/acpica/acglobal.h | 1 +
drivers/acpi/acpica/acpredef.h | 4 ++--
drivers/acpi/acpica/dbhistry.c | 1 -
drivers/acpi/acpica/dsfield.c | 22 ++++++++++++++++------
drivers/acpi/acpica/exfield.c | 2 +-
include/acpi/acpixf.h | 2 +-
6 files changed, 21 insertions(+), 11 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/6] ACPICA: Make acpi_protocol_lengths static
2020-05-05 0:46 [PATCH 0/6] ACPICA release 20200430 Erik Kaneda
@ 2020-05-05 0:46 ` Erik Kaneda
2020-05-05 0:46 ` [PATCH 2/6] ACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h Erik Kaneda
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Erik Kaneda @ 2020-05-05 0:46 UTC (permalink / raw)
To: Rafael J . Wysocki, linux-acpi; +Cc: Yue Haibing, Erik Kaneda, Bob Moore
From: Yue Haibing <yuehaibing@huawei.com>
ACPICA commit 0ebacf12b8ca66ce6d3fce4d349b3f2448da18cb
A linux-based static analyzer (sparse) caught this as a warning.
Making this variable static will result in better optimizations and
ensure that this variable does not get used outside of this file.
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
[ek: commit message]
Link: https://github.com/acpica/acpica/commit/0ebacf12
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/exfield.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index e85eb31e5075..3323a2ba6a31 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -22,7 +22,7 @@ ACPI_MODULE_NAME("exfield")
*/
#define ACPI_INVALID_PROTOCOL_ID 0x80
#define ACPI_MAX_PROTOCOL_ID 0x0F
-const u8 acpi_protocol_lengths[] = {
+static const u8 acpi_protocol_lengths[] = {
ACPI_INVALID_PROTOCOL_ID, /* 0 - reserved */
ACPI_INVALID_PROTOCOL_ID, /* 1 - reserved */
0x00, /* 2 - ATTRIB_QUICK */
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/6] ACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h
2020-05-05 0:46 [PATCH 0/6] ACPICA release 20200430 Erik Kaneda
2020-05-05 0:46 ` [PATCH 1/6] ACPICA: Make acpi_protocol_lengths static Erik Kaneda
@ 2020-05-05 0:46 ` Erik Kaneda
2020-05-05 0:46 ` [PATCH 3/6] ACPICA: Disassembler: ignore AE_ALREADY_EXISTS status when parsing create operators Erik Kaneda
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Erik Kaneda @ 2020-05-05 0:46 UTC (permalink / raw)
To: Rafael J . Wysocki, linux-acpi
Cc: Erik Kaneda, Hulk Robot, Jason Yan, Bob Moore
ACPICA commit 8296a24f33984c26a61103c590b049de3c9b61ff
This commit cleans up the code by moving the global definition out of
dbhistry.c to acglobal.h.
Link: https://github.com/acpica/acpica/commit/8296a24f
Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/acglobal.h | 1 +
drivers/acpi/acpica/dbhistry.c | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 38ffa2c0a496..1030a0ce1599 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -290,6 +290,7 @@ ACPI_GLOBAL(struct acpi_external_file *, acpi_gbl_external_file_list);
#ifdef ACPI_DEBUGGER
ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE);
ACPI_INIT_GLOBAL(acpi_thread_id, acpi_gbl_db_thread_id, ACPI_INVALID_THREAD_ID);
+ACPI_INIT_GLOBAL(u32, acpi_gbl_next_cmd_num, 1);
ACPI_GLOBAL(u8, acpi_gbl_db_opt_no_ini_methods);
ACPI_GLOBAL(u8, acpi_gbl_db_opt_no_region_support);
diff --git a/drivers/acpi/acpica/dbhistry.c b/drivers/acpi/acpica/dbhistry.c
index bb9600b867ee..f5fba14461a6 100644
--- a/drivers/acpi/acpica/dbhistry.c
+++ b/drivers/acpi/acpica/dbhistry.c
@@ -27,7 +27,6 @@ static HISTORY_INFO acpi_gbl_history_buffer[HISTORY_SIZE];
static u16 acpi_gbl_lo_history = 0;
static u16 acpi_gbl_num_history = 0;
static u16 acpi_gbl_next_history_index = 0;
-u32 acpi_gbl_next_cmd_num = 1;
/*******************************************************************************
*
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/6] ACPICA: Disassembler: ignore AE_ALREADY_EXISTS status when parsing create operators
2020-05-05 0:46 [PATCH 0/6] ACPICA release 20200430 Erik Kaneda
2020-05-05 0:46 ` [PATCH 1/6] ACPICA: Make acpi_protocol_lengths static Erik Kaneda
2020-05-05 0:46 ` [PATCH 2/6] ACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h Erik Kaneda
@ 2020-05-05 0:46 ` Erik Kaneda
2020-05-05 0:46 ` [PATCH 4/6] ACPICA: Dispatcher: add status checks Erik Kaneda
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Erik Kaneda @ 2020-05-05 0:46 UTC (permalink / raw)
To: Rafael J . Wysocki, linux-acpi; +Cc: Erik Kaneda, Bob Moore
ACPICA commit cd66d0a50fdc9cc4dcd998e08e7aa3c4154bea2d
Disassembler is intended to emit existing ASL code as-is. Therefore,
error messages emitted during disassembly should be ignored or
handled in a way such that the disassembler can continue to parse the
AML. This change ignores AE_ALREADY_EXISTS errors during the deferred
Op parsing for create operators in order to complete parsing ASL
termlists.
Link: https://github.com/acpica/acpica/commit/cd66d0a5
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/dsfield.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index c901f5aec739..0189b5d4e3a3 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -177,7 +177,10 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
arg->common.value.string, ACPI_TYPE_ANY,
ACPI_IMODE_LOAD_PASS1, flags,
walk_state, &node);
- if (ACPI_FAILURE(status)) {
+ if ((walk_state->parse_flags & ACPI_PARSE_DISASSEMBLE)
+ && status == AE_ALREADY_EXISTS) {
+ status = AE_OK;
+ } else if (ACPI_FAILURE(status)) {
ACPI_ERROR_NAMESPACE(walk_state->scope_info,
arg->common.value.string, status);
return_ACPI_STATUS(status);
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/6] ACPICA: Dispatcher: add status checks
2020-05-05 0:46 [PATCH 0/6] ACPICA release 20200430 Erik Kaneda
` (2 preceding siblings ...)
2020-05-05 0:46 ` [PATCH 3/6] ACPICA: Disassembler: ignore AE_ALREADY_EXISTS status when parsing create operators Erik Kaneda
@ 2020-05-05 0:46 ` Erik Kaneda
2020-05-05 0:46 ` [PATCH 5/6] ACPICA: Fix required parameters for _NIG and _NIH Erik Kaneda
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Erik Kaneda @ 2020-05-05 0:46 UTC (permalink / raw)
To: Rafael J . Wysocki, linux-acpi; +Cc: Erik Kaneda, Kurt Kennett, Bob Moore
The status chekcs are used to to avoid NULL pointer dereference on
field objects
ACPICA commit 3244c1eeba9f9fb9ccedb875f7923a3d85e0c6aa
Link: https://github.com/acpica/acpica/commit/3244c1ee
Reported-by: Kurt Kennett <kurt_kennett@hotmail.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/dsfield.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index 0189b5d4e3a3..fa768b3a989e 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -517,13 +517,20 @@ acpi_ds_create_field(union acpi_parse_object *op,
info.region_node = region_node;
status = acpi_ds_get_field_names(&info, walk_state, arg->common.next);
+ if (ACPI_FAILURE(status)) {
+ return_ACPI_STATUS(status);
+ }
+
if (info.region_node->object->region.space_id ==
- ACPI_ADR_SPACE_PLATFORM_COMM
- && !(region_node->object->field.internal_pcc_buffer =
- ACPI_ALLOCATE_ZEROED(info.region_node->object->region.
- length))) {
- return_ACPI_STATUS(AE_NO_MEMORY);
+ ACPI_ADR_SPACE_PLATFORM_COMM) {
+ region_node->object->field.internal_pcc_buffer =
+ ACPI_ALLOCATE_ZEROED(info.region_node->object->region.
+ length);
+ if (!region_node->object->field.internal_pcc_buffer) {
+ return_ACPI_STATUS(AE_NO_MEMORY);
+ }
}
+
return_ACPI_STATUS(status);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/6] ACPICA: Fix required parameters for _NIG and _NIH
2020-05-05 0:46 [PATCH 0/6] ACPICA release 20200430 Erik Kaneda
` (3 preceding siblings ...)
2020-05-05 0:46 ` [PATCH 4/6] ACPICA: Dispatcher: add status checks Erik Kaneda
@ 2020-05-05 0:46 ` Erik Kaneda
2020-05-05 0:46 ` [PATCH 6/6] ACPICA: Update version to 20200430 Erik Kaneda
2020-05-09 9:16 ` [PATCH 0/6] ACPICA release 20200430 Rafael J. Wysocki
6 siblings, 0 replies; 8+ messages in thread
From: Erik Kaneda @ 2020-05-05 0:46 UTC (permalink / raw)
To: Rafael J . Wysocki, linux-acpi; +Cc: Erik Kaneda, Paul A Lohr, Bob Moore
ACPICA commit 4b0e043386c7e698bea9e862f60a388647f56622
Previously, there was a mixup where _NIG required one parameter and
_NIH required zero parameters. This changes swaps these parameter
requirements. Now this change requires _NIH to be called with one
parameter and _NIG requires zero.
Link: https://github.com/acpica/acpica/commit/4b0e0433
Reported-by: Paul A Lohr <paul.a.lohr@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/acpredef.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h
index cd0f5df0ea23..2cbb56652f1c 100644
--- a/drivers/acpi/acpica/acpredef.h
+++ b/drivers/acpi/acpica/acpredef.h
@@ -640,10 +640,10 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
{{"_NIC", METHOD_0ARGS, /* ACPI 6.3 */
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
- {{"_NIG", METHOD_1ARGS(ACPI_TYPE_BUFFER), /* ACPI 6.3 */
+ {{"_NIG", METHOD_0ARGS, /* ACPI 6.3 */
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
- {{"_NIH", METHOD_0ARGS, /* ACPI 6.3 */
+ {{"_NIH", METHOD_1ARGS(ACPI_TYPE_BUFFER), /* ACPI 6.3 */
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
{{"_NTT", METHOD_0ARGS,
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/6] ACPICA: Update version to 20200430
2020-05-05 0:46 [PATCH 0/6] ACPICA release 20200430 Erik Kaneda
` (4 preceding siblings ...)
2020-05-05 0:46 ` [PATCH 5/6] ACPICA: Fix required parameters for _NIG and _NIH Erik Kaneda
@ 2020-05-05 0:46 ` Erik Kaneda
2020-05-09 9:16 ` [PATCH 0/6] ACPICA release 20200430 Rafael J. Wysocki
6 siblings, 0 replies; 8+ messages in thread
From: Erik Kaneda @ 2020-05-05 0:46 UTC (permalink / raw)
To: Rafael J . Wysocki, linux-acpi; +Cc: Bob Moore, Erik Kaneda
From: Bob Moore <robert.moore@intel.com>
ACPICA commit c00a5cd99fa3fe6cd053a2a1a557e54b4fea26f7
Version 20200430.
Link: https://github.com/acpica/acpica/commit/c00a5cd9
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
---
include/acpi/acpixf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 49b519f36b69..1dc8d262035b 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -12,7 +12,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20200326
+#define ACPI_CA_VERSION 0x20200430
#include <acpi/acconfig.h>
#include <acpi/actypes.h>
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/6] ACPICA release 20200430
2020-05-05 0:46 [PATCH 0/6] ACPICA release 20200430 Erik Kaneda
` (5 preceding siblings ...)
2020-05-05 0:46 ` [PATCH 6/6] ACPICA: Update version to 20200430 Erik Kaneda
@ 2020-05-09 9:16 ` Rafael J. Wysocki
6 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2020-05-09 9:16 UTC (permalink / raw)
To: Erik Kaneda; +Cc: Rafael J . Wysocki, linux-acpi
On Tuesday, May 5, 2020 2:46:48 AM CEST Erik Kaneda wrote:
> This series contains the linux-ized patches of the 20200430 ACPICA
> release. There are two patches to fix sparse warnings that are
> generated from global variables, and a fix to avoid null pointer
> dereferences in the dispatcher. Aside from that, there is a fix to
> correct the required parameters for the predefined ACPI methods _NIH
> and _NIG.
>
> Bob Moore (1):
> ACPICA: Update version to 20200430
>
> Erik Kaneda (4):
> ACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h
> ACPICA: Disassembler: ignore AE_ALREADY_EXISTS status when parsing
> create operators
> ACPICA: Dispatcher: add status checks to avoid NULL pointer
> dereference on field objects
> ACPICA: Fix required parameters for _NIG and _NIH
>
> Yue Haibing (1):
> ACPICA: Make acpi_protocol_lengths static
>
> drivers/acpi/acpica/acglobal.h | 1 +
> drivers/acpi/acpica/acpredef.h | 4 ++--
> drivers/acpi/acpica/dbhistry.c | 1 -
> drivers/acpi/acpica/dsfield.c | 22 ++++++++++++++++------
> drivers/acpi/acpica/exfield.c | 2 +-
> include/acpi/acpixf.h | 2 +-
> 6 files changed, 21 insertions(+), 11 deletions(-)
>
>
All patches applied as 5.8 material, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-05-09 9:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 0:46 [PATCH 0/6] ACPICA release 20200430 Erik Kaneda
2020-05-05 0:46 ` [PATCH 1/6] ACPICA: Make acpi_protocol_lengths static Erik Kaneda
2020-05-05 0:46 ` [PATCH 2/6] ACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h Erik Kaneda
2020-05-05 0:46 ` [PATCH 3/6] ACPICA: Disassembler: ignore AE_ALREADY_EXISTS status when parsing create operators Erik Kaneda
2020-05-05 0:46 ` [PATCH 4/6] ACPICA: Dispatcher: add status checks Erik Kaneda
2020-05-05 0:46 ` [PATCH 5/6] ACPICA: Fix required parameters for _NIG and _NIH Erik Kaneda
2020-05-05 0:46 ` [PATCH 6/6] ACPICA: Update version to 20200430 Erik Kaneda
2020-05-09 9:16 ` [PATCH 0/6] ACPICA release 20200430 Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).