diff mbox series

[v5,16/24] hw: acpi: Fix memory hotplug AML generation error

Message ID 20181105014047.26447-17-sameo@linux.intel.com
State New
Headers show
Series ACPI reorganization for hardware-reduced API addition | expand

Commit Message

Samuel Ortiz Nov. 5, 2018, 1:40 a.m. UTC
From: Yang Zhong <yang.zhong@intel.com>

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: Yang Zhong <yang.zhong@intel.com>
---
 hw/acpi/memory_hotplug.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Igor Mammedov Nov. 8, 2018, 2:23 p.m. UTC | #1
On Mon,  5 Nov 2018 02:40:39 +0100
Samuel Ortiz <sameo@linux.intel.com> wrote:

> From: Yang Zhong <yang.zhong@intel.com>
> 
> 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: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>

I suggest to put this patch at the beginning of the series
before reference tables in test are updated.

> ---
>  hw/acpi/memory_hotplug.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
> index db2c4df961..893fc2bd27 100644
> --- a/hw/acpi/memory_hotplug.c
> +++ b/hw/acpi/memory_hotplug.c
> @@ -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);
Michael S. Tsirkin Jan. 14, 2019, 6:35 p.m. UTC | #2
On Thu, Nov 08, 2018 at 03:23:41PM +0100, Igor Mammedov wrote:
> On Mon,  5 Nov 2018 02:40:39 +0100
> Samuel Ortiz <sameo@linux.intel.com> wrote:
> 
> > From: Yang Zhong <yang.zhong@intel.com>
> > 
> > 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: Yang Zhong <yang.zhong@intel.com>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> 
> I suggest to put this patch at the beginning of the series
> before reference tables in test are updated.

Samuel how about a separate small series with just bugfixes
for starters?


> > ---
> >  hw/acpi/memory_hotplug.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
> > index db2c4df961..893fc2bd27 100644
> > --- a/hw/acpi/memory_hotplug.c
> > +++ b/hw/acpi/memory_hotplug.c
> > @@ -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);
diff mbox series

Patch

diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index db2c4df961..893fc2bd27 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -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);