public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* BUG: spinlock bad magic on CPU#0
@ 2011-01-14 14:08 Sergey Senozhatsky
  2011-01-14 19:26 ` Len Brown
  2011-01-14 21:09 ` Rafael J. Wysocki
  0 siblings, 2 replies; 5+ messages in thread
From: Sergey Senozhatsky @ 2011-01-14 14:08 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2835 bytes --]

Hello,

Acer Aspire  5741g
2.6.37-git11

Got this trace today:

[    0.814609] ACPI: EC: Look up EC in DSDT
[    0.825556] BUG: spinlock bad magic on CPU#0, swapper/1
[    0.825639]  lock: ffffffff8242fa90, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[    0.825741] Pid: 1, comm: swapper Not tainted 2.6.37-dbg-git11-07456-gdbc61c6-dirty #359
[    0.825841] Call Trace:
[    0.825923]  [<ffffffff81247919>] ? spin_bug+0x9c/0xa3
[    0.826004]  [<ffffffff812479e9>] ? do_raw_spin_lock+0x29/0x122
[    0.826093]  [<ffffffff814867e5>] ? _raw_spin_lock_irqsave+0x56/0x60
[    0.826181]  [<ffffffff81275e8a>] ? acpi_os_acquire_lock+0x9/0xb
[    0.826264]  [<ffffffff81275e8a>] ? acpi_os_acquire_lock+0x9/0xb
[    0.826350]  [<ffffffff81288fad>] ? acpi_ev_acquire_global_lock+0x10b/0x206
[    0.826438]  [<ffffffff8129620c>] ? acpi_ex_acquire_mutex_object+0xa3/0x11d
[    0.826525]  [<ffffffff812952e3>] ? acpi_ex_acquire_global_lock+0x61/0xa2
[    0.826613]  [<ffffffff8128def7>] ? acpi_ex_read_data_from_field+0x293/0x2f1
[    0.826701]  [<ffffffff81296e88>] ? acpi_ex_resolve_node_to_value+0x320/0x444
[    0.826789]  [<ffffffff812a8587>] ? acpi_ut_trace_ptr+0x58/0x65
[    0.826874]  [<ffffffff8128efb1>] ? acpi_ex_resolve_to_value+0x379/0x406
[    0.826961]  [<ffffffff81284efb>] ? acpi_ds_evaluate_name_path+0x9e/0x143
[    0.827048]  [<ffffffff812824c5>] ? acpi_ds_exec_end_op+0xda/0x641
[    0.827131]  [<ffffffff812a844c>] ? acpi_ut_status_exit+0x6f/0x80
[    0.827216]  [<ffffffff812a2e5c>] ? acpi_ps_parse_loop+0xc65/0xf45
[    0.827302]  [<ffffffff812a1acf>] ? acpi_ps_parse_aml+0x162/0x467
[    0.827385]  [<ffffffff812a8691>] ? acpi_ut_ptr_exit+0x33/0x3b
[    0.827470]  [<ffffffff812a3b5a>] ? acpi_ps_execute_method+0x26d/0x393
[    0.827558]  [<ffffffff8129c14d>] ? acpi_ns_evaluate+0x235/0x3b7
[    0.827643]  [<ffffffff812ab605>] ? acpi_ut_add_reference+0xb1/0xb8
[    0.827730]  [<ffffffff8129c42a>] ? acpi_ns_exec_module_code_list+0x15b/0x25d
[    0.827818]  [<ffffffff812a9dbb>] ? acpi_initialize_objects+0x88/0x17d
[    0.827907]  [<ffffffff81ad43ff>] ? acpi_init+0x0/0x10a
[    0.827990]  [<ffffffff81ad42c1>] ? acpi_bus_init+0x9f/0x1dd
[    0.828076]  [<ffffffff8123c24b>] ? kobject_create_and_add+0x37/0x68
[    0.828162]  [<ffffffff81ad4470>] ? acpi_init+0x71/0x10a
[    0.828248]  [<ffffffff810002ee>] ? do_one_initcall+0x7a/0x13c
[    0.828334]  [<ffffffff81aacda0>] ? kernel_init+0x16c/0x1f0
[    0.828420]  [<ffffffff81002fa4>] ? kernel_thread_helper+0x4/0x10
[    0.828506]  [<ffffffff81031ab3>] ? finish_task_switch+0x78/0xec
[    0.828592]  [<ffffffff81487318>] ? restore_args+0x0/0x30
[    0.828677]  [<ffffffff81aacc34>] ? kernel_init+0x0/0x1f0
[    0.828760]  [<ffffffff81002fa0>] ? kernel_thread_helper+0x0/0x10
[    0.828935] ACPI: Executed 1 blocks of module-level executable AML code


	Sergey

