1 diff -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
7 /* endless loop with no priority at all */
13 diff -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
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));
27 diff -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
32 __asm__ __volatile__("\n\
41 : "=&r" (old), "=m" (*p)
42 : "r" (mask), "r" (p), "m" (*p)
45 __asm__ __volatile__("\n\
54 : "=&r" (old), "=m" (*p)
55 : "r" (mask), "r" (p), "m" (*p)
58 __asm__ __volatile__("\n\
67 : "=&r" (old), "=m" (*p)
68 : "r" (mask), "r" (p), "m" (*p)
71 __asm__ __volatile__(SMP_WMB "\n\
81 : "=&r" (old), "=&r" (t), "=m" (*p)
84 __asm__ __volatile__(SMP_WMB "\n\
94 : "=&r" (old), "=&r" (t), "=m" (*p)
97 __asm__ __volatile__(SMP_WMB "\n\
101 -" stwcx. %1,0,%4 \n\
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
111 * Find the first bit set in a 140-bit bitmap.
112 * The first 100 bits are unlikely to be set.
114 -static inline int sched_find_first_bit(unsigned long *b)
115 +static inline int _sched_find_first_bit(unsigned long *b)
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
123 finish_arch_switch(this_rq(), prev);
126 +asmlinkage void schedule_tail(task_t *prev)
128 + finish_arch_switch(this_rq(), prev);
132 static inline task_t * context_switch(task_t *prev, task_t *next)
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
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]) )
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
151 #endif /* defined(CONFIG_ALL_PPC) */
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
159 #define cpu_logical_map(cpu) (cpu)
160 #define cpu_number_map(x) (x)
162 -#define smp_processor_id() (current->processor)
163 +#define smp_processor_id() (current->cpu)
165 extern int smp_hw_index[NR_CPUS];
166 #define hard_smp_processor_id() (smp_hw_index[smp_processor_id()])
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
173 - printk(" CPU: %d", current->processor);
174 + printk(" CPU: %d", current->cpu);
175 #endif /* CONFIG_SMP */
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
181 * cpu 0, the master -- Cort
183 cpu_callin_map[0] = 1;
184 - current->processor = 0;
190 for (i = 0; i < NR_CPUS; i++) {
192 @@ -348,12 +348,12 @@
193 p = init_task.prev_task;
195 panic("No idle task for CPU %d", i);
196 - del_from_runqueue(p);
197 +// del_from_runqueue(p);
200 +// init_tasks[i] = p;
203 - p->cpus_runnable = 1 << i; /* we schedule the first task manually */
205 +// p->cpus_runnable = 1 << i; /* we schedule the first task manually */
211 void __init smp_callin(void)
213 - int cpu = current->processor;
214 + int cpu = current->cpu;
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
221 #define BASE_TIMESLICE(p) (MIN_TIMESLICE + \
222 ((MAX_TIMESLICE - MIN_TIMESLICE) * (MAX_PRIO-1-(p)->static_prio)/(MAX_USER_PRIO - 1)))
224 +unsigned long cache_decay_ticks;
226 static inline unsigned int task_timeslice(task_t *p)
228 if (p->policy == SCHED_BATCH)