All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Andrew Deason <adeason@sinenomine.net>
Cc: "Eduardo Habkost" <eduardo@habkost.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Ani Sinha" <ani@anisinha.ca>,
	"Igor Mammedov" <imammedo@redhat.com>
Subject: Re: [PATCH v3 2/3] hw/i386/acpi-build: Avoid 'sun' identifier
Date: Wed, 16 Mar 2022 04:55:11 -0400	[thread overview]
Message-ID: <20220316045448-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220316035227.3702-3-adeason@sinenomine.net>

On Tue, Mar 15, 2022 at 10:52:26PM -0500, Andrew Deason wrote:
> On Solaris, 'sun' is #define'd to 1, which causes errors if a variable
> is named 'sun'. Slightly change the name of the var for the Slot User
> Number so we can build on Solaris.
> 
> Reviewed-by: Ani Sinha <ani@anisinha.ca>
> Signed-off-by: Andrew Deason <adeason@sinenomine.net>


Reviewed-by: Michael S. Tsirkin <mst@redhat.com>


> ---
>  hw/i386/acpi-build.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 4ad4d7286c..dcf6ece3d0 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -576,32 +576,32 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
>  }
>  
>  Aml *aml_pci_device_dsm(void)
>  {
>      Aml *method, *UUID, *ifctx, *ifctx1, *ifctx2, *ifctx3, *elsectx;
>      Aml *acpi_index = aml_local(0);
>      Aml *zero = aml_int(0);
>      Aml *bnum = aml_arg(4);
>      Aml *func = aml_arg(2);
>      Aml *rev = aml_arg(1);
> -    Aml *sun = aml_arg(5);
> +    Aml *sunum = aml_arg(5);
>  
>      method = aml_method("PDSM", 6, AML_SERIALIZED);
>  
>      /*
>       * PCI Firmware Specification 3.1
>       * 4.6.  _DSM Definitions for PCI
>       */
>      UUID = aml_touuid("E5C937D0-3553-4D7A-9117-EA4D19C3434D");
>      ifctx = aml_if(aml_equal(aml_arg(0), UUID));
>      {
> -        aml_append(ifctx, aml_store(aml_call2("AIDX", bnum, sun), acpi_index));
> +        aml_append(ifctx, aml_store(aml_call2("AIDX", bnum, sunum), acpi_index));
>          ifctx1 = aml_if(aml_equal(func, zero));
>          {
>              uint8_t byte_list[1];
>  
>              ifctx2 = aml_if(aml_equal(rev, aml_int(2)));
>              {
>                  /*
>                   * advertise function 7 if device has acpi-index
>                   * acpi_index values:
>                   *            0: not present (default value)
> -- 
> 2.11.0



  reply	other threads:[~2022-03-16  8:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16  3:52 [PATCH v3 0/3] Fixes for building on Solaris 11.4.42 CBE Andrew Deason
2022-03-16  3:52 ` [PATCH v3 1/3] util/osdep: Avoid madvise proto on modern Solaris Andrew Deason
2022-03-18 11:26   ` Peter Maydell
2022-03-16  3:52 ` [PATCH v3 2/3] hw/i386/acpi-build: Avoid 'sun' identifier Andrew Deason
2022-03-16  8:55   ` Michael S. Tsirkin [this message]
2022-03-16  3:52 ` [PATCH v3 3/3] util/osdep: Remove some early cruft Andrew Deason
2022-03-16  8:55 ` [PATCH v3 0/3] Fixes for building on Solaris 11.4.42 CBE Michael S. Tsirkin
2022-03-18 11:26   ` Peter Maydell

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=20220316045448-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=adeason@sinenomine.net \
    --cc=ani@anisinha.ca \
    --cc=berrange@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.