patch-2.4.23 linux-2.4.23/include/asm-sparc/viking.h

Next file: linux-2.4.23/include/asm-sparc64/asi.h
Previous file: linux-2.4.23/include/asm-sparc/vac-ops.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/include/asm-sparc/viking.h linux-2.4.23/include/asm-sparc/viking.h
@@ -110,48 +110,57 @@
 
 #ifndef __ASSEMBLY__
 
-extern __inline__ void viking_flush_icache(void)
+static inline void viking_flush_icache(void)
 {
-	__asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" : :
-			     "i" (ASI_M_IC_FLCLEAR));
+	__asm__ __volatile__("sta %%g0, [%%g0] %0\n\t"
+			     : /* no outputs */
+			     : "i" (ASI_M_IC_FLCLEAR)
+			     : "memory");
 }
 
-extern __inline__ void viking_flush_dcache(void)
+static inline void viking_flush_dcache(void)
 {
-	__asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" : :
-			     "i" (ASI_M_DC_FLCLEAR));
+	__asm__ __volatile__("sta %%g0, [%%g0] %0\n\t"
+			     : /* no outputs */
+			     : "i" (ASI_M_DC_FLCLEAR)
+			     : "memory");
 }
 
-extern __inline__ void viking_unlock_icache(void)
+static inline void viking_unlock_icache(void)
 {
-	__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
-			     "r" (0x80000000), "i" (ASI_M_IC_FLCLEAR));
+	__asm__ __volatile__("sta %%g0, [%0] %1\n\t"
+			     : /* no outputs */
+			     : "r" (0x80000000), "i" (ASI_M_IC_FLCLEAR)
+			     : "memory");
 }
 
-extern __inline__ void viking_unlock_dcache(void)
+static inline void viking_unlock_dcache(void)
 {
-	__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
-			     "r" (0x80000000), "i" (ASI_M_DC_FLCLEAR));
+	__asm__ __volatile__("sta %%g0, [%0] %1\n\t"
+			     : /* no outputs */
+			     : "r" (0x80000000), "i" (ASI_M_DC_FLCLEAR)
+			     : "memory");
 }
 
-extern __inline__ void viking_set_bpreg(unsigned long regval)
+static inline void viking_set_bpreg(unsigned long regval)
 {
-	__asm__ __volatile__("sta %0, [%%g0] %1\n\t" : :
-			     "r" (regval),
-			     "i" (ASI_M_ACTION));
+	__asm__ __volatile__("sta %0, [%%g0] %1\n\t"
+			     : /* no outputs */
+			     : "r" (regval), "i" (ASI_M_ACTION)
+			     : "memory");
 }
 
-extern __inline__ unsigned long viking_get_bpreg(void)
+static inline unsigned long viking_get_bpreg(void)
 {
 	unsigned long regval;
 
-	__asm__ __volatile__("lda [%%g0] %1, %0\n\t" :
-			     "=r" (regval) :
-			     "i" (ASI_M_ACTION));
+	__asm__ __volatile__("lda [%%g0] %1, %0\n\t"
+			     : "=r" (regval)
+			     : "i" (ASI_M_ACTION));
 	return regval;
 }
 
-extern __inline__ void viking_get_dcache_ptag(int set, int block,
+static inline void viking_get_dcache_ptag(int set, int block,
 					      unsigned long *data)
 {
 	unsigned long ptag = ((set & 0x7f) << 5) | ((block & 0x3) << 26) |
@@ -160,15 +169,15 @@
 
 	__asm__ __volatile__ ("ldda [%2] %3, %%g2\n\t"
 			      "or %%g0, %%g2, %0\n\t"
-			      "or %%g0, %%g3, %1\n\t" :
-			      "=r" (info), "=r" (page) :
-			      "r" (ptag), "i" (ASI_M_DATAC_TAG) :
-			      "g2", "g3");
+			      "or %%g0, %%g3, %1\n\t"
+			      : "=r" (info), "=r" (page)
+			      : "r" (ptag), "i" (ASI_M_DATAC_TAG)
+			      : "g2", "g3");
 	data[0] = info;
 	data[1] = page;
 }
 
