* [Qemu-devel] [PATCH] pseries pci: removed redundand busdev
@ 2012-06-14 4:38 ` Alexey Kardashevskiy
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2012-06-14 4:38 UTC (permalink / raw)
To: kvm-ppc, qemu-devel, Benjamin Herrenschmidt
The PCIHostState struct already contains SysBusDevice so
the one in sPAPRPHBState has to go.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
hw/spapr_pci.c | 4 ++--
hw/spapr_pci.h | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
index 75943cf..1c0b605 100644
--- a/hw/spapr_pci.c
+++ b/hw/spapr_pci.c
@@ -215,7 +215,7 @@ static DMAContext *spapr_pci_dma_context_fn(PCIBus *bus, void *opaque,
static int spapr_phb_init(SysBusDevice *s)
{
- sPAPRPHBState *phb = FROM_SYSBUS(sPAPRPHBState, s);
+ sPAPRPHBState *phb = DO_UPCAST(sPAPRPHBState, host_state.busdev, s);
char *namebuf;
int i;
PCIBus *bus;
@@ -253,7 +253,7 @@ static int spapr_phb_init(SysBusDevice *s)
memory_region_add_subregion(get_system_memory(), phb->io_win_addr,
&phb->iowindow);
- bus = pci_register_bus(&phb->busdev.qdev,
+ bus = pci_register_bus(&phb->host_state.busdev.qdev,
phb->busname ? phb->busname : phb->dtbusname,
pci_spapr_set_irq, pci_spapr_map_irq, phb,
&phb->memspace, &phb->iospace,
diff --git a/hw/spapr_pci.h b/hw/spapr_pci.h
index d9e46e2..a141764 100644
--- a/hw/spapr_pci.h
+++ b/hw/spapr_pci.h
@@ -28,7 +28,6 @@
#include "hw/xics.h"
typedef struct sPAPRPHBState {
- SysBusDevice busdev;
PCIHostState host_state;
uint64_t buid;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] pseries pci: removed redundand busdev
@ 2012-06-14 4:38 ` Alexey Kardashevskiy
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2012-06-14 4:38 UTC (permalink / raw)
To: kvm-ppc, qemu-devel, Benjamin Herrenschmidt
The PCIHostState struct already contains SysBusDevice so
the one in sPAPRPHBState has to go.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
hw/spapr_pci.c | 4 ++--
hw/spapr_pci.h | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
index 75943cf..1c0b605 100644
--- a/hw/spapr_pci.c
+++ b/hw/spapr_pci.c
@@ -215,7 +215,7 @@ static DMAContext *spapr_pci_dma_context_fn(PCIBus *bus, void *opaque,
static int spapr_phb_init(SysBusDevice *s)
{
- sPAPRPHBState *phb = FROM_SYSBUS(sPAPRPHBState, s);
+ sPAPRPHBState *phb = DO_UPCAST(sPAPRPHBState, host_state.busdev, s);
char *namebuf;
int i;
PCIBus *bus;
@@ -253,7 +253,7 @@ static int spapr_phb_init(SysBusDevice *s)
memory_region_add_subregion(get_system_memory(), phb->io_win_addr,
&phb->iowindow);
- bus = pci_register_bus(&phb->busdev.qdev,
+ bus = pci_register_bus(&phb->host_state.busdev.qdev,
phb->busname ? phb->busname : phb->dtbusname,
pci_spapr_set_irq, pci_spapr_map_irq, phb,
&phb->memspace, &phb->iospace,
diff --git a/hw/spapr_pci.h b/hw/spapr_pci.h
index d9e46e2..a141764 100644
--- a/hw/spapr_pci.h
+++ b/hw/spapr_pci.h
@@ -28,7 +28,6 @@
#include "hw/xics.h"
typedef struct sPAPRPHBState {
- SysBusDevice busdev;
PCIHostState host_state;
uint64_t buid;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pseries pci: removed redundand busdev
2012-06-14 4:38 ` Alexey Kardashevskiy
(?)
@ 2012-06-28 13:15 ` Alexander Graf
-1 siblings, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2012-06-28 13:15 UTC (permalink / raw)
To: kvm-ppc
On 06/14/2012 06:38 AM, Alexey Kardashevskiy wrote:
> The PCIHostState struct already contains SysBusDevice so
> the one in sPAPRPHBState has to go.
>
> Signed-off-by: Alexey Kardashevskiy<aik@ozlabs.ru>
Thanks, applied to ppc-next.
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-28 13:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-14 4:38 [Qemu-devel] [PATCH] pseries pci: removed redundand busdev Alexey Kardashevskiy
2012-06-14 4:38 ` Alexey Kardashevskiy
2012-06-28 13:15 ` Alexander Graf
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.