patch-2.1.9 linux/include/asm-sparc/swift.h
Next file: linux/include/asm-sparc/system.h
Previous file: linux/include/asm-sparc/svr4.h
Back to the patch index
Back to the overall index
- Lines: 80
- Date:
Sat Nov 9 10:30:13 1996
- Orig file:
v2.1.8/linux/include/asm-sparc/swift.h
- Orig date:
Sun Apr 21 12:30:34 1996
diff -u --recursive --new-file v2.1.8/linux/include/asm-sparc/swift.h linux/include/asm-sparc/swift.h
@@ -26,64 +26,66 @@
#define SWIFT_NF 0x00000002 /* No fault mode */
#define SWIFT_EN 0x00000001 /* MMU enable */
-extern inline void swift_inv_insn_tag(unsigned long addr)
+/* Bits [13:5] select one of 512 instruction cache tags */
+extern __inline__ void swift_inv_insn_tag(unsigned long addr)
{
__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
"r" (addr), "i" (ASI_M_TXTC_TAG));
}
-extern inline void swift_inv_data_tag(unsigned long addr)
+/* Bits [12:4] select one of 512 data cache tags */
+extern __inline__ void swift_inv_data_tag(unsigned long addr)
{
__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
"r" (addr), "i" (ASI_M_DATAC_TAG));
}
-extern inline void swift_flush_dcache(void)
+extern __inline__ void swift_flush_dcache(void)
{
unsigned long addr;
- for(addr = 0; addr < (PAGE_SIZE << 2); addr += 16)
+ for(addr = 0; addr < 0x2000; addr += 0x10)
swift_inv_data_tag(addr);
}
-extern inline void swift_flush_icache(void)
+extern __inline__ void swift_flush_icache(void)
{
unsigned long addr;
- for(addr = 0; addr < (PAGE_SIZE << 2); addr += 16)
+ for(addr = 0; addr < 0x4000; addr += 0x20)
swift_inv_insn_tag(addr);
}
-extern inline void swift_idflash_clear(void)
+extern __inline__ void swift_idflash_clear(void)
{
unsigned long addr;
- for(addr = 0; addr < (PAGE_SIZE << 2); addr += 16) {
- swift_inv_insn_tag(addr);
+ for(addr = 0; addr < 0x2000; addr += 0x10) {
+ swift_inv_insn_tag(addr<<1);
swift_inv_data_tag(addr);
}
}
/* Swift is so broken, it isn't even safe to use the following. */
-extern inline void swift_flush_page(unsigned long page)
+extern __inline__ void swift_flush_page(unsigned long page)
{
__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
"r" (page), "i" (ASI_M_FLUSH_PAGE));
}
-extern inline void swift_flush_segment(unsigned long addr)
+extern __inline__ void swift_flush_segment(unsigned long addr)
{
__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
"r" (addr), "i" (ASI_M_FLUSH_SEG));
}
-extern inline void swift_flush_region(unsigned long addr)
+extern __inline__ void swift_flush_region(unsigned long addr)
{
__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
"r" (addr), "i" (ASI_M_FLUSH_REGION));
}
-extern inline void swift_flush_context(void)
+extern __inline__ void swift_flush_context(void)
{
__asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" : :
"i" (ASI_M_FLUSH_CTX));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov