hvmloader: avoid named helper symbols
authorJan Beulich <jbeulich@suse.com>
Fri, 9 Jan 2015 16:32:54 +0000 (17:32 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 9 Jan 2015 16:32:54 +0000 (17:32 +0100)
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.Campbell@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/firmware/hvmloader/acpi/dsdt.asl
tools/firmware/hvmloader/acpi/ssdt_pm.asl

index 5610385024a0d464531883b3e146eeeb1c5818da..fc1f3095b1acbf11be9c390dcd9137c5225ad501 100644 (file)
@@ -109,7 +109,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "Xen", "HVM", 0)
 
            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, "Xen", "HVM", 0)
                         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, "Xen", "HVM", 0)
                 } 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, "Xen", "HVM", 0)
                     Subtract(MAXL, One, MAXL)
                 }
 
-                Return (PRT0)
+                Return (Local1)
             }
 
             Device(HPET) {
index afb78b6b4243f425dcf6e2e7d269201346df237c..48e6d05861660483c4d617faa16d06d4360f99ad 100644 (file)
@@ -276,14 +276,13 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", 2, "Xen", "HVM", 0)
                 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", 2, "Xen", "HVM", 0)
                 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", 2, "Xen", "HVM", 0)
                 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)
             }
         }
     }