Skip to contentSkip to conversation

acpi: add a missing backslash to the \_SB scope.

PATCH In review Gal Hammer 4 participants 6 messages Apr 21, 2015 – Apr 22, 2015

lore
Share & tools
lore

Gal Hammer

author
#0 lore raw

PATCH 1/1 acpi: add a missing backslash to the \_SB scope.

A predefined scope in the ACPI specs is precede with a backslash.

---
 hw/i386/acpi-build.c        | 2 +-
 include/hw/acpi/aml-build.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/i386/acpi-build.c +1 -1
index 8d1a761..05c1d34 100644
@@ -856,7 +856,7 @@ build_ssdt(GArray *table_data, GArray *linker,
         aml_append(ssdt, scope);
     }
 
-    sb_scope = aml_scope("_SB");
+    sb_scope = aml_scope("\\_SB");
     {
         /* create PCI0.PRES device and its _CRS to reserve CPU hotplug MMIO */
         dev = aml_device("PCI0." stringify(CPU_HOTPLUG_RESOURCE_DEVICE));
include/hw/acpi/aml-build.h +1 -1
index 48afb72..cb80f2a 100644
@@ -120,7 +120,7 @@ void free_aml_allocator(void);
  * Joins Aml elements together and helps to construct AML tables
  * Examle of usage:
  *   Aml *table = aml_def_block("SSDT", ...);
- *   Aml *sb = aml_scope("\_SB");
+ *   Aml *sb = aml_scope("\\_SB");
  *   Aml *dev = aml_device("PCI0");
  *
  *   aml_append(dev, aml_name_decl("HID", aml_eisaid("PNP0A03")));
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · On Tue, 21 Apr 2015 11:26:12 +0300 Gal Hammer <[email protected]> wrote:

A predefined scope in the ACPI specs is precede with a backslash.

Quoted 31 lines
---
 hw/i386/acpi-build.c        | 2 +-
 include/hw/acpi/aml-build.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/i386/acpi-build.c +1 -1
index 8d1a761..05c1d34 100644
@@ -856,7 +856,7 @@ build_ssdt(GArray *table_data, GArray *linker,
         aml_append(ssdt, scope);
     }
 
-    sb_scope = aml_scope("_SB");
+    sb_scope = aml_scope("\\_SB");
     {
         /* create PCI0.PRES device and its _CRS to reserve CPU hotplug MMIO */
         dev = aml_device("PCI0." stringify(CPU_HOTPLUG_RESOURCE_DEVICE));
include/hw/acpi/aml-build.h +1 -1
index 48afb72..cb80f2a 100644
@@ -120,7 +120,7 @@ void free_aml_allocator(void);
  * Joins Aml elements together and helps to construct AML tables
  * Examle of usage:
  *   Aml *table = aml_def_block("SSDT", ...);
- *   Aml *sb = aml_scope("\_SB");
+ *   Aml *sb = aml_scope("\\_SB");
  *   Aml *dev = aml_device("PCI0");
  *
  *   aml_append(dev, aml_name_decl("HID", aml_eisaid("PNP0A03")));
#2 lore raw
In reply to Gal Hammer
Quoted 3 lines · Gal Hammer

A predefined scope in the ACPI specs is precede with a backslash.

s/precede/preceded/

This is correct, but do we need this in 2.3? I'm split on this. Thoughts?
If yes, commit log needs better explanation on what the effect on guests is.

Quoted 33 lines
---
 hw/i386/acpi-build.c        | 2 +-
 include/hw/acpi/aml-build.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/i386/acpi-build.c +1 -1
index 8d1a761..05c1d34 100644
@@ -856,7 +856,7 @@ build_ssdt(GArray *table_data, GArray *linker,
         aml_append(ssdt, scope);
     }
 
-    sb_scope = aml_scope("_SB");
+    sb_scope = aml_scope("\\_SB");
     {
         /* create PCI0.PRES device and its _CRS to reserve CPU hotplug MMIO */
         dev = aml_device("PCI0." stringify(CPU_HOTPLUG_RESOURCE_DEVICE));
include/hw/acpi/aml-build.h +1 -1
index 48afb72..cb80f2a 100644
@@ -120,7 +120,7 @@ void free_aml_allocator(void);
  * Joins Aml elements together and helps to construct AML tables
  * Examle of usage:
  *   Aml *table = aml_def_block("SSDT", ...);
- *   Aml *sb = aml_scope("\_SB");
+ *   Aml *sb = aml_scope("\\_SB");
  *   Aml *dev = aml_device("PCI0");
  *
  *   aml_append(dev, aml_name_decl("HID", aml_eisaid("PNP0A03")));
Signature · 1 line
2.1.0
#3 lore raw
Quoted 11 lines · Michael S. Tsirkin
Quoted 3 lines · Gal Hammer

A predefined scope in the ACPI specs is precede with a backslash.

s/precede/preceded/

This is correct, but do we need this in 2.3? I'm split on this. Thoughts?
If yes, commit log needs better explanation on what the effect on guests is.

Unless the effect is absolutely catastrophic you've missed the boat for 2.3, and should settle for 2.4 + cc:stable.

thanks
-- PMM

#4 lore raw
Quoted 13 lines · Peter Maydell
Quoted 11 lines · Michael S. Tsirkin
Quoted 3 lines · Gal Hammer

A predefined scope in the ACPI specs is precede with a backslash.

s/precede/preceded/

This is correct, but do we need this in 2.3? I'm split on this. Thoughts?
If yes, commit log needs better explanation on what the effect on guests is.

Quoted 5 lines

Unless the effect is absolutely catastrophic you've missed the boat for 2.3, and should settle for 2.4 + cc:stable.

thanks
-- PMM

I rechecked a bunch of guests and they all seem to behave identically with and without the patch.
2.4 it is.

Thanks.

Signature · 1 line
MST
#5 lore raw
Quoted 17 lines · On Tue, 21 Apr 2015 14:53:54 +0200 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 16 lines · Peter Maydell
Quoted 11 lines · Michael S. Tsirkin
Quoted 3 lines · Gal Hammer

A predefined scope in the ACPI specs is precede with a backslash.

s/precede/preceded/

This is correct, but do we need this in 2.3? I'm split on this. Thoughts?
If yes, commit log needs better explanation on what the effect on guests is.

Unless the effect is absolutely catastrophic you've missed the boat for 2.3, and should settle for 2.4 + cc:stable.

Quoted 6 lines
Quoted 2 lines

thanks
-- PMM

I rechecked a bunch of guests and they all seem to behave identically with and without the patch.
2.4 it is.

Yep, it's cosmetic change, since that _SB was at the top level it's automatically attributed to root scope. Having explicit root in name doesn't hurt though and makes it consistent with other _SB declarations in the code.

Quoted 3 lines

Thanks.