Skip to content

Commit

Permalink
m68k: Define rtc_lock on Atari
Browse files Browse the repository at this point in the history
The nvram and rtc-cmos drivers use the spinlock rtc_lock to protect against
concurrent accesses to the CMOS memory. As m68k doesn't support SMP or preempt
yet, the spinlock calls tend to get optimized away, but not for all
configurations, causing in some rare cases:

| ERROR: "rtc_lock" [drivers/rtc/rtc-cmos.ko] undefined!
| ERROR: "rtc_lock" [drivers/char/nvram.ko] undefined!

Add the spinlock to the Atari core code to avoid this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed Oct 14, 2008
1 parent 3e24fc9 commit 7ae4833
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/m68k/atari/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

#include <asm/atariints.h>

DEFINE_SPINLOCK(rtc_lock);
EXPORT_SYMBOL_GPL(rtc_lock);

void __init
atari_sched_init(irq_handler_t timer_routine)
{
Expand Down

0 comments on commit 7ae4833

Please sign in to comment.