diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-11-06 07:41:46 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-11-23 22:31:28 -0500 |
commit | 293cfa44c3a861d63c77923667206356c4756ae0 (patch) | |
tree | dcfbce4239fe7993892f04617dbddc394f76bbf8 | |
parent | 0b048c7a1d7f65e3e3f77834c03237be9d6d94b7 (diff) |
powerpc: Replace old style lock initializer
SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/iseries/htab.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c index f99c6c4b6985..3ae66ab9d5e7 100644 --- a/arch/powerpc/platforms/iseries/htab.c +++ b/arch/powerpc/platforms/iseries/htab.c | |||
@@ -19,8 +19,7 @@ | |||
19 | 19 | ||
20 | #include "call_hpt.h" | 20 | #include "call_hpt.h" |
21 | 21 | ||
22 | static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp = | 22 | static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp; |
23 | { [0 ... 63] = SPIN_LOCK_UNLOCKED}; | ||
24 | 23 | ||
25 | /* | 24 | /* |
26 | * Very primitive algorithm for picking up a lock | 25 | * Very primitive algorithm for picking up a lock |
@@ -245,6 +244,11 @@ static void iSeries_hpte_invalidate(unsigned long slot, unsigned long va, | |||
245 | 244 | ||
246 | void __init hpte_init_iSeries(void) | 245 | void __init hpte_init_iSeries(void) |
247 | { | 246 | { |
247 | int i; | ||
248 | |||
249 | for (i = 0; i < ARRAY_SIZE(iSeries_hlocks); i++) | ||
250 | spin_lock_init(&iSeries_hlocks[i]); | ||
251 | |||
248 | ppc_md.hpte_invalidate = iSeries_hpte_invalidate; | 252 | ppc_md.hpte_invalidate = iSeries_hpte_invalidate; |
249 | ppc_md.hpte_updatepp = iSeries_hpte_updatepp; | 253 | ppc_md.hpte_updatepp = iSeries_hpte_updatepp; |
250 | ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp; | 254 | ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp; |