Commit e674132a authored by Yang Zhong's avatar Yang Zhong Committed by Michael S. Tsirkin
Browse files

hw: acpi: Fix memory hotplug AML generation error



When using the generated memory hotplug AML, the iasl
compiler would give the following error:

dsdt.dsl 266: Return (MOST (_UID, Arg0, Arg1, Arg2))
Error 6080 - Called method returns no value ^

Signed-off-by: default avatarYang Zhong <yang.zhong@intel.com>
Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent ffab1be7
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -686,15 +686,15 @@ void build_memory_hotplug_aml(Aml *table, uint32_t nr_mem,

            method = aml_method("_OST", 3, AML_NOTSERIALIZED);
            s = MEMORY_SLOT_OST_METHOD;
            aml_append(method, aml_return(aml_call4(
                s, aml_name("_UID"), aml_arg(0), aml_arg(1), aml_arg(2)
            )));
            aml_append(method,
                       aml_call4(s, aml_name("_UID"), aml_arg(0),
                                 aml_arg(1), aml_arg(2)));
            aml_append(dev, method);

            method = aml_method("_EJ0", 1, AML_NOTSERIALIZED);
            s = MEMORY_SLOT_EJECT_METHOD;
            aml_append(method, aml_return(aml_call2(
                       s, aml_name("_UID"), aml_arg(0))));
            aml_append(method,
                       aml_call2(s, aml_name("_UID"), aml_arg(0)));
            aml_append(dev, method);

            aml_append(dev_container, dev);