linux/drivers/acpi/acpica
Steven Rostedt ace81409f9 acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t
We hit the following bug with 3.6-rt:

[    5.898990] BUG: scheduling while atomic: swapper/3/0/0x00000002
[    5.898991] no locks held by swapper/3/0.
[    5.898993] Modules linked in:
[    5.898996] Pid: 0, comm: swapper/3 Not tainted 3.6.11-rt28.19.el6rt.x86_64.debug #1
[    5.898997] Call Trace:
[    5.899011]  [<ffffffff810804e7>] __schedule_bug+0x67/0x90
[    5.899028]  [<ffffffff81577923>] __schedule+0x793/0x7a0
[    5.899032]  [<ffffffff810b4e40>] ? debug_rt_mutex_print_deadlock+0x50/0x200
[    5.899034]  [<ffffffff81577b89>] schedule+0x29/0x70
[    5.899036] BUG: scheduling while atomic: swapper/7/0/0x00000002
[    5.899037] no locks held by swapper/7/0.
[    5.899039]  [<ffffffff81578525>] rt_spin_lock_slowlock+0xe5/0x2f0
[    5.899040] Modules linked in:
[    5.899041]
[    5.899045]  [<ffffffff81579a58>] ? _raw_spin_unlock_irqrestore+0x38/0x90
[    5.899046] Pid: 0, comm: swapper/7 Not tainted 3.6.11-rt28.19.el6rt.x86_64.debug #1
[    5.899047] Call Trace:
[    5.899049]  [<ffffffff81578bc6>] rt_spin_lock+0x16/0x40
[    5.899052]  [<ffffffff810804e7>] __schedule_bug+0x67/0x90
[    5.899054]  [<ffffffff8157d3f0>] ? notifier_call_chain+0x80/0x80
[    5.899056]  [<ffffffff81577923>] __schedule+0x793/0x7a0
[    5.899059]  [<ffffffff812f2034>] acpi_os_acquire_lock+0x1f/0x23
[    5.899062]  [<ffffffff810b4e40>] ? debug_rt_mutex_print_deadlock+0x50/0x200
[    5.899068]  [<ffffffff8130be64>] acpi_write_bit_register+0x33/0xb0
[    5.899071]  [<ffffffff81577b89>] schedule+0x29/0x70
[    5.899072]  [<ffffffff8130be13>] ? acpi_read_bit_register+0x33/0x51
[    5.899074]  [<ffffffff81578525>] rt_spin_lock_slowlock+0xe5/0x2f0
[    5.899077]  [<ffffffff8131d1fc>] acpi_idle_enter_bm+0x8a/0x28e
[    5.899079]  [<ffffffff81579a58>] ? _raw_spin_unlock_irqrestore+0x38/0x90
[    5.899081]  [<ffffffff8107e5da>] ? this_cpu_load+0x1a/0x30
[    5.899083]  [<ffffffff81578bc6>] rt_spin_lock+0x16/0x40
[    5.899087]  [<ffffffff8144c759>] cpuidle_enter+0x19/0x20
[    5.899088]  [<ffffffff8157d3f0>] ? notifier_call_chain+0x80/0x80
[    5.899090]  [<ffffffff8144c777>] cpuidle_enter_state+0x17/0x50
[    5.899092]  [<ffffffff812f2034>] acpi_os_acquire_lock+0x1f/0x23
[    5.899094]  [<ffffffff8144d1a1>] cpuidle899101]  [<ffffffff8130be13>] ?

As the acpi code disables interrupts in acpi_idle_enter_bm, and calls
code that grabs the acpi lock, it causes issues as the lock is currently
in RT a sleeping lock.

The lock was converted from a raw to a sleeping lock due to some
previous issues, and tests that showed it didn't seem to matter.
Unfortunately, it did matter for one of our boxes.

This patch converts the lock back to a raw lock. I've run this code on a
few of my own machines, one being my laptop that uses the acpi quite
extensively. I've been able to suspend and resume without issues.

