[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v4 03/83] acpi/ssdt: Fix aml_or() and aml_and() in if clause
From: |
Michael S. Tsirkin |
Subject: |
[PULL v4 03/83] acpi/ssdt: Fix aml_or() and aml_and() in if clause |
Date: |
Mon, 7 Nov 2022 17:47:39 -0500 |
From: Robert Hoo <robert.hu@linux.intel.com>
In If condition, using bitwise and/or, rather than logical and/or.
The result change in AML code:
If (((Local6 == Zero) | (Arg0 != Local0)))
==>
If (((Local6 == Zero) || (Arg0 != Local0)))
If (((ObjectType (Arg3) == 0x04) & (SizeOf (Arg3) == One)))
==>
If (((ObjectType (Arg3) == 0x04) && (SizeOf (Arg3) == One)))
Fixes: 90623ebf603 ("nvdimm acpi: check UUID")
Fixes: 4568c948066 ("nvdimm acpi: save arg3 of _DSM method")
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Reviewed-by: Jingqi Liu <jingqi.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220922122155.1326543-3-robert.hu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/nvdimm.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 31e46df0bd..201317c611 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -1037,7 +1037,7 @@ static void nvdimm_build_common_dsm(Aml *dev,
uuid_invalid = aml_lnot(aml_equal(uuid, expected_uuid));
- unsupport = aml_if(aml_or(unpatched, uuid_invalid, NULL));
+ unsupport = aml_if(aml_lor(unpatched, uuid_invalid));
/*
* function 0 is called to inquire what functions are supported by
@@ -1069,10 +1069,9 @@ static void nvdimm_build_common_dsm(Aml *dev,
* in the DSM Spec.
*/
pckg = aml_arg(3);
- ifctx = aml_if(aml_and(aml_equal(aml_object_type(pckg),
+ ifctx = aml_if(aml_land(aml_equal(aml_object_type(pckg),
aml_int(4 /* Package */)) /* It is a Package? */,
- aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? */,
- NULL));
+ aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? */));
pckg_index = aml_local(2);
pckg_buf = aml_local(3);
--
MST
- [PULL v4 00/83] pci,pc,virtio: features, tests, fixes, cleanups, Michael S. Tsirkin, 2022/11/07
- [PULL v4 01/83] hw/i386/e820: remove legacy reserved entries for e820, Michael S. Tsirkin, 2022/11/07
- [PULL v4 02/83] tests/acpi: allow SSDT changes, Michael S. Tsirkin, 2022/11/07
- [PULL v4 03/83] acpi/ssdt: Fix aml_or() and aml_and() in if clause,
Michael S. Tsirkin <=
- [PULL v4 04/83] acpi/nvdimm: define macro for NVDIMM Device _DSM, Michael S. Tsirkin, 2022/11/07
- [PULL v4 05/83] acpi/nvdimm: Implement ACPI NVDIMM Label Methods, Michael S. Tsirkin, 2022/11/07
- [PULL v4 07/83] virtio-crypto: Support asynchronous mode, Michael S. Tsirkin, 2022/11/07
- [PULL v4 06/83] test/acpi/bios-tables-test: SSDT: update golden master binaries, Michael S. Tsirkin, 2022/11/07
- [PULL v4 08/83] crypto: Support DER encodings, Michael S. Tsirkin, 2022/11/07
- [PULL v4 09/83] crypto: Support export akcipher to pkcs8, Michael S. Tsirkin, 2022/11/07
- [PULL v4 11/83] acpi/tests/avocado/bits: initial commit of test scripts that are run by biosbits, Michael S. Tsirkin, 2022/11/07
- [PULL v4 13/83] acpi/tests/avocado/bits: add biosbits config file for running bios tests, Michael S. Tsirkin, 2022/11/07
- [PULL v4 14/83] acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses biosbits, Michael S. Tsirkin, 2022/11/07
- [PULL v4 10/83] cryptodev: Add a lkcf-backend for cryptodev, Michael S. Tsirkin, 2022/11/07