]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/blackfin/include/asm/context.S
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
[linux-2.6-omap-h63xx.git] / arch / blackfin / include / asm / context.S
index c0e630edfb9a30950b92eca4101c50be14dc79ed..16561ab18b38b602a9426a9f0c6c0b8bcb8aac93 100644 (file)
        RETI = [sp++];
        RETS = [sp++];
 
-       p0.h = _irq_flags;
-       p0.l = _irq_flags;
+#ifdef CONFIG_SMP
+       GET_PDA(p0, r0);
+       r0 = [p0 + PDA_IRQFLAGS];
+#else
+       p0.h = _bfin_irq_flags;
+       p0.l = _bfin_irq_flags;
        r0 = [p0];
+#endif
        sti r0;
 
        sp += 4;        /* Skip Reserved */
        csync;
 .endm
 
+.macro save_context_cplb
+       [--sp] = (R7:0, P5:0);
+       [--sp] = fp;
+
+       [--sp] = a0.x;
+       [--sp] = a0.w;
+       [--sp] = a1.x;
+       [--sp] = a1.w;
+
+       [--sp] = LC0;
+       [--sp] = LC1;
+       [--sp] = LT0;
+       [--sp] = LT1;
+       [--sp] = LB0;
+       [--sp] = LB1;
+
+       [--sp] = RETS;
+.endm
+
+.macro restore_context_cplb
+       RETS = [sp++];
+
+       LB1 = [sp++];
+       LB0 = [sp++];
+       LT1 = [sp++];
+       LT0 = [sp++];
+       LC1 = [sp++];
+       LC0 = [sp++];
+
+       a1.w = [sp++];
+       a1.x = [sp++];
+       a0.w = [sp++];
+       a0.x = [sp++];
+
+       fp = [sp++];
+
+       (R7:0, P5:0) = [SP++];
+.endm