* [PATCH] Initialise spinlock in the DEBUG_PAGEALLOC code
@ 2007-04-17 1:43 Michael Ellerman
2007-04-17 7:57 ` Milton Miller
0 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2007-04-17 1:43 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Fixes:
BUG: spinlock bad magic on CPU#0, swapper/0
lock: c00000000064ec30, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
Call Trace:
[c00000000062b980] [c00000000000f920] .show_stack+0x6c/0x1a0 (unreliable)
[c00000000062ba20] [c0000000001c2b40] .spin_bug+0xb0/0xd4
[c00000000062bab0] [c0000000001c2ed0] ._raw_spin_lock+0x44/0x184
[c00000000062bb50] [c0000000003a42b4] ._spin_lock+0x10/0x24
[c00000000062bbd0] [c00000000002b4dc] .kernel_map_pages+0x198/0x278
[c00000000062bc90] [c000000000079720] .free_hot_cold_page+0x124/0x418
[c00000000062bd70] [c000000000530278] .free_all_bootmem_core+0x14c/0x224
[c00000000062be50] [c00000000052a178] .mem_init+0x68/0x170
[c00000000062bee0] [c00000000051d874] .start_kernel+0x2a0/0x37c
[c00000000062bf90] [c0000000000084c8] .start_here_common+0x54/0x8c
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/mm/hash_utils_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: powerpc/arch/powerpc/mm/hash_utils_64.c
===================================================================
--- powerpc.orig/arch/powerpc/mm/hash_utils_64.c
+++ powerpc/arch/powerpc/mm/hash_utils_64.c
@@ -103,7 +103,7 @@ int mmu_ci_restrictions;
#ifdef CONFIG_DEBUG_PAGEALLOC
static u8 *linear_map_hash_slots;
static unsigned long linear_map_hash_count;
-static spinlock_t linear_map_hash_lock;
+static spinlock_t linear_map_hash_lock = SPIN_LOCK_UNLOCKED;
#endif /* CONFIG_DEBUG_PAGEALLOC */
/* There are definitions of page sizes arrays to be used when none
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Initialise spinlock in the DEBUG_PAGEALLOC code
2007-04-17 1:43 Michael Ellerman
@ 2007-04-17 7:57 ` Milton Miller
2007-04-18 1:38 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Milton Miller @ 2007-04-17 7:57 UTC (permalink / raw)
To: Michael Ellerman; +Cc: ppcdev, Paul Mackerras
On Tue Apr 17 11:43:12 EST 2007, Michael Ellerman wrote:
> -static spinlock_t linear_map_hash_lock;
> +static spinlock_t linear_map_hash_lock = SPIN_LOCK_UNLOCKED;
I think the people in this thread
[KJ][PATCH]SPIN_LOCK_UNLOCKED cleanup in arch/powerpc
http://ozlabs.org/pipermail/linuxppc-dev/2007-April/034210.html
SPIN_LOCK_UNLOCKED cleanup,use DEFINE_SPINLOCK or
__SPIN_LOCK_UNLOCKED where ever appropriate.
would like you to initialize it differently. (I think it has
to do with the lock dependancy stuff).
milton
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Initialise spinlock in the DEBUG_PAGEALLOC code
2007-04-17 7:57 ` Milton Miller
@ 2007-04-18 1:38 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2007-04-18 1:38 UTC (permalink / raw)
To: Milton Miller; +Cc: ppcdev, Paul Mackerras
[-- Attachment #1: Type: text/plain, Size: 936 bytes --]
On Tue, 2007-04-17 at 02:57 -0500, Milton Miller wrote:
> On Tue Apr 17 11:43:12 EST 2007, Michael Ellerman wrote:
> > -static spinlock_t linear_map_hash_lock;
> > +static spinlock_t linear_map_hash_lock = SPIN_LOCK_UNLOCKED;
>
> I think the people in this thread
>
> [KJ][PATCH]SPIN_LOCK_UNLOCKED cleanup in arch/powerpc
> http://ozlabs.org/pipermail/linuxppc-dev/2007-April/034210.html
>
> SPIN_LOCK_UNLOCKED cleanup,use DEFINE_SPINLOCK or
> __SPIN_LOCK_UNLOCKED where ever appropriate.
>
> would like you to initialize it differently. (I think it has
> to do with the lock dependancy stuff).
And it's documented where .. ?
I'll send a new patch.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Initialise spinlock in the DEBUG_PAGEALLOC code
@ 2007-04-18 1:50 Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2007-04-18 1:50 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Fixes:
BUG: spinlock bad magic on CPU#0, swapper/0
lock: c00000000064ec30, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
Call Trace:
[c00000000062b980] [c00000000000f920] .show_stack+0x6c/0x1a0 (unreliable)
[c00000000062ba20] [c0000000001c2b40] .spin_bug+0xb0/0xd4
[c00000000062bab0] [c0000000001c2ed0] ._raw_spin_lock+0x44/0x184
[c00000000062bb50] [c0000000003a42b4] ._spin_lock+0x10/0x24
[c00000000062bbd0] [c00000000002b4dc] .kernel_map_pages+0x198/0x278
[c00000000062bc90] [c000000000079720] .free_hot_cold_page+0x124/0x418
[c00000000062bd70] [c000000000530278] .free_all_bootmem_core+0x14c/0x224
[c00000000062be50] [c00000000052a178] .mem_init+0x68/0x170
[c00000000062bee0] [c00000000051d874] .start_kernel+0x2a0/0x37c
[c00000000062bf90] [c0000000000084c8] .start_here_common+0x54/0x8c
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/mm/hash_utils_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: powerpc/arch/powerpc/mm/hash_utils_64.c
===================================================================
--- powerpc.orig/arch/powerpc/mm/hash_utils_64.c
+++ powerpc/arch/powerpc/mm/hash_utils_64.c
@@ -103,7 +103,7 @@ int mmu_ci_restrictions;
#ifdef CONFIG_DEBUG_PAGEALLOC
static u8 *linear_map_hash_slots;
static unsigned long linear_map_hash_count;
-static spinlock_t linear_map_hash_lock;
+static DEFINE_SPINLOCK(linear_map_hash_lock);
#endif /* CONFIG_DEBUG_PAGEALLOC */
/* There are definitions of page sizes arrays to be used when none
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-18 1:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-18 1:50 [PATCH] Initialise spinlock in the DEBUG_PAGEALLOC code Michael Ellerman
-- strict thread matches above, loose matches on Subject: below --
2007-04-17 1:43 Michael Ellerman
2007-04-17 7:57 ` Milton Miller
2007-04-18 1:38 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).