]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/asm-sh/system.h
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[mv-sheeva.git] / include / asm-sh / system.h
index 127af304865febb1d5605412b5c17bfddc7c9624..82f3e229e62135c2e944e1fbbe5e316744e2c4c1 100644 (file)
@@ -82,16 +82,6 @@ static inline void sched_cacheflush(void)
 }
 #endif
 
-static inline unsigned long tas(volatile int *m)
-{
-       unsigned long retval;
-
-       __asm__ __volatile__ ("tas.b    @%1\n\t"
-                             "movt     %0"
-                             : "=r" (retval): "r" (m): "t", "memory");
-       return retval;
-}
-
 /*
  * A brief note on ctrl_barrier(), the control register write barrier.
  *
@@ -265,6 +255,15 @@ static inline void *set_exception_table_evt(unsigned int evt, void *handler)
        return set_exception_table_vec(evt >> 5, handler);
 }
 
+/*
+ * SH-2A has both 16 and 32-bit opcodes, do lame encoding checks.
+ */
+#ifdef CONFIG_CPU_SH2A
+extern unsigned int instruction_size(unsigned int insn);
+#else
+#define instruction_size(insn) (2)
+#endif
+
 /* XXX
  * disable hlt during certain critical i/o operations
  */