aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-03-20 08:25:02 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-03-20 08:25:02 -0400
commit6ac4a2ab16af49a86ad16bdab1de72d5b809a9c1 (patch)
tree6cdaa76dbcdfe070e293b3d6ab4c78649c8ed059 /drivers/acpi
parent94a81caca3757a2eda026cbd592db8e321fcba43 (diff)
parent6e596084833b95662dfe90e1f30d83ccbd64575c (diff)
Merge branch 'acpica'
* acpica: (29 commits) ACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)." ACPICA: Update version to 20140214. ACPICA: Prevent infinite loops when traversing corrupted lists. ACPICA: Debugger: Add missing objects; Traverse linked lists ACPICA: Add text: ACPICA policy for new _OSI strings. No functional change. ACPICA: Update for _PRP predefined name. ACPICA: Cleanup/improve global variable declarations. ACPICA: Comment update - no functional change. ACPICA: Do not abort _PRT repair on a single subpackage failure. ACPICA: Harden _PRT repair code; check for minimum package length. ACPICA: Restore code that repairs NULL package elements in return values. ACPICA: Properly handle NULL entries in _PRT return packages. ACPICA: Update conditional compilation flags for resource dump functions. ACPICA: Predefined names: Add support for the _PRP method. ACPICA: Headers: Deploy #pragma pack (push) and (pop). ACPICA: Add boot option to disable auto return object repair ACPICA: acpidump: Remove integer types translation protection. ACPICA: acpidump: Add sparse declarators support. ACPICA: Add "Windows 2013" string to _OSI support. ACPICA: Update version to 20140114. ...
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/Makefile4
-rw-r--r--drivers/acpi/acpica/accommon.h2
-rw-r--r--drivers/acpi/acpica/acdebug.h4
-rw-r--r--drivers/acpi/acpica/acdispat.h2
-rw-r--r--drivers/acpi/acpica/acevents.h2
-rw-r--r--drivers/acpi/acpica/acglobal.h355
-rw-r--r--drivers/acpi/acpica/achware.h2
-rw-r--r--drivers/acpi/acpica/acinterp.h6
-rw-r--r--drivers/acpi/acpica/aclocal.h2
-rw-r--r--drivers/acpi/acpica/acmacros.h16
-rw-r--r--drivers/acpi/acpica/acnamesp.h2
-rw-r--r--drivers/acpi/acpica/acobject.h2
-rw-r--r--drivers/acpi/acpica/acopcode.h2
-rw-r--r--drivers/acpi/acpica/acparser.h2
-rw-r--r--drivers/acpi/acpica/acpredef.h16
-rw-r--r--drivers/acpi/acpica/acresrc.h2
-rw-r--r--drivers/acpi/acpica/acstruct.h2
-rw-r--r--drivers/acpi/acpica/actables.h2
-rw-r--r--drivers/acpi/acpica/acutils.h4
-rw-r--r--drivers/acpi/acpica/amlcode.h2
-rw-r--r--drivers/acpi/acpica/amlresrc.h2
-rw-r--r--drivers/acpi/acpica/dsargs.c2
-rw-r--r--drivers/acpi/acpica/dscontrol.c2
-rw-r--r--drivers/acpi/acpica/dsfield.c2
-rw-r--r--drivers/acpi/acpica/dsinit.c2
-rw-r--r--drivers/acpi/acpica/dsmethod.c2
-rw-r--r--drivers/acpi/acpica/dsmthdat.c2
-rw-r--r--drivers/acpi/acpica/dsobject.c2
-rw-r--r--drivers/acpi/acpica/dsopcode.c2
-rw-r--r--drivers/acpi/acpica/dsutils.c2
-rw-r--r--drivers/acpi/acpica/dswexec.c2
-rw-r--r--drivers/acpi/acpica/dswload.c2
-rw-r--r--drivers/acpi/acpica/dswload2.c2
-rw-r--r--drivers/acpi/acpica/dswscope.c2
-rw-r--r--drivers/acpi/acpica/dswstate.c2
-rw-r--r--drivers/acpi/acpica/evevent.c2
-rw-r--r--drivers/acpi/acpica/evglock.c2
-rw-r--r--drivers/acpi/acpica/evgpe.c2
-rw-r--r--drivers/acpi/acpica/evgpeblk.c2
-rw-r--r--drivers/acpi/acpica/evgpeinit.c2
-rw-r--r--drivers/acpi/acpica/evgpeutil.c2
-rw-r--r--drivers/acpi/acpica/evhandler.c2
-rw-r--r--drivers/acpi/acpica/evmisc.c2
-rw-r--r--drivers/acpi/acpica/evregion.c13
-rw-r--r--drivers/acpi/acpica/evrgnini.c2
-rw-r--r--drivers/acpi/acpica/evsci.c2
-rw-r--r--drivers/acpi/acpica/evxface.c2
-rw-r--r--drivers/acpi/acpica/evxfevnt.c2
-rw-r--r--drivers/acpi/acpica/evxfgpe.c21
-rw-r--r--drivers/acpi/acpica/evxfregn.c2
-rw-r--r--drivers/acpi/acpica/exconfig.c2
-rw-r--r--drivers/acpi/acpica/exconvrt.c2
-rw-r--r--drivers/acpi/acpica/excreate.c2
-rw-r--r--drivers/acpi/acpica/exdebug.c2
-rw-r--r--drivers/acpi/acpica/exdump.c231
-rw-r--r--drivers/acpi/acpica/exfield.c2
-rw-r--r--drivers/acpi/acpica/exfldio.c2
-rw-r--r--drivers/acpi/acpica/exmisc.c2
-rw-r--r--drivers/acpi/acpica/exmutex.c2
-rw-r--r--drivers/acpi/acpica/exnames.c2
-rw-r--r--drivers/acpi/acpica/exoparg1.c2
-rw-r--r--drivers/acpi/acpica/exoparg2.c2
-rw-r--r--drivers/acpi/acpica/exoparg3.c2
-rw-r--r--drivers/acpi/acpica/exoparg6.c2
-rw-r--r--drivers/acpi/acpica/exprep.c2
-rw-r--r--drivers/acpi/acpica/exregion.c2
-rw-r--r--drivers/acpi/acpica/exresnte.c2
-rw-r--r--drivers/acpi/acpica/exresolv.c2
-rw-r--r--drivers/acpi/acpica/exresop.c2
-rw-r--r--drivers/acpi/acpica/exstore.c2
-rw-r--r--drivers/acpi/acpica/exstoren.c2
-rw-r--r--drivers/acpi/acpica/exstorob.c2
-rw-r--r--drivers/acpi/acpica/exsystem.c2
-rw-r--r--drivers/acpi/acpica/exutils.c2
-rw-r--r--drivers/acpi/acpica/hwacpi.c2
-rw-r--r--drivers/acpi/acpica/hwesleep.c2
-rw-r--r--drivers/acpi/acpica/hwgpe.c2
-rw-r--r--drivers/acpi/acpica/hwpci.c2
-rw-r--r--drivers/acpi/acpica/hwregs.c2
-rw-r--r--drivers/acpi/acpica/hwsleep.c2
-rw-r--r--drivers/acpi/acpica/hwtimer.c2
-rw-r--r--drivers/acpi/acpica/hwvalid.c2
-rw-r--r--drivers/acpi/acpica/hwxface.c2
-rw-r--r--drivers/acpi/acpica/hwxfsleep.c2
-rw-r--r--drivers/acpi/acpica/nsaccess.c2
-rw-r--r--drivers/acpi/acpica/nsalloc.c2
-rw-r--r--drivers/acpi/acpica/nsarguments.c2
-rw-r--r--drivers/acpi/acpica/nsconvert.c2
-rw-r--r--drivers/acpi/acpica/nsdump.c2
-rw-r--r--drivers/acpi/acpica/nsdumpdv.c2
-rw-r--r--drivers/acpi/acpica/nseval.c2
-rw-r--r--drivers/acpi/acpica/nsinit.c2
-rw-r--r--drivers/acpi/acpica/nsload.c2
-rw-r--r--drivers/acpi/acpica/nsnames.c2
-rw-r--r--drivers/acpi/acpica/nsobject.c12
-rw-r--r--drivers/acpi/acpica/nsparse.c2
-rw-r--r--drivers/acpi/acpica/nspredef.c2
-rw-r--r--drivers/acpi/acpica/nsprepkg.c42
-rw-r--r--drivers/acpi/acpica/nsrepair.c31
-rw-r--r--drivers/acpi/acpica/nsrepair2.c39
-rw-r--r--drivers/acpi/acpica/nssearch.c2
-rw-r--r--drivers/acpi/acpica/nsutils.c2
-rw-r--r--drivers/acpi/acpica/nswalk.c2
-rw-r--r--drivers/acpi/acpica/nsxfeval.c2
-rw-r--r--drivers/acpi/acpica/nsxfname.c2
-rw-r--r--drivers/acpi/acpica/nsxfobj.c2
-rw-r--r--drivers/acpi/acpica/psargs.c2
-rw-r--r--drivers/acpi/acpica/psloop.c2
-rw-r--r--drivers/acpi/acpica/psobject.c2
-rw-r--r--drivers/acpi/acpica/psopcode.c2
-rw-r--r--drivers/acpi/acpica/psopinfo.c2
-rw-r--r--drivers/acpi/acpica/psparse.c2
-rw-r--r--drivers/acpi/acpica/psscope.c2
-rw-r--r--drivers/acpi/acpica/pstree.c2
-rw-r--r--drivers/acpi/acpica/psutils.c2
-rw-r--r--drivers/acpi/acpica/pswalk.c2
-rw-r--r--drivers/acpi/acpica/psxface.c2
-rw-r--r--drivers/acpi/acpica/rsaddr.c2
-rw-r--r--drivers/acpi/acpica/rscalc.c4
-rw-r--r--drivers/acpi/acpica/rscreate.c12
-rw-r--r--drivers/acpi/acpica/rsdump.c5
-rw-r--r--drivers/acpi/acpica/rsdumpinfo.c4
-rw-r--r--drivers/acpi/acpica/rsinfo.c6
-rw-r--r--drivers/acpi/acpica/rsio.c2
-rw-r--r--drivers/acpi/acpica/rsirq.c2
-rw-r--r--drivers/acpi/acpica/rslist.c2
-rw-r--r--drivers/acpi/acpica/rsmemory.c2
-rw-r--r--drivers/acpi/acpica/rsmisc.c2
-rw-r--r--drivers/acpi/acpica/rsserial.c2
-rw-r--r--drivers/acpi/acpica/rsutils.c2
-rw-r--r--drivers/acpi/acpica/rsxface.c2
-rw-r--r--drivers/acpi/acpica/tbfadt.c2
-rw-r--r--drivers/acpi/acpica/tbfind.c2
-rw-r--r--drivers/acpi/acpica/tbinstal.c17
-rw-r--r--drivers/acpi/acpica/tbprint.c22
-rw-r--r--drivers/acpi/acpica/tbutils.c2
-rw-r--r--drivers/acpi/acpica/tbxface.c2
-rw-r--r--drivers/acpi/acpica/tbxfload.c2
-rw-r--r--drivers/acpi/acpica/tbxfroot.c2
-rw-r--r--drivers/acpi/acpica/utaddress.c2
-rw-r--r--drivers/acpi/acpica/utalloc.c2
-rw-r--r--drivers/acpi/acpica/utbuffer.c2
-rw-r--r--drivers/acpi/acpica/utcache.c2
-rw-r--r--drivers/acpi/acpica/utcopy.c8
-rw-r--r--drivers/acpi/acpica/utdebug.c2
-rw-r--r--drivers/acpi/acpica/utdecode.c2
-rw-r--r--drivers/acpi/acpica/utdelete.c17
-rw-r--r--drivers/acpi/acpica/uterror.c2
-rw-r--r--drivers/acpi/acpica/uteval.c2
-rw-r--r--drivers/acpi/acpica/utexcep.c2
-rw-r--r--drivers/acpi/acpica/utglobal.c39
-rw-r--r--drivers/acpi/acpica/utids.c2
-rw-r--r--drivers/acpi/acpica/utinit.c2
-rw-r--r--drivers/acpi/acpica/utlock.c2
-rw-r--r--drivers/acpi/acpica/utmath.c2
-rw-r--r--drivers/acpi/acpica/utmisc.c2
-rw-r--r--drivers/acpi/acpica/utmutex.c2
-rw-r--r--drivers/acpi/acpica/utobject.c2
-rw-r--r--drivers/acpi/acpica/utosi.c28
-rw-r--r--drivers/acpi/acpica/utownerid.c2
-rw-r--r--drivers/acpi/acpica/utpredef.c2
-rw-r--r--drivers/acpi/acpica/utresrc.c5
-rw-r--r--drivers/acpi/acpica/utstate.c2
-rw-r--r--drivers/acpi/acpica/utstring.c2
-rw-r--r--drivers/acpi/acpica/uttrack.c5
-rw-r--r--drivers/acpi/acpica/utxface.c2
-rw-r--r--drivers/acpi/acpica/utxferror.c2
-rw-r--r--drivers/acpi/acpica/utxfinit.c2
-rw-r--r--drivers/acpi/acpica/utxfmutex.c2
-rw-r--r--drivers/acpi/osl.c11
170 files changed, 770 insertions, 491 deletions
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index 438304086ff1..b7ed86a20427 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -122,6 +122,8 @@ acpi-y += \
122 rsaddr.o \ 122 rsaddr.o \
123 rscalc.o \ 123 rscalc.o \
124 rscreate.o \ 124 rscreate.o \
125 rsdump.o \
126 rsdumpinfo.o \
125 rsinfo.o \ 127 rsinfo.o \
126 rsio.o \ 128 rsio.o \
127 rsirq.o \ 129 rsirq.o \
@@ -132,8 +134,6 @@ acpi-y += \
132 rsutils.o \ 134 rsutils.o \
133 rsxface.o 135 rsxface.o
134 136
135acpi-$(ACPI_FUTURE_USAGE) += rsdump.o rsdumpinfo.o
136
137acpi-y += \ 137acpi-y += \
138 tbfadt.o \ 138 tbfadt.o \
139 tbfind.o \ 139 tbfind.o \
diff --git a/drivers/acpi/acpica/accommon.h b/drivers/acpi/acpica/accommon.h
index 8a6c4a0d22db..6f1c616910ac 100644
--- a/drivers/acpi/acpica/accommon.h
+++ b/drivers/acpi/acpica/accommon.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
index 2bf3ca2b8a7a..68a91eb0fa48 100644
--- a/drivers/acpi/acpica/acdebug.h
+++ b/drivers/acpi/acpica/acdebug.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -115,6 +115,8 @@ ACPI_HW_DEPENDENT_RETURN_VOID(void
115 char *block_arg)) 115 char *block_arg))
116ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_generate_sci(void)) 116ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_generate_sci(void))
117 117
118void acpi_db_execute_test(char *type_arg);
119
118/* 120/*
119 * dbconvert - miscellaneous conversion routines 121 * dbconvert - miscellaneous conversion routines
120 */ 122 */
diff --git a/drivers/acpi/acpica/acdispat.h b/drivers/acpi/acpica/acdispat.h
index 427db72a6302..5b472c43c31d 100644
--- a/drivers/acpi/acpica/acdispat.h
+++ b/drivers/acpi/acpica/acdispat.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h
index 0fb0adf435d6..68ec61fff188 100644
--- a/drivers/acpi/acpica/acevents.h
+++ b/drivers/acpi/acpica/acevents.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 4ed1aa384df2..8f40bb972ae3 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -51,11 +51,19 @@
51 * to simplify maintenance of the code. 51 * to simplify maintenance of the code.
52 */ 52 */
53#ifdef DEFINE_ACPI_GLOBALS 53#ifdef DEFINE_ACPI_GLOBALS
54#define ACPI_EXTERN 54#define ACPI_GLOBAL(type,name) \
55#define ACPI_INIT_GLOBAL(a,b) a=b 55 extern type name; \
56 type name
57
58#define ACPI_INIT_GLOBAL(type,name,value) \
59 type name=value
60
56#else 61#else
57#define ACPI_EXTERN extern 62#define ACPI_GLOBAL(type,name) \
58#define ACPI_INIT_GLOBAL(a,b) a 63 extern type name
64
65#define ACPI_INIT_GLOBAL(type,name,value) \
66 extern type name
59#endif 67#endif
60 68
61#ifdef DEFINE_ACPI_GLOBALS 69#ifdef DEFINE_ACPI_GLOBALS
@@ -82,7 +90,7 @@
82 * 5) Allow unresolved references (invalid target name) in package objects 90 * 5) Allow unresolved references (invalid target name) in package objects
83 * 6) Enable warning messages for behavior that is not ACPI spec compliant 91 * 6) Enable warning messages for behavior that is not ACPI spec compliant
84 */ 92 */
85u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE); 93ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
86 94
87/* 95/*
88 * Automatically serialize ALL control methods? Default is FALSE, meaning 96 * Automatically serialize ALL control methods? Default is FALSE, meaning
@@ -90,25 +98,25 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
90 * Only change this if the ASL code is poorly written and cannot handle 98 * Only change this if the ASL code is poorly written and cannot handle
91 * reentrancy even though methods are marked "NotSerialized". 99 * reentrancy even though methods are marked "NotSerialized".
92 */ 100 */
93u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE); 101ACPI_INIT_GLOBAL(u8, acpi_gbl_all_methods_serialized, FALSE);
94 102
95/* 103/*
96 * Create the predefined _OSI method in the namespace? Default is TRUE 104 * Create the predefined _OSI method in the namespace? Default is TRUE
97 * because ACPI CA is fully compatible with other ACPI implementations. 105 * because ACPI CA is fully compatible with other ACPI implementations.
98 * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior. 106 * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
99 */ 107 */
100u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE); 108ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
101 109
102/* 110/*
103 * Optionally use default values for the ACPI register widths. Set this to 111 * Optionally use default values for the ACPI register widths. Set this to
104 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths. 112 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
105 */ 113 */
106u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE); 114ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
107 115
108/* 116/*
109 * Optionally enable output from the AML Debug Object. 117 * Optionally enable output from the AML Debug Object.
110 */ 118 */
111u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE); 119ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
112 120
113/* 121/*
114 * Optionally copy the entire DSDT to local memory (instead of simply 122 * Optionally copy the entire DSDT to local memory (instead of simply
@@ -116,7 +124,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
116 * DSDT, creating the need for this option. Default is FALSE, do not copy 124 * DSDT, creating the need for this option. Default is FALSE, do not copy
117 * the DSDT. 125 * the DSDT.
118 */ 126 */
119u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE); 127ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
120 128
121/* 129/*
122 * Optionally ignore an XSDT if present and use the RSDT instead. 130 * Optionally ignore an XSDT if present and use the RSDT instead.
@@ -124,7 +132,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
124 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on 132 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
125 * some machines. Default behavior is to use the XSDT if present. 133 * some machines. Default behavior is to use the XSDT if present.
126 */ 134 */
127u8 ACPI_INIT_GLOBAL(acpi_gbl_do_not_use_xsdt, FALSE); 135ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
128 136
129/* 137/*
130 * Optionally use 32-bit FADT addresses if and when there is a conflict 138 * Optionally use 32-bit FADT addresses if and when there is a conflict
@@ -134,7 +142,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_do_not_use_xsdt, FALSE);
134 * some machines have been found to have a corrupted non-zero 64-bit 142 * some machines have been found to have a corrupted non-zero 64-bit
135 * address. Default is FALSE, do not favor the 32-bit addresses. 143 * address. Default is FALSE, do not favor the 32-bit addresses.
136 */ 144 */
137u8 ACPI_INIT_GLOBAL(acpi_gbl_use32_bit_fadt_addresses, FALSE); 145ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE);
138 146
139/* 147/*
140 * Optionally truncate I/O addresses to 16 bits. Provides compatibility 148 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
@@ -142,47 +150,28 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use32_bit_fadt_addresses, FALSE);
142 * this value is set to TRUE if any Windows OSI strings have been 150 * this value is set to TRUE if any Windows OSI strings have been
143 * requested by the BIOS. 151 * requested by the BIOS.
144 */ 152 */
145u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE); 153ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
146 154
147/* 155/*
148 * Disable runtime checking and repair of values returned by control methods. 156 * Disable runtime checking and repair of values returned by control methods.
149 * Use only if the repair is causing a problem on a particular machine. 157 * Use only if the repair is causing a problem on a particular machine.
150 */ 158 */
151u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_auto_repair, FALSE); 159ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
152 160
153/* 161/*
154 * Optionally do not load any SSDTs from the RSDT/XSDT during initialization. 162 * Optionally do not load any SSDTs from the RSDT/XSDT during initialization.
155 * This can be useful for debugging ACPI problems on some machines. 163 * This can be useful for debugging ACPI problems on some machines.
156 */ 164 */
157u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_ssdt_table_load, FALSE); 165ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_load, FALSE);
158 166
159/* 167/*
160 * We keep track of the latest version of Windows that has been requested by 168 * We keep track of the latest version of Windows that has been requested by
161 * the BIOS. 169 * the BIOS.
162 */ 170 */
163u8 ACPI_INIT_GLOBAL(acpi_gbl_osi_data, 0); 171ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
164
165/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */
166
167struct acpi_table_fadt acpi_gbl_FADT;
168u32 acpi_current_gpe_count;
169u32 acpi_gbl_trace_flags;
170acpi_name acpi_gbl_trace_method_name;
171u8 acpi_gbl_system_awake_and_running;
172
173/*
174 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
175 * that the ACPI hardware is no longer required. A flag in the FADT indicates
176 * a reduced HW machine, and that flag is duplicated here for convenience.
177 */
178u8 acpi_gbl_reduced_hardware;
179 172
180#endif /* DEFINE_ACPI_GLOBALS */ 173#endif /* DEFINE_ACPI_GLOBALS */
181 174
182/* Do not disassemble buffers to resource descriptors */
183
184ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE);
185
186/***************************************************************************** 175/*****************************************************************************
187 * 176 *
188 * ACPI Table globals 177 * ACPI Table globals
@@ -190,37 +179,36 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE);
190 ****************************************************************************/ 179 ****************************************************************************/
191 180
192/* 181/*
193 * acpi_gbl_root_table_list is the master list of ACPI tables that were 182 * Master list of all ACPI tables that were found in the RSDT/XSDT.
194 * found in the RSDT/XSDT.
195 */ 183 */
196ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list; 184ACPI_GLOBAL(struct acpi_table_list, acpi_gbl_root_table_list);
185
186/* DSDT information. Used to check for DSDT corruption */
187
188ACPI_GLOBAL(struct acpi_table_header *, acpi_gbl_DSDT);
189ACPI_GLOBAL(struct acpi_table_header, acpi_gbl_original_dsdt_header);
197 190
198#if (!ACPI_REDUCED_HARDWARE) 191#if (!ACPI_REDUCED_HARDWARE)
199ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS; 192ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS);
200 193
201#endif /* !ACPI_REDUCED_HARDWARE */ 194#endif /* !ACPI_REDUCED_HARDWARE */
202 195
203/* These addresses are calculated from the FADT Event Block addresses */ 196/* These addresses are calculated from the FADT Event Block addresses */
204 197
205ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_status; 198ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1a_status);
206ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable; 199ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1a_enable);
207
208ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_status;
209ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
210 200
211/* DSDT information. Used to check for DSDT corruption */ 201ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1b_status);
212 202ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1b_enable);
213ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
214ACPI_EXTERN struct acpi_table_header acpi_gbl_original_dsdt_header;
215 203
216/* 204/*
217 * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is 205 * Handle both ACPI 1.0 and ACPI 2.0+ Integer widths. The integer width is
218 * determined by the revision of the DSDT: If the DSDT revision is less than 206 * determined by the revision of the DSDT: If the DSDT revision is less than
219 * 2, use only the lower 32 bits of the internal 64-bit Integer. 207 * 2, use only the lower 32 bits of the internal 64-bit Integer.
220 */ 208 */
221ACPI_EXTERN u8 acpi_gbl_integer_bit_width; 209ACPI_GLOBAL(u8, acpi_gbl_integer_bit_width);
222ACPI_EXTERN u8 acpi_gbl_integer_byte_width; 210ACPI_GLOBAL(u8, acpi_gbl_integer_byte_width);
223ACPI_EXTERN u8 acpi_gbl_integer_nybble_width; 211ACPI_GLOBAL(u8, acpi_gbl_integer_nybble_width);
224 212
225/***************************************************************************** 213/*****************************************************************************
226 * 214 *
@@ -233,36 +221,36 @@ ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
233 * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. 221 * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
234 * (The table maps local handles to the real OS handles) 222 * (The table maps local handles to the real OS handles)
235 */ 223 */
236ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX]; 224ACPI_GLOBAL(struct acpi_mutex_info, acpi_gbl_mutex_info[ACPI_NUM_MUTEX]);
237 225
238/* 226/*
239 * Global lock mutex is an actual AML mutex object 227 * Global lock mutex is an actual AML mutex object
240 * Global lock semaphore works in conjunction with the actual global lock 228 * Global lock semaphore works in conjunction with the actual global lock
241 * Global lock spinlock is used for "pending" handshake 229 * Global lock spinlock is used for "pending" handshake
242 */ 230 */
243ACPI_EXTERN union acpi_operand_object *acpi_gbl_global_lock_mutex; 231ACPI_GLOBAL(union acpi_operand_object *, acpi_gbl_global_lock_mutex);
244ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore; 232ACPI_GLOBAL(acpi_semaphore, acpi_gbl_global_lock_semaphore);
245ACPI_EXTERN acpi_spinlock acpi_gbl_global_lock_pending_lock; 233ACPI_GLOBAL(acpi_spinlock, acpi_gbl_global_lock_pending_lock);
246ACPI_EXTERN u16 acpi_gbl_global_lock_handle; 234ACPI_GLOBAL(u16, acpi_gbl_global_lock_handle);
247ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; 235ACPI_GLOBAL(u8, acpi_gbl_global_lock_acquired);
248ACPI_EXTERN u8 acpi_gbl_global_lock_present; 236ACPI_GLOBAL(u8, acpi_gbl_global_lock_present);
249ACPI_EXTERN u8 acpi_gbl_global_lock_pending; 237ACPI_GLOBAL(u8, acpi_gbl_global_lock_pending);
250 238
251/* 239/*
252 * Spinlocks are used for interfaces that can be possibly called at 240 * Spinlocks are used for interfaces that can be possibly called at
253 * interrupt level 241 * interrupt level
254 */ 242 */
255ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock; /* For GPE data structs and registers */ 243ACPI_GLOBAL(acpi_spinlock, acpi_gbl_gpe_lock); /* For GPE data structs and registers */
256ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */ 244ACPI_GLOBAL(acpi_spinlock, acpi_gbl_hardware_lock); /* For ACPI H/W except GPE registers */
257ACPI_EXTERN acpi_spinlock acpi_gbl_reference_count_lock; 245ACPI_GLOBAL(acpi_spinlock, acpi_gbl_reference_count_lock);
258 246
259/* Mutex for _OSI support */ 247/* Mutex for _OSI support */
260 248
261ACPI_EXTERN acpi_mutex acpi_gbl_osi_mutex; 249ACPI_GLOBAL(acpi_mutex, acpi_gbl_osi_mutex);
262 250
263/* Reader/Writer lock is used for namespace walk and dynamic table unload */ 251/* Reader/Writer lock is used for namespace walk and dynamic table unload */
264 252
265ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock; 253ACPI_GLOBAL(struct acpi_rw_lock, acpi_gbl_namespace_rw_lock);
266 254
267/***************************************************************************** 255/*****************************************************************************
268 * 256 *
@@ -272,70 +260,69 @@ ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;
272 260
273/* Object caches */ 261/* Object caches */
274 262
275ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache; 263ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_namespace_cache);
276ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache; 264ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_state_cache);
277ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache; 265ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_ps_node_cache);
278ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache; 266ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_ps_node_ext_cache);
279ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache; 267ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_operand_cache);
268
269/* System */
270
271ACPI_INIT_GLOBAL(u32, acpi_gbl_startup_flags, 0);
272ACPI_INIT_GLOBAL(u8, acpi_gbl_shutdown, TRUE);
280 273
281/* Global handlers */ 274/* Global handlers */
282 275
283ACPI_EXTERN struct acpi_global_notify_handler acpi_gbl_global_notify[2]; 276ACPI_GLOBAL(struct acpi_global_notify_handler, acpi_gbl_global_notify[2]);
284ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; 277ACPI_GLOBAL(acpi_exception_handler, acpi_gbl_exception_handler);
285ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; 278ACPI_GLOBAL(acpi_init_handler, acpi_gbl_init_handler);
286ACPI_EXTERN acpi_table_handler acpi_gbl_table_handler; 279ACPI_GLOBAL(acpi_table_handler, acpi_gbl_table_handler);
287ACPI_EXTERN void *acpi_gbl_table_handler_context; 280ACPI_GLOBAL(void *, acpi_gbl_table_handler_context);
288ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; 281ACPI_GLOBAL(struct acpi_walk_state *, acpi_gbl_breakpoint_walk);
289ACPI_EXTERN acpi_interface_handler acpi_gbl_interface_handler; 282ACPI_GLOBAL(acpi_interface_handler, acpi_gbl_interface_handler);
290ACPI_EXTERN struct acpi_sci_handler_info *acpi_gbl_sci_handler_list; 283ACPI_GLOBAL(struct acpi_sci_handler_info *, acpi_gbl_sci_handler_list);
291 284
292/* Owner ID support */ 285/* Owner ID support */
293 286
294ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS]; 287ACPI_GLOBAL(u32, acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS]);
295ACPI_EXTERN u8 acpi_gbl_last_owner_id_index; 288ACPI_GLOBAL(u8, acpi_gbl_last_owner_id_index);
296ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset; 289ACPI_GLOBAL(u8, acpi_gbl_next_owner_id_offset);
297 290
298/* Initialization sequencing */ 291/* Initialization sequencing */
299 292
300ACPI_EXTERN u8 acpi_gbl_reg_methods_executed; 293ACPI_GLOBAL(u8, acpi_gbl_reg_methods_executed);
301 294
302/* Misc */ 295/* Misc */
303 296
304ACPI_EXTERN u32 acpi_gbl_original_mode; 297ACPI_GLOBAL(u32, acpi_gbl_original_mode);
305ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; 298ACPI_GLOBAL(u32, acpi_gbl_rsdp_original_location);
306ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; 299ACPI_GLOBAL(u32, acpi_gbl_ns_lookup_count);
307ACPI_EXTERN u32 acpi_gbl_ps_find_count; 300ACPI_GLOBAL(u32, acpi_gbl_ps_find_count);
308ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; 301ACPI_GLOBAL(u16, acpi_gbl_pm1_enable_register_save);
309ACPI_EXTERN u8 acpi_gbl_debugger_configuration; 302ACPI_GLOBAL(u8, acpi_gbl_debugger_configuration);
310ACPI_EXTERN u8 acpi_gbl_step_to_next_call; 303ACPI_GLOBAL(u8, acpi_gbl_step_to_next_call);
311ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present; 304ACPI_GLOBAL(u8, acpi_gbl_acpi_hardware_present);
312ACPI_EXTERN u8 acpi_gbl_events_initialized; 305ACPI_GLOBAL(u8, acpi_gbl_events_initialized);
313ACPI_EXTERN struct acpi_interface_info *acpi_gbl_supported_interfaces; 306ACPI_GLOBAL(struct acpi_interface_info *, acpi_gbl_supported_interfaces);
314ACPI_EXTERN struct acpi_address_range 307ACPI_GLOBAL(struct acpi_address_range *,
315 *acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX]; 308 acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX]);
316 309
317#ifndef DEFINE_ACPI_GLOBALS 310/* Other miscellaneous, declared and initialized in utglobal */
318 311
319/* Other miscellaneous */
320
321extern u8 acpi_gbl_shutdown;
322extern u32 acpi_gbl_startup_flags;
323extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT]; 312extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];
324extern const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS]; 313extern const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS];
325extern const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS]; 314extern const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS];
326extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
327extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS]; 315extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
328 316extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
329#endif
330 317
331#ifdef ACPI_DBG_TRACK_ALLOCATIONS 318#ifdef ACPI_DBG_TRACK_ALLOCATIONS
332 319
333/* Lists for tracking memory allocations */ 320/* Lists for tracking memory allocations (debug only) */
334 321
335ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; 322ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_global_list);
336ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; 323ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_ns_node_list);
337ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats; 324ACPI_GLOBAL(u8, acpi_gbl_display_final_mem_stats);
338ACPI_EXTERN u8 acpi_gbl_disable_mem_tracking; 325ACPI_GLOBAL(u8, acpi_gbl_disable_mem_tracking);
339#endif 326#endif
340 327
341/***************************************************************************** 328/*****************************************************************************
@@ -350,22 +337,23 @@ ACPI_EXTERN u8 acpi_gbl_disable_mem_tracking;
350#define NUM_PREDEFINED_NAMES 9 337#define NUM_PREDEFINED_NAMES 9
351#endif 338#endif
352 339
353ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct; 340ACPI_GLOBAL(struct acpi_namespace_node, acpi_gbl_root_node_struct);
354ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node; 341ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_root_node);
355ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device; 342ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_fadt_gpe_device);
356ACPI_EXTERN union acpi_operand_object *acpi_gbl_module_code_list; 343ACPI_GLOBAL(union acpi_operand_object *, acpi_gbl_module_code_list);
357 344
358extern const u8 acpi_gbl_ns_properties[ACPI_NUM_NS_TYPES]; 345extern const u8 acpi_gbl_ns_properties[ACPI_NUM_NS_TYPES];
359extern const struct acpi_predefined_names 346extern const struct acpi_predefined_names
360 acpi_gbl_pre_defined_names[NUM_PREDEFINED_NAMES]; 347 acpi_gbl_pre_defined_names[NUM_PREDEFINED_NAMES];
361 348
362#ifdef ACPI_DEBUG_OUTPUT 349#ifdef ACPI_DEBUG_OUTPUT
363ACPI_EXTERN u32 acpi_gbl_current_node_count; 350ACPI_GLOBAL(u32, acpi_gbl_current_node_count);
364ACPI_EXTERN u32 acpi_gbl_current_node_size; 351ACPI_GLOBAL(u32, acpi_gbl_current_node_size);
365ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count; 352ACPI_GLOBAL(u32, acpi_gbl_max_concurrent_node_count);
366ACPI_EXTERN acpi_size *acpi_gbl_entry_stack_pointer; 353ACPI_GLOBAL(acpi_size *, acpi_gbl_entry_stack_pointer);
367ACPI_EXTERN acpi_size *acpi_gbl_lowest_stack_pointer; 354ACPI_GLOBAL(acpi_size *, acpi_gbl_lowest_stack_pointer);
368ACPI_EXTERN u32 acpi_gbl_deepest_nesting; 355ACPI_GLOBAL(u32, acpi_gbl_deepest_nesting);
356ACPI_INIT_GLOBAL(u32, acpi_gbl_nesting_level, 0);
369#endif 357#endif
370 358
371/***************************************************************************** 359/*****************************************************************************
@@ -374,11 +362,11 @@ ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
374 * 362 *
375 ****************************************************************************/ 363 ****************************************************************************/
376 364
377ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list; 365ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);
378 366
379/* Control method single step flag */ 367/* Control method single step flag */
380 368
381ACPI_EXTERN u8 acpi_gbl_cm_single_step; 369ACPI_GLOBAL(u8, acpi_gbl_cm_single_step);
382 370
383/***************************************************************************** 371/*****************************************************************************
384 * 372 *
@@ -388,8 +376,9 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step;
388 376
389extern struct acpi_bit_register_info 377extern struct acpi_bit_register_info
390 acpi_gbl_bit_register_info[ACPI_NUM_BITREG]; 378 acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
391ACPI_EXTERN u8 acpi_gbl_sleep_type_a; 379
392ACPI_EXTERN u8 acpi_gbl_sleep_type_b; 380ACPI_GLOBAL(u8, acpi_gbl_sleep_type_a);
381ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b);
393 382
394/***************************************************************************** 383/*****************************************************************************
395 * 384 *
@@ -399,14 +388,15 @@ ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
399 388
400#if (!ACPI_REDUCED_HARDWARE) 389#if (!ACPI_REDUCED_HARDWARE)
401 390
402ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized; 391ACPI_GLOBAL(u8, acpi_gbl_all_gpes_initialized);
403ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; 392ACPI_GLOBAL(struct acpi_gpe_xrupt_info *, acpi_gbl_gpe_xrupt_list_head);
404ACPI_EXTERN struct acpi_gpe_block_info 393ACPI_GLOBAL(struct acpi_gpe_block_info *,
405 *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; 394 acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]);
406ACPI_EXTERN acpi_gbl_event_handler acpi_gbl_global_event_handler; 395ACPI_GLOBAL(acpi_gbl_event_handler, acpi_gbl_global_event_handler);
407ACPI_EXTERN void *acpi_gbl_global_event_handler_context; 396ACPI_GLOBAL(void *, acpi_gbl_global_event_handler_context);
408ACPI_EXTERN struct acpi_fixed_event_handler 397ACPI_GLOBAL(struct acpi_fixed_event_handler,
409 acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS]; 398 acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS]);
399
410extern struct acpi_fixed_event_info 400extern struct acpi_fixed_event_info
411 acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS]; 401 acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
412 402
@@ -418,23 +408,19 @@ extern struct acpi_fixed_event_info
418 * 408 *
419 ****************************************************************************/ 409 ****************************************************************************/
420 410
421/* Procedure nesting level for debug output */
422
423extern u32 acpi_gbl_nesting_level;
424
425/* Event counters */ 411/* Event counters */
426 412
427ACPI_EXTERN u32 acpi_method_count; 413ACPI_GLOBAL(u32, acpi_method_count);
428ACPI_EXTERN u32 acpi_gpe_count; 414ACPI_GLOBAL(u32, acpi_gpe_count);
429ACPI_EXTERN u32 acpi_sci_count; 415ACPI_GLOBAL(u32, acpi_sci_count);
430ACPI_EXTERN u32 acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]; 416ACPI_GLOBAL(u32, acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]);
431 417
432/* Support for dynamic control method tracing mechanism */ 418/* Support for dynamic control method tracing mechanism */
433 419
434ACPI_EXTERN u32 acpi_gbl_original_dbg_level; 420ACPI_GLOBAL(u32, acpi_gbl_original_dbg_level);
435ACPI_EXTERN u32 acpi_gbl_original_dbg_layer; 421ACPI_GLOBAL(u32, acpi_gbl_original_dbg_layer);
436ACPI_EXTERN u32 acpi_gbl_trace_dbg_level; 422ACPI_GLOBAL(u32, acpi_gbl_trace_dbg_level);
437ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; 423ACPI_GLOBAL(u32, acpi_gbl_trace_dbg_layer);
438 424
439/***************************************************************************** 425/*****************************************************************************
440 * 426 *
@@ -442,61 +428,64 @@ ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;
442 * 428 *
443 ****************************************************************************/ 429 ****************************************************************************/
444 430
445ACPI_EXTERN u8 acpi_gbl_db_output_flags; 431ACPI_GLOBAL(u8, acpi_gbl_db_output_flags);
446 432
447#ifdef ACPI_DISASSEMBLER 433#ifdef ACPI_DISASSEMBLER
448 434
449ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_ignore_noop_operator, FALSE); 435/* Do not disassemble buffers to resource descriptors */
436
437ACPI_INIT_GLOBAL(u8, acpi_gbl_no_resource_disassembly, FALSE);
438ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_noop_operator, FALSE);
450 439
451ACPI_EXTERN u8 acpi_gbl_db_opt_disasm; 440ACPI_GLOBAL(u8, acpi_gbl_db_opt_disasm);
452ACPI_EXTERN u8 acpi_gbl_db_opt_verbose; 441ACPI_GLOBAL(u8, acpi_gbl_db_opt_verbose);
453ACPI_EXTERN u8 acpi_gbl_num_external_methods; 442ACPI_GLOBAL(u8, acpi_gbl_num_external_methods);
454ACPI_EXTERN u32 acpi_gbl_resolved_external_methods; 443ACPI_GLOBAL(u32, acpi_gbl_resolved_external_methods);
455ACPI_EXTERN struct acpi_external_list *acpi_gbl_external_list; 444ACPI_GLOBAL(struct acpi_external_list *, acpi_gbl_external_list);
456ACPI_EXTERN struct acpi_external_file *acpi_gbl_external_file_list; 445ACPI_GLOBAL(struct acpi_external_file *, acpi_gbl_external_file_list);
457#endif 446#endif
458 447
459#ifdef ACPI_DEBUGGER 448#ifdef ACPI_DEBUGGER
460 449
461extern u8 acpi_gbl_method_executing; 450ACPI_INIT_GLOBAL(u8, acpi_gbl_db_terminate_threads, FALSE);
462extern u8 acpi_gbl_abort_method; 451ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE);
463extern u8 acpi_gbl_db_terminate_threads; 452ACPI_INIT_GLOBAL(u8, acpi_gbl_method_executing, FALSE);
464 453
465ACPI_EXTERN u8 acpi_gbl_db_opt_tables; 454ACPI_GLOBAL(u8, acpi_gbl_db_opt_tables);
466ACPI_EXTERN u8 acpi_gbl_db_opt_stats; 455ACPI_GLOBAL(u8, acpi_gbl_db_opt_stats);
467ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods; 456ACPI_GLOBAL(u8, acpi_gbl_db_opt_ini_methods);
468ACPI_EXTERN u8 acpi_gbl_db_opt_no_region_support; 457ACPI_GLOBAL(u8, acpi_gbl_db_opt_no_region_support);
469ACPI_EXTERN u8 acpi_gbl_db_output_to_file; 458ACPI_GLOBAL(u8, acpi_gbl_db_output_to_file);
470ACPI_EXTERN char *acpi_gbl_db_buffer; 459ACPI_GLOBAL(char *, acpi_gbl_db_buffer);
471ACPI_EXTERN char *acpi_gbl_db_filename; 460ACPI_GLOBAL(char *, acpi_gbl_db_filename);
472ACPI_EXTERN u32 acpi_gbl_db_debug_level; 461ACPI_GLOBAL(u32, acpi_gbl_db_debug_level);
473ACPI_EXTERN u32 acpi_gbl_db_console_debug_level; 462ACPI_GLOBAL(u32, acpi_gbl_db_console_debug_level);
474ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node; 463ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_db_scope_node);
475 464
476ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]; 465ACPI_GLOBAL(char *, acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]);
477ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]; 466ACPI_GLOBAL(acpi_object_type, acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]);
478 467
479/* These buffers should all be the same size */ 468/* These buffers should all be the same size */
480 469
481ACPI_EXTERN char acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE]; 470ACPI_GLOBAL(char, acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE]);
482ACPI_EXTERN char acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE]; 471ACPI_GLOBAL(char, acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE]);
483ACPI_EXTERN char acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE]; 472ACPI_GLOBAL(char, acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE]);
484ACPI_EXTERN char acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]; 473ACPI_GLOBAL(char, acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]);
485 474
486/* 475/*
487 * Statistic globals 476 * Statistic globals
488 */ 477 */
489ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1]; 478ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1]);
490ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1]; 479ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1]);
491ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc; 480ACPI_GLOBAL(u16, acpi_gbl_obj_type_count_misc);
492ACPI_EXTERN u16 acpi_gbl_node_type_count_misc; 481ACPI_GLOBAL(u16, acpi_gbl_node_type_count_misc);
493ACPI_EXTERN u32 acpi_gbl_num_nodes; 482ACPI_GLOBAL(u32, acpi_gbl_num_nodes);
494ACPI_EXTERN u32 acpi_gbl_num_objects; 483ACPI_GLOBAL(u32, acpi_gbl_num_objects);
495 484
496ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree; 485ACPI_GLOBAL(u32, acpi_gbl_size_of_parse_tree);
497ACPI_EXTERN u32 acpi_gbl_size_of_method_trees; 486ACPI_GLOBAL(u32, acpi_gbl_size_of_method_trees);
498ACPI_EXTERN u32 acpi_gbl_size_of_node_entries; 487ACPI_GLOBAL(u32, acpi_gbl_size_of_node_entries);
499ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects; 488ACPI_GLOBAL(u32, acpi_gbl_size_of_acpi_objects);
500 489
501#endif /* ACPI_DEBUGGER */ 490#endif /* ACPI_DEBUGGER */
502 491
@@ -508,7 +497,7 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
508 497
509#ifdef ACPI_APPLICATION 498#ifdef ACPI_APPLICATION
510 499
511ACPI_FILE ACPI_INIT_GLOBAL(acpi_gbl_debug_file, NULL); 500ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_debug_file, NULL);
512 501
513#endif /* ACPI_APPLICATION */ 502#endif /* ACPI_APPLICATION */
514 503
diff --git a/drivers/acpi/acpica/achware.h b/drivers/acpi/acpica/achware.h
index 6357e932bfd9..2ad2351a9833 100644
--- a/drivers/acpi/acpica/achware.h
+++ b/drivers/acpi/acpica/achware.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h
index 8af8c9bdeb35..c54267748be5 100644
--- a/drivers/acpi/acpica/acinterp.h
+++ b/drivers/acpi/acpica/acinterp.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -87,6 +87,10 @@ typedef const struct acpi_exdump_info {
87#define ACPI_EXD_PACKAGE 11 87#define ACPI_EXD_PACKAGE 11
88#define ACPI_EXD_FIELD 12 88#define ACPI_EXD_FIELD 12
89#define ACPI_EXD_REFERENCE 13 89#define ACPI_EXD_REFERENCE 13
90#define ACPI_EXD_LIST 14 /* Operand object list */
91#define ACPI_EXD_HDLR_LIST 15 /* Address Handler list */
92#define ACPI_EXD_RGN_LIST 16 /* Region list */
93#define ACPI_EXD_NODE 17 /* Namespace Node */
90 94
91/* restore default alignment */ 95/* restore default alignment */
92 96
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index d95ca5449ace..52a21dafb540 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h
index 2a86c65d873b..4bceb11c7380 100644
--- a/drivers/acpi/acpica/acmacros.h
+++ b/drivers/acpi/acpica/acmacros.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -63,17 +63,21 @@
63#define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val)) 63#define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val))
64 64
65/* 65/*
66 * printf() format helpers 66 * printf() format helpers. These macros are workarounds for the difficulties
67 * with emitting 64-bit integers and 64-bit pointers with the same code
68 * for both 32-bit and 64-bit hosts.
67 */ 69 */
68
69/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
70
71#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i) 70#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
72 71
73#if ACPI_MACHINE_WIDTH == 64 72#if ACPI_MACHINE_WIDTH == 64
74#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i) 73#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
74#define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i)
75#define ACPI_PRINTF_UINT "0x%8.8X%8.8X"
76
75#else 77#else
76#define ACPI_FORMAT_NATIVE_UINT(i) 0, (i) 78#define ACPI_FORMAT_NATIVE_UINT(i) 0, (u32) (i)
79#define ACPI_FORMAT_TO_UINT(i) (u32) (i)
80#define ACPI_PRINTF_UINT "0x%8.8X"
77#endif 81#endif
78 82
79/* 83/*
diff --git a/drivers/acpi/acpica/acnamesp.h b/drivers/acpi/acpica/acnamesp.h
index e6138ac4a160..ee1c040f321c 100644
--- a/drivers/acpi/acpica/acnamesp.h
+++ b/drivers/acpi/acpica/acnamesp.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h
index cc7ab6dd724e..1a4d61805ebc 100644
--- a/drivers/acpi/acpica/acobject.h
+++ b/drivers/acpi/acpica/acobject.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acopcode.h b/drivers/acpi/acpica/acopcode.h
index 3fc9ca7e8aa3..dda0e6affcf1 100644
--- a/drivers/acpi/acpica/acopcode.h
+++ b/drivers/acpi/acpica/acopcode.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acparser.h b/drivers/acpi/acpica/acparser.h
index aed319318835..6168b85463ed 100644
--- a/drivers/acpi/acpica/acparser.h
+++ b/drivers/acpi/acpica/acparser.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h
index f600aded7261..a48d713e9599 100644
--- a/drivers/acpi/acpica/acpredef.h
+++ b/drivers/acpi/acpica/acpredef.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@
48 * 48 *
49 * Return Package types 49 * Return Package types
50 * 50 *
51 * 1) PTYPE1 packages do not contain sub-packages. 51 * 1) PTYPE1 packages do not contain subpackages.
52 * 52 *
53 * ACPI_PTYPE1_FIXED: Fixed-length length, 1 or 2 object types: 53 * ACPI_PTYPE1_FIXED: Fixed-length length, 1 or 2 object types:
54 * object type 54 * object type
@@ -63,8 +63,8 @@
63 * (Used for _PRW) 63 * (Used for _PRW)
64 * 64 *
65 * 65 *
66 * 2) PTYPE2 packages contain a Variable-length number of sub-packages. Each 66 * 2) PTYPE2 packages contain a Variable-length number of subpackages. Each
67 * of the different types describe the contents of each of the sub-packages. 67 * of the different types describe the contents of each of the subpackages.
68 * 68 *
69 * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types. Zero-length 69 * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types. Zero-length
70 * parent package is allowed: 70 * parent package is allowed:
@@ -560,7 +560,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
560 560
561 /* 561 /*
562 * For _HPX, a single package is returned, containing a variable-length number 562 * For _HPX, a single package is returned, containing a variable-length number
563 * of sub-packages. Each sub-package contains a PCI record setting. 563 * of subpackages. Each subpackage contains a PCI record setting.
564 * There are several different type of record settings, of different 564 * There are several different type of record settings, of different
565 * lengths, but all elements of all settings are Integers. 565 * lengths, but all elements of all settings are Integers.
566 */ 566 */
@@ -698,6 +698,12 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
698 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */ 698 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
699 PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0), 699 PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
700 700
701 {{"_PRP", METHOD_0ARGS,
702 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each: 1 Str, 1 Int/Str/Pkg */
703 PACKAGE_INFO(ACPI_PTYPE2, ACPI_RTYPE_STRING, 1,
704 ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING |
705 ACPI_RTYPE_PACKAGE | ACPI_RTYPE_REFERENCE, 1, 0),
706
701 {{"_PRS", METHOD_0ARGS, 707 {{"_PRS", METHOD_0ARGS,
702 METHOD_RETURNS(ACPI_RTYPE_BUFFER)}}, 708 METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
703 709
diff --git a/drivers/acpi/acpica/acresrc.h b/drivers/acpi/acpica/acresrc.h
index ff97430455cb..4b008e8884a1 100644
--- a/drivers/acpi/acpica/acresrc.h
+++ b/drivers/acpi/acpica/acresrc.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h
index fc83c0a5ca70..5d2989a1b68c 100644
--- a/drivers/acpi/acpica/acstruct.h
+++ b/drivers/acpi/acpica/acstruct.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h
index c54f42c64fe2..5fa4b2027697 100644
--- a/drivers/acpi/acpica/actables.h
+++ b/drivers/acpi/acpica/actables.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index be8180c17d7e..ceeec0b7ccb1 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@ extern const u8 acpi_gbl_resource_aml_serial_bus_sizes[];
49 49
50/* Strings used by the disassembler and debugger resource dump routines */ 50/* Strings used by the disassembler and debugger resource dump routines */
51 51
52#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) 52#if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
53 53
54extern const char *acpi_gbl_bm_decode[]; 54extern const char *acpi_gbl_bm_decode[];
55extern const char *acpi_gbl_config_decode[]; 55extern const char *acpi_gbl_config_decode[];
diff --git a/drivers/acpi/acpica/amlcode.h b/drivers/acpi/acpica/amlcode.h
index 48a3e331b72d..5908ccec6aea 100644
--- a/drivers/acpi/acpica/amlcode.h
+++ b/drivers/acpi/acpica/amlcode.h
@@ -7,7 +7,7 @@
7 *****************************************************************************/ 7 *****************************************************************************/
8 8
9/* 9/*
10 * Copyright (C) 2000 - 2013, Intel Corp. 10 * Copyright (C) 2000 - 2014, Intel Corp.
11 * All rights reserved. 11 * All rights reserved.
12 * 12 *
13 * Redistribution and use in source and binary forms, with or without 13 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h
index 87c26366d1df..f3f834408441 100644
--- a/drivers/acpi/acpica/amlresrc.h
+++ b/drivers/acpi/acpica/amlresrc.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c
index afdc6df17abf..720b1cdda711 100644
--- a/drivers/acpi/acpica/dsargs.c
+++ b/drivers/acpi/acpica/dsargs.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dscontrol.c b/drivers/acpi/acpica/dscontrol.c
index eb56b66444b5..8daf9de82b73 100644
--- a/drivers/acpi/acpica/dscontrol.c
+++ b/drivers/acpi/acpica/dscontrol.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index e7a57c554e84..3661c8e90540 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c
index 14424200d246..96644d5ac0e1 100644
--- a/drivers/acpi/acpica/dsinit.c
+++ b/drivers/acpi/acpica/dsinit.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index 81a78ba84311..2c6d42c2bc01 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dsmthdat.c b/drivers/acpi/acpica/dsmthdat.c
index c4b0b3657237..b67522df01ac 100644
--- a/drivers/acpi/acpica/dsmthdat.c
+++ b/drivers/acpi/acpica/dsmthdat.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index b1746a68dad1..a1e7e6b6fcf7 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index 5205edcf2c01..6c0759c0db47 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index d7f53fb2979a..9f74795e2268 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c
index 1bbb22fd6fa0..f7f5107e754d 100644
--- a/drivers/acpi/acpica/dswexec.c
+++ b/drivers/acpi/acpica/dswexec.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c
index 2dbe109727c8..bd7811c64169 100644
--- a/drivers/acpi/acpica/dswload.c
+++ b/drivers/acpi/acpica/dswload.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
index 7f569d573027..2ac28d297305 100644
--- a/drivers/acpi/acpica/dswload2.c
+++ b/drivers/acpi/acpica/dswload2.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dswscope.c b/drivers/acpi/acpica/dswscope.c
index d67891de1b54..9d6e2c1de1f8 100644
--- a/drivers/acpi/acpica/dswscope.c
+++ b/drivers/acpi/acpica/dswscope.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c
index ecb12e2137ff..24f7d5ea678a 100644
--- a/drivers/acpi/acpica/dswstate.c
+++ b/drivers/acpi/acpica/dswstate.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c
index 83cd45f4a870..c7bffff9ed32 100644
--- a/drivers/acpi/acpica/evevent.c
+++ b/drivers/acpi/acpica/evevent.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evglock.c b/drivers/acpi/acpica/evglock.c
index 4c67193a9fa7..3393a73ca0d6 100644
--- a/drivers/acpi/acpica/evglock.c
+++ b/drivers/acpi/acpica/evglock.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index a9cb4a1a4bb8..955f83da68a5 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c
index a31e549e64cc..caaed3c673fd 100644
--- a/drivers/acpi/acpica/evgpeblk.c
+++ b/drivers/acpi/acpica/evgpeblk.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c
index a3e2f38aadf6..ae779c1e871d 100644
--- a/drivers/acpi/acpica/evgpeinit.c
+++ b/drivers/acpi/acpica/evgpeinit.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c
index 4d764e847a08..17e4bbfdb096 100644
--- a/drivers/acpi/acpica/evgpeutil.c
+++ b/drivers/acpi/acpica/evgpeutil.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c
index e3157313eb27..78ac29351c9e 100644
--- a/drivers/acpi/acpica/evhandler.c
+++ b/drivers/acpi/acpica/evhandler.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c
index a5687540e9a6..5d594eb2e5ec 100644
--- a/drivers/acpi/acpica/evmisc.c
+++ b/drivers/acpi/acpica/evmisc.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
index 144cbb9b73bc..9957297d1580 100644
--- a/drivers/acpi/acpica/evregion.c
+++ b/drivers/acpi/acpica/evregion.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -314,6 +314,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
314{ 314{
315 union acpi_operand_object *handler_obj; 315 union acpi_operand_object *handler_obj;
316 union acpi_operand_object *obj_desc; 316 union acpi_operand_object *obj_desc;
317 union acpi_operand_object *start_desc;
317 union acpi_operand_object **last_obj_ptr; 318 union acpi_operand_object **last_obj_ptr;
318 acpi_adr_space_setup region_setup; 319 acpi_adr_space_setup region_setup;
319 void **region_context; 320 void **region_context;
@@ -341,6 +342,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
341 /* Find this region in the handler's list */ 342 /* Find this region in the handler's list */
342 343
343 obj_desc = handler_obj->address_space.region_list; 344 obj_desc = handler_obj->address_space.region_list;
345 start_desc = obj_desc;
344 last_obj_ptr = &handler_obj->address_space.region_list; 346 last_obj_ptr = &handler_obj->address_space.region_list;
345 347
346 while (obj_desc) { 348 while (obj_desc) {
@@ -438,6 +440,15 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
438 440
439 last_obj_ptr = &obj_desc->region.next; 441 last_obj_ptr = &obj_desc->region.next;
440 obj_desc = obj_desc->region.next; 442 obj_desc = obj_desc->region.next;
443
444 /* Prevent infinite loop if list is corrupted */
445
446 if (obj_desc == start_desc) {
447 ACPI_ERROR((AE_INFO,
448 "Circular handler list in region object %p",
449 region_obj));
450 return_VOID;
451 }
441 } 452 }
442 453
443 /* If we get here, the region was not in the handler's region list */ 454 /* If we get here, the region was not in the handler's region list */
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c
index 8354c4f7f10c..1b148a440d67 100644
--- a/drivers/acpi/acpica/evrgnini.c
+++ b/drivers/acpi/acpica/evrgnini.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evsci.c b/drivers/acpi/acpica/evsci.c
index 9e9e3454d893..4d8a709c1fc4 100644
--- a/drivers/acpi/acpica/evsci.c
+++ b/drivers/acpi/acpica/evsci.c
@@ -6,7 +6,7 @@
6 ******************************************************************************/ 6 ******************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c
index 23a7fadca412..a734b27da061 100644
--- a/drivers/acpi/acpica/evxface.c
+++ b/drivers/acpi/acpica/evxface.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c
index 39d06af5e347..e286640ad4ff 100644
--- a/drivers/acpi/acpica/evxfevnt.c
+++ b/drivers/acpi/acpica/evxfevnt.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index 5713da77c665..20a1392ffe06 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -583,6 +583,18 @@ acpi_install_gpe_block(acpi_handle gpe_device,
583 goto unlock_and_exit; 583 goto unlock_and_exit;
584 } 584 }
585 585
586 /* Validate the parent device */
587
588 if (node->type != ACPI_TYPE_DEVICE) {
589 status = AE_TYPE;
590 goto unlock_and_exit;
591 }
592
593 if (node->object) {
594 status = AE_ALREADY_EXISTS;
595 goto unlock_and_exit;
596 }
597
586 /* 598 /*
587 * For user-installed GPE Block Devices, the gpe_block_base_number 599 * For user-installed GPE Block Devices, the gpe_block_base_number
588 * is always zero 600 * is always zero
@@ -666,6 +678,13 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
666 goto unlock_and_exit; 678 goto unlock_and_exit;
667 } 679 }
668 680
681 /* Validate the parent device */
682
683 if (node->type != ACPI_TYPE_DEVICE) {
684 status = AE_TYPE;
685 goto unlock_and_exit;
686 }
687
669 /* Get the device_object attached to the node */ 688 /* Get the device_object attached to the node */
670 689
671 obj_desc = acpi_ns_get_attached_object(node); 690 obj_desc = acpi_ns_get_attached_object(node);
diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c
index 02ed75ac56cd..2d6f187939c7 100644
--- a/drivers/acpi/acpica/evxfregn.c
+++ b/drivers/acpi/acpica/evxfregn.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index 06d216c8d43a..8ba1464efd11 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index 69e4a8cc9b71..c545386fee96 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index 3c2e6dcdad3e..95d23dabcfbb 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exdebug.c b/drivers/acpi/acpica/exdebug.c
index 81c72a4ecd82..4cfc3d3b5c97 100644
--- a/drivers/acpi/acpica/exdebug.c
+++ b/drivers/acpi/acpica/exdebug.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
index 4d046faac48c..973fdae00f94 100644
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -94,12 +94,13 @@ static struct acpi_exdump_info acpi_ex_dump_buffer[5] = {
94 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL}, 94 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL},
95 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"}, 95 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"},
96 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"}, 96 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"},
97 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.node), "Parent Node"}, 97 {ACPI_EXD_NODE, ACPI_EXD_OFFSET(buffer.node), "Parent Node"},
98 {ACPI_EXD_BUFFER, 0, NULL} 98 {ACPI_EXD_BUFFER, 0, NULL}
99}; 99};
100 100
101static struct acpi_exdump_info acpi_ex_dump_package[5] = { 101static struct acpi_exdump_info acpi_ex_dump_package[6] = {
102 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL}, 102 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL},
103 {ACPI_EXD_NODE, ACPI_EXD_OFFSET(package.node), "Parent Node"},
103 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"}, 104 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"},
104 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"}, 105 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"},
105 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"}, 106 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"},
@@ -108,11 +109,11 @@ static struct acpi_exdump_info acpi_ex_dump_package[5] = {
108 109
109static struct acpi_exdump_info acpi_ex_dump_device[4] = { 110static struct acpi_exdump_info acpi_ex_dump_device[4] = {
110 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL}, 111 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL},
111 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"},
112 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[0]), 112 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[0]),
113 "System Notify"}, 113 "System Notify"},
114 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[1]), 114 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[1]),
115 "Device Notify"} 115 "Device Notify"},
116 {ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(device.handler), "Handler"}
116}; 117};
117 118
118static struct acpi_exdump_info acpi_ex_dump_event[2] = { 119static struct acpi_exdump_info acpi_ex_dump_event[2] = {
@@ -142,17 +143,18 @@ static struct acpi_exdump_info acpi_ex_dump_mutex[5] = {
142 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.os_mutex), "OsMutex"} 143 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.os_mutex), "OsMutex"}
143}; 144};
144 145
145static struct acpi_exdump_info acpi_ex_dump_region[7] = { 146static struct acpi_exdump_info acpi_ex_dump_region[8] = {
146 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL}, 147 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL},
147 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"}, 148 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"},
148 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"}, 149 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"},
150 {ACPI_EXD_NODE, ACPI_EXD_OFFSET(region.node), "Parent Node"},
149 {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"}, 151 {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"},
150 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"}, 152 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"},
151 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.handler), "Handler"}, 153 {ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(region.handler), "Handler"},
152 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"} 154 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"}
153}; 155};
154 156
155static struct acpi_exdump_info acpi_ex_dump_power[5] = { 157static struct acpi_exdump_info acpi_ex_dump_power[6] = {
156 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL}, 158 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL},
157 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level), 159 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level),
158 "System Level"}, 160 "System Level"},
@@ -161,7 +163,8 @@ static struct acpi_exdump_info acpi_ex_dump_power[5] = {
161 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[0]), 163 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[0]),
162 "System Notify"}, 164 "System Notify"},
163 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[1]), 165 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[1]),
164 "Device Notify"} 166 "Device Notify"},
167 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.handler), "Handler"}
165}; 168};
166 169
167static struct acpi_exdump_info acpi_ex_dump_processor[7] = { 170static struct acpi_exdump_info acpi_ex_dump_processor[7] = {
@@ -225,7 +228,7 @@ static struct acpi_exdump_info acpi_ex_dump_reference[8] = {
225 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, 228 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"},
226 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.value), "Value"}, 229 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.value), "Value"},
227 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, 230 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"},
228 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, 231 {ACPI_EXD_NODE, ACPI_EXD_OFFSET(reference.node), "Node"},
229 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, 232 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"},
230 {ACPI_EXD_REFERENCE, 0, NULL} 233 {ACPI_EXD_REFERENCE, 0, NULL}
231}; 234};
@@ -234,16 +237,16 @@ static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = {
234 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler), 237 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler),
235 NULL}, 238 NULL},
236 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"}, 239 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"},
237 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.next), "Next"}, 240 {ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(address_space.next), "Next"},
238 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.region_list), 241 {ACPI_EXD_RGN_LIST, ACPI_EXD_OFFSET(address_space.region_list),
239 "Region List"}, 242 "Region List"},
240 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.node), "Node"}, 243 {ACPI_EXD_NODE, ACPI_EXD_OFFSET(address_space.node), "Node"},
241 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} 244 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"}
242}; 245};
243 246
244static struct acpi_exdump_info acpi_ex_dump_notify[7] = { 247static struct acpi_exdump_info acpi_ex_dump_notify[7] = {
245 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL}, 248 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL},
246 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"}, 249 {ACPI_EXD_NODE, ACPI_EXD_OFFSET(notify.node), "Node"},
247 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(notify.handler_type), "Handler Type"}, 250 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(notify.handler_type), "Handler Type"},
248 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.handler), "Handler"}, 251 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.handler), "Handler"},
249 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"}, 252 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"},
@@ -252,14 +255,31 @@ static struct acpi_exdump_info acpi_ex_dump_notify[7] = {
252 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.next[1]), "Next Device Notify"} 255 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.next[1]), "Next Device Notify"}
253}; 256};
254 257
258static struct acpi_exdump_info acpi_ex_dump_extra[6] = {
259 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_extra), NULL},
260 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.method_REG), "_REG Method"},
261 {ACPI_EXD_NODE, ACPI_EXD_OFFSET(extra.scope_node), "Scope Node"},
262 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.region_context),
263 "Region Context"},
264 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.aml_start), "Aml Start"},
265 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(extra.aml_length), "Aml Length"}
266};
267
268static struct acpi_exdump_info acpi_ex_dump_data[3] = {
269 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_data), NULL},
270 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(data.handler), "Handler"},
271 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(data.pointer), "Raw Data"}
272};
273
255/* Miscellaneous tables */ 274/* Miscellaneous tables */
256 275
257static struct acpi_exdump_info acpi_ex_dump_common[4] = { 276static struct acpi_exdump_info acpi_ex_dump_common[5] = {
258 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL}, 277 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL},
259 {ACPI_EXD_TYPE, 0, NULL}, 278 {ACPI_EXD_TYPE, 0, NULL},
260 {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count), 279 {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count),
261 "Reference Count"}, 280 "Reference Count"},
262 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"} 281 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"},
282 {ACPI_EXD_LIST, ACPI_EXD_OFFSET(common.next_object), "Object List"}
263}; 283};
264 284
265static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { 285static struct acpi_exdump_info acpi_ex_dump_field_common[7] = {
@@ -274,15 +294,17 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = {
274 "Field Bit Offset"}, 294 "Field Bit Offset"},
275 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset), 295 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset),
276 "Base Byte Offset"}, 296 "Base Byte Offset"},
277 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} 297 {ACPI_EXD_NODE, ACPI_EXD_OFFSET(common_field.node), "Parent Node"}
278}; 298};
279 299
280static struct acpi_exdump_info acpi_ex_dump_node[5] = { 300static struct acpi_exdump_info acpi_ex_dump_node[7] = {
281 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, 301 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL},
282 {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, 302 {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"},
283 {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, 303 {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"},
284 {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"}, 304 {ACPI_EXD_LIST, ACPI_EXD_NSOFFSET(object), "Object List"},
285 {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"} 305 {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(parent), "Parent"},
306 {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(child), "Child"},
307 {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(peer), "Peer"}
286}; 308};
287 309
288/* Dispatch table, indexed by object type */ 310/* Dispatch table, indexed by object type */
@@ -315,7 +337,9 @@ static struct acpi_exdump_info *acpi_ex_dump_info[] = {
315 acpi_ex_dump_address_handler, 337 acpi_ex_dump_address_handler,
316 NULL, 338 NULL,
317 NULL, 339 NULL,
318 NULL 340 NULL,
341 acpi_ex_dump_extra,
342 acpi_ex_dump_data
319}; 343};
320 344
321/******************************************************************************* 345/*******************************************************************************
@@ -340,6 +364,10 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
340 char *name; 364 char *name;
341 const char *reference_name; 365 const char *reference_name;
342 u8 count; 366 u8 count;
367 union acpi_operand_object *start;
368 union acpi_operand_object *data = NULL;
369 union acpi_operand_object *next;
370 struct acpi_namespace_node *node;
343 371
344 if (!info) { 372 if (!info) {
345 acpi_os_printf 373 acpi_os_printf
@@ -363,9 +391,9 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
363 391
364 case ACPI_EXD_TYPE: 392 case ACPI_EXD_TYPE:
365 393
366 acpi_ex_out_string("Type", 394 acpi_os_printf("%20s : %2.2X [%s]\n", "Type",
367 acpi_ut_get_object_type_name 395 obj_desc->common.type,
368 (obj_desc)); 396 acpi_ut_get_object_type_name(obj_desc));
369 break; 397 break;
370 398
371 case ACPI_EXD_UINT8: 399 case ACPI_EXD_UINT8:
@@ -433,6 +461,121 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
433 acpi_ex_dump_reference_obj(obj_desc); 461 acpi_ex_dump_reference_obj(obj_desc);
434 break; 462 break;
435 463
464 case ACPI_EXD_LIST:
465
466 start = *ACPI_CAST_PTR(void *, target);
467 next = start;
468
469 acpi_os_printf("%20s : %p", name, next);
470 if (next) {
471 acpi_os_printf("(%s %2.2X)",
472 acpi_ut_get_object_type_name
473 (next), next->common.type);
474
475 while (next->common.next_object) {
476 if ((next->common.type ==
477 ACPI_TYPE_LOCAL_DATA) && !data) {
478 data = next;
479 }
480
481 next = next->common.next_object;
482 acpi_os_printf("->%p(%s %2.2X)", next,
483 acpi_ut_get_object_type_name
484 (next),
485 next->common.type);
486
487 if ((next == start) || (next == data)) {
488 acpi_os_printf
489 ("\n**** Error: Object list appears to be circular linked");
490 break;
491 }
492 }
493 }
494
495 acpi_os_printf("\n", next);
496 break;
497
498 case ACPI_EXD_HDLR_LIST:
499
500 start = *ACPI_CAST_PTR(void *, target);
501 next = start;
502
503 acpi_os_printf("%20s : %p", name, next);
504 if (next) {
505 acpi_os_printf("(%s %2.2X)",
506 acpi_ut_get_object_type_name
507 (next), next->common.type);
508
509 while (next->address_space.next) {
510 if ((next->common.type ==
511 ACPI_TYPE_LOCAL_DATA) && !data) {
512 data = next;
513 }
514
515 next = next->address_space.next;
516 acpi_os_printf("->%p(%s %2.2X)", next,
517 acpi_ut_get_object_type_name
518 (next),
519 next->common.type);
520
521 if ((next == start) || (next == data)) {
522 acpi_os_printf
523 ("\n**** Error: Handler list appears to be circular linked");
524 break;
525 }
526 }
527 }
528
529 acpi_os_printf("\n", next);
530 break;
531
532 case ACPI_EXD_RGN_LIST:
533
534 start = *ACPI_CAST_PTR(void *, target);
535 next = start;
536
537 acpi_os_printf("%20s : %p", name, next);
538 if (next) {
539 acpi_os_printf("(%s %2.2X)",
540 acpi_ut_get_object_type_name
541 (next), next->common.type);
542
543 while (next->region.next) {
544 if ((next->common.type ==
545 ACPI_TYPE_LOCAL_DATA) && !data) {
546 data = next;
547 }
548
549 next = next->region.next;
550 acpi_os_printf("->%p(%s %2.2X)", next,
551 acpi_ut_get_object_type_name
552 (next),
553 next->common.type);
554
555 if ((next == start) || (next == data)) {
556 acpi_os_printf
557 ("\n**** Error: Region list appears to be circular linked");
558 break;
559 }
560 }
561 }
562
563 acpi_os_printf("\n", next);
564 break;
565
566 case ACPI_EXD_NODE:
567
568 node =
569 *ACPI_CAST_PTR(struct acpi_namespace_node *,
570 target);
571
572 acpi_os_printf("%20s : %p", name, node);
573 if (node) {
574 acpi_os_printf(" [%4.4s]", node->name.ascii);
575 }
576 acpi_os_printf("\n");
577 break;
578
436 default: 579 default:
437 580
438 acpi_os_printf("**** Invalid table opcode [%X] ****\n", 581 acpi_os_printf("**** Invalid table opcode [%X] ****\n",
@@ -821,10 +964,8 @@ void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags)
821 } 964 }
822 965
823 acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); 966 acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node));
824 acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); 967 acpi_os_printf("%20s : %2.2X [%s]\n", "Type",
825 acpi_ex_out_pointer("Attached Object", 968 node->type, acpi_ut_get_type_name(node->type));
826 acpi_ns_get_attached_object(node));
827 acpi_ex_out_pointer("Parent", node->parent);
828 969
829 acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node), 970 acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node),
830 acpi_ex_dump_node); 971 acpi_ex_dump_node);
@@ -1017,22 +1158,26 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
1017 ((struct acpi_namespace_node *)obj_desc)-> 1158 ((struct acpi_namespace_node *)obj_desc)->
1018 object); 1159 object);
1019 1160
1020 acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) 1161 obj_desc = ((struct acpi_namespace_node *)obj_desc)->object;
1021 obj_desc)->object, flags); 1162 goto dump_object;
1022 return_VOID;
1023 } 1163 }
1024 1164
1025 if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) { 1165 if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) {
1026 acpi_os_printf 1166 acpi_os_printf("%p is not an ACPI operand object: [%s]\n",
1027 ("ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n", 1167 obj_desc, acpi_ut_get_descriptor_name(obj_desc));
1028 obj_desc, acpi_ut_get_descriptor_name(obj_desc));
1029 return_VOID; 1168 return_VOID;
1030 } 1169 }
1031 1170
1032 if (obj_desc->common.type > ACPI_TYPE_NS_NODE_MAX) { 1171 /* Validate the object type */
1172
1173 if (obj_desc->common.type > ACPI_TYPE_LOCAL_MAX) {
1174 acpi_os_printf("Not a known object type: %2.2X\n",
1175 obj_desc->common.type);
1033 return_VOID; 1176 return_VOID;
1034 } 1177 }
1035 1178
1179dump_object:
1180
1036 /* Common Fields */ 1181 /* Common Fields */
1037 1182
1038 acpi_ex_dump_object(obj_desc, acpi_ex_dump_common); 1183 acpi_ex_dump_object(obj_desc, acpi_ex_dump_common);
@@ -1040,6 +1185,22 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
1040 /* Object-specific fields */ 1185 /* Object-specific fields */
1041 1186
1042 acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]); 1187 acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]);
1188
1189 if (obj_desc->common.type == ACPI_TYPE_REGION) {
1190 obj_desc = obj_desc->common.next_object;
1191 if (obj_desc->common.type > ACPI_TYPE_LOCAL_MAX) {
1192 acpi_os_printf
1193 ("Secondary object is not a known object type: %2.2X\n",
1194 obj_desc->common.type);
1195
1196 return_VOID;
1197 }
1198
1199 acpi_os_printf("\nExtra attached Object (%p):\n", obj_desc);
1200 acpi_ex_dump_object(obj_desc,
1201 acpi_ex_dump_info[obj_desc->common.type]);
1202 }
1203
1043 return_VOID; 1204 return_VOID;
1044} 1205}
1045 1206
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index cfd875243421..68d97441432c 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index 49fb742d61b9..1d1b27a96c5b 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exmisc.c b/drivers/acpi/acpica/exmisc.c
index 65d93607f368..2207e624f538 100644
--- a/drivers/acpi/acpica/exmisc.c
+++ b/drivers/acpi/acpica/exmisc.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exmutex.c b/drivers/acpi/acpica/exmutex.c
index 7be0205ad067..b49ea2a95f4f 100644
--- a/drivers/acpi/acpica/exmutex.c
+++ b/drivers/acpi/acpica/exmutex.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exnames.c b/drivers/acpi/acpica/exnames.c
index 14689dec4960..dbb03b544e8c 100644
--- a/drivers/acpi/acpica/exnames.c
+++ b/drivers/acpi/acpica/exnames.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c
index d74cea416ca0..1b8e94104407 100644
--- a/drivers/acpi/acpica/exoparg1.c
+++ b/drivers/acpi/acpica/exoparg1.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exoparg2.c b/drivers/acpi/acpica/exoparg2.c
index d6fa0fce1fc9..2ede656ee26a 100644
--- a/drivers/acpi/acpica/exoparg2.c
+++ b/drivers/acpi/acpica/exoparg2.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c
index bc042adf8804..363767cf01e5 100644
--- a/drivers/acpi/acpica/exoparg3.c
+++ b/drivers/acpi/acpica/exoparg3.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exoparg6.c b/drivers/acpi/acpica/exoparg6.c
index 4459e32c683d..29e9e99f7fe3 100644
--- a/drivers/acpi/acpica/exoparg6.c
+++ b/drivers/acpi/acpica/exoparg6.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c
index 5a588611ab48..ee3f872870bc 100644
--- a/drivers/acpi/acpica/exprep.c
+++ b/drivers/acpi/acpica/exprep.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 9d28867e60dc..cd5288a257a9 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exresnte.c b/drivers/acpi/acpica/exresnte.c
index 7ca6925a87ca..ab060261b43e 100644
--- a/drivers/acpi/acpica/exresnte.c
+++ b/drivers/acpi/acpica/exresnte.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c
index 1606524312e3..3cde553bcbe1 100644
--- a/drivers/acpi/acpica/exresolv.c
+++ b/drivers/acpi/acpica/exresolv.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c
index be3f66973ee8..3af8de3fcea4 100644
--- a/drivers/acpi/acpica/exresop.c
+++ b/drivers/acpi/acpica/exresop.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c
index f0b09bf9887d..daf49f7ea311 100644
--- a/drivers/acpi/acpica/exstore.c
+++ b/drivers/acpi/acpica/exstore.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exstoren.c b/drivers/acpi/acpica/exstoren.c
index 20d809d90c5b..04bd16c08f9e 100644
--- a/drivers/acpi/acpica/exstoren.c
+++ b/drivers/acpi/acpica/exstoren.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exstorob.c b/drivers/acpi/acpica/exstorob.c
index 26e371073b1a..fd11018b0168 100644
--- a/drivers/acpi/acpica/exstorob.c
+++ b/drivers/acpi/acpica/exstorob.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c
index 6578dee2e51b..841caed11c08 100644
--- a/drivers/acpi/acpica/exsystem.c
+++ b/drivers/acpi/acpica/exsystem.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c
index 99dc7b287d55..5b16c5484bee 100644
--- a/drivers/acpi/acpica/exutils.c
+++ b/drivers/acpi/acpica/exutils.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c
index 3d36df828f52..1e66d960fc11 100644
--- a/drivers/acpi/acpica/hwacpi.c
+++ b/drivers/acpi/acpica/hwacpi.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwesleep.c b/drivers/acpi/acpica/hwesleep.c
index 414076818d40..858fdd6be598 100644
--- a/drivers/acpi/acpica/hwesleep.c
+++ b/drivers/acpi/acpica/hwesleep.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c
index 96540506058f..2e6caabba07a 100644
--- a/drivers/acpi/acpica/hwgpe.c
+++ b/drivers/acpi/acpica/hwgpe.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwpci.c b/drivers/acpi/acpica/hwpci.c
index 0889a629505f..e701d8c33dbf 100644
--- a/drivers/acpi/acpica/hwpci.c
+++ b/drivers/acpi/acpica/hwpci.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 12e6cff54f78..e0fd9b4978cd 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -6,7 +6,7 @@
6 ******************************************************************************/ 6 ******************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c
index e3828cc4361b..d590693eb54e 100644
--- a/drivers/acpi/acpica/hwsleep.c
+++ b/drivers/acpi/acpica/hwsleep.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwtimer.c b/drivers/acpi/acpica/hwtimer.c
index 3c498dc1636e..76ab5c1a814e 100644
--- a/drivers/acpi/acpica/hwtimer.c
+++ b/drivers/acpi/acpica/hwtimer.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c
index eab70d58852a..6b919127cd9d 100644
--- a/drivers/acpi/acpica/hwvalid.c
+++ b/drivers/acpi/acpica/hwvalid.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index b4b47db2dee2..96d007df65ec 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 15dddc10fc9b..6921c7f3d208 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 14f65f6345b9..f1249e3463be 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c
index fd1ff54cda19..607eb9e5150d 100644
--- a/drivers/acpi/acpica/nsalloc.c
+++ b/drivers/acpi/acpica/nsalloc.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsarguments.c b/drivers/acpi/acpica/nsarguments.c
index 74b24c82707e..80fcfc8c9c1b 100644
--- a/drivers/acpi/acpica/nsarguments.c
+++ b/drivers/acpi/acpica/nsarguments.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsconvert.c b/drivers/acpi/acpica/nsconvert.c
index acd2964c2690..b55642c4ee58 100644
--- a/drivers/acpi/acpica/nsconvert.c
+++ b/drivers/acpi/acpica/nsconvert.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 48b9c6f12643..3d88ef4a3e0d 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c
index 283762511b73..42d37109aa5d 100644
--- a/drivers/acpi/acpica/nsdumpdv.c
+++ b/drivers/acpi/acpica/nsdumpdv.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c
index 963ceef063f8..e634a05974db 100644
--- a/drivers/acpi/acpica/nseval.c
+++ b/drivers/acpi/acpica/nseval.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index 3a0423af968c..5b74677bf74d 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsload.c b/drivers/acpi/acpica/nsload.c
index 89ec645e7730..7ae521ce8d3f 100644
--- a/drivers/acpi/acpica/nsload.c
+++ b/drivers/acpi/acpica/nsload.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c
index 90a0380fb8a0..7eee0a6f02f6 100644
--- a/drivers/acpi/acpica/nsnames.c
+++ b/drivers/acpi/acpica/nsnames.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsobject.c b/drivers/acpi/acpica/nsobject.c
index 7a736f4d1fd8..fe54a8c73b8c 100644
--- a/drivers/acpi/acpica/nsobject.c
+++ b/drivers/acpi/acpica/nsobject.c
@@ -6,7 +6,7 @@
6 ******************************************************************************/ 6 ******************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
@@ -222,13 +222,19 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node)
222 } 222 }
223 } 223 }
224 224
225 /* Clear the entry in all cases */ 225 /* Clear the Node entry in all cases */
226 226
227 node->object = NULL; 227 node->object = NULL;
228 if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_OPERAND) { 228 if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_OPERAND) {
229
230 /* Unlink object from front of possible object list */
231
229 node->object = obj_desc->common.next_object; 232 node->object = obj_desc->common.next_object;
233
234 /* Handle possible 2-descriptor object */
235
230 if (node->object && 236 if (node->object &&
231 ((node->object)->common.type != ACPI_TYPE_LOCAL_DATA)) { 237 (node->object->common.type != ACPI_TYPE_LOCAL_DATA)) {
232 node->object = node->object->common.next_object; 238 node->object = node->object->common.next_object;
233 } 239 }
234 } 240 }
diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c
index 177857340271..e83cff31754b 100644
--- a/drivers/acpi/acpica/nsparse.c
+++ b/drivers/acpi/acpica/nsparse.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index d2855d9857c4..392910ffbed9 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsprepkg.c b/drivers/acpi/acpica/nsprepkg.c
index 3d5391f9bcb5..68f725839eb6 100644
--- a/drivers/acpi/acpica/nsprepkg.c
+++ b/drivers/acpi/acpica/nsprepkg.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -132,12 +132,12 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
132 * Decode the type of the expected package contents 132 * Decode the type of the expected package contents
133 * 133 *
134 * PTYPE1 packages contain no subpackages 134 * PTYPE1 packages contain no subpackages
135 * PTYPE2 packages contain sub-packages 135 * PTYPE2 packages contain subpackages
136 */ 136 */
137 switch (package->ret_info.type) { 137 switch (package->ret_info.type) {
138 case ACPI_PTYPE1_FIXED: 138 case ACPI_PTYPE1_FIXED:
139 /* 139 /*
140 * The package count is fixed and there are no sub-packages 140 * The package count is fixed and there are no subpackages
141 * 141 *
142 * If package is too small, exit. 142 * If package is too small, exit.
143 * If package is larger than expected, issue warning but continue 143 * If package is larger than expected, issue warning but continue
@@ -169,7 +169,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
169 169
170 case ACPI_PTYPE1_VAR: 170 case ACPI_PTYPE1_VAR:
171 /* 171 /*
172 * The package count is variable, there are no sub-packages, and all 172 * The package count is variable, there are no subpackages, and all
173 * elements must be of the same type 173 * elements must be of the same type
174 */ 174 */
175 for (i = 0; i < count; i++) { 175 for (i = 0; i < count; i++) {
@@ -185,7 +185,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
185 185
186 case ACPI_PTYPE1_OPTION: 186 case ACPI_PTYPE1_OPTION:
187 /* 187 /*
188 * The package count is variable, there are no sub-packages. There are 188 * The package count is variable, there are no subpackages. There are
189 * a fixed number of required elements, and a variable number of 189 * a fixed number of required elements, and a variable number of
190 * optional elements. 190 * optional elements.
191 * 191 *
@@ -242,7 +242,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
242 elements++; 242 elements++;
243 count--; 243 count--;
244 244
245 /* Examine the sub-packages */ 245 /* Examine the subpackages */
246 246
247 status = 247 status =
248 acpi_ns_check_package_list(info, package, elements, count); 248 acpi_ns_check_package_list(info, package, elements, count);
@@ -250,7 +250,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
250 250
251 case ACPI_PTYPE2_PKG_COUNT: 251 case ACPI_PTYPE2_PKG_COUNT:
252 252
253 /* First element is the (Integer) count of sub-packages to follow */ 253 /* First element is the (Integer) count of subpackages to follow */
254 254
255 status = acpi_ns_check_object_type(info, elements, 255 status = acpi_ns_check_object_type(info, elements,
256 ACPI_RTYPE_INTEGER, 0); 256 ACPI_RTYPE_INTEGER, 0);
@@ -270,7 +270,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
270 count = expected_count; 270 count = expected_count;
271 elements++; 271 elements++;
272 272
273 /* Examine the sub-packages */ 273 /* Examine the subpackages */
274 274
275 status = 275 status =
276 acpi_ns_check_package_list(info, package, elements, count); 276 acpi_ns_check_package_list(info, package, elements, count);
@@ -283,9 +283,9 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
283 case ACPI_PTYPE2_FIX_VAR: 283 case ACPI_PTYPE2_FIX_VAR:
284 /* 284 /*
285 * These types all return a single Package that consists of a 285 * These types all return a single Package that consists of a
286 * variable number of sub-Packages. 286 * variable number of subpackages.
287 * 287 *
288 * First, ensure that the first element is a sub-Package. If not, 288 * First, ensure that the first element is a subpackage. If not,
289 * the BIOS may have incorrectly returned the object as a single 289 * the BIOS may have incorrectly returned the object as a single
290 * package instead of a Package of Packages (a common error if 290 * package instead of a Package of Packages (a common error if
291 * there is only one entry). We may be able to repair this by 291 * there is only one entry). We may be able to repair this by
@@ -310,7 +310,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
310 count = 1; 310 count = 1;
311 } 311 }
312 312
313 /* Examine the sub-packages */ 313 /* Examine the subpackages */
314 314
315 status = 315 status =
316 acpi_ns_check_package_list(info, package, elements, count); 316 acpi_ns_check_package_list(info, package, elements, count);
@@ -370,9 +370,9 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,
370 u32 j; 370 u32 j;
371 371
372 /* 372 /*
373 * Validate each sub-Package in the parent Package 373 * Validate each subpackage in the parent Package
374 * 374 *
375 * NOTE: assumes list of sub-packages contains no NULL elements. 375 * NOTE: assumes list of subpackages contains no NULL elements.
376 * Any NULL elements should have been removed by earlier call 376 * Any NULL elements should have been removed by earlier call
377 * to acpi_ns_remove_null_elements. 377 * to acpi_ns_remove_null_elements.
378 */ 378 */
@@ -389,7 +389,7 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,
389 return (status); 389 return (status);
390 } 390 }
391 391
392 /* Examine the different types of expected sub-packages */ 392 /* Examine the different types of expected subpackages */
393 393
394 info->parent_package = sub_package; 394 info->parent_package = sub_package;
395 switch (package->ret_info.type) { 395 switch (package->ret_info.type) {
@@ -450,14 +450,14 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,
450 450
451 case ACPI_PTYPE2_FIXED: 451 case ACPI_PTYPE2_FIXED:
452 452
453 /* Each sub-package has a fixed length */ 453 /* Each subpackage has a fixed length */
454 454
455 expected_count = package->ret_info2.count; 455 expected_count = package->ret_info2.count;
456 if (sub_package->package.count < expected_count) { 456 if (sub_package->package.count < expected_count) {
457 goto package_too_small; 457 goto package_too_small;
458 } 458 }
459 459
460 /* Check the type of each sub-package element */ 460 /* Check the type of each subpackage element */
461 461
462 for (j = 0; j < expected_count; j++) { 462 for (j = 0; j < expected_count; j++) {
463 status = 463 status =
@@ -475,14 +475,14 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,
475 475
476 case ACPI_PTYPE2_MIN: 476 case ACPI_PTYPE2_MIN:
477 477
478 /* Each sub-package has a variable but minimum length */ 478 /* Each subpackage has a variable but minimum length */
479 479
480 expected_count = package->ret_info.count1; 480 expected_count = package->ret_info.count1;
481 if (sub_package->package.count < expected_count) { 481 if (sub_package->package.count < expected_count) {
482 goto package_too_small; 482 goto package_too_small;
483 } 483 }
484 484
485 /* Check the type of each sub-package element */ 485 /* Check the type of each subpackage element */
486 486
487 status = 487 status =
488 acpi_ns_check_package_elements(info, sub_elements, 488 acpi_ns_check_package_elements(info, sub_elements,
@@ -531,7 +531,7 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,
531 (*sub_elements)->integer.value = expected_count; 531 (*sub_elements)->integer.value = expected_count;
532 } 532 }
533 533
534 /* Check the type of each sub-package element */ 534 /* Check the type of each subpackage element */
535 535
536 status = 536 status =
537 acpi_ns_check_package_elements(info, 537 acpi_ns_check_package_elements(info,
@@ -557,10 +557,10 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,
557 557
558package_too_small: 558package_too_small:
559 559
560 /* The sub-package count was smaller than required */ 560 /* The subpackage count was smaller than required */
561 561
562 ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, info->node_flags, 562 ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, info->node_flags,
563 "Return Sub-Package[%u] is too small - found %u elements, expected %u", 563 "Return SubPackage[%u] is too small - found %u elements, expected %u",
564 i, sub_package->package.count, expected_count)); 564 i, sub_package->package.count, expected_count));
565 565
566 return (AE_AML_OPERAND_VALUE); 566 return (AE_AML_OPERAND_VALUE);
diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c
index a05afff50eb9..7e417aa5c91e 100644
--- a/drivers/acpi/acpica/nsrepair.c
+++ b/drivers/acpi/acpica/nsrepair.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -207,13 +207,30 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
207 * this predefined name. Either one return value is expected, or none, 207 * this predefined name. Either one return value is expected, or none,
208 * for both methods and other objects. 208 * for both methods and other objects.
209 * 209 *
210 * Exit now if there is no return object. Warning if one was expected. 210 * Try to fix if there was no return object. Warning if failed to fix.
211 */ 211 */
212 if (!return_object) { 212 if (!return_object) {
213 if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) { 213 if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) {
214 ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, 214 if (package_index != ACPI_NOT_PACKAGE_ELEMENT) {
215 ACPI_WARN_ALWAYS, 215 ACPI_WARN_PREDEFINED((AE_INFO,
216 "Missing expected return value")); 216 info->full_pathname,
217 ACPI_WARN_ALWAYS,
218 "Found unexpected NULL package element"));
219
220 status =
221 acpi_ns_repair_null_element(info,
222 expected_btypes,
223 package_index,
224 return_object_ptr);
225 if (ACPI_SUCCESS(status)) {
226 return (AE_OK); /* Repair was successful */
227 }
228 } else {
229 ACPI_WARN_PREDEFINED((AE_INFO,
230 info->full_pathname,
231 ACPI_WARN_ALWAYS,
232 "Missing expected return value"));
233 }
217 234
218 return (AE_AML_NO_RETURN_VALUE); 235 return (AE_AML_NO_RETURN_VALUE);
219 } 236 }
@@ -448,7 +465,7 @@ acpi_ns_repair_null_element(struct acpi_evaluate_info * info,
448 * RETURN: None. 465 * RETURN: None.
449 * 466 *
450 * DESCRIPTION: Remove all NULL package elements from packages that contain 467 * DESCRIPTION: Remove all NULL package elements from packages that contain
451 * a variable number of sub-packages. For these types of 468 * a variable number of subpackages. For these types of
452 * packages, NULL elements can be safely removed. 469 * packages, NULL elements can be safely removed.
453 * 470 *
454 *****************************************************************************/ 471 *****************************************************************************/
@@ -469,7 +486,7 @@ acpi_ns_remove_null_elements(struct acpi_evaluate_info *info,
469 /* 486 /*
470 * We can safely remove all NULL elements from these package types: 487 * We can safely remove all NULL elements from these package types:
471 * PTYPE1_VAR packages contain a variable number of simple data types. 488 * PTYPE1_VAR packages contain a variable number of simple data types.
472 * PTYPE2 packages contain a variable number of sub-packages. 489 * PTYPE2 packages contain a variable number of subpackages.
473 */ 490 */
474 switch (package_type) { 491 switch (package_type) {
475 case ACPI_PTYPE1_VAR: 492 case ACPI_PTYPE1_VAR:
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index 6a25d320b169..b09e6bef72b8 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
@@ -432,8 +432,8 @@ acpi_ns_repair_CID(struct acpi_evaluate_info *info,
432 * DESCRIPTION: Repair for the _CST object: 432 * DESCRIPTION: Repair for the _CST object:
433 * 1. Sort the list ascending by C state type 433 * 1. Sort the list ascending by C state type
434 * 2. Ensure type cannot be zero 434 * 2. Ensure type cannot be zero
435 * 3. A sub-package count of zero means _CST is meaningless 435 * 3. A subpackage count of zero means _CST is meaningless
436 * 4. Count must match the number of C state sub-packages 436 * 4. Count must match the number of C state subpackages
437 * 437 *
438 *****************************************************************************/ 438 *****************************************************************************/
439 439
@@ -611,6 +611,7 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info,
611 union acpi_operand_object **top_object_list; 611 union acpi_operand_object **top_object_list;
612 union acpi_operand_object **sub_object_list; 612 union acpi_operand_object **sub_object_list;
613 union acpi_operand_object *obj_desc; 613 union acpi_operand_object *obj_desc;
614 union acpi_operand_object *sub_package;
614 u32 element_count; 615 u32 element_count;
615 u32 index; 616 u32 index;
616 617
@@ -619,8 +620,17 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info,
619 top_object_list = package_object->package.elements; 620 top_object_list = package_object->package.elements;
620 element_count = package_object->package.count; 621 element_count = package_object->package.count;
621 622
622 for (index = 0; index < element_count; index++) { 623 /* Examine each subpackage */
623 sub_object_list = (*top_object_list)->package.elements; 624
625 for (index = 0; index < element_count; index++, top_object_list++) {
626 sub_package = *top_object_list;
627 sub_object_list = sub_package->package.elements;
628
629 /* Check for minimum required element count */
630
631 if (sub_package->package.count < 4) {
632 continue;
633 }
624 634
625 /* 635 /*
626 * If the BIOS has erroneously reversed the _PRT source_name (index 2) 636 * If the BIOS has erroneously reversed the _PRT source_name (index 2)
@@ -634,15 +644,12 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info,
634 sub_object_list[2] = obj_desc; 644 sub_object_list[2] = obj_desc;
635 info->return_flags |= ACPI_OBJECT_REPAIRED; 645 info->return_flags |= ACPI_OBJECT_REPAIRED;
636 646
637 ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, 647 ACPI_WARN_PREDEFINED((AE_INFO,
648 info->full_pathname,
638 info->node_flags, 649 info->node_flags,
639 "PRT[%X]: Fixed reversed SourceName and SourceIndex", 650 "PRT[%X]: Fixed reversed SourceName and SourceIndex",
640 index)); 651 index));
641 } 652 }
642
643 /* Point to the next union acpi_operand_object in the top level package */
644
645 top_object_list++;
646 } 653 }
647 654
648 return (AE_OK); 655 return (AE_OK);
@@ -679,7 +686,7 @@ acpi_ns_repair_PSS(struct acpi_evaluate_info *info,
679 u32 i; 686 u32 i;
680 687
681 /* 688 /*
682 * Entries (sub-packages) in the _PSS Package must be sorted by power 689 * Entries (subpackages) in the _PSS Package must be sorted by power
683 * dissipation, in descending order. If it appears that the list is 690 * dissipation, in descending order. If it appears that the list is
684 * incorrectly sorted, sort it. We sort by cpu_frequency, since this 691 * incorrectly sorted, sort it. We sort by cpu_frequency, since this
685 * should be proportional to the power. 692 * should be proportional to the power.
@@ -767,9 +774,9 @@ acpi_ns_repair_TSS(struct acpi_evaluate_info *info,
767 * 774 *
768 * PARAMETERS: info - Method execution information block 775 * PARAMETERS: info - Method execution information block
769 * return_object - Pointer to the top-level returned object 776 * return_object - Pointer to the top-level returned object
770 * start_index - Index of the first sub-package 777 * start_index - Index of the first subpackage
771 * expected_count - Minimum length of each sub-package 778 * expected_count - Minimum length of each subpackage
772 * sort_index - Sub-package entry to sort on 779 * sort_index - Subpackage entry to sort on
773 * sort_direction - Ascending or descending 780 * sort_direction - Ascending or descending
774 * sort_key_name - Name of the sort_index field 781 * sort_key_name - Name of the sort_index field
775 * 782 *
@@ -805,7 +812,7 @@ acpi_ns_check_sorted_list(struct acpi_evaluate_info *info,
805 } 812 }
806 813
807 /* 814 /*
808 * NOTE: assumes list of sub-packages contains no NULL elements. 815 * NOTE: assumes list of subpackages contains no NULL elements.
809 * Any NULL elements should have been removed by earlier call 816 * Any NULL elements should have been removed by earlier call
810 * to acpi_ns_remove_null_elements. 817 * to acpi_ns_remove_null_elements.
811 */ 818 */
@@ -832,7 +839,7 @@ acpi_ns_check_sorted_list(struct acpi_evaluate_info *info,
832 return (AE_AML_OPERAND_TYPE); 839 return (AE_AML_OPERAND_TYPE);
833 } 840 }
834 841
835 /* Each sub-package must have the minimum length */ 842 /* Each subpackage must have the minimum length */
836 843
837 if ((*outer_elements)->package.count < expected_count) { 844 if ((*outer_elements)->package.count < expected_count) {
838 return (AE_AML_PACKAGE_LIMIT); 845 return (AE_AML_PACKAGE_LIMIT);
diff --git a/drivers/acpi/acpica/nssearch.c b/drivers/acpi/acpica/nssearch.c
index 47420faef073..af1cc42a8aa1 100644
--- a/drivers/acpi/acpica/nssearch.c
+++ b/drivers/acpi/acpica/nssearch.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index 4a0665b6bcc1..4a5e3f5c0ff7 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c
index e81f15ef659a..4758a1f2ce22 100644
--- a/drivers/acpi/acpica/nswalk.c
+++ b/drivers/acpi/acpica/nswalk.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index d6b33bc7bab0..4bd558bf10d2 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -6,7 +6,7 @@
6 ******************************************************************************/ 6 ******************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index 3a4bd3ff49a3..8c6c11ce9760 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/nsxfobj.c b/drivers/acpi/acpica/nsxfobj.c
index 0e6d79e462d4..dae9401be7a2 100644
--- a/drivers/acpi/acpica/nsxfobj.c
+++ b/drivers/acpi/acpica/nsxfobj.c
@@ -6,7 +6,7 @@
6 ******************************************************************************/ 6 ******************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2013, Intel Corp. 9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 91a5a69db80c..314d314340ae 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index 065b44ae538f..646d1a3f6e27 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c
index 95dc608a66a8..af1f46cd37a5 100644
--- a/drivers/acpi/acpica/psobject.c
+++ b/drivers/acpi/acpica/psobject.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psopcode.c b/drivers/acpi/acpica/psopcode.c
index 1b659e59710a..1755d2ac5656 100644
--- a/drivers/acpi/acpica/psopcode.c
+++ b/drivers/acpi/acpica/psopcode.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psopinfo.c b/drivers/acpi/acpica/psopinfo.c
index b0c9787dbe61..0d8d37ffd04d 100644
--- a/drivers/acpi/acpica/psopinfo.c
+++ b/drivers/acpi/acpica/psopinfo.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index 79d9a28dedef..6d27b597394e 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psscope.c b/drivers/acpi/acpica/psscope.c
index 6a4b6fb39f32..32d250feea21 100644
--- a/drivers/acpi/acpica/psscope.c
+++ b/drivers/acpi/acpica/psscope.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/pstree.c b/drivers/acpi/acpica/pstree.c
index 877dc0de8df3..0b64181e7720 100644
--- a/drivers/acpi/acpica/pstree.c
+++ b/drivers/acpi/acpica/pstree.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psutils.c b/drivers/acpi/acpica/psutils.c
index 91fa73a6e55e..3cd48802eede 100644
--- a/drivers/acpi/acpica/psutils.c
+++ b/drivers/acpi/acpica/psutils.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/pswalk.c b/drivers/acpi/acpica/pswalk.c
index abd65624754f..9cb07e1e76d9 100644
--- a/drivers/acpi/acpica/pswalk.c
+++ b/drivers/acpi/acpica/pswalk.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c
index fcb7a840e996..e135acaa5e1c 100644
--- a/drivers/acpi/acpica/psxface.c
+++ b/drivers/acpi/acpica/psxface.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rsaddr.c b/drivers/acpi/acpica/rsaddr.c
index f3a9276ac665..916fd095ff34 100644
--- a/drivers/acpi/acpica/rsaddr.c
+++ b/drivers/acpi/acpica/rsaddr.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index b60c9cf82862..689556744b03 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -636,7 +636,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
636 636
637 for (index = 0; index < number_of_elements; index++) { 637 for (index = 0; index < number_of_elements; index++) {
638 638
639 /* Dereference the sub-package */ 639 /* Dereference the subpackage */
640 640
641 package_element = *top_object_list; 641 package_element = *top_object_list;
642 642
diff --git a/drivers/acpi/acpica/rscreate.c b/drivers/acpi/acpica/rscreate.c
index 3a2ace93e62c..75d369050657 100644
--- a/drivers/acpi/acpica/rscreate.c
+++ b/drivers/acpi/acpica/rscreate.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -273,7 +273,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
273 */ 273 */
274 user_prt->length = (sizeof(struct acpi_pci_routing_table) - 4); 274 user_prt->length = (sizeof(struct acpi_pci_routing_table) - 4);
275 275
276 /* Each sub-package must be of length 4 */ 276 /* Each subpackage must be of length 4 */
277 277
278 if ((*top_object_list)->package.count != 4) { 278 if ((*top_object_list)->package.count != 4) {
279 ACPI_ERROR((AE_INFO, 279 ACPI_ERROR((AE_INFO,
@@ -283,7 +283,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
283 } 283 }
284 284
285 /* 285 /*
286 * Dereference the sub-package. 286 * Dereference the subpackage.
287 * The sub_object_list will now point to an array of the four IRQ 287 * The sub_object_list will now point to an array of the four IRQ
288 * elements: [Address, Pin, Source, source_index] 288 * elements: [Address, Pin, Source, source_index]
289 */ 289 */
@@ -292,7 +292,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
292 /* 1) First subobject: Dereference the PRT.Address */ 292 /* 1) First subobject: Dereference the PRT.Address */
293 293
294 obj_desc = sub_object_list[0]; 294 obj_desc = sub_object_list[0];
295 if (obj_desc->common.type != ACPI_TYPE_INTEGER) { 295 if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) {
296 ACPI_ERROR((AE_INFO, 296 ACPI_ERROR((AE_INFO,
297 "(PRT[%u].Address) Need Integer, found %s", 297 "(PRT[%u].Address) Need Integer, found %s",
298 index, 298 index,
@@ -305,7 +305,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
305 /* 2) Second subobject: Dereference the PRT.Pin */ 305 /* 2) Second subobject: Dereference the PRT.Pin */
306 306
307 obj_desc = sub_object_list[1]; 307 obj_desc = sub_object_list[1];
308 if (obj_desc->common.type != ACPI_TYPE_INTEGER) { 308 if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) {
309 ACPI_ERROR((AE_INFO, 309 ACPI_ERROR((AE_INFO,
310 "(PRT[%u].Pin) Need Integer, found %s", 310 "(PRT[%u].Pin) Need Integer, found %s",
311 index, 311 index,
@@ -394,7 +394,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
394 /* 4) Fourth subobject: Dereference the PRT.source_index */ 394 /* 4) Fourth subobject: Dereference the PRT.source_index */
395 395
396 obj_desc = sub_object_list[3]; 396 obj_desc = sub_object_list[3];
397 if (obj_desc->common.type != ACPI_TYPE_INTEGER) { 397 if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) {
398 ACPI_ERROR((AE_INFO, 398 ACPI_ERROR((AE_INFO,
399 "(PRT[%u].SourceIndex) Need Integer, found %s", 399 "(PRT[%u].SourceIndex) Need Integer, found %s",
400 index, 400 index,
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c
index 8a2d4986b0aa..c3c56b5a9788 100644
--- a/drivers/acpi/acpica/rsdump.c
+++ b/drivers/acpi/acpica/rsdump.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,8 @@
47 47
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsdump") 49ACPI_MODULE_NAME("rsdump")
50#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 50
51#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
51/* Local prototypes */ 52/* Local prototypes */
52static void acpi_rs_out_string(char *title, char *value); 53static void acpi_rs_out_string(char *title, char *value);
53 54
diff --git a/drivers/acpi/acpica/rsdumpinfo.c b/drivers/acpi/acpica/rsdumpinfo.c
index 46192bd53653..2f9332d5c973 100644
--- a/drivers/acpi/acpica/rsdumpinfo.c
+++ b/drivers/acpi/acpica/rsdumpinfo.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsdumpinfo") 49ACPI_MODULE_NAME("rsdumpinfo")
50 50
51#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 51#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
52#define ACPI_RSD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_resource_data,f) 52#define ACPI_RSD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_resource_data,f)
53#define ACPI_PRT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_pci_routing_table,f) 53#define ACPI_PRT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_pci_routing_table,f)
54#define ACPI_RSD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_rsdump_info)) 54#define ACPI_RSD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_rsdump_info))
diff --git a/drivers/acpi/acpica/rsinfo.c b/drivers/acpi/acpica/rsinfo.c
index 41fed78e0de6..9d3f8a9a24bd 100644
--- a/drivers/acpi/acpica/rsinfo.c
+++ b/drivers/acpi/acpica/rsinfo.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -132,8 +132,7 @@ struct acpi_rsconvert_info *acpi_gbl_convert_resource_serial_bus_dispatch[] = {
132 acpi_rs_convert_uart_serial_bus, 132 acpi_rs_convert_uart_serial_bus,
133}; 133};
134 134
135#ifdef ACPI_FUTURE_USAGE 135#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
136#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
137 136
138/* Dispatch table for resource dump functions */ 137/* Dispatch table for resource dump functions */
139 138
@@ -168,7 +167,6 @@ struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = {
168}; 167};
169#endif 168#endif
170 169
171#endif /* ACPI_FUTURE_USAGE */
172/* 170/*
173 * Base sizes for external AML resource descriptors, indexed by internal type. 171 * Base sizes for external AML resource descriptors, indexed by internal type.
174 * Includes size of the descriptor header (1 byte for small descriptors, 172 * Includes size of the descriptor header (1 byte for small descriptors,
diff --git a/drivers/acpi/acpica/rsio.c b/drivers/acpi/acpica/rsio.c
index ca183755a6f9..19d64873290a 100644
--- a/drivers/acpi/acpica/rsio.c
+++ b/drivers/acpi/acpica/rsio.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rsirq.c b/drivers/acpi/acpica/rsirq.c
index 364decc1028a..3461f7db26df 100644
--- a/drivers/acpi/acpica/rsirq.c
+++ b/drivers/acpi/acpica/rsirq.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rslist.c b/drivers/acpi/acpica/rslist.c
index 6053aa182093..77291293af64 100644
--- a/drivers/acpi/acpica/rslist.c
+++ b/drivers/acpi/acpica/rslist.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rsmemory.c b/drivers/acpi/acpica/rsmemory.c
index ebc773a1b350..eab4483ff5f8 100644
--- a/drivers/acpi/acpica/rsmemory.c
+++ b/drivers/acpi/acpica/rsmemory.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c
index c99cec9cefde..41eea4bc089c 100644
--- a/drivers/acpi/acpica/rsmisc.c
+++ b/drivers/acpi/acpica/rsmisc.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rsserial.c b/drivers/acpi/acpica/rsserial.c
index fe49fc43e10f..9e8407223d95 100644
--- a/drivers/acpi/acpica/rsserial.c
+++ b/drivers/acpi/acpica/rsserial.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index 14a7982c9961..897a5ceb0420 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index 01e476988aae..877ab9202133 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index 8f89263ac47e..ec14588254d4 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/tbfind.c b/drivers/acpi/acpica/tbfind.c
index e4f4f02d49e7..c12003947bd5 100644
--- a/drivers/acpi/acpica/tbfind.c
+++ b/drivers/acpi/acpica/tbfind.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 634357d51fe9..e3040947e9a0 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -292,10 +292,11 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
292 new_table = acpi_os_map_memory(new_address, new_table_length); 292 new_table = acpi_os_map_memory(new_address, new_table_length);
293 if (!new_table) { 293 if (!new_table) {
294 ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY, 294 ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
295 "%4.4s %p Attempted physical table override failed", 295 "%4.4s " ACPI_PRINTF_UINT
296 " Attempted physical table override failed",
296 table_header->signature, 297 table_header->signature,
297 ACPI_CAST_PTR(void, 298 ACPI_FORMAT_TO_UINT(table_desc->
298 table_desc->address))); 299 address)));
299 return (NULL); 300 return (NULL);
300 } 301 }
301 302
@@ -308,11 +309,11 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
308 309
309finish_override: 310finish_override:
310 311
311 ACPI_INFO((AE_INFO, 312 ACPI_INFO((AE_INFO, "%4.4s " ACPI_PRINTF_UINT
312 "%4.4s %p %s table override, new table: %p", 313 " %s table override, new table: " ACPI_PRINTF_UINT,
313 table_header->signature, 314 table_header->signature,
314 ACPI_CAST_PTR(void, table_desc->address), 315 ACPI_FORMAT_TO_UINT(table_desc->address),
315 override_type, new_table)); 316 override_type, ACPI_FORMAT_TO_UINT(new_table)));
316 317
317 /* We can now unmap/delete the original table (if fully mapped) */ 318 /* We can now unmap/delete the original table (if fully mapped) */
318 319
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
index 6866e767ba90..df3bb20ea325 100644
--- a/drivers/acpi/acpica/tbprint.c
+++ b/drivers/acpi/acpica/tbprint.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -128,15 +128,17 @@ acpi_tb_print_table_header(acpi_physical_address address,
128 struct acpi_table_header local_header; 128 struct acpi_table_header local_header;
129 129
130 /* 130 /*
131 * The reason that the Address is cast to a void pointer is so that we 131 * The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to
132 * can use %p which will work properly on both 32-bit and 64-bit hosts. 132 * support both 32-bit and 64-bit hosts/addresses in a consistent manner.
133 * The %p specifier does not emit uniform output on all hosts. On some,
134 * leading zeros are not supported.
133 */ 135 */
134 if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) { 136 if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) {
135 137
136 /* FACS only has signature and length fields */ 138 /* FACS only has signature and length fields */
137 139
138 ACPI_INFO((AE_INFO, "%4.4s %p %06X", 140 ACPI_INFO((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X",
139 header->signature, ACPI_CAST_PTR(void, address), 141 header->signature, ACPI_FORMAT_TO_UINT(address),
140 header->length)); 142 header->length));
141 } else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) { 143 } else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) {
142 144
@@ -147,8 +149,9 @@ acpi_tb_print_table_header(acpi_physical_address address,
147 header)->oem_id, ACPI_OEM_ID_SIZE); 149 header)->oem_id, ACPI_OEM_ID_SIZE);
148 acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE); 150 acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
149 151
150 ACPI_INFO((AE_INFO, "RSDP %p %06X (v%.2d %6.6s)", 152 ACPI_INFO((AE_INFO,
151 ACPI_CAST_PTR(void, address), 153 "RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)",
154 ACPI_FORMAT_TO_UINT(address),
152 (ACPI_CAST_PTR(struct acpi_table_rsdp, header)-> 155 (ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
153 revision > 156 revision >
154 0) ? ACPI_CAST_PTR(struct acpi_table_rsdp, 157 0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
@@ -162,8 +165,9 @@ acpi_tb_print_table_header(acpi_physical_address address,
162 acpi_tb_cleanup_table_header(&local_header, header); 165 acpi_tb_cleanup_table_header(&local_header, header);
163 166
164 ACPI_INFO((AE_INFO, 167 ACPI_INFO((AE_INFO,
165 "%4.4s %p %06X (v%.2d %6.6s %8.8s %08X %4.4s %08X)", 168 "%-4.4s " ACPI_PRINTF_UINT
166 local_header.signature, ACPI_CAST_PTR(void, address), 169 " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
170 local_header.signature, ACPI_FORMAT_TO_UINT(address),
167 local_header.length, local_header.revision, 171 local_header.length, local_header.revision,
168 local_header.oem_id, local_header.oem_table_id, 172 local_header.oem_id, local_header.oem_table_id,
169 local_header.oem_revision, 173 local_header.oem_revision,
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 6412d3c301cb..a4702eee91a8 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index db826eaadd1c..a1593159d9ea 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 60b5a871833c..0909420fc776 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index e4e1468877c3..65ab8fed3d5e 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utaddress.c b/drivers/acpi/acpica/utaddress.c
index 2c2b6ae5dfc4..a1acec9d2ef3 100644
--- a/drivers/acpi/acpica/utaddress.c
+++ b/drivers/acpi/acpica/utaddress.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utalloc.c b/drivers/acpi/acpica/utalloc.c
index 1851762fc5b5..efac83c606dc 100644
--- a/drivers/acpi/acpica/utalloc.c
+++ b/drivers/acpi/acpica/utalloc.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utbuffer.c b/drivers/acpi/acpica/utbuffer.c
index 11fde93be120..3c1699740653 100644
--- a/drivers/acpi/acpica/utbuffer.c
+++ b/drivers/acpi/acpica/utbuffer.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c
index cacd2fd9e665..78fde0aac487 100644
--- a/drivers/acpi/acpica/utcache.c
+++ b/drivers/acpi/acpica/utcache.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index edff4e653d9a..270c16464dd9 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -535,10 +535,10 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
535 535
536 case ACPI_TYPE_LOCAL_REFERENCE: 536 case ACPI_TYPE_LOCAL_REFERENCE:
537 537
538 /* TBD: should validate incoming handle */ 538 /* An incoming reference is defined to be a namespace node */
539 539
540 internal_object->reference.class = ACPI_REFCLASS_NAME; 540 internal_object->reference.class = ACPI_REFCLASS_REFOF;
541 internal_object->reference.node = 541 internal_object->reference.object =
542 external_object->reference.handle; 542 external_object->reference.handle;
543 break; 543 break;
544 544
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index d971c8631263..21a20ac5b1e1 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index b3f31dd89a45..fbfa9eca011f 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c
index c07d2227ea42..a3516de213fa 100644
--- a/drivers/acpi/acpica/utdelete.c
+++ b/drivers/acpi/acpica/utdelete.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -75,6 +75,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
75 union acpi_operand_object *handler_desc; 75 union acpi_operand_object *handler_desc;
76 union acpi_operand_object *second_desc; 76 union acpi_operand_object *second_desc;
77 union acpi_operand_object *next_desc; 77 union acpi_operand_object *next_desc;
78 union acpi_operand_object *start_desc;
78 union acpi_operand_object **last_obj_ptr; 79 union acpi_operand_object **last_obj_ptr;
79 80
80 ACPI_FUNCTION_TRACE_PTR(ut_delete_internal_obj, object); 81 ACPI_FUNCTION_TRACE_PTR(ut_delete_internal_obj, object);
@@ -235,10 +236,11 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
235 if (handler_desc) { 236 if (handler_desc) {
236 next_desc = 237 next_desc =
237 handler_desc->address_space.region_list; 238 handler_desc->address_space.region_list;
239 start_desc = next_desc;
238 last_obj_ptr = 240 last_obj_ptr =
239 &handler_desc->address_space.region_list; 241 &handler_desc->address_space.region_list;
240 242
241 /* Remove the region object from the handler's list */ 243 /* Remove the region object from the handler list */
242 244
243 while (next_desc) { 245 while (next_desc) {
244 if (next_desc == object) { 246 if (next_desc == object) {
@@ -247,10 +249,19 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
247 break; 249 break;
248 } 250 }
249 251
250 /* Walk the linked list of handler */ 252 /* Walk the linked list of handlers */
251 253
252 last_obj_ptr = &next_desc->region.next; 254 last_obj_ptr = &next_desc->region.next;
253 next_desc = next_desc->region.next; 255 next_desc = next_desc->region.next;
256
257 /* Prevent infinite loop if list is corrupted */
258
259 if (next_desc == start_desc) {
260 ACPI_ERROR((AE_INFO,
261 "Circular region list in address handler object %p",
262 handler_desc));
263 return_VOID;
264 }
254 } 265 }
255 266
256 if (handler_desc->address_space.handler_flags & 267 if (handler_desc->address_space.handler_flags &
diff --git a/drivers/acpi/acpica/uterror.c b/drivers/acpi/acpica/uterror.c
index 154fdcaa5830..8e544d4688cd 100644
--- a/drivers/acpi/acpica/uterror.c
+++ b/drivers/acpi/acpica/uterror.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c
index 16fb90506db7..8fed1482d228 100644
--- a/drivers/acpi/acpica/uteval.c
+++ b/drivers/acpi/acpica/uteval.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utexcep.c b/drivers/acpi/acpica/utexcep.c
index 3cf7b597edb9..0403dcaabaf2 100644
--- a/drivers/acpi/acpica/utexcep.c
+++ b/drivers/acpi/acpica/utexcep.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c
index 030cb0dc673c..f3abeae9d2f8 100644
--- a/drivers/acpi/acpica/utglobal.c
+++ b/drivers/acpi/acpica/utglobal.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -55,31 +55,27 @@ ACPI_MODULE_NAME("utglobal")
55 * Static global variable initialization. 55 * Static global variable initialization.
56 * 56 *
57 ******************************************************************************/ 57 ******************************************************************************/
58/* 58/* Debug output control masks */
59 * We want the debug switches statically initialized so they
60 * are already set when the debugger is entered.
61 */
62/* Debug switch - level and trace mask */
63u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; 59u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
64 60
65/* Debug switch - layer (component) mask */
66
67u32 acpi_dbg_layer = 0; 61u32 acpi_dbg_layer = 0;
68u32 acpi_gbl_nesting_level = 0;
69 62
70/* Debugger globals */ 63/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */
71 64
72u8 acpi_gbl_db_terminate_threads = FALSE; 65struct acpi_table_fadt acpi_gbl_FADT;
73u8 acpi_gbl_abort_method = FALSE; 66u32 acpi_gbl_trace_flags;
74u8 acpi_gbl_method_executing = FALSE; 67acpi_name acpi_gbl_trace_method_name;
68u8 acpi_gbl_system_awake_and_running;
69u32 acpi_current_gpe_count;
75 70
76/* System flags */ 71/*
77 72 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
78u32 acpi_gbl_startup_flags = 0; 73 * that the ACPI hardware is no longer required. A flag in the FADT indicates
79 74 * a reduced HW machine, and that flag is duplicated here for convenience.
80/* System starts uninitialized */ 75 */
76u8 acpi_gbl_reduced_hardware;
81 77
82u8 acpi_gbl_shutdown = TRUE; 78/* Various state name strings */
83 79
84const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] = { 80const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] = {
85 "\\_S0_", 81 "\\_S0_",
@@ -335,7 +331,6 @@ acpi_status acpi_ut_init_globals(void)
335 331
336 acpi_gbl_DSDT = NULL; 332 acpi_gbl_DSDT = NULL;
337 acpi_gbl_cm_single_step = FALSE; 333 acpi_gbl_cm_single_step = FALSE;
338 acpi_gbl_db_terminate_threads = FALSE;
339 acpi_gbl_shutdown = FALSE; 334 acpi_gbl_shutdown = FALSE;
340 acpi_gbl_ns_lookup_count = 0; 335 acpi_gbl_ns_lookup_count = 0;
341 acpi_gbl_ps_find_count = 0; 336 acpi_gbl_ps_find_count = 0;
@@ -382,6 +377,10 @@ acpi_status acpi_ut_init_globals(void)
382 acpi_gbl_disable_mem_tracking = FALSE; 377 acpi_gbl_disable_mem_tracking = FALSE;
383#endif 378#endif
384 379
380#ifdef ACPI_DEBUGGER
381 acpi_gbl_db_terminate_threads = FALSE;
382#endif
383
385 return_ACPI_STATUS(AE_OK); 384 return_ACPI_STATUS(AE_OK);
386} 385}
387 386
diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c
index bfca7b4b6731..4b12880e5b11 100644
--- a/drivers/acpi/acpica/utids.c
+++ b/drivers/acpi/acpica/utids.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utinit.c b/drivers/acpi/acpica/utinit.c
index c5d1ac44c07d..5f56fc49021e 100644
--- a/drivers/acpi/acpica/utinit.c
+++ b/drivers/acpi/acpica/utinit.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utlock.c b/drivers/acpi/acpica/utlock.c
index 5c26ad420344..dc6e96547f18 100644
--- a/drivers/acpi/acpica/utlock.c
+++ b/drivers/acpi/acpica/utlock.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utmath.c b/drivers/acpi/acpica/utmath.c
index 909fe66e1934..d44dee6ee10a 100644
--- a/drivers/acpi/acpica/utmath.c
+++ b/drivers/acpi/acpica/utmath.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c
index 02f9101b65e4..2e2bb14e1099 100644
--- a/drivers/acpi/acpica/utmisc.c
+++ b/drivers/acpi/acpica/utmisc.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c
index 08c323245584..82717fff9ffc 100644
--- a/drivers/acpi/acpica/utmutex.c
+++ b/drivers/acpi/acpica/utmutex.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index 517af700399d..dfa9009bfc87 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c
index 8856bd37bc76..685766fc6ca8 100644
--- a/drivers/acpi/acpica/utosi.c
+++ b/drivers/acpi/acpica/utosi.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -47,6 +47,31 @@
47#define _COMPONENT ACPI_UTILITIES 47#define _COMPONENT ACPI_UTILITIES
48ACPI_MODULE_NAME("utosi") 48ACPI_MODULE_NAME("utosi")
49 49
50/******************************************************************************
51 *
52 * ACPICA policy for new _OSI strings:
53 *
54 * It is the stated policy of ACPICA that new _OSI strings will be integrated
55 * into this module as soon as possible after they are defined. It is strongly
56 * recommended that all ACPICA hosts mirror this policy and integrate any
57 * changes to this module as soon as possible. There are several historical
58 * reasons behind this policy:
59 *
60 * 1) New BIOSs tend to test only the case where the host responds TRUE to
61 * the latest version of Windows, which would respond to the latest/newest
62 * _OSI string. Not responding TRUE to the latest version of Windows will
63 * risk executing untested code paths throughout the DSDT and SSDTs.
64 *
65 * 2) If a new _OSI string is recognized only after a significant delay, this
66 * has the potential to cause problems on existing working machines because
67 * of the possibility that a new and different path through the ASL code
68 * will be executed.
69 *
70 * 3) New _OSI strings are tending to come out about once per year. A delay
71 * in recognizing a new string for a significant amount of time risks the
72 * release of another string which only compounds the initial problem.
73 *
74 *****************************************************************************/
50/* 75/*
51 * Strings supported by the _OSI predefined control method (which is 76 * Strings supported by the _OSI predefined control method (which is
52 * implemented internally within this module.) 77 * implemented internally within this module.)
@@ -74,6 +99,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = {
74 {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */ 99 {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */
75 {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */ 100 {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */
76 {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */ 101 {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */
102 {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */
77 103
78 /* Feature Group Strings */ 104 /* Feature Group Strings */
79 105
diff --git a/drivers/acpi/acpica/utownerid.c b/drivers/acpi/acpica/utownerid.c
index eb3aca761369..36bec57ebd23 100644
--- a/drivers/acpi/acpica/utownerid.c
+++ b/drivers/acpi/acpica/utownerid.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utpredef.c b/drivers/acpi/acpica/utpredef.c
index 2b1ce4cd3207..db30caff130a 100644
--- a/drivers/acpi/acpica/utpredef.c
+++ b/drivers/acpi/acpica/utpredef.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c
index 2c2accb9e534..14cb6c0c8be2 100644
--- a/drivers/acpi/acpica/utresrc.c
+++ b/drivers/acpi/acpica/utresrc.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,8 @@
47 47
48#define _COMPONENT ACPI_UTILITIES 48#define _COMPONENT ACPI_UTILITIES
49ACPI_MODULE_NAME("utresrc") 49ACPI_MODULE_NAME("utresrc")
50#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) 50
51#if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
51/* 52/*
52 * Strings used to decode resource descriptors. 53 * Strings used to decode resource descriptors.
53 * Used by both the disassembler and the debugger resource dump routines 54 * Used by both the disassembler and the debugger resource dump routines
diff --git a/drivers/acpi/acpica/utstate.c b/drivers/acpi/acpica/utstate.c
index 03c4c2febd84..1cc97a752c15 100644
--- a/drivers/acpi/acpica/utstate.c
+++ b/drivers/acpi/acpica/utstate.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index 45c0eb26b33d..77219336c7e0 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/uttrack.c b/drivers/acpi/acpica/uttrack.c
index c0027773cccb..7d0ee969d781 100644
--- a/drivers/acpi/acpica/uttrack.c
+++ b/drivers/acpi/acpica/uttrack.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -276,7 +276,8 @@ acpi_ut_free_and_track(void *allocation,
276 } 276 }
277 277
278 acpi_os_free(debug_block); 278 acpi_os_free(debug_block);
279 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p freed\n", allocation)); 279 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p freed (block %p)\n",
280 allocation, debug_block));
280 return_VOID; 281 return_VOID;
281} 282}
282 283
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index be322c83643a..502a8492dc83 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utxferror.c b/drivers/acpi/acpica/utxferror.c
index f7edb88f6054..edd861102f1b 100644
--- a/drivers/acpi/acpica/utxferror.c
+++ b/drivers/acpi/acpica/utxferror.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index 246ef68681f4..13380d818462 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/acpica/utxfmutex.c b/drivers/acpi/acpica/utxfmutex.c
index 312299721ba1..2a0f9e04d3a4 100644
--- a/drivers/acpi/acpica/utxfmutex.c
+++ b/drivers/acpi/acpica/utxfmutex.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 67cdaf583bdd..27f84af4e337 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1778,6 +1778,17 @@ static int __init acpi_no_auto_ssdt_setup(char *s)
1778 1778
1779__setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); 1779__setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup);
1780 1780
1781static int __init acpi_disable_return_repair(char *s)
1782{
1783 printk(KERN_NOTICE PREFIX
1784 "ACPI: Predefined validation mechanism disabled\n");
1785 acpi_gbl_disable_auto_repair = TRUE;
1786
1787 return 1;
1788}
1789
1790__setup("acpica_no_return_repair", acpi_disable_return_repair);
1791
1781acpi_status __init acpi_os_initialize(void) 1792acpi_status __init acpi_os_initialize(void)
1782{ 1793{
1783 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block); 1794 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block);