]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/align.c
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
[karo-tx-linux.git] / arch / powerpc / kernel / align.c
index 94908af308d80423dd3cf18455887aadb5d9b7bf..34f55524d4564bd83db2dce7b8455080c952987d 100644 (file)
 #include <asm/cputable.h>
 #include <asm/emulated_ops.h>
 #include <asm/switch_to.h>
+#include <asm/disassemble.h>
 
 struct aligninfo {
        unsigned char len;
        unsigned char flags;
 };
 
-#define IS_XFORM(inst) (((inst) >> 26) == 31)
-#define IS_DSFORM(inst)        (((inst) >> 26) >= 56)
 
 #define INVALID        { 0, 0 }
 
@@ -191,37 +190,6 @@ static struct aligninfo aligninfo[128] = {
        INVALID,                /* 11 1 1111 */
 };
 
-/*
- * Create a DSISR value from the instruction
- */
-static inline unsigned make_dsisr(unsigned instr)
-{
-       unsigned dsisr;
-
-
-       /* bits  6:15 --> 22:31 */
-       dsisr = (instr & 0x03ff0000) >> 16;
-
-       if (IS_XFORM(instr)) {
-               /* bits 29:30 --> 15:16 */
-               dsisr |= (instr & 0x00000006) << 14;
-               /* bit     25 -->    17 */
-               dsisr |= (instr & 0x00000040) << 8;
-               /* bits 21:24 --> 18:21 */
-               dsisr |= (instr & 0x00000780) << 3;
-       } else {
-               /* bit      5 -->    17 */
-               dsisr |= (instr & 0x04000000) >> 12;
-               /* bits  1: 4 --> 18:21 */
-               dsisr |= (instr & 0x78000000) >> 17;
-               /* bits 30:31 --> 12:13 */
-               if (IS_DSFORM(instr))
-                       dsisr |= (instr & 0x00000003) << 18;
-       }
-
-       return dsisr;
-}
-
 /*
  * The dcbz (data cache block zero) instruction
  * gives an alignment fault if used on non-cacheable