Newer iasl validly complains that such routines would otherwise need to
be marked Serialized (in the SSDT case it can't know that explicit
serialization is being enforced), which is undesirable. Use Local<N>
instead.

Reported-by: Ian Campbell <ian.campb...@citrix.com>
Signed-off-by: Jan Beulich <jbeul...@suse.com>

--- a/tools/firmware/hvmloader/acpi/dsdt.asl
+++ b/tools/firmware/hvmloader/acpi/dsdt.asl
@@ -109,7 +109,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
 
            Method (_CRS, 0, NotSerialized)
            {
-               Name (PRT0, ResourceTemplate ()
+               Store (ResourceTemplate ()
                {
                    /* bus number is from 0 - 255*/
                    WordBusNumber(
@@ -167,11 +167,11 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                         0x0000000000000010,
                         ,, _Y02)
 
-                })
+                }, Local1)
 
-                CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MIN, MMIN)
-                CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MAX, MMAX)
-                CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._LEN, MLEN)
+                CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._MIN, MMIN)
+                CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._MAX, MMAX)
+                CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._LEN, MLEN)
 
                 Store(\_SB.PMIN, MMIN)
                 Store(\_SB.PLEN, MLEN)
@@ -192,12 +192,12 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                 } Else {
                     Store(\_SB.PCI0._CRS._Y02, Local0)
                 }
-                CreateDWordField(PRT0, Add(Local0, 14), MINL)
-                CreateDWordField(PRT0, Add(Local0, 18), MINH)
-                CreateDWordField(PRT0, Add(Local0, 22), MAXL)
-                CreateDWordField(PRT0, Add(Local0, 26), MAXH)
-                CreateDWordField(PRT0, Add(Local0, 38), LENL)
-                CreateDWordField(PRT0, Add(Local0, 42), LENH)
+                CreateDWordField(Local1, Add(Local0, 14), MINL)
+                CreateDWordField(Local1, Add(Local0, 18), MINH)
+                CreateDWordField(Local1, Add(Local0, 22), MAXL)
+                CreateDWordField(Local1, Add(Local0, 26), MAXH)
+                CreateDWordField(Local1, Add(Local0, 38), LENL)
+                CreateDWordField(Local1, Add(Local0, 42), LENH)
 
                 Store(\_SB.LMIN, MINL)
                 Store(\_SB.HMIN, MINH)
@@ -215,7 +215,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                     Subtract(MAXL, One, MAXL)
                 }
 
-                Return (PRT0)
+                Return (Local1)
             }
 
             Device(HPET) {
--- a/tools/firmware/hvmloader/acpi/ssdt_pm.asl
+++ b/tools/firmware/hvmloader/acpi/ssdt_pm.asl
@@ -276,14 +276,13 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", 
                 HLP8 (Arg0, Local0)
                 Increment (Local0)
             }
+            Return (Arg0)
         }
 
         Method (HLPA, 0, NotSerialized)
         {
             Store (HLP6 (), Local0)
-            Name (TMP, Buffer (Local0) {})
-            HLP9 (TMP, Local0)
-            Return (TMP)
+            Return (HLP9 (Buffer (Local0) {}, Local0))
         }
 
         Method (REL, 0, NotSerialized)
@@ -372,14 +371,14 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", 
                 INIT (0x02)
                 INIT (0x01)
                 HLP5 ()
-                Name (BST0, Package (0x04) {})
-                Store (HLP7 (), Index (BST0, 0x00))
-                Store (HLP7 (), Index (BST0, 0x01))
-                Store (HLP7 (), Index (BST0, 0x02))
-                Store (HLP7 (), Index (BST0, 0x03))
+                Store (Package (0x04) {}, Local0)
+                Store (HLP7 (), Index (Local0, 0x00))
+                Store (HLP7 (), Index (Local0, 0x01))
+                Store (HLP7 (), Index (Local0, 0x02))
+                Store (HLP7 (), Index (Local0, 0x03))
                 REL ()
                 Store (2, \_SB.DBG1)
-                Return (BST0)
+                Return (Local0)
             }
         }
 
@@ -409,13 +408,13 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", 
                 INIT (0x02)
                 INIT (0x02)
                 HLP5 ()
-                Name (BST1, Package (0x04) {})
-                Store (HLP7 (), Index (BST1, 0x00))
-                Store (HLP7 (), Index (BST1, 0x01))
-                Store (HLP7 (), Index (BST1, 0x02))
-                Store (HLP7 (), Index (BST1, 0x03))
+                Store (Package (0x04) {}, Local0)
+                Store (HLP7 (), Index (Local0, 0x00))
+                Store (HLP7 (), Index (Local0, 0x01))
+                Store (HLP7 (), Index (Local0, 0x02))
+                Store (HLP7 (), Index (Local0, 0x03))
                 REL ()
-                Return (BST1)
+                Return (Local0)
             }
         }
     }


hvmloader: avoid named helper symbols

