* [PATCH 0/2] Two hppa cleanup patches
@ 2026-05-19 13:33 Helge Deller
2026-05-19 13:33 ` [PATCH 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Helge Deller @ 2026-05-19 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Helge Deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
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é.
Please review.
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] 5+ messages in thread
* [PATCH 1/2] hw/pci-host/astro: Encode Astro version numbers
2026-05-19 13:33 [PATCH 0/2] Two hppa cleanup patches Helge Deller
@ 2026-05-19 13:33 ` Helge Deller
2026-05-19 13:33 ` [PATCH 2/2] hw/hppa: Move static variable lasi_dev into MachineState Helge Deller
2026-05-19 14:33 ` [PATCH 0/2] Two hppa cleanup patches Philippe Mathieu-Daudé
2 siblings, 0 replies; 5+ messages in thread
From: Helge Deller @ 2026-05-19 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Helge Deller, Richard Henderson
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>
---
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] 5+ messages in thread
* [PATCH 2/2] hw/hppa: Move static variable lasi_dev into MachineState
2026-05-19 13:33 [PATCH 0/2] Two hppa cleanup patches Helge Deller
2026-05-19 13:33 ` [PATCH 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
@ 2026-05-19 13:33 ` Helge Deller
2026-05-19 13:42 ` Peter Maydell
2026-05-19 14:33 ` [PATCH 0/2] Two hppa cleanup patches Philippe Mathieu-Daudé
2 siblings, 1 reply; 5+ messages in thread
From: Helge Deller @ 2026-05-19 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Helge Deller, Richard Henderson
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>
---
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] 5+ messages in thread
* Re: [PATCH 2/2] hw/hppa: Move static variable lasi_dev into MachineState
2026-05-19 13:33 ` [PATCH 2/2] hw/hppa: Move static variable lasi_dev into MachineState Helge Deller
@ 2026-05-19 13:42 ` Peter Maydell
0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2026-05-19 13:42 UTC (permalink / raw)
To: Helge Deller
Cc: qemu-devel, Philippe Mathieu-Daudé, Helge Deller,
Richard Henderson
On Tue, 19 May 2026 at 14:33, Helge Deller <deller@kernel.org> wrote:
>
> 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: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] Two hppa cleanup patches
2026-05-19 13:33 [PATCH 0/2] Two hppa cleanup patches Helge Deller
2026-05-19 13:33 ` [PATCH 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
2026-05-19 13:33 ` [PATCH 2/2] hw/hppa: Move static variable lasi_dev into MachineState Helge Deller
@ 2026-05-19 14:33 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-19 14:33 UTC (permalink / raw)
To: Helge Deller, qemu-devel; +Cc: Helge Deller, Richard Henderson
On 19/5/26 15:33, Helge Deller wrote:
> From: Helge Deller <deller@gmx.de>
>
> 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é.
>
> Please review.
>
> 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(-)
Thank you! Series:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-19 14:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 13:33 [PATCH 0/2] Two hppa cleanup patches Helge Deller
2026-05-19 13:33 ` [PATCH 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
2026-05-19 13:33 ` [PATCH 2/2] hw/hppa: Move static variable lasi_dev into MachineState Helge Deller
2026-05-19 13:42 ` Peter Maydell
2026-05-19 14:33 ` [PATCH 0/2] Two hppa cleanup patches Philippe Mathieu-Daudé
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.