public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
To: avi@redhat.com
Cc: ehrhardt@linux.vnet.ibm.com, c=kvm-ppc@vger.kernel.org,
	kvm@vger.kernel.org, hollisb@us.ibm.com
Subject: [PATCH 6 of 6] [PATCH] kvm-userspace: ppc: align with upstream qemu - pcibus
Date: Wed, 10 Dec 2008 16:45:52 +0100	[thread overview]
Message-ID: <9a7208ca1afab83913ee.1228923952@HelionPrime> (raw)
In-Reply-To: <patchbomb.1228923946@HelionPrime>

# HG changeset patch
# User Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
# Date 1228922789 -3600
# Node ID 9a7208ca1afab83913ee14c629bf27632ee6326b
# Parent  5adc6fbbd4a3b82e1bc8acbcb233c60e89715b61
[PATCH] kvm-userspace: ppc: align with upstream qemu - pcibus

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

ppc initializer now properly use the opaque PCIBus type. This is already
changed in all upstream qemu files. This patch changes kvm ppc440 files
to use the new type too.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 ppc440.c        |   11 ++++++-----
 ppc440.h        |    3 ++-
 ppc440_bamboo.c |   10 +++++-----
 3 files changed, 13 insertions(+), 11 deletions(-)

[diff]

diff --git a/qemu/hw/ppc440.c b/qemu/hw/ppc440.c
--- a/qemu/hw/ppc440.c
+++ b/qemu/hw/ppc440.c
@@ -13,6 +13,7 @@
 #include "hw.h"
 #include "hw/isa.h"
 #include "ppc440.h"
+#include "pci.h"
 
 #define PPC440EP_PCI_CONFIG 0xeec00000
 #define PPC440EP_PCI_INTACK 0xeed00000
@@ -29,12 +30,12 @@ void ppc440ep_init(CPUState *env,
 		target_phys_addr_t ram_sizes[PPC440_MAX_RAM_SLOTS],
 		int nbanks,
 		qemu_irq **picp,
-		ppc4xx_pci_t **pcip,
+		PCIBus **pcibusp,
 		int do_init)
 {
 	ppc4xx_mmio_t *mmio;
 	qemu_irq *pic, *irqs;
-	ppc4xx_pci_t *pci;
+	PCIBus *pcibus;
 	int i;
 
 	ppc_dcr_init(env, NULL, NULL);
@@ -59,14 +60,14 @@ void ppc440ep_init(CPUState *env,
 	ppc405_sdram_init(env, pic[14], nbanks, ram_bases, ram_sizes, do_init);
 
 	/* PCI */
-	pci = ppc4xx_pci_init(env, pic,
+	pcibus = ppc4xx_pci_init(env, pic,
 	                      PPC440EP_PCI_CONFIG,
 	                      PPC440EP_PCI_INTACK,
 	                      PPC440EP_PCI_SPECIAL,
 	                      PPC440EP_PCI_REGS);
-	if (!pci)
+	if (!pcibus)
 		printf("couldn't create PCI controller!\n");
-	*pcip = pci;
+	*pcibusp = pcibus;
 
 	isa_mmio_init(PPC440EP_PCI_IO, PPC440EP_PCI_IOLEN);
 
diff --git a/qemu/hw/ppc440.h b/qemu/hw/ppc440.h
--- a/qemu/hw/ppc440.h
+++ b/qemu/hw/ppc440.h
@@ -20,6 +20,7 @@
 #include "sysemu.h"
 #include "exec-all.h"
 #include "boards.h"
+#include "pci.h"
 
 #define PPC440_MAX_RAM_SLOTS 4
 
@@ -28,7 +29,7 @@ void ppc440ep_init(CPUState *env,
 		target_phys_addr_t ram_sizes[PPC440_MAX_RAM_SLOTS],
 		int nbanks,
 		qemu_irq **picp,
-		ppc4xx_pci_t **pcip,
+		PCIBus **pcip,
 		int do_init);
 
 #endif
diff --git a/qemu/hw/ppc440_bamboo.c b/qemu/hw/ppc440_bamboo.c
--- a/qemu/hw/ppc440_bamboo.c
+++ b/qemu/hw/ppc440_bamboo.c
@@ -37,7 +37,7 @@ void bamboo_init(ram_addr_t ram_size, in
 	target_phys_addr_t ram_sizes[PPC440_MAX_RAM_SLOTS];
 	NICInfo *nd;
 	qemu_irq *pic;
-	ppc4xx_pci_t *pci;
+	PCIBus *pcibus;
 	CPUState *env;
     uint64_t elf_entry;
     uint64_t elf_lowaddr;
@@ -102,7 +102,7 @@ void bamboo_init(ram_addr_t ram_size, in
 
 	/* call init */
 	printf("Calling function ppc440_init\n");
-	ppc440ep_init(env, ram_bases, ram_sizes, nbanks, &pic, &pci, 1);
+	ppc440ep_init(env, ram_bases, ram_sizes, nbanks, &pic, &pcibus, 1);
 	printf("Done calling ppc440_init\n");
 
 	/* load kernel with uboot loader */
@@ -197,12 +197,12 @@ void bamboo_init(ram_addr_t ram_size, in
 		env->nip = entry;
 	}
 
-	if (pci) {
+	if (pcibus) {
 		int unit_id = 0;
 
 		/* Add virtio block devices. */
 		while ((i = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) {
-			virtio_blk_init(pci->bus, 0x1AF4, 0x1001,
+			virtio_blk_init(pcibus, 0x1AF4, 0x1001,
 				drives_table[i].bdrv);
 			unit_id++;
 		}
@@ -212,7 +212,7 @@ void bamboo_init(ram_addr_t ram_size, in
 			nd = &nd_table[i];
 			if (!nd->model)
 				nd->model = "virtio";
-			pci_nic_init(pci->bus, nd, -1);
+			pci_nic_init(pcibus, nd, -1);
 		}
 	}
 

  parent reply	other threads:[~2008-12-10 15:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 15:45 [PATCH 0 of 6] powerpc updates to kvm-userspace Christian Ehrhardt
2008-12-10 15:45 ` [PATCH 1 of 6] [PATCH] kvm-userspace: ppc: fix compatfd build decision Christian Ehrhardt
2008-12-14 10:45   ` Avi Kivity
     [not found]     ` <4944E3E0.1050607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-12-15 12:43       ` Christian Ehrhardt
2008-12-10 15:45 ` [PATCH 2 of 6] [PATCH] kvm-userspace: ppc: fix configure enabling kvm for ppc Christian Ehrhardt
2008-12-10 15:45 ` [PATCH 3 of 6] [PATCH] kvm-userspace: ppc: align with upstream qemu - breakpoint reset Christian Ehrhardt
2008-12-10 15:45 ` [PATCH 4 of 6] [PATCH] kvm-userpace: ppc: align with upstream qemu - 4xxdevs Christian Ehrhardt
2008-12-10 15:45 ` [PATCH 5 of 6] [PATCH] kvm-userspace: ppc: use virtio-blk header Christian Ehrhardt
2008-12-10 15:45 ` Christian Ehrhardt [this message]
2008-12-14  8:36 ` [PATCH 0 of 6] powerpc updates to kvm-userspace Avi Kivity
2008-12-14  8:37 ` Avi Kivity

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=9a7208ca1afab83913ee.1228923952@HelionPrime \
    --to=ehrhardt@linux.vnet.ibm.com \
    --cc=avi@redhat.com \
    --cc=c=kvm-ppc@vger.kernel.org \
    --cc=hollisb@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox