From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: BUG: spinlock bad magic on CPU#0 Date: Fri, 14 Jan 2011 22:09:35 +0100 Message-ID: <201101142209.35892.rjw@sisk.pl> References: <20110114140803.GA4003@swordfish> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110114140803.GA4003@swordfish> Sender: linux-kernel-owner@vger.kernel.org To: Sergey Senozhatsky Cc: Len Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-acpi@vger.kernel.org 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: /-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] [] ? spin_bug+0x9c/0xa3 > [ 0.826004] [] ? do_raw_spin_lock+0x29/0x122 > [ 0.826093] [] ? _raw_spin_lock_irqsave+0x56/0x60 > [ 0.826181] [] ? acpi_os_acquire_lock+0x9/0xb > [ 0.826264] [] ? acpi_os_acquire_lock+0x9/0xb > [ 0.826350] [] ? acpi_ev_acquire_global_lock+0x10b/0x206 > [ 0.826438] [] ? acpi_ex_acquire_mutex_object+0xa3/0x11d > [ 0.826525] [] ? acpi_ex_acquire_global_lock+0x61/0xa2 > [ 0.826613] [] ? acpi_ex_read_data_from_field+0x293/0x2f1 > [ 0.826701] [] ? acpi_ex_resolve_node_to_value+0x320/0x444 > [ 0.826789] [] ? acpi_ut_trace_ptr+0x58/0x65 > [ 0.826874] [] ? acpi_ex_resolve_to_value+0x379/0x406 > [ 0.826961] [] ? acpi_ds_evaluate_name_path+0x9e/0x143 > [ 0.827048] [] ? acpi_ds_exec_end_op+0xda/0x641 > [ 0.827131] [] ? acpi_ut_status_exit+0x6f/0x80 > [ 0.827216] [] ? acpi_ps_parse_loop+0xc65/0xf45 > [ 0.827302] [] ? acpi_ps_parse_aml+0x162/0x467 > [ 0.827385] [] ? acpi_ut_ptr_exit+0x33/0x3b > [ 0.827470] [] ? acpi_ps_execute_method+0x26d/0x393 > [ 0.827558] [] ? acpi_ns_evaluate+0x235/0x3b7 > [ 0.827643] [] ? acpi_ut_add_reference+0xb1/0xb8 > [ 0.827730] [] ? acpi_ns_exec_module_code_list+0x15b/0x25d > [ 0.827818] [] ? acpi_initialize_objects+0x88/0x17d > [ 0.827907] [] ? acpi_init+0x0/0x10a > [ 0.827990] [] ? acpi_bus_init+0x9f/0x1dd > [ 0.828076] [] ? kobject_create_and_add+0x37/0x68 > [ 0.828162] [] ? acpi_init+0x71/0x10a > [ 0.828248] [] ? do_one_initcall+0x7a/0x13c > [ 0.828334] [] ? kernel_init+0x16c/0x1f0 > [ 0.828420] [] ? kernel_thread_helper+0x4/0x10 > [ 0.828506] [] ? finish_task_switch+0x78/0xec > [ 0.828592] [] ? restore_args+0x0/0x30 > [ 0.828677] [] ? kernel_init+0x0/0x1f0 > [ 0.828760] [] ? 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);