]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/processor.h
mm: introduce non panic alloc_bootmem
[linux-2.6-omap-h63xx.git] / include / asm-mips / processor.h
index 1d8b9a8ae324d147923ef6593b9a9995700347b0..58cbac5a64e4472dd45e17c3cef7426b86dbf243 100644 (file)
@@ -39,6 +39,7 @@ extern unsigned int vced_count, vcei_count;
  * so don't change it unless you know what you are doing.
  */
 #define TASK_SIZE      0x7fff8000UL
+#define STACK_TOP      TASK_SIZE
 
 /*
  * This decides where the kernel will search for a free chunk of vm
@@ -57,13 +58,22 @@ extern unsigned int vced_count, vcei_count;
  */
 #define TASK_SIZE32    0x7fff8000UL
 #define TASK_SIZE      0x10000000000UL
+#define STACK_TOP      \
+      (test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE     ((current->thread.mflags & MF_32BIT_ADDR) ? \
-       PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3))
+#define TASK_UNMAPPED_BASE                                             \
+       (test_thread_flag(TIF_32BIT_ADDR) ?                             \
+               PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3))
+#define TASK_SIZE_OF(tsk)                                              \
+       (test_tsk_thread_flag(tsk, TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE)
+#endif
+
+#ifdef __KERNEL__
+#define STACK_TOP_MAX  TASK_SIZE
 #endif
 
 #define NUM_FPU_REGS   32
@@ -132,22 +142,11 @@ struct thread_struct {
        unsigned long cp0_baduaddr;     /* Last kernel fault accessing USEG */
        unsigned long error_code;
        unsigned long trap_no;
-#define MF_FIXADE      1               /* Fix address errors in software */
-#define MF_LOGADE      2               /* Log address errors to syslog */
-#define MF_32BIT_REGS  4               /* also implies 16/32 fprs */
-#define MF_32BIT_ADDR  8               /* 32-bit address space (o32/n32) */
-#define MF_FPUBOUND    0x10            /* thread bound to FPU-full CPU set */
-       unsigned long mflags;
        unsigned long irix_trampoline;  /* Wheee... */
        unsigned long irix_oldctx;
        struct mips_abi *abi;
 };
 
-#define MF_ABI_MASK    (MF_32BIT_REGS | MF_32BIT_ADDR)
-#define MF_O32         (MF_32BIT_REGS | MF_32BIT_ADDR)
-#define MF_N32         MF_32BIT_ADDR
-#define MF_N64         0
-
 #ifdef CONFIG_MIPS_MT_FPAFF
 #define FPAFF_INIT                                             \
        .emulated_fp                    = 0,                    \
@@ -200,10 +199,6 @@ struct thread_struct {
        .cp0_baduaddr           = 0,                            \
        .error_code             = 0,                            \
        .trap_no                = 0,                            \
-       /*                                                      \
-        * For now the default is to fix address errors         \
-        */                                                     \
-       .mflags                 = MF_FIXADE,                    \
        .irix_trampoline        = 0,                            \
        .irix_oldctx            = 0,                            \
 }