All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/2] Hppa post v11 patches patches
@ 2026-05-19 15:18 Helge Deller
  2026-05-19 15:18 ` [PULL 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Helge Deller @ 2026-05-19 15:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, deller, Philippe Mathieu-Daudé

From: Helge Deller <deller@gmx.de>

The following changes since commit 6d17fd91f6cf88df5cb2205e578640d72605cc43:

  Merge tag 'pull-nvme-20260518' of https://gitlab.com/birkelund/qemu into staging (2026-05-18 08:33:20 -0400)

are available in the Git repository at:

  https://github.com/hdeller/qemu-hppa.git tags/hppa-post-v11-patches-pull-request

for you to fetch changes up to cf05a5c52716fae63a1792a67b94b0612cb800b8:

  hw/hppa: Move static variable lasi_dev into MachineState (2026-05-19 17:17:26 +0200)

----------------------------------------------------------------
Two hppa cleanup patches

Two leftover cleanup patches which I did not wanted to merge shortly before the qemu-v11 release.
Nothing critical, and both suggested by Philippe Mathieu-Daudé.

----------------------------------------------------------------

Helge Deller (2):
  hw/pci-host/astro: Encode Astro version numbers
  hw/hppa: Move static variable lasi_dev into MachineState

 hw/hppa/machine.c   | 15 ++++++++++-----
 hw/pci-host/astro.c |  5 ++++-
 2 files changed, 14 insertions(+), 6 deletions(-)

-- 
2.54.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PULL 1/2] hw/pci-host/astro: Encode Astro version numbers
  2026-05-19 15:18 [PULL 0/2] Hppa post v11 patches patches Helge Deller
@ 2026-05-19 15:18 ` Helge Deller
  2026-05-19 15:18 ` [PULL 2/2] hw/hppa: Move static variable lasi_dev into MachineState Helge Deller
  2026-05-19 20:51 ` [PULL 0/2] Hppa post v11 patches patches Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Helge Deller @ 2026-05-19 15:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, deller, Philippe Mathieu-Daudé

From: Helge Deller <deller@gmx.de>

