> I got following error on compiling 2.1.34 on a Dell Poweredge Dual Pentium:
here are my current patches for the APIC timer stuff, it fixes these
compiling warnings (sortof), plus fixes a more serious problem.
-- mingo
diff -ru linux-2.1.34_vanilla/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- linux-2.1.34_vanilla/arch/i386/kernel/smp.c Tue Apr 15 11:55:22 1997
+++ linux/arch/i386/kernel/smp.c Tue Apr 15 11:53:48 1997
@@ -1337,21 +1337,21 @@
* it's SMP safe.
*/
-inline void x86_do_profile (unsigned long eip)
+static inline void x86_do_profile (unsigned long eip)
{
if (prof_buffer && current->pid) {
extern int _stext;
eip -= (unsigned long) &_stext;
eip >>= prof_shift;
if (eip < prof_len)
- atomic_inc(&prof_buffer[eip]);
+ atomic_inc((volatile atomic_t *)&prof_buffer[eip]);
else
/*
* Dont ignore out-of-bounds EIP values silently,
* put them into the last histogram slot, so if
* present, they will show up as a sharp peak.
*/
- atomic_inc(&prof_buffer[prof_len-1]);
+ atomic_inc((volatile atomic_t *)&prof_buffer[prof_len-1]);
}
}
@@ -1395,8 +1395,8 @@
* kernel statistics counters are updated via atomic
* operations.
*
- * update_one_process() might send signals, thus
- * we have to get the irq lock for that one.
+ * update_one_process() might send signals, but only
+ * to the current process, thus it's safe.
*/
if (user_mode(regs))
@@ -1405,12 +1405,7 @@
system=1;
if (p->pid) {
- unsigned long flags;
-
- save_flags(flags);
- cli();
update_one_process(current, 1, user, system);
- restore_flags(flags);
p->counter -= 1;
if (p->counter < 0) {
@@ -1418,11 +1413,11 @@
need_resched = 1;
}
if (p->priority < DEF_PRIORITY)
- atomic_add (user, &kstat.cpu_nice);
+ atomic_add (user, (volatile atomic_t *)&kstat.cpu_nice);
else
- atomic_add (user, &kstat.cpu_user);
+ atomic_add (user, (volatile atomic_t *)&kstat.cpu_user);
- atomic_add (system, &kstat.cpu_system);
+ atomic_add (system, (volatile atomic_t *)&kstat.cpu_system);
} else {
#ifdef __SMP_PROF__
diff -ru linux-2.1.34_vanilla/arch/i386/kernel/time.c linux/arch/i386/kernel/time.c
--- linux-2.1.34_vanilla/arch/i386/kernel/time.c Tue Apr 15 11:55:22 1997
+++ linux/arch/i386/kernel/time.c Tue Apr 15 11:53:39 1997
@@ -369,21 +369,21 @@
* Move this to a header file - right now it shows
* up both here and in smp.c
*/
-inline void x86_do_profile (unsigned long eip)
+static inline void x86_do_profile (unsigned long eip)
{
if (prof_buffer && current->pid) {
extern int _stext;
eip -= (unsigned long) &_stext;
eip >>= prof_shift;
if (eip < prof_len)
- atomic_inc(&prof_buffer[eip]);
+ atomic_inc((volatile atomic_t *)&prof_buffer[eip]);
else
/*
* Dont ignore out-of-bounds EIP values silently,
* put them into the last histogram slot, so if
* present, they will show up as a sharp peak.
*/
- atomic_inc(&prof_buffer[prof_len-1]);
+ atomic_inc((volatile atomic_t *)&prof_buffer[prof_len-1]);
}
}