From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLVkY-0008VH-Um for qemu-devel@nongnu.org; Tue, 09 Oct 2012 05:05:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLVkP-00055M-EQ for qemu-devel@nongnu.org; Tue, 09 Oct 2012 05:05:14 -0400 Message-ID: <5073E8AA.8030107@redhat.com> Date: Tue, 09 Oct 2012 11:04:42 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1349714816-12618-1-git-send-email-Bharat.Bhushan@freescale.com> <1349714816-12618-3-git-send-email-Bharat.Bhushan@freescale.com> <50730BA3.5000005@suse.de> In-Reply-To: <50730BA3.5000005@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/3] e500: Adding CCSR memory region List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: qemu-devel@nongnu.org, Bharat Bhushan , qemu-ppc@nongnu.org, agraf@suse.de, Bharat Bhushan On 10/08/2012 07:21 PM, Andreas F=E4rber wrote: > Am 08.10.2012 18:46, schrieb Bharat Bhushan: >> All devices are also placed under CCSR memory region. >> The CCSR memory region is exported to pci device. The MSI interrupt >> generation is the main reason to export the CCSR region to PCI device. >> This put the requirement to move mpic under CCSR region, but logically >> all devices should be under CCSR. So this patch places all emulated >> devices under ccsr region. >>=20 >> + sysbus_connect_irq(s, 0, mpic[pci_irq_nrs[0]]); >> + sysbus_connect_irq(s, 1, mpic[pci_irq_nrs[1]]); >> + sysbus_connect_irq(s, 2, mpic[pci_irq_nrs[2]]); >> + sysbus_connect_irq(s, 3, mpic[pci_irq_nrs[3]]); >> + memory_region_add_subregion(ccsr, MPC8544_PCI_REGS_OFFSET, s->mmi= o[0].memory); >=20 > ... I wonder if fiddling with SysBus MMIO is a good idea. > s->mmio[0].addr is not getting assigned this way, which is checked as > condition for deleting the subregion. But sysbus_mmio_map() only adds t= o > / deletes from get_system_memory(). > The alternative would be using a custom field rather than the > SysBus-internal one. Avi/Alex? IMO yes. Or not use sysbus at all. --=20 error compiling committee.c: too many arguments to function