Add enum which encodes the Astro version numbers.

Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/pci-host/astro.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 8c61c696bd..fc07608da7 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -41,6 +41,9 @@ static const int elroy_hpa_offsets[ELROY_NUM] = {
 static const char elroy_rope_nr[ELROY_NUM] = {
             0, 1, 4, 6 }; /* busnum path, e.g. [10:6] */
 
+/* Astro version numbers */
+enum { ID_ASTRO_1_0 = 0, ID_ASTRO_2_1 = 9, ID_ASTRO_3_0 = 2 };
+
 /*
  * Helper functions
  */
@@ -738,7 +741,7 @@ static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr,
     switch ((addr >> 3) << 3) {
     /* R2I registers */
     case 0x0000:        /* ID */
-        val = (0x01 << 3) | 0x01ULL;
+        val = ID_ASTRO_2_1;
         break;
     case 0x0008:        /* IOC_CTRL */
         val = s->ioc_ctrl;
-- 
2.54.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PULL 2/2] hw/hppa: Move static variable lasi_dev into MachineState
  2026-05-19 15:18 [PULL 0/2] Hppa post v11 patches patches Helge Deller
  2026-05-19 15:18 ` [PULL 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
@ 2026-05-19 15:18 ` Helge Deller
  2026-05-19 20:51 ` [PULL 0/2] Hppa post v11 patches patches Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Helge Deller @ 2026-05-19 15:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, deller, Philippe Mathieu-Daudé

From: Helge Deller <deller@gmx.de>

Avoid static variables, so move lasi_dev into the MachineState struct.

Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/hppa/machine.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 0937d90ed2..d762163ddf 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -44,6 +44,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(HppaMachineState, HPPA_COMMON_MACHINE)
 struct HppaMachineState {
     MachineState parent_obj;
 
+    DeviceState *lasi_dev;
     uint64_t memsplit_addr;
 };
 
@@ -52,8 +53,6 @@ struct HppaMachineState {
 #define HPA_POWER_BUTTON        (FIRMWARE_END - 0x10)
 static hwaddr soft_power_reg;
 
-static DeviceState *lasi_dev;
-
 static void hppa_powerdown_req(Notifier *n, void *opaque)
 {
     uint32_t val;
@@ -399,7 +398,8 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
 {
     const char *kernel_filename = machine->kernel_filename;
     MachineClass *mc = MACHINE_GET_CLASS(machine);
-    DeviceState *dev;
+    HppaMachineState *hpm = HPPA_COMMON_MACHINE(machine);
+    DeviceState *dev, *lasi_dev;
     PCIDevice *pci_dev;
     long size;
     uint64_t kernel_entry = 0;
@@ -408,6 +408,7 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
     SysBusDevice *s;
 
     /* Graphics setup. */
+    lasi_dev = hpm->lasi_dev;
     if (lasi_dev && machine->enable_graphics &&
         vga_interface_type != VGA_NONE) {
         dev = qdev_new("artist");
@@ -576,7 +577,8 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
  */
 static void machine_HP_715_init(MachineState *machine)
 {
-    DeviceState *dev;
+    HppaMachineState *hpm = HPPA_COMMON_MACHINE(machine);
+    DeviceState *dev, *lasi_dev;
     MemoryRegion *addr_space = get_system_memory();
     TranslateFn *translate;
     ISABus *isa_bus;
@@ -596,6 +598,7 @@ static void machine_HP_715_init(MachineState *machine)
 
     /* Init Lasi chip */
     lasi_dev = DEVICE(lasi_init());
+    hpm->lasi_dev = lasi_dev;
     memory_region_add_subregion(addr_space, translate(NULL, LASI_HPA_715),
                                 sysbus_mmio_get_region(
                                     SYS_BUS_DEVICE(lasi_dev), 0));
@@ -652,7 +655,8 @@ static void machine_HP_715_init(MachineState *machine)
  */
 static void machine_HP_B160L_init(MachineState *machine)
 {
-    DeviceState *dev, *dino_dev;
+    HppaMachineState *hpm = HPPA_COMMON_MACHINE(machine);
+    DeviceState *dev, *dino_dev, *lasi_dev;
     MemoryRegion *addr_space = get_system_memory();
     TranslateFn *translate;
     ISABus *isa_bus;
@@ -669,6 +673,7 @@ static void machine_HP_B160L_init(MachineState *machine)
 
     /* Init Lasi chip */
     lasi_dev = DEVICE(lasi_init());
+    hpm->lasi_dev = lasi_dev;
     memory_region_add_subregion(addr_space, translate(NULL, LASI_HPA),
                                 sysbus_mmio_get_region(
                                     SYS_BUS_DEVICE(lasi_dev), 0));
-- 
2.54.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PULL 0/2] Hppa post v11 patches patches
  2026-05-19 15:18 [PULL 0/2] Hppa post v11 patches patches Helge Deller
  2026-05-19 15:18 ` [PULL 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
  2026-05-19 15:18 ` [PULL 2/2] hw/hppa: Move static variable lasi_dev into MachineState Helge Deller
@ 2026-05-19 20:51 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2026-05-19 20:51 UTC (permalink / raw)
  To: Helge Deller
  Cc: qemu-devel, Richard Henderson, deller,
	Philippe Mathieu-Daudé

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-19 20:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 15:18 [PULL 0/2] Hppa post v11 patches patches Helge Deller
2026-05-19 15:18 ` [PULL 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
2026-05-19 15:18 ` [PULL 2/2] hw/hppa: Move static variable lasi_dev into MachineState Helge Deller
2026-05-19 20:51 ` [PULL 0/2] Hppa post v11 patches patches Stefan Hajnoczi

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.