]> git.hungrycats.org Git - linux/commitdiff
[PATCH] (2/6) alpha fixes
authorAlexander Viro <viro@math.psu.edu>
Mon, 22 Apr 2002 05:58:23 +0000 (22:58 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Mon, 22 Apr 2002 05:58:23 +0000 (22:58 -0700)
 - missing defines/fields/includes for alpha (accumulated since 2.5.0)

arch/alpha/kernel/semaphore.c
include/asm-alpha/mman.h
include/asm-alpha/siginfo.h
include/asm-alpha/thread_info.h
include/asm-alpha/unistd.h
init/main.c

index 27ba8b1dcd523687a33affc4262147c6a1e50d56..c87d1b72a594881d84304a87034b97ed2657db5f 100644 (file)
@@ -5,9 +5,9 @@
  * (C) Copyright 1999, 2000 Richard Henderson
  */
 
+#include <linux/errno.h>
 #include <linux/sched.h>
 
-
 /*
  * Semaphores are implemented using a two-way counter:
  * 
index 3e9b58d98a9935ca998c4cb724a848f1da220680..51d1a3078b3937771785b88f7d9b85cf5798791d 100644 (file)
@@ -4,6 +4,7 @@
 #define PROT_READ      0x1             /* page can be read */
 #define PROT_WRITE     0x2             /* page can be written */
 #define PROT_EXEC      0x4             /* page can be executed */
+#define PROT_SEM       0x8             /* page may be used for atomic ops */
 #define PROT_NONE      0x0             /* page can not be accessed */
 
 #define MAP_SHARED     0x01            /* Share changes */
index b5a899bd13d840a3c2db62358a010a2ef4ad10d3..b6ff2471d9dfb07d9802bab14e7f34363ed179db 100644 (file)
@@ -108,6 +108,7 @@ typedef struct siginfo {
 #define SI_ASYNCIO     -4              /* sent by AIO completion */
 #define SI_SIGIO       -5              /* sent by queued SIGIO */
 #define SI_TKILL       -6              /* sent by tkill system call */
+#define SI_DETHREAD    -7              /* sent by execve() killing subsidiary threads */
 
 #define SI_FROMUSER(siptr)     ((siptr)->si_code <= 0)
 #define SI_FROMKERNEL(siptr)   ((siptr)->si_code > 0)
index a1f831d47245b43d8fa68ed7d8881030674e15ec..549cff3cd7b00784c1102c3d1b59742d51f92c2f 100644 (file)
@@ -20,6 +20,7 @@ struct thread_info {
        struct exec_domain      *exec_domain;   /* execution domain */
        mm_segment_t            addr_limit;     /* thread address space */
        int                     cpu;            /* current CPU */
+       int                     preempt_count; /* 0 => preemptable, <0 => BUG */
 
        int bpt_nsaved;
        unsigned long bpt_addr[2];              /* breakpoint handling  */
@@ -53,6 +54,8 @@ register struct thread_info *__current_thread_info __asm__("$8");
 
 #endif /* __ASSEMBLY__ */
 
+#define PREEMPT_ACTIVE         0x4000000
+
 /*
  * Thread information flags:
  * - these are process state flags and used from assembly
index 22dd6de583403243e8fbaa53854152819d49c4e1..3f7bf95438a9d4afe4c944300cf2c77bac7eb864 100644 (file)
@@ -528,6 +528,7 @@ static inline long dup(int fd)
 
 static inline long close(int fd)
 {
+       extern long sys_close(unsigned int);
        return sys_close(fd);
 }
 
@@ -603,6 +604,6 @@ static inline long delete_module(const char *name)
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asmlinkage long x(void) __attribute__((weak,alias("sys_ni_syscall")));
 
 #endif /* _ALPHA_UNISTD_H */
index c01c52ee02c09fdae446b2ca640366c6c500e21c..b3e47b44c24ecf570354a07be0ef6cbe3093b9a5 100644 (file)
@@ -271,6 +271,9 @@ static void __init smp_init(void)
 #else
 #define smp_init()     do { } while (0)
 #endif
+static inline void setup_per_cpu_areas(void)
+{
+}
 
 static inline void setup_per_cpu_areas(void)
 {