lkml.org 
[lkml]   [2007]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Replace arrays of SPIN_LOCK_UNLOCKED with __RAW_SPIN_LOCK_UNLOCKED.

For Sparc, PPC and CRIS, replace declarations of an array of
SPIN_LOCK_UNLOCKED with an array of __RAW_SPIN_LOCK_UNLOCKED.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

given that the macro SPIN_LOCK_UNLOCKED is deprecated in favour of
the named version of spin locks, it would seem to make sense, if you
need to allocate an array of spin locks, to use the raw form of the
spin lock instead, as is done by PARISC and MIPS.

but this is just a guess and i'm willing to be told i have no clue
what i'm talking about.


arch/cris/arch-v32/kernel/smp.c | 2 +-
arch/powerpc/platforms/iseries/htab.c | 4 ++--
arch/sparc/lib/atomic32.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index 77e655f..f5aa705 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -24,7 +24,7 @@
#define FLUSH_ALL (void*)0xffffffff

/* Vector of locks used for various atomic operations */
-spinlock_t cris_atomic_locks[] = { [0 ... LOCK_COUNT - 1] = SPIN_LOCK_UNLOCKED};
+raw_spinlock_t cris_atomic_locks[] = { [0 ... LOCK_COUNT - 1] = __RAW_SPIN_LOCK_UNLOCKED};

/* CPU masks */
cpumask_t cpu_online_map = CPU_MASK_NONE;
diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c
index ed44dfc..713fa1e 100644
--- a/arch/powerpc/platforms/iseries/htab.c
+++ b/arch/powerpc/platforms/iseries/htab.c
@@ -19,8 +19,8 @@

#include "call_hpt.h"

-static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp =
- { [0 ... 63] = SPIN_LOCK_UNLOCKED};
+static raw_spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp =
+ { [0 ... 63] = __RAW_SPIN_LOCK_UNLOCKED};

/*
* Very primitive algorithm for picking up a lock
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c
index 53ddcd9..21f407c 100644
--- a/arch/sparc/lib/atomic32.c
+++ b/arch/sparc/lib/atomic32.c
@@ -14,8 +14,8 @@
#define ATOMIC_HASH_SIZE 4
#define ATOMIC_HASH(a) (&__atomic_hash[(((unsigned long)a)>>8) & (ATOMIC_HASH_SIZE-1)])

-spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
- [0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
+raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
+ [0 ... (ATOMIC_HASH_SIZE-1)] = __RAW_SPIN_LOCK_UNLOCKED
};

#else /* SMP */
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://www.fsdev.dreamhosters.com/wiki/index.php?title=Main_Page
========================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-02-01 17:03    [W:0.164 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site