Merge branch 'misc' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc...
[pandora-kernel.git] / arch / mips / kernel / asm-offsets.c
index 2c11abb..92b28b6 100644 (file)
@@ -69,6 +69,9 @@ void output_ptreg_defines(void)
        offset("#define PT_BVADDR ", struct pt_regs, cp0_badvaddr);
        offset("#define PT_STATUS ", struct pt_regs, cp0_status);
        offset("#define PT_CAUSE  ", struct pt_regs, cp0_cause);
+#ifdef CONFIG_MIPS_MT_SMTC
+       offset("#define PT_TCSTATUS  ", struct pt_regs, cp0_tcstatus);
+#endif /* CONFIG_MIPS_MT_SMTC */
        size("#define PT_SIZE   ", struct pt_regs);
        linefeed;
 }
@@ -95,6 +98,7 @@ void output_thread_info_defines(void)
        offset("#define TI_PRE_COUNT       ", struct thread_info, preempt_count);
        offset("#define TI_ADDR_LIMIT      ", struct thread_info, addr_limit);
        offset("#define TI_RESTART_BLOCK   ", struct thread_info, restart_block);
+       offset("#define TI_TP_VALUE        ", struct thread_info, tp_value);
        constant("#define _THREAD_SIZE_ORDER ", THREAD_SIZE_ORDER);
        constant("#define _THREAD_SIZE       ", THREAD_SIZE);
        constant("#define _THREAD_MASK       ", THREAD_MASK);
@@ -240,6 +244,7 @@ void output_mm_defines(void)
        linefeed;
 }
 
+#ifdef CONFIG_32BIT
 void output_sc_defines(void)
 {
        text("/* Linux sigcontext offsets. */");
@@ -251,10 +256,29 @@ void output_sc_defines(void)
        offset("#define SC_STATUS     ", struct sigcontext, sc_status);
        offset("#define SC_FPC_CSR    ", struct sigcontext, sc_fpc_csr);
        offset("#define SC_FPC_EIR    ", struct sigcontext, sc_fpc_eir);
-       offset("#define SC_CAUSE      ", struct sigcontext, sc_cause);
-       offset("#define SC_BADVADDR   ", struct sigcontext, sc_badvaddr);
+       offset("#define SC_HI1        ", struct sigcontext, sc_hi1);
+       offset("#define SC_LO1        ", struct sigcontext, sc_lo1);
+       offset("#define SC_HI2        ", struct sigcontext, sc_hi2);
+       offset("#define SC_LO2        ", struct sigcontext, sc_lo2);
+       offset("#define SC_HI3        ", struct sigcontext, sc_hi3);
+       offset("#define SC_LO3        ", struct sigcontext, sc_lo3);
        linefeed;
 }
+#endif
+
+#ifdef CONFIG_64BIT
+void output_sc_defines(void)
+{
+       text("/* Linux sigcontext offsets. */");
+       offset("#define SC_REGS       ", struct sigcontext, sc_regs);
+       offset("#define SC_FPREGS     ", struct sigcontext, sc_fpregs);
+       offset("#define SC_MDHI       ", struct sigcontext, sc_hi);
+       offset("#define SC_MDLO       ", struct sigcontext, sc_lo);
+       offset("#define SC_PC         ", struct sigcontext, sc_pc);
+       offset("#define SC_FPC_CSR    ", struct sigcontext, sc_fpc_csr);
+       linefeed;
+}
+#endif
 
 #ifdef CONFIG_MIPS32_COMPAT
 void output_sc32_defines(void)