lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0702010958190.15224@CPE00045a9c397f-CM001225dbafb6>
Date:	Thu, 1 Feb 2007 10:05:55 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Linux kernel mailing list <linux-kernel@...r.kernel.org>
cc:	Paul Mackerras <paulus@...ba.org>, benh@...nel.crashing.org,
	wli@...omorphy.com, starvik@...s.com
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@...dspring.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