patch-2.4.25 linux-2.4.25/arch/mips64/mm/pg-sb1.c
Next file: linux-2.4.25/arch/mips64/mm/sc-rm7k.c
Previous file: linux-2.4.25/arch/mips64/mm/pg-r4k.c
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
2004-02-18 05:36:30.000000000 -0800
- Orig file:
linux-2.4.24/arch/mips64/mm/pg-sb1.c
- Orig date:
2003-08-25 04:44:40.000000000 -0700
diff -urN linux-2.4.24/arch/mips64/mm/pg-sb1.c linux-2.4.25/arch/mips64/mm/pg-sb1.c
@@ -2,6 +2,7 @@
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
* Copyright (C) 1997, 2001 Ralf Baechle (ralf@gnu.org)
* Copyright (C) 2000 SiByte, Inc.
+ * Copyright (C) 2002, 2003 Broadcom Corporation
*
* Written by Justin Carlson of SiByte, Inc.
* and Kip Walker of Broadcom Corp.
@@ -40,8 +41,11 @@
#define SB1_PREF_STORE_STREAMED_HINT "5"
#endif
-/* These are the functions hooked by the memory management function pointers */
-void sb1_clear_page(void *page)
+#ifdef CONFIG_SIBYTE_DMA_PAGEOPS
+static inline void clear_page_cpu(void *page)
+#else
+void clear_page(void *page)
+#endif
{
/*
* JDCXXX - This should be bottlenecked by the write buffer, but these
@@ -80,7 +84,11 @@
}
-void sb1_copy_page(void *to, void *from)
+#ifdef CONFIG_SIBYTE_DMA_PAGEOPS
+static inline void copy_page_cpu(void *to, void *from)
+#else
+void copy_page(void *to, void *from)
+#endif
{
/*
* This should be optimized in assembly...can't use ld/sd, though,
@@ -168,13 +176,13 @@
IO_SPACE_BASE + A_DM_REGISTER(cpu, R_DM_DSCR_BASE));
}
-void sb1_clear_page_dma(void *page)
+void clear_page(void *page)
{
int cpu = smp_processor_id();
/* if the page is above Kseg0, use old way */
if (KSEGX(page) != K0BASE)
- return sb1_clear_page(page);
+ return clear_page_cpu(page);
page_descr[cpu].dscr_a = PHYSADDR(page) | M_DM_DSCRA_ZERO_MEM | M_DM_DSCRA_L2C_DEST | M_DM_DSCRA_INTERRUPT;
page_descr[cpu].dscr_b = V_DM_DSCRB_SRC_LENGTH(PAGE_SIZE);
@@ -189,7 +197,7 @@
in64(IO_SPACE_BASE + A_DM_REGISTER(cpu, R_DM_DSCR_BASE));
}
-void sb1_copy_page_dma(void *to, void *from)
+void copy_page(void *to, void *from)
{
unsigned long from_phys = PHYSADDR(from);
unsigned long to_phys = PHYSADDR(to);
@@ -197,7 +205,7 @@
/* if either page is above Kseg0, use old way */
if ((KSEGX(to) != K0BASE) || (KSEGX(from) != K0BASE))
- return sb1_copy_page(to, from);
+ return copy_page_cpu(to, from);
page_descr[cpu].dscr_a = PHYSADDR(to_phys) | M_DM_DSCRA_L2C_DEST | M_DM_DSCRA_INTERRUPT;
page_descr[cpu].dscr_b = PHYSADDR(from_phys) | V_DM_DSCRB_SRC_LENGTH(PAGE_SIZE);
@@ -212,4 +220,4 @@
in64(IO_SPACE_BASE + A_DM_REGISTER(cpu, R_DM_DSCR_BASE));
}
-#endif
+#endif /* CONFIG_SIBYTE_DMA_PAGEOPS */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)