Michael Schmitz wrote:
I tried compiling a 2.6 kernel from sources (2.6.11 from kernel.org to be exact), and I got the following: What's causing this ?That looks like the swim3 driver. Last I heard, it hadn't been updated when some of the other parts of the kernel changed.Looks like it hasn't been touched in ages, then. BenH should correct me if I'm way off base, but you basically need to replace, at a minimum: save_flags(flags)+cli() by local_irq_save(flags) restore_flags(flags) by local_irq_restore(flags) sti() by local_irq_enable() for uniprocessor use (are there any SMP capable machines with SWIM3??). If that compiles and runs, you can proceed to using proper spinlock functions (a spinlock has already been added to the driver but isn't currently used).
This code needs to be SMP safe (see Bug#271517). You'll need proper locking primitives (ie. spin_lock_irqsave(), etc...). The locks will compile away on UP machines. Keep in mind that this isn't a simple case of search and replace. You should understand what data needs mutual exclusion. The stray sti() looks like a hack. Enabling interrupts with sti() before return is bad practice because your function could be returning to a function that expects interrupts to still be disabled. -Eric -- "Education is what remains after one has forgotten everything he learned in school." - Albert Einstein
Description: OpenPGP digital signature