[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 02/64] spapr: prepare for qdevification of irq
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 02/64] spapr: prepare for qdevification of irq |
Date: |
Thu, 6 Oct 2011 10:05:04 +0200 |
From: Paolo Bonzini <address@hidden>
Restructure common properties for sPAPR devices so that IRQ definitions
can be added in one place.
Signed-off-by: Paolo Bonzini <address@hidden>
Cc: Alexander Graf <address@hidden>
Cc: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/spapr_llan.c | 4 +---
hw/spapr_vio.h | 5 +++++
hw/spapr_vscsi.c | 4 +---
hw/spapr_vty.c | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/hw/spapr_llan.c b/hw/spapr_llan.c
index 2597748..abe1297 100644
--- a/hw/spapr_llan.c
+++ b/hw/spapr_llan.c
@@ -495,9 +495,7 @@ static VIOsPAPRDeviceInfo spapr_vlan = {
.qdev.name = "spapr-vlan",
.qdev.size = sizeof(VIOsPAPRVLANDevice),
.qdev.props = (Property[]) {
- DEFINE_PROP_UINT32("reg", VIOsPAPRDevice, reg, 0x1000),
- DEFINE_PROP_UINT32("dma-window", VIOsPAPRDevice, rtce_window_size,
- 0x10000000),
+ DEFINE_SPAPR_PROPERTIES(VIOsPAPRVLANDevice, sdev, 0x1000, 0x10000000),
DEFINE_NIC_PROPERTIES(VIOsPAPRVLANDevice, nicconf),
DEFINE_PROP_END_OF_LIST(),
},
diff --git a/hw/spapr_vio.h b/hw/spapr_vio.h
index faa5d94..7eb5367 100644
--- a/hw/spapr_vio.h
+++ b/hw/spapr_vio.h
@@ -60,6 +60,11 @@ typedef struct VIOsPAPRDevice {
VIOsPAPR_CRQ crq;
} VIOsPAPRDevice;
+#define DEFINE_SPAPR_PROPERTIES(type, field, default_reg, default_dma_window) \
+ DEFINE_PROP_UINT32("reg", type, field.reg, default_reg), \
+ DEFINE_PROP_UINT32("dma-window", type, field.rtce_window_size, \
+ default_dma_window)
+
typedef struct VIOsPAPRBus {
BusState bus;
int irq;
diff --git a/hw/spapr_vscsi.c b/hw/spapr_vscsi.c
index d2d0415..6fc82f6 100644
--- a/hw/spapr_vscsi.c
+++ b/hw/spapr_vscsi.c
@@ -930,9 +930,7 @@ static VIOsPAPRDeviceInfo spapr_vscsi = {
.qdev.name = "spapr-vscsi",
.qdev.size = sizeof(VSCSIState),
.qdev.props = (Property[]) {
- DEFINE_PROP_UINT32("reg", VIOsPAPRDevice, reg, 0x2000),
- DEFINE_PROP_UINT32("dma-window", VIOsPAPRDevice,
- rtce_window_size, 0x10000000),
+ DEFINE_SPAPR_PROPERTIES(VSCSIState, vdev, 0x2000, 0x10000000),
DEFINE_PROP_END_OF_LIST(),
},
};
diff --git a/hw/spapr_vty.c b/hw/spapr_vty.c
index 607b81b..a9d4b03 100644
--- a/hw/spapr_vty.c
+++ b/hw/spapr_vty.c
@@ -140,7 +140,7 @@ static VIOsPAPRDeviceInfo spapr_vty = {
.qdev.name = "spapr-vty",
.qdev.size = sizeof(VIOsPAPRVTYDevice),
.qdev.props = (Property[]) {
- DEFINE_PROP_UINT32("reg", VIOsPAPRDevice, reg, 0),
+ DEFINE_SPAPR_PROPERTIES(VIOsPAPRVTYDevice, sdev, 0, 0),
DEFINE_PROP_CHR("chardev", VIOsPAPRVTYDevice, chardev),
DEFINE_PROP_END_OF_LIST(),
},
--
1.6.0.2
- [Qemu-ppc] [PATCH 19/64] PPC: bamboo: Use kvm api for freq and clock frequencies, (continued)
- [Qemu-ppc] [PATCH 19/64] PPC: bamboo: Use kvm api for freq and clock frequencies, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 13/64] PPC: E500: Generate IRQ lines for many CPUs, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 03/64] spapr: make irq customizable via qdev, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 11/64] PPC: Bump MPIC up to 32 supported CPUs, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 36/64] pseries: Bugfixes for interrupt numbering in XICS code, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 37/64] pseries: Add a phandle to the xicp interrupt controller device tree node, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 44/64] kvm: ppc: booke206: use MMU API, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 33/64] KVM: update kernel headers, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 56/64] PPC: Fix heathrow PIC to use little endian MMIO, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 14/64] device tree: add nop_node, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 02/64] spapr: prepare for qdevification of irq,
Alexander Graf <=
- [Qemu-ppc] [PATCH 07/64] PPC: Fix IPI support in MPIC, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 34/64] PPC: Enable to use PAPR with PR style KVM, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 64/64] ppc64: Fix linker script, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 28/64] device tree: give dt more size, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 12/64] PPC: E500: create multiple envs, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 59/64] KVM: PPC: Use HIOR setting for -M pseries with PR KVM, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 46/64] ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 45/64] ppc: booke206: add "info tlb" support, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 08/64] PPC: Set MPIC IDE for IPI to 0, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 63/64] pseries: Implement set-time-of-day RTAS function, Alexander Graf, 2011/10/06