[PATCH] [MIPS]: fix CAC_ADDR/UNCAC_ADDR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




With commit db38501511a7513ec4f0ae9922d847c135cf3c78 PAGE_OFFSET was
redefined as CAC_BASE+PHYS_OFFSET, but [UN]CAC_ADDR - which are used
in dma_alloc_coherent() and dma_free_coherent() respectively, and in
drivers/video/au1100fb.c - were not adjusted accordingly.

with kind regards


Signed-off-by: peter fuerst <post@xxxxxxxx>


--- a/linux-2.6.24/include/asm-mips/page.h	Fri Jan 25 12:23:51 2008
+++ b/linux-2.6.24/include/asm-mips/page.h	Wed Feb  6 23:26:31 2008
@@ -184,8 +184,8 @@
 #define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
 				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

-#define UNCAC_ADDR(addr)	((addr) - PAGE_OFFSET + UNCAC_BASE)
-#define CAC_ADDR(addr)		((addr) - UNCAC_BASE + PAGE_OFFSET)
+#define UNCAC_ADDR(addr)	((addr) - PAGE_OFFSET + PHYS_OFFSET + UNCAC_BASE)
+#define CAC_ADDR(addr)		((addr) - UNCAC_BASE + PAGE_OFFSET - PHYS_OFFSET)

 #include <asm-generic/memory_model.h>
 #include <asm-generic/page.h>



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux