diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-02-17 21:22:59 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-18 22:52:30 -0500 |
commit | 7d725bdc1b25b9c4ff7c14e43d0d0d6c3d677727 (patch) | |
tree | d614fdb26e5e0d9b3a4985076a8b1ee1e091daaf /arch/powerpc/platforms | |
parent | be833f3371bd9580d9f5a507390d72452577f394 (diff) |
powerpc: Convert nv_lock to raw_spinlock
nv_lock needs to be a real spinlock in RT. Convert it to raw_spinlock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powermac/nvram.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c index c6f0f9e738e5..80a5258d0364 100644 --- a/arch/powerpc/platforms/powermac/nvram.c +++ b/arch/powerpc/platforms/powermac/nvram.c | |||
@@ -80,7 +80,7 @@ static int is_core_99; | |||
80 | static int core99_bank = 0; | 80 | static int core99_bank = 0; |
81 | static int nvram_partitions[3]; | 81 | static int nvram_partitions[3]; |
82 | // XXX Turn that into a sem | 82 | // XXX Turn that into a sem |
83 | static DEFINE_SPINLOCK(nv_lock); | 83 | static DEFINE_RAW_SPINLOCK(nv_lock); |
84 | 84 | ||
85 | static int (*core99_write_bank)(int bank, u8* datas); | 85 | static int (*core99_write_bank)(int bank, u8* datas); |
86 | static int (*core99_erase_bank)(int bank); | 86 | static int (*core99_erase_bank)(int bank); |
@@ -165,10 +165,10 @@ static unsigned char indirect_nvram_read_byte(int addr) | |||
165 | unsigned char val; | 165 | unsigned char val; |
166 | unsigned long flags; | 166 | unsigned long flags; |
167 | 167 | ||
168 | spin_lock_irqsave(&nv_lock, flags); | 168 | raw_spin_lock_irqsave(&nv_lock, flags); |
169 | out_8(nvram_addr, addr >> 5); | 169 | out_8(nvram_addr, addr >> 5); |
170 | val = in_8(&nvram_data[(addr & 0x1f) << 4]); | 170 | val = in_8(&nvram_data[(addr & 0x1f) << 4]); |
171 | spin_unlock_irqrestore(&nv_lock, flags); | 171 | raw_spin_unlock_irqrestore(&nv_lock, flags); |
172 | 172 | ||
173 | return val; | 173 | return val; |
174 | } | 174 | } |
@@ -177,10 +177,10 @@ static void indirect_nvram_write_byte(int addr, unsigned char val) | |||
177 | { | 177 | { |
178 | unsigned long flags; | 178 | unsigned long flags; |
179 | 179 | ||
180 | spin_lock_irqsave(&nv_lock, flags); | 180 | raw_spin_lock_irqsave(&nv_lock, flags); |
181 | out_8(nvram_addr, addr >> 5); | 181 | out_8(nvram_addr, addr >> 5); |
182 | out_8(&nvram_data[(addr & 0x1f) << 4], val); | 182 | out_8(&nvram_data[(addr & 0x1f) << 4], val); |
183 | spin_unlock_irqrestore(&nv_lock, flags); | 183 | raw_spin_unlock_irqrestore(&nv_lock, flags); |
184 | } | 184 | } |
185 | 185 | ||
186 | 186 | ||
@@ -481,7 +481,7 @@ static void core99_nvram_sync(void) | |||
481 | if (!is_core_99 || !nvram_data || !nvram_image) | 481 | if (!is_core_99 || !nvram_data || !nvram_image) |
482 | return; | 482 | return; |
483 | 483 | ||
484 | spin_lock_irqsave(&nv_lock, flags); | 484 | raw_spin_lock_irqsave(&nv_lock, flags); |
485 | if (!memcmp(nvram_image, (u8*)nvram_data + core99_bank*NVRAM_SIZE, | 485 | if (!memcmp(nvram_image, (u8*)nvram_data + core99_bank*NVRAM_SIZE, |
486 | NVRAM_SIZE)) | 486 | NVRAM_SIZE)) |
487 | goto bail; | 487 | goto bail; |
@@ -503,7 +503,7 @@ static void core99_nvram_sync(void) | |||
503 | if (core99_write_bank(core99_bank, nvram_image)) | 503 | if (core99_write_bank(core99_bank, nvram_image)) |
504 | printk("nvram: Error writing bank %d\n", core99_bank); | 504 | printk("nvram: Error writing bank %d\n", core99_bank); |
505 | bail: | 505 | bail: |
506 | spin_unlock_irqrestore(&nv_lock, flags); | 506 | raw_spin_unlock_irqrestore(&nv_lock, flags); |
507 | 507 | ||
508 | #ifdef DEBUG | 508 | #ifdef DEBUG |
509 | mdelay(2000); | 509 | mdelay(2000); |