Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Nov 2006 10:53:41 GMT
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 110511 for review
Message-ID:  <200611251053.kAPArfaJ036863@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110511

Change 110511 by gonzo@gonzo_hq on 2006/11/25 10:53:04

	o Disable DMA for gxemul by returning ENOENT from bus_dma_tag_create.
	    This makes sence for gxemul but should be fixed ASAP when real
	    hardware step into game.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/mips/busdma_machdep.c#3 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/mips/busdma_machdep.c#3 (text+ko) ====

@@ -111,6 +111,9 @@
 	vm_offset_t		_wsize;
 };
 
+/* XXXMIPS: waith with DMA till real hardware will be used */
+#define NO_DMA
+
 #define DMAMAP_LINEAR		0x1
 #define DMAMAP_MBUF		0x2
 #define DMAMAP_UIO		0x4
@@ -189,6 +192,7 @@
  * with the tag are meant to never be defered.
  * XXX Should have a way to identify which driver is responsible here.
  */
+#ifndef NO_DMA
 static void
 dflt_lock(void *arg, bus_dma_lock_op_t op)
 {
@@ -198,6 +202,7 @@
 	printf("DRIVER_ERROR: busdma dflt_lock called\n");
 #endif
 }
+#endif
 
 static __inline bus_dmamap_t
 _busdma_alloc_dmamap(void)
@@ -238,6 +243,7 @@
 		   bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
 		   void *lockfuncarg, bus_dma_tag_t *dmat)
 {
+#ifndef NO_DMA
 	bus_dma_tag_t newtag;
 	int error = 0;
 
@@ -311,6 +317,9 @@
 	CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
 	    __func__, newtag, (newtag != NULL ? newtag->flags : 0), error);
 	return (error);
+#else 
+	return ENOSYS;
+#endif
 
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611251053.kAPArfaJ036863>