patch-2.4.23 linux-2.4.23/include/asm-sparc/swift.h
Next file: linux-2.4.23/include/asm-sparc/system.h
Previous file: linux-2.4.23/include/asm-sparc/sfp-machine.h
Back to the patch index
Back to the overall index
- Lines: 105
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/include/asm-sparc/swift.h
- Orig date:
1996-11-09 00:30:13.000000000 -0800
diff -urN linux-2.4.22/include/asm-sparc/swift.h linux-2.4.23/include/asm-sparc/swift.h
@@ -27,68 +27,80 @@
#define SWIFT_EN 0x00000001 /* MMU enable */
/* Bits [13:5] select one of 512 instruction cache tags */
-extern __inline__ void swift_inv_insn_tag(unsigned long addr)
+static inline void swift_inv_insn_tag(unsigned long addr)
{
- __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
- "r" (addr), "i" (ASI_M_TXTC_TAG));
+ __asm__ __volatile__("sta %%g0, [%0] %1\n\t"
+ : /* no outputs */
+ : "r" (addr), "i" (ASI_M_TXTC_TAG)
+ : "memory");
}
/* Bits [12:4] select one of 512 data cache tags */
-extern __inline__ void swift_inv_data_tag(unsigned long addr)
+static inline void swift_inv_data_tag(unsigned long addr)
{
- __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
- "r" (addr), "i" (ASI_M_DATAC_TAG));
+ __asm__ __volatile__("sta %%g0, [%0] %1\n\t"
+ : /* no outputs */
+ : "r" (addr), "i" (ASI_M_DATAC_TAG)
+ : "memory");
}
-extern __inline__ void swift_flush_dcache(void)
+static inline void swift_flush_dcache(void)
{
unsigned long addr;
- for(addr = 0; addr < 0x2000; addr += 0x10)
+ for (addr = 0; addr < 0x2000; addr += 0x10)
swift_inv_data_tag(addr);
}
-extern __inline__ void swift_flush_icache(void)
+static inline void swift_flush_icache(void)
{
unsigned long addr;
- for(addr = 0; addr < 0x4000; addr += 0x20)
+ for (addr = 0; addr < 0x4000; addr += 0x20)
swift_inv_insn_tag(addr);
}
-extern __inline__ void swift_idflash_clear(void)
+static inline void swift_idflash_clear(void)
{
unsigned long addr;
- for(addr = 0; addr < 0x2000; addr += 0x10) {
+ 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)
+static inline void swift_flush_page(unsigned long page)
{
- __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
- "r" (page), "i" (ASI_M_FLUSH_PAGE));
+ __asm__ __volatile__("sta %%g0, [%0] %1\n\t"
+ : /* no outputs */
+ : "r" (page), "i" (ASI_M_FLUSH_PAGE)
+ : "memory");
}
-extern __inline__ void swift_flush_segment(unsigned long addr)
+static inline void swift_flush_segment(unsigned long addr)
{
- __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
- "r" (addr), "i" (ASI_M_FLUSH_SEG));
+ __asm__ __volatile__("sta %%g0, [%0] %1\n\t"
+ : /* no outputs */
+ : "r" (addr), "i" (ASI_M_FLUSH_SEG)
+ : "memory");
}
-extern __inline__ void swift_flush_region(unsigned long addr)
+static inline void swift_flush_region(unsigned long addr)
{
- __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
- "r" (addr), "i" (ASI_M_FLUSH_REGION));
+ __asm__ __volatile__("sta %%g0, [%0] %1\n\t"
+ : /* no outputs */
+ : "r" (addr), "i" (ASI_M_FLUSH_REGION)
+ : "memory");
}
-extern __inline__ void swift_flush_context(void)
+static inline void swift_flush_context(void)
{
- __asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" : :
- "i" (ASI_M_FLUSH_CTX));
+ __asm__ __volatile__("sta %%g0, [%%g0] %0\n\t"
+ : /* no outputs */
+ : "i" (ASI_M_FLUSH_CTX)
+ : "memory");
}
#endif /* !(_SPARC_SWIFT_H) */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)