[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BUG: spinlock bad magic on CPU#0
  2011-01-14 14:08 BUG: spinlock bad magic on CPU#0 Sergey Senozhatsky
@ 2011-01-14 19:26 ` Len Brown
  2011-01-14 21:09 ` Rafael J. Wysocki
  1 sibling, 0 replies; 5+ messages in thread
From: Len Brown @ 2011-01-14 19:26 UTC (permalink / raw)
  To: Sergey Senozhatsky; +Cc: linux-acpi, linux-kernel

On Fri, 14 Jan 2011, Sergey Senozhatsky wrote:

> Hello,
> 
> Acer Aspire  5741g
> 2.6.37-git11
> 
> Got this trace today:
> 
> [    0.814609] ACPI: EC: Look up EC in DSDT
> [    0.825556] BUG: spinlock bad magic on CPU#0, swapper/1
> [    0.825639]  lock: ffffffff8242fa90, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
> [    0.825741] Pid: 1, comm: swapper Not tainted 2.6.37-dbg-git11-07456-gdbc61c6-dirty #359
> [    0.825841] Call Trace:
> [    0.825923]  [<ffffffff81247919>] ? spin_bug+0x9c/0xa3
> [    0.826004]  [<ffffffff812479e9>] ? do_raw_spin_lock+0x29/0x122
> [    0.826093]  [<ffffffff814867e5>] ? _raw_spin_lock_irqsave+0x56/0x60
> [    0.826181]  [<ffffffff81275e8a>] ? acpi_os_acquire_lock+0x9/0xb
> [    0.826264]  [<ffffffff81275e8a>] ? acpi_os_acquire_lock+0x9/0xb
> [    0.826350]  [<ffffffff81288fad>] ? acpi_ev_acquire_global_lock+0x10b/0x206
> [    0.826438]  [<ffffffff8129620c>] ? acpi_ex_acquire_mutex_object+0xa3/0x11d
> [    0.826525]  [<ffffffff812952e3>] ? acpi_ex_acquire_global_lock+0x61/0xa2

Does the failure go away if you revert this commit?

commit 9cd031441a4fd09273b7c2beb337d0b2683d104c
    ACPI / ACPICA: Fix global lock acquisition

thanks,
Len Brown, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BUG: spinlock bad magic on CPU#0
  2011-01-14 14:08 BUG: spinlock bad magic on CPU#0 Sergey Senozhatsky
  2011-01-14 19:26 ` Len Brown
@ 2011-01-14 21:09 ` Rafael J. Wysocki
  2011-01-14 21:51   ` Sergey Senozhatsky
  1 sibling, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2011-01-14 21:09 UTC (permalink / raw)
  To: Sergey Senozhatsky; +Cc: Len Brown, linux-acpi, linux-kernel

On Friday, January 14, 2011, Sergey Senozhatsky wrote:
> Hello,

Hi,

> Acer Aspire  5741g
> 2.6.37-git11
> 
> Got this trace today:
> 
> [    0.814609] ACPI: EC: Look up EC in DSDT
> [    0.825556] BUG: spinlock bad magic on CPU#0, swapper/1
> [    0.825639]  lock: ffffffff8242fa90, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
> [    0.825741] Pid: 1, comm: swapper Not tainted 2.6.37-dbg-git11-07456-gdbc61c6-dirty #359
> [    0.825841] Call Trace:
> [    0.825923]  [<ffffffff81247919>] ? spin_bug+0x9c/0xa3
> [    0.826004]  [<ffffffff812479e9>] ? do_raw_spin_lock+0x29/0x122
> [    0.826093]  [<ffffffff814867e5>] ? _raw_spin_lock_irqsave+0x56/0x60
> [    0.826181]  [<ffffffff81275e8a>] ? acpi_os_acquire_lock+0x9/0xb
> [    0.826264]  [<ffffffff81275e8a>] ? acpi_os_acquire_lock+0x9/0xb
> [    0.826350]  [<ffffffff81288fad>] ? acpi_ev_acquire_global_lock+0x10b/0x206
> [    0.826438]  [<ffffffff8129620c>] ? acpi_ex_acquire_mutex_object+0xa3/0x11d
> [    0.826525]  [<ffffffff812952e3>] ? acpi_ex_acquire_global_lock+0x61/0xa2
> [    0.826613]  [<ffffffff8128def7>] ? acpi_ex_read_data_from_field+0x293/0x2f1
> [    0.826701]  [<ffffffff81296e88>] ? acpi_ex_resolve_node_to_value+0x320/0x444
> [    0.826789]  [<ffffffff812a8587>] ? acpi_ut_trace_ptr+0x58/0x65
> [    0.826874]  [<ffffffff8128efb1>] ? acpi_ex_resolve_to_value+0x379/0x406
> [    0.826961]  [<ffffffff81284efb>] ? acpi_ds_evaluate_name_path+0x9e/0x143
> [    0.827048]  [<ffffffff812824c5>] ? acpi_ds_exec_end_op+0xda/0x641
> [    0.827131]  [<ffffffff812a844c>] ? acpi_ut_status_exit+0x6f/0x80
> [    0.827216]  [<ffffffff812a2e5c>] ? acpi_ps_parse_loop+0xc65/0xf45
> [    0.827302]  [<ffffffff812a1acf>] ? acpi_ps_parse_aml+0x162/0x467
> [    0.827385]  [<ffffffff812a8691>] ? acpi_ut_ptr_exit+0x33/0x3b
> [    0.827470]  [<ffffffff812a3b5a>] ? acpi_ps_execute_method+0x26d/0x393
> [    0.827558]  [<ffffffff8129c14d>] ? acpi_ns_evaluate+0x235/0x3b7
> [    0.827643]  [<ffffffff812ab605>] ? acpi_ut_add_reference+0xb1/0xb8
> [    0.827730]  [<ffffffff8129c42a>] ? acpi_ns_exec_module_code_list+0x15b/0x25d
> [    0.827818]  [<ffffffff812a9dbb>] ? acpi_initialize_objects+0x88/0x17d
> [    0.827907]  [<ffffffff81ad43ff>] ? acpi_init+0x0/0x10a
> [    0.827990]  [<ffffffff81ad42c1>] ? acpi_bus_init+0x9f/0x1dd
> [    0.828076]  [<ffffffff8123c24b>] ? kobject_create_and_add+0x37/0x68
> [    0.828162]  [<ffffffff81ad4470>] ? acpi_init+0x71/0x10a
> [    0.828248]  [<ffffffff810002ee>] ? do_one_initcall+0x7a/0x13c
> [    0.828334]  [<ffffffff81aacda0>] ? kernel_init+0x16c/0x1f0
> [    0.828420]  [<ffffffff81002fa4>] ? kernel_thread_helper+0x4/0x10
> [    0.828506]  [<ffffffff81031ab3>] ? finish_task_switch+0x78/0xec
> [    0.828592]  [<ffffffff81487318>] ? restore_args+0x0/0x30
> [    0.828677]  [<ffffffff81aacc34>] ? kernel_init+0x0/0x1f0
> [    0.828760]  [<ffffffff81002fa0>] ? kernel_thread_helper+0x0/0x10
> [    0.828935] ACPI: Executed 1 blocks of module-level executable AML code

Does the appended patch help?

Rafael


---
 drivers/acpi/acpica/acglobal.h |    2 ++
 drivers/acpi/acpica/evmisc.c   |    2 --
 drivers/acpi/acpica/utmutex.c  |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/acpi/acpica/acglobal.h
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/acglobal.h
+++ linux-2.6/drivers/acpi/acpica/acglobal.h
@@ -228,8 +228,10 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_pres
  */
 ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock;	/* For GPE data structs and registers */
 ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock;	/* For ACPI H/W except GPE registers */
+ACPI_EXTERN spinlock_t _acpi_ev_global_lock_pending_lock; /* For global lock */
 #define acpi_gbl_gpe_lock	&_acpi_gbl_gpe_lock
 #define acpi_gbl_hardware_lock	&_acpi_gbl_hardware_lock
+#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
 
 /*****************************************************************************
  *
Index: linux-2.6/drivers/acpi/acpica/evmisc.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/evmisc.c
+++ linux-2.6/drivers/acpi/acpica/evmisc.c
@@ -293,8 +293,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_no
  *
  ******************************************************************************/
 static u8 acpi_ev_global_lock_pending;
-static spinlock_t _acpi_ev_global_lock_pending_lock;
-#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
 
 static u32 acpi_ev_global_lock_handler(void *context)
 {
Index: linux-2.6/drivers/acpi/acpica/utmutex.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/utmutex.c
+++ linux-2.6/drivers/acpi/acpica/utmutex.c
@@ -85,6 +85,7 @@ acpi_status acpi_ut_mutex_initialize(voi
 
 	spin_lock_init(acpi_gbl_gpe_lock);
 	spin_lock_init(acpi_gbl_hardware_lock);
+	spin_lock_init(acpi_ev_global_lock_pending_lock);
 
 	/* Mutex for _OSI support */
 	status = acpi_os_create_mutex(&acpi_gbl_osi_mutex);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BUG: spinlock bad magic on CPU#0
  2011-01-14 21:09 ` Rafael J. Wysocki
@ 2011-01-14 21:51   ` Sergey Senozhatsky
  2011-01-14 22:25     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Senozhatsky @ 2011-01-14 21:51 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Len Brown, linux-acpi, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2430 bytes --]

On (01/14/11 22:09), Rafael J. Wysocki wrote:
> > Hello,
> 
> Does the appended patch help?
> 
>

Hello,
Yes, it does. Seems to be fixed.

Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>


Thanks,
	Sergey

 
> ---
>  drivers/acpi/acpica/acglobal.h |    2 ++
>  drivers/acpi/acpica/evmisc.c   |    2 --
>  drivers/acpi/acpica/utmutex.c  |    1 +
>  3 files changed, 3 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/drivers/acpi/acpica/acglobal.h
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/acpica/acglobal.h
> +++ linux-2.6/drivers/acpi/acpica/acglobal.h
> @@ -228,8 +228,10 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_pres
>   */
>  ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock;	/* For GPE data structs and registers */
>  ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock;	/* For ACPI H/W except GPE registers */
> +ACPI_EXTERN spinlock_t _acpi_ev_global_lock_pending_lock; /* For global lock */
>  #define acpi_gbl_gpe_lock	&_acpi_gbl_gpe_lock
>  #define acpi_gbl_hardware_lock	&_acpi_gbl_hardware_lock
> +#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
>  
>  /*****************************************************************************
>   *
> Index: linux-2.6/drivers/acpi/acpica/evmisc.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/acpica/evmisc.c
> +++ linux-2.6/drivers/acpi/acpica/evmisc.c
> @@ -293,8 +293,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_no
>   *
>   ******************************************************************************/
>  static u8 acpi_ev_global_lock_pending;
> -static spinlock_t _acpi_ev_global_lock_pending_lock;
> -#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
>  
>  static u32 acpi_ev_global_lock_handler(void *context)
>  {
> Index: linux-2.6/drivers/acpi/acpica/utmutex.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/acpica/utmutex.c
> +++ linux-2.6/drivers/acpi/acpica/utmutex.c
> @@ -85,6 +85,7 @@ acpi_status acpi_ut_mutex_initialize(voi
>  
>  	spin_lock_init(acpi_gbl_gpe_lock);
>  	spin_lock_init(acpi_gbl_hardware_lock);
> +	spin_lock_init(acpi_ev_global_lock_pending_lock);
>  
>  	/* Mutex for _OSI support */
>  	status = acpi_os_create_mutex(&acpi_gbl_osi_mutex);
> 

[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BUG: spinlock bad magic on CPU#0
  2011-01-14 21:51   ` Sergey Senozhatsky
@ 2011-01-14 22:25     ` Rafael J. Wysocki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2011-01-14 22:25 UTC (permalink / raw)
  To: Sergey Senozhatsky; +Cc: Len Brown, linux-acpi, linux-kernel, Linus Torvalds

On Friday, January 14, 2011, Sergey Senozhatsky wrote:
> On (01/14/11 22:09), Rafael J. Wysocki wrote:
> > > Hello,
> > 
> > Does the appended patch help?
> > 
> >
> 
> Hello,
> Yes, it does. Seems to be fixed.
> 
> Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

Thanks for testing, appended is a changelogged version.

Rafael

---
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: ACPI / ACPICA: Initialize the global lock spinlock as appropriate

Commit 9cd0314 (ACPI / ACPICA: Fix global lock acquisition) forgot to
initialize the spinlock it added.  Fix that.

Reported-and-tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/acpica/acglobal.h |    2 ++
 drivers/acpi/acpica/evmisc.c   |    2 --
 drivers/acpi/acpica/utmutex.c  |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/acpi/acpica/acglobal.h
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/acglobal.h
+++ linux-2.6/drivers/acpi/acpica/acglobal.h
@@ -228,8 +228,10 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_pres
  */
 ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock;	/* For GPE data structs and registers */
 ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock;	/* For ACPI H/W except GPE registers */
+ACPI_EXTERN spinlock_t _acpi_ev_global_lock_pending_lock; /* For global lock */
 #define acpi_gbl_gpe_lock	&_acpi_gbl_gpe_lock
 #define acpi_gbl_hardware_lock	&_acpi_gbl_hardware_lock
+#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
 
 /*****************************************************************************
  *
Index: linux-2.6/drivers/acpi/acpica/evmisc.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/evmisc.c
+++ linux-2.6/drivers/acpi/acpica/evmisc.c
@@ -293,8 +293,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_no
  *
  ******************************************************************************/
 static u8 acpi_ev_global_lock_pending;
-static spinlock_t _acpi_ev_global_lock_pending_lock;
-#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
 
 static u32 acpi_ev_global_lock_handler(void *context)
 {
Index: linux-2.6/drivers/acpi/acpica/utmutex.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/utmutex.c
+++ linux-2.6/drivers/acpi/acpica/utmutex.c
@@ -85,6 +85,7 @@ acpi_status acpi_ut_mutex_initialize(voi
 
 	spin_lock_init(acpi_gbl_gpe_lock);
 	spin_lock_init(acpi_gbl_hardware_lock);
+	spin_lock_init(acpi_ev_global_lock_pending_lock);
 
 	/* Mutex for _OSI support */
 	status = acpi_os_create_mutex(&acpi_gbl_osi_mutex);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-14 22:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 14:08 BUG: spinlock bad magic on CPU#0 Sergey Senozhatsky
2011-01-14 19:26 ` Len Brown
2011-01-14 21:09 ` Rafael J. Wysocki
2011-01-14 21:51   ` Sergey Senozhatsky
2011-01-14 22:25     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox