All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Amit Shah <amit.shah@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Leon Alrae <leon.alrae@imgtec.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 3/3] hw/acpi: piix4_pm_init(): take fw_cfg object no more
Date: Wed, 29 Apr 2015 15:28:41 +0200	[thread overview]
Message-ID: <5540DC89.1080800@redhat.com> (raw)
In-Reply-To: <1430313616-27348-4-git-send-email-lersek@redhat.com>

On 04/29/15 15:20, Laszlo Ersek wrote:
> This PIIX4 init function has no more reason to receive a pointer to the
> FwCfg object. Remove the parameter from the prototype, and update callers.
> 
> As a result, the pc_init1() function no longer needs to save the return
> value of pc_memory_init() and xen_load_linux(), which makes it more
> similar to pc_memory_init().

Argh, mis-paste. Whoever picks this up (assuming the patches are good
enough), please replace the 2nd instance of pc_memory_init() with
pc_q35_init().

Thanks!
Laszlo

> The return type & value of pc_memory_init() and xen_load_linux() are not
> changed themselves; maybe we'll need their return values sometime later.
> 
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696
> Cc: Amit Shah <amit.shah@redhat.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> Cc: Leon Alrae <leon.alrae@imgtec.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>  include/hw/i386/pc.h |  3 +--
>  hw/acpi/piix4.c      |  3 +--
>  hw/i386/pc_piix.c    | 19 +++++++++----------
>  hw/mips/mips_malta.c |  2 +-
>  4 files changed, 12 insertions(+), 15 deletions(-)
> 
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 1b35168..3d966fa 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -219,8 +219,7 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name);
>  
>  I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
>                        qemu_irq sci_irq, qemu_irq smi_irq,
> -                      int kvm_enabled, FWCfgState *fw_cfg,
> -                      DeviceState **piix4_pm);
> +                      int kvm_enabled, DeviceState **piix4_pm);
>  void piix4_smbus_register_device(SMBusDevice *dev, uint8_t addr);
>  
>  /* hpet.c */
> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> index c53a31a..1e8e174 100644
> --- a/hw/acpi/piix4.c
> +++ b/hw/acpi/piix4.c
> @@ -492,8 +492,7 @@ Object *piix4_pm_find(void)
>  
>  I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
>                        qemu_irq sci_irq, qemu_irq smi_irq,
> -                      int kvm_enabled, FWCfgState *fw_cfg,
> -                      DeviceState **piix4_pm)
> +                      int kvm_enabled, DeviceState **piix4_pm)
>  {
>      DeviceState *dev;
>      PIIX4PMState *s;
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 1fe7bfb..0529434 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -99,7 +99,6 @@ static void pc_init1(MachineState *machine,
>      MemoryRegion *pci_memory;
>      MemoryRegion *rom_memory;
>      DeviceState *icc_bridge;
> -    FWCfgState *fw_cfg = NULL;
>      PcGuestInfo *guest_info;
>      ram_addr_t lowmem;
>  
> @@ -180,16 +179,16 @@ static void pc_init1(MachineState *machine,
>  
>      /* allocate ram and load rom/bios */
>      if (!xen_enabled()) {
> -        fw_cfg = pc_memory_init(machine, system_memory,
> -                                below_4g_mem_size, above_4g_mem_size,
> -                                rom_memory, &ram_memory, guest_info);
> +        pc_memory_init(machine, system_memory,
> +                       below_4g_mem_size, above_4g_mem_size,
> +                       rom_memory, &ram_memory, guest_info);
>      } else if (machine->kernel_filename != NULL) {
>          /* For xen HVM direct kernel boot, load linux here */
> -        fw_cfg = xen_load_linux(machine->kernel_filename,
> -                                machine->kernel_cmdline,
> -                                machine->initrd_filename,
> -                                below_4g_mem_size,
> -                                guest_info);
> +        xen_load_linux(machine->kernel_filename,
> +                       machine->kernel_cmdline,
> +                       machine->initrd_filename,
> +                       below_4g_mem_size,
> +                       guest_info);
>      }
>  
>      gsi_state = g_malloc0(sizeof(*gsi_state));
> @@ -288,7 +287,7 @@ static void pc_init1(MachineState *machine,
>          /* TODO: Populate SPD eeprom data.  */
>          smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100,
>                                gsi[9], *smi_irq,
> -                              kvm_enabled(), fw_cfg, &piix4_pm);
> +                              kvm_enabled(), &piix4_pm);
>          smbus_eeprom_init(smbus, 8, NULL, 0);
>  
>          object_property_add_link(OBJECT(machine), PC_MACHINE_ACPI_DEVICE_PROP,
> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> index b0fa71a..79ab678 100644
> --- a/hw/mips/mips_malta.c
> +++ b/hw/mips/mips_malta.c
> @@ -1160,7 +1160,7 @@ void mips_malta_init(MachineState *machine)
>      pci_piix4_ide_init(pci_bus, hd, piix4_devfn + 1);
>      pci_create_simple(pci_bus, piix4_devfn + 2, "piix4-usb-uhci");
>      smbus = piix4_pm_init(pci_bus, piix4_devfn + 3, 0x1100,
> -                          isa_get_irq(NULL, 9), NULL, 0, NULL, NULL);
> +                          isa_get_irq(NULL, 9), NULL, 0, NULL);
>      smbus_eeprom_init(smbus, 8, smbus_eeprom_buf, smbus_eeprom_size);
>      g_free(smbus_eeprom_buf);
>      pit = pit_init(isa_bus, 0x40, 0, NULL);
> 

  reply	other threads:[~2015-04-29 13:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 13:20 [Qemu-devel] [PATCH 0/3] provide "etc/system-states" on Q35 too Laszlo Ersek
2015-04-29 13:20 ` [Qemu-devel] [PATCH 1/3] hw/acpi: acpi_pm1_cnt_init(): take "disable_s3" and "disable_s4" Laszlo Ersek
2015-04-29 13:20 ` [Qemu-devel] [PATCH 2/3] hw/acpi: move "etc/system-states" fw_cfg file from PIIX4 to core Laszlo Ersek
2015-04-29 13:20 ` [Qemu-devel] [PATCH 3/3] hw/acpi: piix4_pm_init(): take fw_cfg object no more Laszlo Ersek
2015-04-29 13:28   ` Laszlo Ersek [this message]
2015-04-29 13:27 ` [Qemu-devel] [PATCH 0/3] provide "etc/system-states" on Q35 too Paolo Bonzini
2015-04-29 16:36 ` Amit Shah
2015-06-03 16:18 ` Michael S. Tsirkin

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=5540DC89.1080800@redhat.com \
    --to=lersek@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=ehabkost@redhat.com \
    --cc=leon.alrae@imgtec.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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.