-extern __inline__ void viking_mxcc_turn_off_parity(unsigned long *mregp,
+static inline void viking_mxcc_turn_off_parity(unsigned long *mregp,
 						   unsigned long *mxcc_cregp)
 {
 	unsigned long mreg = *mregp;
@@ -190,30 +199,32 @@
 			      "2:\n\t"
 			      "sta %0, [%%g0] %3\n\t"
 			      "sta %1, [%2] %4\n"
-			      "1:\n\t" : :
-			      "r" (mreg), "r" (mxcc_creg),
-			      "r" (MXCC_CREG), "i" (ASI_M_MMUREGS),
-			      "i" (ASI_M_MXCC) : "g2", "cc");
+			      "1:\n\t"
+			      : /* no output */
+			      : "r" (mreg), "r" (mxcc_creg),
+			        "r" (MXCC_CREG), "i" (ASI_M_MMUREGS),
+			        "i" (ASI_M_MXCC)
+			      : "g2", "memory", "cc");
 	*mregp = mreg;
 	*mxcc_cregp = mxcc_creg;
 }
 
-extern __inline__ unsigned long viking_hwprobe(unsigned long vaddr)
+static inline unsigned long viking_hwprobe(unsigned long vaddr)
 {
 	unsigned long val;
 
 	vaddr &= PAGE_MASK;
 	/* Probe all MMU entries. */
-	__asm__ __volatile__("lda [%1] %2, %0\n\t" :
-			     "=r" (val) :
-			     "r" (vaddr | 0x400), "i" (ASI_M_FLUSH_PROBE));
+	__asm__ __volatile__("lda [%1] %2, %0\n\t"
+			     : "=r" (val)
+			     : "r" (vaddr | 0x400), "i" (ASI_M_FLUSH_PROBE));
 	if (!val)
 		return 0;
 
 	/* Probe region. */
-	__asm__ __volatile__("lda [%1] %2, %0\n\t" :
-			     "=r" (val) :
-			     "r" (vaddr | 0x200), "i" (ASI_M_FLUSH_PROBE));
+	__asm__ __volatile__("lda [%1] %2, %0\n\t"
+			     : "=r" (val)
+			     : "r" (vaddr | 0x200), "i" (ASI_M_FLUSH_PROBE));
 	if ((val & SRMMU_ET_MASK) == SRMMU_ET_PTE) {
 		vaddr &= ~SRMMU_PGDIR_MASK;
 		vaddr >>= PAGE_SHIFT;
@@ -221,9 +232,9 @@
 	}
 
 	/* Probe segment. */
-	__asm__ __volatile__("lda [%1] %2, %0\n\t" :
-			     "=r" (val) :
-			     "r" (vaddr | 0x100), "i" (ASI_M_FLUSH_PROBE));
+	__asm__ __volatile__("lda [%1] %2, %0\n\t"
+			     : "=r" (val)
+			     : "r" (vaddr | 0x100), "i" (ASI_M_FLUSH_PROBE));
 	if ((val & SRMMU_ET_MASK) == SRMMU_ET_PTE) {
 		vaddr &= ~SRMMU_PMD_MASK;
 		vaddr >>= PAGE_SHIFT;
@@ -231,9 +242,9 @@
 	}
 
 	/* Probe page. */
-	__asm__ __volatile__("lda [%1] %2, %0\n\t" :
-			     "=r" (val) :
-			     "r" (vaddr), "i" (ASI_M_FLUSH_PROBE));
+	__asm__ __volatile__("lda [%1] %2, %0\n\t"
+			     : "=r" (val)
+			     : "r" (vaddr), "i" (ASI_M_FLUSH_PROBE));
 	return val;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)