]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.4.19-SPARC.patch
- obsolete
[packages/kernel.git] / linux-2.4.19-SPARC.patch
1 --- linux-2.4.19/arch/sparc/kernel/process.c.org        Sat Aug  3 02:39:43 2002
2 +++ linux-2.4.19/arch/sparc/kernel/process.c    Fri Sep 27 09:34:30 2002
3 @@ -74,7 +74,6 @@
4                 goto out;
5  
6         /* endless idle loop with no priority at all */
7 -       init_idle();
8  
9         for (;;) {
10                 if (ARCH_SUN4C_SUN4) {
11 @@ -128,7 +125,6 @@
12  int cpu_idle(void)
13  {
14         /* endless idle loop with no priority at all */
15 -       init_idle();
16  
17         while(1) {
18                 if(current->need_resched) {
19 --- linux/include/asm-sparc/bitops.h.orig       Tue Aug 21 14:26:16 2001
20 +++ linux/include/asm-sparc/bitops.h    Fri Jul 19 15:03:33 2002
21 @@ -13,6 +13,23 @@
22  #include <asm/byteorder.h>
23  #include <asm/system.h>
24  
25 +/**
26 + * __ffs - find first bit in word.
27 + * @word: The word to search
28 + *
29 + * Undefined if no bit exists, so code should check against 0 first.
30 + */
31 +static __inline__ unsigned long __ffs(unsigned long word)
32 +{
33 +       unsigned long result = 0;
34 +
35 +       while (!(word & 1UL)) {
36 +               result++;
37 +               word >>= 1;
38 +       }
39 +       return result;
40 +}
41 +
42  #ifdef __KERNEL__
43  
44  /*
45 @@ -330,6 +400,25 @@
46  }
47  
48  #ifdef __KERNEL__
49 +
50 +/*
51 + * Every architecture must define this function. It's the fastest
52 + * way of searching a 140-bit bitmap where the first 100 bits are
53 + * unlikely to be set. It's guaranteed that at least one of the 140
54 + * bits is cleared.
55 + */
56 +static inline int _sched_find_first_bit(unsigned long *b)
57 +{
58 +       if (unlikely(b[0]))
59 +               return __ffs(b[0]);
60 +       if (unlikely(b[1]))
61 +               return __ffs(b[1]) + 32;
62 +       if (unlikely(b[2]))
63 +               return __ffs(b[2]) + 64;
64 +       if (b[3])
65 +               return __ffs(b[3]) + 96;
66 +       return __ffs(b[4]) + 128;
67 +}
68  
69  /**
70   * ffs - find first bit set
71 --- linux-2.4.19/include/asm-sparc/system.h.org Wed Oct 31 00:08:11 2001
72 +++ linux-2.4.19/include/asm-sparc/system.h     Sat Nov  2 23:54:48 2002
73 @@ -88,7 +88,7 @@
74   *
75   * SWITCH_ENTER and SWITH_DO_LAZY_FPU do not work yet (e.g. SMP does not work)
76   */
77 -#define prepare_to_switch() do { \
78 +#define prepare_arch_switch(rq, next) do { \
79         __asm__ __volatile__( \
80         ".globl\tflush_patch_switch\nflush_patch_switch:\n\t" \
81         "save %sp, -0x40, %sp; save %sp, -0x40, %sp; save %sp, -0x40, %sp\n\t" \
82 @@ -96,6 +96,8 @@
83         "save %sp, -0x40, %sp\n\t" \
84         "restore; restore; restore; restore; restore; restore; restore"); \
85  } while(0)
86 +#define finish_arch_switch(rq, next)   do{ }while(0)
87 +#define task_running(rq, p)            ((rq)->curr == (p))
88  
89         /* Much care has gone into this code, do not touch it.
90          *
91 --- linux-2.4.19/include/asm-sparc/pgtable.h.org        Mon Sep 23 09:33:03 2002
92 +++ linux-2.4.19/include/asm-sparc/pgtable.h    Mon Sep 23 10:23:24 2002
93 @@ -118,6 +118,16 @@
94  #define PAGE_COPY      __pgprot(BTFIXUP_INT(page_copy))
95  #define PAGE_READONLY  __pgprot(BTFIXUP_INT(page_readonly))
96  
97 +#ifdef CONFIG_GRKERNSEC_PAX
98 +#define        PAGE_SHARED_NOEXEC      PAGE_SHARED
99 +#define        PAGE_COPY_NOEXEC        PAGE_COPY
100 +#define        PAGE_READONLY_NOEXEC    PAGE_READONLY
101 +#else
102 +#define        PAGE_SHARED_NOEXEC      PAGE_SHARED
103 +#define        PAGE_COPY_NOEXEC        PAGE_COPY
104 +#define        PAGE_READONLY_NOEXEC    PAGE_READONLY
105 +#endif
106 +
107  extern unsigned long page_kernel;
108  
109  #ifdef MODULE
110 --- linux-2.4.19/kernel/sched.c.org     Fri Sep 13 10:27:12 2002
111 +++ linux-2.4.19/kernel/sched.c Fri Sep 13 10:12:38 2002
112 @@ -520,6 +520,11 @@
113  {
114         finish_arch_switch(this_rq(), prev);
115  }
116 +#else
117 +asmlinkage void schedule_tail(task_t *prev)
118 +{
119 +       finish_arch_switch(this_rq(), prev);
120 +}
121  #endif
122  
123  static inline task_t * context_switch(task_t *prev, task_t *next)
This page took 0.037634 seconds and 3 git commands to generate.