Newer iasl validly complains that such routines would otherwise need to
be marked Serialized (in the SSDT case it can't know that explicit
serialization is being enforced), which is undesirable. Use Local<N>
instead.

Reported-by: Ian Campbell <ian.campb...@citrix.com>
Signed-off-by: Jan Beulich <jbeul...@suse.com>

--- a/tools/firmware/hvmloader/acpi/dsdt.asl
+++ b/tools/firmware/hvmloader/acpi/dsdt.asl
@@ -109,7 +109,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
 
            Method (_CRS, 0, NotSerialized)
            {
-               Name (PRT0, ResourceTemplate ()
+               Store (ResourceTemplate ()
                {
                    /* bus number is from 0 - 255*/
                    WordBusNumber(
@@ -167,11 +167,11 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                         0x0000000000000010,
                         ,, _Y02)
 
-                })
+                }, Local1)
 
-                CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MIN, MMIN)
-                CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MAX, MMAX)
-                CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._LEN, MLEN)
+                CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._MIN, MMIN)
+                CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._MAX, MMAX)
+                CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._LEN, MLEN)
 
                 Store(\_SB.PMIN, MMIN)
                 Store(\_SB.PLEN, MLEN)
@@ -192,12 +192,12 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                 } Else {
                     Store(\_SB.PCI0._CRS._Y02, Local0)
                 }
-                CreateDWordField(PRT0, Add(Local0, 14), MINL)
-                CreateDWordField(PRT0, Add(Local0, 18), MINH)
-                CreateDWordField(PRT0, Add(Local0, 22), MAXL)
-                CreateDWordField(PRT0, Add(Local0, 26), MAXH)
-                CreateDWordField(PRT0, Add(Local0, 38), LENL)
-                CreateDWordField(PRT0, Add(Local0, 42), LENH)
+                CreateDWordField(Local1, Add(Local0, 14), MINL)
+                CreateDWordField(Local1, Add(Local0, 18), MINH)
+                CreateDWordField(Local1, Add(Local0, 22), MAXL)
+                CreateDWordField(Local1, Add(Local0, 26), MAXH)
+                CreateDWordField(Local1, Add(Local0, 38), LENL)
+                CreateDWordField(Local1, Add(Local0, 42), LENH)
 
                 Store(\_SB.LMIN, MINL)
                 Store(\_SB.HMIN, MINH)
@@ -215,7 +215,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                     Subtract(MAXL, One, MAXL)
                 }
 
-                Return (PRT0)
+                Return (Local1)
             }
 
             Device(HPET) {
--- a/tools/firmware/hvmloader/acpi/ssdt_pm.asl
+++ b/tools/firmware/hvmloader/acpi/ssdt_pm.asl
@@ -276,14 +276,13 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", 
                 HLP8 (Arg0, Local0)
                 Increment (Local0)
             }
+            Return (Arg0)
         }
 
         Method (HLPA, 0, NotSerialized)
         {
             Store (HLP6 (), Local0)
-            Name (TMP, Buffer (Local0) {})
-            HLP9 (TMP, Local0)
-            Return (TMP)
+            Return (HLP9 (Buffer (Local0) {}, Local0))
         }
 
         Method (REL, 0, NotSerialized)
@@ -372,14 +371,14 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", 
                 INIT (0x02)
                 INIT (0x01)
                 HLP5 ()
-                Name (BST0, Package (0x04) {})
-                Store (HLP7 (), Index (BST0, 0x00))
-                Store (HLP7 (), Index (BST0, 0x01))
-                Store (HLP7 (), Index (BST0, 0x02))
-                Store (HLP7 (), Index (BST0, 0x03))
+                Store (Package (0x04) {}, Local0)
+                Store (HLP7 (), Index (Local0, 0x00))
+                Store (HLP7 (), Index (Local0, 0x01))
+                Store (HLP7 (), Index (Local0, 0x02))
+                Store (HLP7 (), Index (Local0, 0x03))
                 REL ()
                 Store (2, \_SB.DBG1)
-                Return (BST0)
+                Return (Local0)
             }
         }
 
@@ -409,13 +408,13 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", 
                 INIT (0x02)
                 INIT (0x02)
                 HLP5 ()
-                Name (BST1, Package (0x04) {})
-                Store (HLP7 (), Index (BST1, 0x00))
-                Store (HLP7 (), Index (BST1, 0x01))
-                Store (HLP7 (), Index (BST1, 0x02))
-                Store (HLP7 (), Index (BST1, 0x03))
+                Store (Package (0x04) {}, Local0)
+                Store (HLP7 (), Index (Local0, 0x00))
+                Store (HLP7 (), Index (Local0, 0x01))
+                Store (HLP7 (), Index (Local0, 0x02))
+                Store (HLP7 (), Index (Local0, 0x03))
                 REL ()
-                Return (BST1)
+                Return (Local0)
             }
         }
     }
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to