fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / ia64 / ia32 / ia32priv.h
index ba875e0..cfa0bc0 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _ASM_IA64_IA32_PRIV_H
 #define _ASM_IA64_IA32_PRIV_H
 
-#include <linux/config.h>
 
 #include <asm/ia32.h>
 
@@ -29,9 +28,9 @@
 struct partial_page {
        struct partial_page     *next; /* linked list, sorted by address */
        struct rb_node          pp_rb;
-       /* 64K is the largest "normal" page supported by ia64 ABI. So 4K*32
+       /* 64K is the largest "normal" page supported by ia64 ABI. So 4K*64
         * should suffice.*/
-       unsigned int            bitmap;
+       unsigned long           bitmap;
        unsigned int            base;
 };
 
@@ -168,6 +167,9 @@ struct ia32_user_fxsr_struct {
 #define IA32_SA_HANDLER(ka)    ((unsigned long) (ka)->sa.sa_handler & 0xffffffff)
 #define IA32_SA_RESTORER(ka)   ((unsigned long) (ka)->sa.sa_handler >> 32)
 
+#define __IA32_NR_sigreturn 119
+#define __IA32_NR_rt_sigreturn 173
+
 struct sigaction32 {
        unsigned int sa_handler;                /* Really a pointer, but need to deal with 32 bits */
        unsigned int sa_flags;
@@ -222,14 +224,7 @@ struct stat64 {
        unsigned int    st_ino_hi;
 };
 
-typedef union sigval32 {
-       int sival_int;
-       unsigned int sival_ptr;
-} sigval_t32;
-
-#define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
-
-typedef struct siginfo32 {
+typedef struct compat_siginfo {
        int si_signo;
        int si_errno;
        int si_code;
@@ -245,10 +240,10 @@ typedef struct siginfo32 {
 
                /* POSIX.1b timers */
                struct {
-                       timer_t _tid;           /* timer id */
+                       compat_timer_t _tid;            /* timer id */
                        int _overrun;           /* overrun count */
                        char _pad[sizeof(unsigned int) - sizeof(int)];
-                       sigval_t32 _sigval;     /* same as below */
+                       compat_sigval_t _sigval;        /* same as below */
                        int _sys_private;       /* not to be passed to user */
                } _timer;
 
@@ -256,7 +251,7 @@ typedef struct siginfo32 {
                struct {
                        unsigned int _pid;      /* sender's pid */
                        unsigned int _uid;      /* sender's uid */
-                       sigval_t32 _sigval;
+                       compat_sigval_t _sigval;
                } _rt;
 
                /* SIGCHLD */
@@ -279,20 +274,7 @@ typedef struct siginfo32 {
                        int _fd;
                } _sigpoll;
        } _sifields;
-} siginfo_t32;
-
-typedef struct sigevent32 {
-       sigval_t32 sigev_value;
-       int sigev_signo;
-       int sigev_notify;
-       union {
-               int _pad[SIGEV_PAD_SIZE32];
-               struct {
-                       u32 _function;
-                       u32 _attribute; /* really pthread_attr_t */
-               } _sigev_thread;
-       } _sigev_un;
-} sigevent_t32;
+} compat_siginfo_t;
 
 struct old_linux32_dirent {
        u32     d_ino;
@@ -322,16 +304,17 @@ struct old_linux32_dirent {
 #define ELF_DATA       ELFDATA2LSB
 #define ELF_ARCH       EM_386
 
-#define IA32_PAGE_OFFSET       0xc0000000
 #define IA32_STACK_TOP         IA32_PAGE_OFFSET
+#define IA32_GATE_OFFSET       IA32_PAGE_OFFSET
+#define IA32_GATE_END          IA32_PAGE_OFFSET + PAGE_SIZE
 
 /*
  * The system segments (GDT, TSS, LDT) have to be mapped below 4GB so the IA-32 engine can
  * access them.
  */
-#define IA32_GDT_OFFSET                (IA32_PAGE_OFFSET)
-#define IA32_TSS_OFFSET                (IA32_PAGE_OFFSET + PAGE_SIZE)
-#define IA32_LDT_OFFSET                (IA32_PAGE_OFFSET + 2*PAGE_SIZE)
+#define IA32_GDT_OFFSET                (IA32_PAGE_OFFSET + PAGE_SIZE)
+#define IA32_TSS_OFFSET                (IA32_PAGE_OFFSET + 2*PAGE_SIZE)
+#define IA32_LDT_OFFSET                (IA32_PAGE_OFFSET + 3*PAGE_SIZE)
 
 #define ELF_EXEC_PAGESIZE      IA32_PAGE_SIZE
 
@@ -347,8 +330,6 @@ struct old_linux32_dirent {
 void ia64_elf32_init(struct pt_regs *regs);
 #define ELF_PLAT_INIT(_r, load_addr)   ia64_elf32_init(_r)
 
-#define elf_addr_t     u32
-
 /* This macro yields a bitmask that programs can use to figure out
    what instruction set this CPU supports.  */
 #define ELF_HWCAP      0
@@ -356,7 +337,7 @@ void ia64_elf32_init(struct pt_regs *regs);
 /* This macro yields a string that ld.so will use to load
    implementation specific libraries for optimization.  Not terribly
    relevant until we have real hardware to play with... */
-#define ELF_PLATFORM   0
+#define ELF_PLATFORM   NULL
 
 #ifdef __KERNEL__
 # define SET_PERSONALITY(EX,IBCS2)                             \
@@ -434,7 +415,7 @@ void ia64_elf32_init(struct pt_regs *regs);
         | ((((sd) >> IA32_SEG_DB) & 0x1) << SEG_DB)                                             \
         | ((((sd) >> IA32_SEG_G) & 0x1) << SEG_G))
 
-#define IA32_IOBASE    0x2000000000000000 /* Virtual address for I/O space */
+#define IA32_IOBASE    0x2000000000000000UL /* Virtual address for I/O space */
 
 #define IA32_CR0       0x80000001      /* Enable PG and PE bits */
 #define IA32_CR4       0x600           /* MMXEX and FXSR on */
@@ -551,8 +532,8 @@ struct user_regs_struct32 {
 };
 
 /* Prototypes for use in elfcore32.h */
-extern int save_ia32_fpstate (struct task_struct *tsk, struct ia32_user_i387_struct *save);
-extern int save_ia32_fpxstate (struct task_struct *tsk, struct ia32_user_fxsr_struct *save);
+extern int save_ia32_fpstate (struct task_struct *, struct ia32_user_i387_struct __user *);
+extern int save_ia32_fpxstate (struct task_struct *, struct ia32_user_fxsr_struct __user *);
 
 #endif /* !CONFIG_IA32_SUPPORT */