From: "Jan Beulich" Subject: [PATCH 1/2] hvmloader: avoid named helper symbols Date: Thu, 08 Jan 2015 16:31:47 +0000 Message-ID: <54AEBF030200007800052D13@mail.emea.novell.com> References: <54AEBCE60200007800052CEE@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartC1F436E3.1__=" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y9Fzz-0000DK-7D for xen-devel@lists.xenproject.org; Thu, 08 Jan 2015 16:31:51 +0000 In-Reply-To: <54AEBCE60200007800052CEE@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Ian Campbell , Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartC1F436E3.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 instead. Reported-by: Ian Campbell Signed-off-by: Jan Beulich --- a/tools/firmware/hvmloader/acpi/dsdt.asl +++ b/tools/firmware/hvmloader/acpi/dsdt.asl @@ -109,7 +109,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,=20 =20 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,=20 0x0000000000000010, ,, _Y02) =20 - }) + }, Local1) =20 - 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) =20 Store(\_SB.PMIN, MMIN) Store(\_SB.PLEN, MLEN) @@ -192,12 +192,12 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,=20 } 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) =20 Store(\_SB.LMIN, MINL) Store(\_SB.HMIN, MINH) @@ -215,7 +215,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,=20 Subtract(MAXL, One, MAXL) } =20 - Return (PRT0) + Return (Local1) } =20 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",=20 HLP8 (Arg0, Local0) Increment (Local0) } + Return (Arg0) } =20 Method (HLPA, 0, NotSerialized) { Store (HLP6 (), Local0) - Name (TMP, Buffer (Local0) {}) - HLP9 (TMP, Local0) - Return (TMP) + Return (HLP9 (Buffer (Local0) {}, Local0)) } =20 Method (REL, 0, NotSerialized) @@ -372,14 +371,14 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT",=20 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) } } =20 @@ -409,13 +408,13 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT",=20 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) } } } --=__PartC1F436E3.1__= Content-Type: text/plain; name="hvmloader-ASL-temporaries.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="hvmloader-ASL-temporaries.patch" hvmloader: avoid named helper symbols=0A=0ANewer iasl validly complains = that such routines would otherwise need to=0Abe marked Serialized (in the = SSDT case it can't know that explicit=0Aserialization is being enforced), = which is undesirable. Use Local=0Ainstead.=0A=0AReported-by: Ian = Campbell =0ASigned-off-by: Jan Beulich =0A=0A--- a/tools/firmware/hvmloader/acpi/dsdt.asl=0A+++ b/tools/fi= rmware/hvmloader/acpi/dsdt.asl=0A@@ -109,7 +109,7 @@ DefinitionBlock = ("DSDT.aml", "DSDT", 2, =0A =0A Method (_CRS, 0, NotSerialized)= =0A {=0A- Name (PRT0, ResourceTemplate ()=0A+ = Store (ResourceTemplate ()=0A {=0A = /* bus number is from 0 - 255*/=0A WordBusNumber(=0A= @@ -167,11 +167,11 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, =0A = 0x0000000000000010,=0A ,, _Y02)=0A = =0A- })=0A+ }, Local1)=0A =0A- = CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MIN, MMIN)=0A- = CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MAX, MMAX)=0A- = CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._LEN, MLEN)=0A+ = CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._MIN, MMIN)=0A+ = CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._MAX, MMAX)=0A+ = CreateDWordField(Local1, \_SB.PCI0._CRS._Y01._LEN, MLEN)=0A =0A = Store(\_SB.PMIN, MMIN)=0A Store(\_SB.PLEN, = MLEN)=0A@@ -192,12 +192,12 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, =0A = } Else {=0A Store(\_SB.PCI0._CRS._Y02, = Local0)=0A }=0A- CreateDWordField(PRT0, = Add(Local0, 14), MINL)=0A- CreateDWordField(PRT0, Add(Local0= , 18), MINH)=0A- CreateDWordField(PRT0, Add(Local0, 22), = MAXL)=0A- CreateDWordField(PRT0, Add(Local0, 26), MAXH)=0A- = CreateDWordField(PRT0, Add(Local0, 38), LENL)=0A- = CreateDWordField(PRT0, Add(Local0, 42), LENH)=0A+ = CreateDWordField(Local1, Add(Local0, 14), MINL)=0A+ = CreateDWordField(Local1, Add(Local0, 18), MINH)=0A+ = CreateDWordField(Local1, Add(Local0, 22), MAXL)=0A+ = CreateDWordField(Local1, Add(Local0, 26), MAXH)=0A+ = CreateDWordField(Local1, Add(Local0, 38), LENL)=0A+ = CreateDWordField(Local1, Add(Local0, 42), LENH)=0A =0A = Store(\_SB.LMIN, MINL)=0A Store(\_SB.HMIN, MINH)=0A@@ = -215,7 +215,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, =0A = Subtract(MAXL, One, MAXL)=0A }=0A =0A- = Return (PRT0)=0A+ Return (Local1)=0A }=0A =0A = Device(HPET) {=0A--- a/tools/firmware/hvmloader/acpi/ssdt_pm.asl= =0A+++ b/tools/firmware/hvmloader/acpi/ssdt_pm.asl=0A@@ -276,14 +276,13 @@ = DefinitionBlock ("SSDT_PM.aml", "SSDT", =0A HLP8 (Arg0, = Local0)=0A Increment (Local0)=0A }=0A+ = Return (Arg0)=0A }=0A =0A Method (HLPA, 0, NotSerialized= )=0A {=0A Store (HLP6 (), Local0)=0A- Name = (TMP, Buffer (Local0) {})=0A- HLP9 (TMP, Local0)=0A- = Return (TMP)=0A+ Return (HLP9 (Buffer (Local0) {}, Local0))=0A = }=0A =0A Method (REL, 0, NotSerialized)=0A@@ -372,14 = +371,14 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", =0A = INIT (0x02)=0A INIT (0x01)=0A HLP5 ()=0A- = Name (BST0, Package (0x04) {})=0A- Store = (HLP7 (), Index (BST0, 0x00))=0A- Store (HLP7 (), Index = (BST0, 0x01))=0A- Store (HLP7 (), Index (BST0, 0x02))=0A- = Store (HLP7 (), Index (BST0, 0x03))=0A+ Store = (Package (0x04) {}, Local0)=0A+ Store (HLP7 (), Index = (Local0, 0x00))=0A+ Store (HLP7 (), Index (Local0, = 0x01))=0A+ Store (HLP7 (), Index (Local0, 0x02))=0A+ = Store (HLP7 (), Index (Local0, 0x03))=0A REL ()=0A = Store (2, \_SB.DBG1)=0A- Return (BST0)=0A+ = Return (Local0)=0A }=0A }=0A =0A@@ = -409,13 +408,13 @@ DefinitionBlock ("SSDT_PM.aml", "SSDT", =0A = INIT (0x02)=0A INIT (0x02)=0A HLP5 = ()=0A- Name (BST1, Package (0x04) {})=0A- = Store (HLP7 (), Index (BST1, 0x00))=0A- Store (HLP7 (), = Index (BST1, 0x01))=0A- Store (HLP7 (), Index (BST1, = 0x02))=0A- Store (HLP7 (), Index (BST1, 0x03))=0A+ = Store (Package (0x04) {}, Local0)=0A+ Store (HLP7 (), = Index (Local0, 0x00))=0A+ Store (HLP7 (), Index (Local0, = 0x01))=0A+ Store (HLP7 (), Index (Local0, 0x02))=0A+ = Store (HLP7 (), Index (Local0, 0x03))=0A REL = ()=0A- Return (BST1)=0A+ Return (Local0)=0A = }=0A }=0A }=0A --=__PartC1F436E3.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__PartC1F436E3.1__=--