[ tglx: Made the change exclusive for acpi_gbl_hardware_lock ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: John Kacur <jkacur@gmail.com>
Cc: Clark Williams <clark@redhat.com>
Link: http://lkml.kernel.org/r/1360765565.23152.5.camel@gandalf.local.home
Cc: stable-rt@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2020-10-14 00:59:20 +03:00
..
Makefile ACPICA: Split table print utilities to a new a separate file 2013-06-16 00:55:56 +02:00
accommon.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acdebug.h ACPICA: Linuxize: Cleanup spaces after special macro invocations. 2014-01-08 15:31:39 +01:00
acdispat.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acevents.h ACPICA: Linuxize: Cleanup spaces after special macro invocations. 2014-01-08 15:31:39 +01:00
acglobal.h acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t 2020-10-14 00:59:20 +03:00
achware.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acinterp.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
aclocal.h ACPICA: Update to GPIO region handler interface. 2014-10-05 14:52:16 -07:00
acmacros.h ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-05-17 09:53:51 -07:00
acnamesp.h ACPICA: Debugger: Add new command to display full namespace pathnames. 2013-09-24 01:46:24 +02:00
acobject.h ACPICA: Update to GPIO region handler interface. 2014-10-05 14:52:16 -07:00
acopcode.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acparser.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acpredef.h ACPICA: Add argument typechecking for all predefined ACPI names 2013-06-01 21:54:30 +02:00
acresrc.h ACPICA: Resources: Fix loop termination for the get AML length function. 2013-11-21 13:47:04 +01:00
acstruct.h ACPICA: Add argument typechecking for all predefined ACPI names 2013-06-01 21:54:30 +02:00
actables.h ACPICA: Export acpi_tb_validate_rsdp(). 2013-08-08 15:36:08 +02:00
acutils.h ACPICA: Cleanup memory allocation macros and configurability. 2013-10-30 12:24:21 +01:00
amlcode.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
amlresrc.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
dsargs.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
dscontrol.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
dsfield.c ACPICA: Update to GPIO region handler interface. 2014-10-05 14:52:16 -07:00
dsinit.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
dsmethod.c ACPICA: Add new statistics interface. 2013-10-31 14:37:33 +01:00
dsmthdat.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
dsobject.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
dsopcode.c ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-05-17 09:53:51 -07:00
dsutils.c ACPICA: Update several debug statements - no functional change. 2014-01-08 15:31:37 +01:00
dswexec.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
dswload.c ACPICA: Disassembler: Improve pathname support for emitted External() statements. 2014-01-08 15:31:36 +01:00
dswload2.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
dswscope.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
dswstate.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
evevent.c ACPICA: Fix a typo in a function header, no functional change 2013-04-12 13:29:47 +02:00
evglock.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
evgpe.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
evgpeblk.c ACPICA: Improve exception handling for GPE block installation. 2014-01-08 15:31:37 +01:00
evgpeinit.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
evgpeutil.c ACPICA: Improve exception handling for GPE block installation. 2014-01-08 15:31:37 +01:00
evhandler.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
evmisc.c ACPICA: Add support for host-installed SCI handlers. 2013-09-24 01:46:24 +02:00
evregion.c ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-05-17 09:53:51 -07:00
evrgnini.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
evsci.c ACPICA: Add new statistics interface. 2013-10-31 14:37:33 +01:00
evxface.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
evxfevnt.c ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules. 2013-10-31 14:34:00 +01:00
evxfgpe.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
evxfregn.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exconfig.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
exconvrt.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
excreate.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exdebug.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
exdump.c ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-05-17 09:53:51 -07:00
exfield.c ACPICA: Update to GPIO region handler interface. 2014-10-05 14:52:16 -07:00
exfldio.c ACPICA: Utilities: Cleanup to convert physical address printing formats. 2015-05-17 09:53:51 -07:00
exmisc.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exmutex.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
exnames.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
exoparg1.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exoparg2.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exoparg3.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exoparg6.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exprep.c ACPICA: Update to GPIO region handler interface. 2014-10-05 14:52:16 -07:00
exregion.c ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-05-17 09:53:51 -07:00
exresnte.c ACPICA: Interpreter: Add additional debug info for an error case. 2014-01-08 15:31:39 +01:00
exresolv.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exresop.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
exstore.c ACPICA: Fix for a Store->ArgX when ArgX contains a reference to a field. 2013-09-06 15:39:59 +02:00
exstoren.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
exstorob.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
exsystem.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
exutils.c ACPICA: Regression fix: reinstate safe exit macros 2013-03-12 00:45:04 +01:00
hwacpi.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
hwesleep.c ACPI / sleep: Introduce acpi_os_prepare_extended_sleep() for extended sleep path 2013-07-31 14:20:39 +02:00
hwgpe.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
hwpci.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
hwregs.c acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t 2020-10-14 00:59:20 +03:00
hwsleep.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
hwtimer.c ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules. 2013-10-31 14:34:00 +01:00
hwvalid.c ACPICA: Utilities: Cleanup to convert physical address printing formats. 2015-05-17 09:53:51 -07:00
hwxface.c acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t 2020-10-14 00:59:20 +03:00
hwxfsleep.c ACPICA: Cleanup asmlinkage for ACPICA APIs. 2013-10-31 14:37:35 +01:00
nsaccess.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nsalloc.c ACPICA: Add support to delete all objects attached to the root namespace node. 2013-11-21 13:47:04 +01:00
nsarguments.c ACPICA: Add argument typechecking for all predefined ACPI names 2013-06-01 21:54:30 +02:00
nsconvert.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
nsdump.c ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-05-17 09:53:51 -07:00
nsdumpdv.c ACPICA: Update namespace dump code. 2013-10-31 14:37:31 +01:00
nseval.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nsinit.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nsload.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nsnames.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
nsobject.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
nsparse.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nspredef.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nsprepkg.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nsrepair.c ACPICA: Restore code that repairs NULL package elements in return values. 2014-05-06 07:59:24 -07:00
nsrepair2.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nssearch.c ACPICA: Update check for setting the ANOBJ_IS_EXTERNAL flag. 2013-10-31 14:37:31 +01:00
nsutils.c ACPICA: Add support to delete all objects attached to the root namespace node. 2013-11-21 13:47:04 +01:00
nswalk.c ACPICA: Update names for walk_namespace callbacks to clarify usage. 2013-08-13 13:14:16 +02:00
nsxfeval.c ACPICA: Remove unused ACPI_FREE_BUFFER macro. No functional change. 2014-01-08 15:31:36 +01:00
nsxfname.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
nsxfobj.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
psargs.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
psloop.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
psobject.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
psopcode.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
psopinfo.c ACPICA: Conditionally define a local variable that is used for debug only. 2014-01-08 15:31:38 +01:00
psparse.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
psscope.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
pstree.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
psutils.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
pswalk.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
psxface.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
rsaddr.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
rscalc.c ACPICA: Resources: Fix loop termination for the get AML length function. 2013-11-21 13:47:04 +01:00
rscreate.c ACPICA: Resources: Fix loop termination for the get AML length function. 2013-11-21 13:47:04 +01:00
rsdump.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
rsdumpinfo.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
rsinfo.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
rsio.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
rsirq.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
rslist.c ACPICA: Resource Mgr: Prevent infinite loops in resource walks 2013-03-12 00:45:03 +01:00
rsmemory.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
rsmisc.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
rsserial.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
rsutils.c ACPICA: Resources: Fix loop termination for the get AML length function. 2013-11-21 13:47:04 +01:00
rsxface.c ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules. 2013-10-31 14:34:00 +01:00
tbfadt.c ACPICA: Add option to favor 32-bit FADT addresses. 2014-01-08 15:31:36 +01:00
tbfind.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
tbinstal.c ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR(). 2015-05-17 09:53:51 -07:00
tbprint.c ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-05-17 09:53:51 -07:00
tbutils.c ACPICA: Utilities: Cleanup to convert physical address printing formats. 2015-05-17 09:53:51 -07:00
tbxface.c ACPICA: Add __init for ACPICA initializers/finalizers. 2013-10-31 14:37:36 +01:00
tbxfload.c ACPICA: Utilities: Cleanup to convert physical address printing formats. 2015-05-17 09:53:51 -07:00
tbxfroot.c ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address. 2015-05-17 09:53:51 -07:00
utaddress.c ACPICA: Utilities: Cleanup to convert physical address printing formats. 2015-05-17 09:53:51 -07:00
utalloc.c ACPICA: Remove unused ACPI_FREE_BUFFER macro. No functional change. 2014-01-08 15:31:36 +01:00
utbuffer.c ACPICA: Split buffer dump routines into separate file 2013-06-16 00:52:22 +02:00
utcache.c ACPICA: Debug output: Fix a couple of small output issues. 2014-01-08 15:31:36 +01:00
utcopy.c ACPICA: Utilities: Fix memory leak in acpi_ut_copy_iobject_to_iobject 2014-09-17 09:19:19 -07:00
utdebug.c ACPICA: Debug output: Fix a couple of small output issues. 2014-01-08 15:31:36 +01:00
utdecode.c ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules. 2013-10-31 14:34:00 +01:00
utdelete.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
uterror.c ACPICA: Split internal error msg routines to a separate file 2013-06-16 00:54:08 +02:00
uteval.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
utexcep.c ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules. 2013-10-31 14:34:00 +01:00
utglobal.c ACPICA: Linuxize: Cleanup spaces after special macro invocations. 2014-01-08 15:31:39 +01:00
utids.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
utinit.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
utlock.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
utmath.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
utmisc.c ACPICA: Standardize all switch() blocks 2013-06-16 00:55:05 +02:00
utmutex.c acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t 2020-10-14 00:59:20 +03:00
utobject.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-11-15 16:47:22 -08:00
utosi.c ACPICA: Add acpi_update_interfaces() public interface 2013-07-23 04:06:03 +02:00
utownerid.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
utpredef.c ACPICA: Add argument typechecking for all predefined ACPI names 2013-06-01 21:54:30 +02:00
utresrc.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
utstate.c ACPICA: Cleanup useless memset invocations. 2013-10-31 14:37:34 +01:00
utstring.c ACPICA: utstring: Check array index bound before use. 2014-06-30 20:11:58 -07:00
uttrack.c ACPICA: Linuxize: Change indentation of C labels. 2013-10-31 14:35:36 +01:00
utxface.c ACPICA: Add __init for ACPICA initializers/finalizers. 2013-10-31 14:37:36 +01:00
utxferror.c ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules. 2013-10-31 14:34:00 +01:00
utxfinit.c ACPICA: Add an error message if the Debugger fails initialization. 2014-01-08 15:31:38 +01:00
utxfmutex.c ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00