qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, ani@anisinha.ca
Subject: [PATCH 12/17] x86: pci: acpi: reorder Device's _ADR and _SUN fields
Date: Fri,  1 Jul 2022 09:35:10 -0400	[thread overview]
Message-ID: <20220701133515.137890-13-imammedo@redhat.com> (raw)
In-Reply-To: <20220701133515.137890-1-imammedo@redhat.com>

no functional change, align order of fields in empty slot
descriptor with a populated slot ordering.
Expected diff:
  -                Name (_SUN, 0x0X)  // _SUN: Slot User Number
                   Name (_ADR, 0xY)  // _ADR: Address
  ...
  +                Name (_SUN, 0xX)  // _SUN: Slot User Number

that will eliminate contextual changes (causing test failures)
when follow up patches merge code generating populated and empty
slots descriptors.

Put mandatory _ADR as the 1st field, then ASUN as it can be
present for both pupulated and empty slots and only then _SUN
which is present only when slot is hotpluggable.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 36fe43c52f..fd7f3253e5 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -442,8 +442,8 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
                     break;
                 }
                 dev = aml_device("S%.02X", devfn);
-                aml_append(dev, aml_name_decl("ASUN", aml_int(slot)));
                 aml_append(dev, aml_name_decl("_ADR", aml_int(adr)));
+                aml_append(dev, aml_name_decl("ASUN", aml_int(slot)));
                 aml_append(dev, aml_name_decl("_SUN", aml_int(slot)));
                 method = aml_method("_EJ0", 1, AML_NOTSERIALIZED);
                 aml_append(method,
-- 
2.31.1



  parent reply	other threads:[~2022-07-01 13:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 13:34 [PATCH 00/17] acpi:pc/q35: minor PCI refactoring/cleanups Igor Mammedov
2022-07-01 13:34 ` [PATCH 01/17] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move Igor Mammedov
2022-07-01 13:35 ` [PATCH 02/17] acpi: x86: deduplicate HPET AML building Igor Mammedov
2022-07-01 16:26   ` Michael S. Tsirkin
2022-07-07  9:16     ` Igor Mammedov
2022-07-07 10:08       ` Michael S. Tsirkin
2022-07-07 10:55         ` Igor Mammedov
2022-07-01 13:35 ` [PATCH 03/17] tests: acpi: update expected blobs after HPET move Igor Mammedov
2022-07-01 13:35 ` [PATCH 04/17] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move Igor Mammedov
2022-07-01 13:35 ` [PATCH 05/17] acpi: x86: refactor PDSM method to reduce nesting Igor Mammedov
2022-07-01 13:35 ` [PATCH 06/17] x86: acpi: _DSM: use Package to pass parameters Igor Mammedov
2022-07-01 13:35 ` [PATCH 07/17] tests: acpi: update expected blobs Igor Mammedov
2022-07-01 13:35 ` [PATCH 08/17] tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN Igor Mammedov
2022-07-01 13:35 ` [PATCH 09/17] x86: acpi: cleanup PCI device _DSM duplication Igor Mammedov
2022-07-01 13:35 ` [PATCH 10/17] tests: acpi: update expected blobs Igor Mammedov
2022-07-01 13:35 ` [PATCH 11/17] tests: acpi: whitelist pc/q35 DSDT before moving _ADR field Igor Mammedov
2022-07-01 13:35 ` Igor Mammedov [this message]
2022-07-01 13:35 ` [PATCH 13/17] tests: acpi: update expected blobs Igor Mammedov
2022-07-01 13:35 ` [PATCH 14/17] tests: acpi: whitelist pc/q35 DSDT before moving _ADR field Igor Mammedov
2022-07-01 13:35 ` [PATCH 15/17] x86: pci: acpi: reorder Device's _DSM method Igor Mammedov
2022-07-01 13:35 ` [PATCH 16/17] tests: acpi: update expected blobs Igor Mammedov
2022-07-01 13:35 ` [PATCH 17/17] x86: pci: acpi: deduplate PCI slots creation Igor Mammedov
2022-09-06 11:41 ` [PATCH 00/17] acpi:pc/q35: minor PCI refactoring/cleanups Igor Mammedov
2022-09-06 13:10   ` Michael S. Tsirkin
2022-09-27 10:20     ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220701133515.137890-13-imammedo@redhat.com \
    --to=imammedo@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).