Linux-kernel mailing list archive 1999-23,: Re: 2.2.10-pre-3 build fails on alpha

# Re: 2.2.10-pre-3 build fails on alpha

Peter Rival (frival@zk3.dec.com)
Fri, 11 Jun 1999 18:24:54 -0400

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: david parsons: "Re: Migrating to larger numbers"
- Previous message: Jeff Merkey: "Re: VFAT Naming Bugs"
- Maybe in reply to: Jeff Garzik: "2.2.10-pre-3 build fails on alpha"

Okay...I took some time last night to get 2.2.10-pre-3 to compile for
the Rawhide. Basically I just looked at the two patches and tried to
guess a bit. I will say, however, that going from 2.2.9 to 2.2.10-pre-3
enabled me to get the rawhide to go from hitting a wall at ~50 AIM VII
users to hitting it at between 150 and 200. Not a bad performance.
Anyway, the diff against 2.2.10-pre-3 is below. The usual warranty
(none) applies. However, like I said, it survived 150 AIM VII fserver
users, so it's probably not _that_ bad ;)

- Pete

PATCH:

diff -u --recursive --new-file
linux-2.2.10-pre3/arch/alpha/kernel/alpha_ksyms.c
linux/arch/alpha/kernel/alpha_ksyms.c
--- linux-2.2.10-pre3/arch/alpha/kernel/alpha_ksyms.c Fri Jun 11
15:21:58 1999+++ linux/arch/alpha/kernel/alpha_ksyms.c Thu Jun 10
11:44:38 1999
@@ -171,8 +171,8 @@
EXPORT_SYMBOL(__global_restore_flags);
#if DEBUG_SPINLOCK
EXPORT_SYMBOL(spin_unlock);
-EXPORT_SYMBOL(debug_spin_lock);
-EXPORT_SYMBOL(debug_spin_trylock);
+EXPORT_SYMBOL(spin_lock);
+EXPORT_SYMBOL(spin_trylock);
#endif
#if DEBUG_RWLOCK
EXPORT_SYMBOL(write_lock);
diff -u --recursive --new-file linux-2.2.10-pre3/arch/alpha/kernel/smp.c
linux/arch/alpha/kernel/smp.c
--- linux-2.2.10-pre3/arch/alpha/kernel/smp.c Fri Jun 11 15:21:58 1999
+++ linux/arch/alpha/kernel/smp.c Thu Jun 10 11:31:48 1999
@@ -977,10 +977,14 @@
void
spin_unlock(spinlock_t * lock)
{
- long old_ipl = lock->saved_ipl;
mb();
lock->lock = 0;
- spinlock_restore_ipl(old_ipl);

+ lock->on_cpu = -1;
+ lock->previous = NULL;
+ lock->task = NULL;
+ lock->base_file = "none";
+ lock->line_no = 0;
}

void
@@ -992,7 +996,6 @@
unsigned long started = jiffies;
int printed = 0;
int cpu = smp_processor_id();
- long old_ipl = spinlock_raise_ipl(lock);

stuck = 1L << 28;
try_again:
@@ -1029,7 +1032,6 @@
}

/* Exiting. Got the lock. */
- lock->saved_ipl = old_ipl;
lock->on_cpu = cpu;
lock->previous = inline_pc;
lock->task = current;
@@ -1043,16 +1045,11 @@
int
spin_trylock(spinlock_t * lock)
{
- long old_ipl = spinlock_raise_ipl(lock);
int ret;
if ((ret = !test_and_set_bit(0, lock))) {
- mb();
- lock->saved_ipl = old_ipl;
lock->on_cpu = smp_processor_id();
lock->previous = __builtin_return_address(0);
lock->task = current;
- } else {
- spinlock_restore_ipl(old_ipl);
}
return ret;
}
diff -u --recursive --new-file
linux-2.2.10-pre3/include/asm-alpha/spinlock.h
linux/include/asm-alpha/spinlock.h
--- linux-2.2.10-pre3/include/asm-alpha/spinlock.h Fri Jun 11 15:22:01
1999+++ linux/include/asm-alpha/spinlock.h Fri Jun 11 15:40:20 1999
@@ -106,11 +106,8 @@

#if DEBUG_SPINLOCK
extern void spin_unlock(spinlock_t * lock);
-extern void debug_spin_lock(spinlock_t * lock, const char *, int);
-extern int debug_spin_trylock(spinlock_t * lock, const char *, int);

-#define spin_lock(LOCK) debug_spin_lock(LOCK, __BASE_FILE__, __LINE__)
-#define spin_trylock(LOCK) debug_spin_trylock(LOCK, __BASE_FILE__,
__LINE__)
+extern void spin_lock(spinlock_t * lock);
+extern int spin_trylock(spinlock_t * lock);

