From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LHTpV-0007iN-8Z for qemu-devel@nongnu.org; Mon, 29 Dec 2008 20:55:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LHTpR-0007i8-L0 for qemu-devel@nongnu.org; Mon, 29 Dec 2008 20:55:31 -0500 Received: from [199.232.76.173] (port=41451 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHTpR-0007i5-FN for qemu-devel@nongnu.org; Mon, 29 Dec 2008 20:55:29 -0500 Received: from hall.aurel32.net ([88.191.82.174]:55741) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LHTpQ-0006vr-S4 for qemu-devel@nongnu.org; Mon, 29 Dec 2008 20:55:29 -0500 Date: Tue, 30 Dec 2008 01:30:22 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] MIPS: DMA support for RC4030 chipset [v4] Message-ID: <20081230003022.GA31528@volta.aurel32.net> References: <49566F4E.9060904@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <49566F4E.9060904@reactos.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-15?Q?Herv=E9?= Poussineau Cc: qemu-devel@nongnu.org On Sat, Dec 27, 2008 at 07:09:18PM +0100, Hervé Poussineau wrote: > Hi, > > Attached patch implements DMA support to RC4030 chipset and simplifies > jazz IO part (at 0xf0000000), where registers contain 16 bit values. > The patch also wires DMA transfers for the SCSI adapter in the Jazz > emulation (Mips Magnum 4000 and Acer Pica 61). > > Signed-off-by: Hervé Poussineau > > Changes since v1: > - Support reuse of esp callback functions up to DMA engine > - Don't keep in memory the DMA table, but read it when needed > > Changes since v2: > - Don't use cpu_single_env in the DMA transfer function, as it is NULL > in the aio path > - Multiple improvements to the DMA transfer function: report errors to > the caller, support for non contiguous physical pages... > > Changes since v3: > - Mask out higher bits of DMA translation table address > This patches introduces some new warnings: /home/aurel32/git/qemu/hw/rc4030.c: In function ‘rc4030_readl’: /home/aurel32/git/qemu/hw/rc4030.c:227: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘target_phys_addr_t’ /home/aurel32/git/qemu/hw/rc4030.c: In function ‘rc4030_writel’: /home/aurel32/git/qemu/hw/rc4030.c:374: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 5 has type ‘target_phys_addr_t’ /home/aurel32/git/qemu/hw/rc4030.c: In function ‘jazzio_readw’: /home/aurel32/git/qemu/hw/rc4030.c:501: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘target_phys_addr_t’ /home/aurel32/git/qemu/hw/rc4030.c: In function ‘jazzio_writew’: /home/aurel32/git/qemu/hw/rc4030.c:539: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 5 has type ‘target_phys_addr_t’ Also, please include a Signed-off. [snip] > + jazzio_writeb, > + jazzio_writew, > + jazzio_writel, > }; > > -#define G364_512KB_RAM (0x0) > -#define G364_2MB_RAM (0x1) > -#define G364_8MB_RAM (0x2) > -#define G364_32MB_RAM (0x3) > - > static void rc4030_reset(void *opaque) > { > rc4030State *s = opaque; > int i; > > - s->config = (G364_2MB_RAM << 8) | 0x04; > + s->config = 0x410; Why this change? This make the resulting code less readable. > s->invalid_address_register = 0; > > memset(s->dma_regs, 0, sizeof(s->dma_regs)); > @@ -569,7 +589,6 @@ > s->cache_ptag = s->cache_ltag = 0; > s->cache_bmask = s->cache_bwin = 0; > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net