]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4.19-PPC-o1_scheduler.patch
- argh. for all 2.4.x < 2.4.25-rc4 (taken from linux 2.4 bk)
[packages/kernel.git] / linux-2.4.19-PPC-o1_scheduler.patch
CommitLineData
f7b6a188 1diff -Nur linux-2.4.19.org/arch/ppc/kernel/idle.c linux-2.4.19/arch/ppc/kernel/idle.c
2--- linux-2.4.19.org/arch/ppc/kernel/idle.c Fri Sep 6 11:26:48 2002
3+++ linux-2.4.19/arch/ppc/kernel/idle.c Fri Sep 6 11:17:56 2002
4@@ -55,7 +55,7 @@
5 do_power_save = 1;
6
7 /* endless loop with no priority at all */
8- init_idle();
9+// init_idle();
10
11 for (;;) {
12 #ifdef CONFIG_SMP
13diff -Nur linux-2.4.19.org/arch/ppc/kernel/mk_defs.c linux-2.4.19/arch/ppc/kernel/mk_defs.c
14--- linux-2.4.19.org/arch/ppc/kernel/mk_defs.c Tue Aug 28 15:58:33 2001
15+++ linux-2.4.19/arch/ppc/kernel/mk_defs.c Fri Sep 6 11:16:47 2002
16@@ -37,8 +37,8 @@
17 /*DEFINE(KERNELBASE, KERNELBASE);*/
18 DEFINE(STATE, offsetof(struct task_struct, state));
19 DEFINE(NEXT_TASK, offsetof(struct task_struct, next_task));
20- DEFINE(COUNTER, offsetof(struct task_struct, counter));
21- DEFINE(PROCESSOR, offsetof(struct task_struct, processor));
22+ DEFINE(COUNTER, offsetof(struct task_struct, time_slice));
23+ DEFINE(PROCESSOR, offsetof(struct task_struct, cpu));
24 DEFINE(SIGPENDING, offsetof(struct task_struct, sigpending));
25 DEFINE(THREAD, offsetof(struct task_struct, thread));
26 DEFINE(MM, offsetof(struct task_struct, mm));
27diff -Nur linux-2.4.19.org/include/asm-ppc/bitops.h linux-2.4.19/include/asm-ppc/bitops.h
28--- linux-2.4.19.org/include/asm-ppc/bitops.h Fri Sep 6 11:26:48 2002
29+++ linux-2.4.19/include/asm-ppc/bitops.h Thu Sep 5 10:36:32 2002
30@@ -38,9 +38,9 @@
31
32 __asm__ __volatile__("\n\
33 1: lwarx %0,0,%3 \n\
34- or %0,%0,%2 \n"
35- PPC405_ERR77(0,%3)
36-" stwcx. %0,0,%3 \n\
37+ or %0,%0,%2 \n\
38+ dcbt 0,%3 \n\
39+ stwcx. %0,0,%3 \n\
40 bne- 1b"
41 : "=&r" (old), "=m" (*p)
42 : "r" (mask), "r" (p), "m" (*p)
43@@ -72,9 +72,9 @@
44
45 __asm__ __volatile__("\n\
46 1: lwarx %0,0,%3 \n\
47- andc %0,%0,%2 \n"
48- PPC405_ERR77(0,%3)
49-" stwcx. %0,0,%3 \n\
50+ andc %0,%0,%2 \n\
51+ dcbt 0,%3 \n\
52+ stwcx. %0,0,%3 \n\
53 bne- 1b"
54 : "=&r" (old), "=m" (*p)
55 : "r" (mask), "r" (p), "m" (*p)
56@@ -100,9 +100,9 @@
57
58 __asm__ __volatile__("\n\
59 1: lwarx %0,0,%3 \n\
60- xor %0,%0,%2 \n"
61- PPC405_ERR77(0,%3)
62-" stwcx. %0,0,%3 \n\
63+ xor %0,%0,%2 \n\
64+ dcbt 0,%3 \n\
65+ stwcx. %0,0,%3 \n\
66 bne- 1b"
67 : "=&r" (old), "=m" (*p)
68 : "r" (mask), "r" (p), "m" (*p)
69@@ -131,9 +131,9 @@
70
71 __asm__ __volatile__(SMP_WMB "\n\
72 1: lwarx %0,0,%4 \n\
73- or %1,%0,%3 \n"
74- PPC405_ERR77(0,%4)
75-" stwcx. %1,0,%4 \n\
76+ or %1,%0,%3 \n\
77+ dcbt 0,%4 \n\
78+ stwcx. %1,0,%4 \n\
79 bne 1b"
80 SMP_MB
81 : "=&r" (old), "=&r" (t), "=m" (*p)
82@@ -164,9 +164,9 @@
83
84 __asm__ __volatile__(SMP_WMB "\n\
85 1: lwarx %0,0,%4 \n\
86- andc %1,%0,%3 \n"
87- PPC405_ERR77(0,%4)
88-" stwcx. %1,0,%4 \n\
89+ andc %1,%0,%3 \n\
90+ dcbt 0,%4 \n\
91+ stwcx. %1,0,%4 \n\
92 bne 1b"
93 SMP_MB
94 : "=&r" (old), "=&r" (t), "=m" (*p)
95@@ -197,9 +197,9 @@
96
97 __asm__ __volatile__(SMP_WMB "\n\
98 1: lwarx %0,0,%4 \n\
99- xor %1,%0,%3 \n"
100- PPC405_ERR77(0,%4)
101-" stwcx. %1,0,%4 \n\
102+ xor %1,%0,%3 \n\
103+ dcbt 0,%4 \n\
104+ stwcx. %1,0,%4 \n\
105 bne 1b"
106 SMP_MB
107 : "=&r" (old), "=&r" (t), "=m" (*p)
108--- linux-2.4.19/include/asm-ppc/bitops.h.org Fri Sep 13 09:18:31 2002
109+++ linux-2.4.19/include/asm-ppc/bitops.h Fri Sep 13 09:07:46 2002
110@@ -289,7 +289,7 @@
111 * Find the first bit set in a 140-bit bitmap.
112 * The first 100 bits are unlikely to be set.
113 */
114-static inline int sched_find_first_bit(unsigned long *b)
115+static inline int _sched_find_first_bit(unsigned long *b)
116 {
117 if (unlikely(b[0]))
118 return __ffs(b[0]);
119--- linux-2.4.19/kernel/sched.c.org Fri Sep 13 10:27:12 2002
120+++ linux-2.4.19/kernel/sched.c Fri Sep 13 10:12:38 2002
9e54a507 121@@ -520,6 +520,11 @@
f7b6a188 122 {
123 finish_arch_switch(this_rq(), prev);
124 }
9e54a507 125+#else
126+asmlinkage void schedule_tail(task_t *prev)
127+{
128+ finish_arch_switch(this_rq(), prev);
129+}
130 #endif
f7b6a188 131
132 static inline task_t * context_switch(task_t *prev, task_t *next)
2eb62314 133--- linux-2.4.19.work/arch/ppc/mm/init.c.org Mon Sep 16 12:29:30 2002
134+++ linux-2.4.19.work/arch/ppc/mm/init.c Mon Sep 16 12:31:46 2002
135@@ -168,9 +168,9 @@
136 {
137 int iscur = 0;
138 #ifdef CONFIG_SMP
139- printk("%3d ", p->processor);
140- if ( (p->processor != NO_PROC_ID) &&
141- (p == current_set[p->processor]) )
142+ printk("%3d ", p->cpu);
143+ if ( (p->cpu != NO_PROC_ID) &&
144+ (p == current_set[p->cpu]) )
145 {
146 iscur = 1;
147 printk("current");
148--- linux-2.4.19/arch/ppc/kernel/ppc_ksyms.c.org Thu Sep 19 20:41:52 2002
149+++ linux-2.4.19/arch/ppc/kernel/ppc_ksyms.c Thu Sep 19 20:41:40 2002
150@@ -371,3 +371,5 @@
151 #endif /* defined(CONFIG_ALL_PPC) */
152
153
154+
155+EXPORT_SYMBOL(ioremap_bot);
156--- linux-2.4.19/include/asm-ppc/smp.h.org Fri Sep 20 14:51:59 2002
157+++ linux-2.4.19/include/asm-ppc/smp.h Fri Sep 20 15:06:52 2002
216bcce3 158@@ -49,7 +49,7 @@
159 #define cpu_logical_map(cpu) (cpu)
160 #define cpu_number_map(x) (x)
161
162-#define smp_processor_id() (current->processor)
163+#define smp_processor_id() (current->cpu)
164
165 extern int smp_hw_index[NR_CPUS];
166 #define hard_smp_processor_id() (smp_hw_index[smp_processor_id()])
2eb62314 167--- linux-2.4.19/arch/ppc/kernel/process.c.org Mon Nov 26 14:29:17 2001
168+++ linux-2.4.19/arch/ppc/kernel/process.c Fri Sep 20 15:16:32 2002
169@@ -270,7 +270,7 @@
170 #endif
171
172 #ifdef CONFIG_SMP
173- printk(" CPU: %d", current->processor);
174+ printk(" CPU: %d", current->cpu);
175 #endif /* CONFIG_SMP */
176
177 printk("\n");
178--- linux-2.4.19/arch/ppc/kernel/smp.c.org Sat Aug 3 02:39:43 2002
179+++ linux-2.4.19/arch/ppc/kernel/smp.c Fri Sep 20 15:20:40 2002
180@@ -292,9 +292,9 @@
181 * cpu 0, the master -- Cort
182 */
183 cpu_callin_map[0] = 1;
184- current->processor = 0;
185+ current->cpu = 0;
186
187- init_idle();
188+// init_idle();
189
190 for (i = 0; i < NR_CPUS; i++) {
191 prof_counter[i] = 1;
192@@ -348,12 +348,12 @@
193 p = init_task.prev_task;
194 if (!p)
195 panic("No idle task for CPU %d", i);
196- del_from_runqueue(p);
197+// del_from_runqueue(p);
198 unhash_process(p);
199- init_tasks[i] = p;
200+// init_tasks[i] = p;
201
202- p->processor = i;
203- p->cpus_runnable = 1 << i; /* we schedule the first task manually */
204+ p->cpu = i;
205+// p->cpus_runnable = 1 << i; /* we schedule the first task manually */
206 current_set[i] = p;
207
208 /*
209@@ -502,7 +502,7 @@
210
211 void __init smp_callin(void)
212 {
213- int cpu = current->processor;
214+ int cpu = current->cpu;
215
216 smp_store_cpu_info(cpu);
217 set_dec(tb_ticks_per_jiffy);
218--- linux-2.4.19/kernel/sched.c.org Fri Sep 20 14:48:06 2002
219+++ linux-2.4.19/kernel/sched.c Fri Sep 20 15:27:34 2002
220@@ -119,6 +119,8 @@
221 #define BASE_TIMESLICE(p) (MIN_TIMESLICE + \
222 ((MAX_TIMESLICE - MIN_TIMESLICE) * (MAX_PRIO-1-(p)->static_prio)/(MAX_USER_PRIO - 1)))
223
224+unsigned long cache_decay_ticks;
225+
226 static inline unsigned int task_timeslice(task_t *p)
227 {
228 if (p->policy == SCHED_BATCH)
This page took 2.202851 seconds and 4 git commands to generate.