#define spin_lock_own(LOCK, LOCATION) \
do { \
diff -u --recursive --new-file
linux-2.2.10-pre3/include/asm-alpha/system.h
linux/include/asm-alpha/system.h
--- linux-2.2.10-pre3/include/asm-alpha/system.h Fri Jun 11 15:22:01
1999+++ linux/include/asm-alpha/system.h Wed Jun 9 17:13:45 1999
@@ -154,13 +154,6 @@
AMASK_PRECISE_TRAP = (1UL << 9),
};

-enum amask_enum {
- AMASK_BWX = (1UL << 0),
- AMASK_FIX = (1UL << 1),
- AMASK_MAX = (1UL << 8),
- AMASK_PRECISE_TRAP = (1UL << 9),
-};

#define amask(mask) \
({ unsigned long __amask, __input = (mask); \
__asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \

END PATCH.

Peter Rival wrote:
>
> As promised, the failure from a 2.2.10-pre-3 build for an SMP rawhide
> system (follows). The same configuration sans SMP builds fine. Looking
> at the SMP patches that Richard Henderson has put out, it looks like
> some elements of those patches are in here, but others aren't, causing
> the compilation failures. If I have time (heh, yeah...) I'll try to
> piece together what's going on and see if I can fix it up. Anyway...the
> compilation errors:
>
> ...
> gcc -D__KERNEL__ -I/home/frival/linuxtest/linux/include -Wall
> -Wstrict-prototypes -O2 -fomit-frame-pointer -D__SMP__ -pipe
> -mno-fp-regs -ffixed-8 -c -o smp.o smp.c
> smp.c: In function `secondary_cpu_start':
> smp.c:357: warning: assignment from incompatible pointer type
> smp.c: In function `spin_unlock':
> smp.c:980: structure has no member named `saved_ipl'
> smp.c: At top level:
> smp.c:987: parse error before string constant
> smp.c: In function `debug_spin_lock':
> smp.c:988: number of arguments doesn't match prototype
> /home/frival/linuxtest/linux/include/asm/spinlock.h:109: prototype
> declaration
> smp.c:995: `lock' undeclared (first use in this function)
> smp.c:995: (Each undeclared identifier is reported only once
> smp.c:995: for each function it appears in.)
> smp.c:995: warning: left-hand operand of comma expression has no effect
> smp.c: At top level:
> smp.c:1044: parse error before string constant
> smp.c: In function `debug_spin_trylock':
> smp.c:1045: number of arguments doesn't match prototype
> /home/frival/linuxtest/linux/include/asm/spinlock.h:110: prototype
> declaration
> smp.c:1046: `lock' undeclared (first use in this function)
> smp.c:1046: warning: left-hand operand of comma expression has no effect
> make[1]: *** [smp.o] Error 1
> make[1]: Leaving directory
> `/home/frival/linuxtest/linux/arch/alpha/kernel'
> make: *** [_dir_arch/alpha/kernel] Error 2
>
> Jeff Garzik wrote:
> >
> > Peter Rival wrote:
> > >
> > > You can just #if 0...#endif the offending re-definition. For some reason the patch adds the same declaration twice. Somewhere down the line it doesn't compile for an SMP (rawhide)
> > > platform either, but the avanti might work past that. Unfortunately I toasted that build tree trying to figure out why my AIM runs are still crashing. (Hint: don't bother
> > > #define-ing DEBUG_ISP1020 to 1 if you're trying to run a 100 user simulation on your system with _heavy_ filesystem work across 4 cards. I ran out of disk space with the debug
> > > messages... *sigh*) See if the above helps...let me know if it compiles the rest of the way...
> >
> > Yeah, getting past it was easy, but I wanted to make sure it was known.
> > CONFIG_ALPHA_AVANTI disables SMP, so I didn't have much trouble after
> > that.
> >
> > "bunzip2 -c xx | tar" and kernel compiles still occasionally crash my
> > machine, dropping me back to SRM with a "kernel stack not valid" error.
> > We'll see if that happens until 2.2.10, it does until 2.2.9 and 2.3.x...
> >
> > Jeff
> >
> > >
> > > - Pete
> > >
> > > Jeff Garzik wrote:
> > >
> > > > This is what I get on an AlphaStation 200 (avanti), CVS-recent egcs, and
> > > > kernel 2.2.10-pre-3:
> > > >
<snip>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: david parsons: "Re: Migrating to larger numbers"
- Previous message: Jeff Merkey: "Re: VFAT Naming Bugs"
- Maybe in reply to: Jeff Garzik: "2.2.10-pre-3 build fails on alpha"