Skip to contentSkip to conversation

2.2.18: static rtc_lock in nvram.c

DISCUSSION Ulrich Windl 2 participants 4 messages Feb 26, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

browsing the sources for some problem I wondered why nvram.c uses a static spinlock named rtc_lock, hiding the global one.

Regards,
Ulrich

#1 lore raw
Quoted 4 lines · Alan Cox
Quoted 2 lines

browsing the sources for some problem I wondered why nvram.c uses a static spinlock named rtc_lock, hiding the global one.

It only does that for the atari, where the driver isnt used by other things

Hmm.. are there different nvram.c drivers? I noticed that SuSE 7.1 loads that driver in i386....

Also doesn't look a lot like Atari:
* This driver allows you to access the contents of the non-volatile
memory in
* the mc146818rtc.h real-time clock. This chip is built into all PCs
and into
* many Atari machines. In the former it's called "CMOS-RAM", in the
latter
* "NVRAM" (NV stands for non-volatile).

Regards,
Ulrich

#2 lore raw
Quoted 4 lines
Quoted 1 line

It only does that for the atari, where the driver isnt used by other things

Hmm.. are there different nvram.c drivers? I noticed that SuSE 7.1 loads that driver in i386....

Read carefully

Quoted 7 lines

* This driver allows you to access the contents of the non-volatile
memory in
* the mc146818rtc.h real-time clock. This chip is built into all PCs
and into
* many Atari machines. In the former it's called "CMOS-RAM", in the
latter
* "NVRAM" (NV stands for non-volatile).

The

static spinlock_t

is in the ATARI specific section

#3 lore raw
In reply to Ulrich Windl
Quoted 2 lines

browsing the sources for some problem I wondered why nvram.c uses a static spinlock named rtc_lock, hiding the global one.

It only does that for the atari, where the driver isnt used by other things