AcpiDump: Update error handling in the os*tbl modules.

Correctly cleanup and return error codes for both the Windows
and Linux versions of the utility.
Merge branch 'master' of git://github.com/acpica/acpica
gcc-specific: Fix possible issue with the strchr function.

Some versions of gcc implement strchr via a macro, which either
contains bugs or can provoke a bug in the compiler. This change
fixes a possible compile-time error when using this function.
The problem is usually seen when compiling the getopt.c module.
Unload operator: Emit a warning if and when it is ever used.

We would like to see the ASL for any machine that uses this operator,
so emit at least a warning to hopefully draw some attention.
Merge branch 'master' of git://github.com/acpica/acpica
Disassembler: Add support to decode _HID and _CID values.

For _HID and _CID, the disassembler will emit a string that describes
the device if the _HID/_CID value is recognized. AcpiHelp updated also.
AcpiHelp will now search for a specific ID as well as displaying
the list of "known" (to ACPICA) IDs.
Merge branch 'master' of git://github.com/acpica/acpica
AcpiHelp: Add substring match support for the -i option.

This option displays PNP hardware IDs. This change adds substring
support similar to the other AcpiHelp options.
Revert "Headers: Deploy #pragma pack (push) and (pop)."

This reverts commit aae576e5faefa8ba70647efa320d4747b6375f1e.
Push and Pop are not portable "enough", and caused problems for
some ACPICA customers.

Conflicts:

	source/include/aclocal.h
	source/include/acutils.h
AcpiHelp: Add -a option to display both ASL and AML syntax

Displays an ASL operator syntax, then displays the AML encoding
and syntax. In other words, all information about the operator.
Disassembler: Add decoding of Notify() values.

For Notify operators, displays a comment that describe the meaning
of the notify value.
Disassembler: Add support to cross-ref namespace twice if needed.

If a table must be parsed a second time due to the discovery
of external methods, now cross-ref the namespace again also.
This enables additional namespace support such as handling
notify disassembly comments on a per-object-type basis.
Disassembler: Miscellaneous updates for extern() handling.

1) Abort compiler if file specified by -fe option does not exist.
2) Silence unnecessary warnings about argument count mismatches.
3) Update warning messages concerning unresolved method externals.
iASL: Prevent possible infinite loop with -e option.

-e<file> with no space could loop forever.
Merge branch 'master' of git://github.com/acpica/acpica
Disassembler: Emit full pathname comment for target operands.

This changes displays the full pathname (if possible) for target
operands of AML operators. Adds additional information to the
disassembly. The pathnames are emitted within comments so as not
to interfere with compilation.
Disassembler: Emit "UnknownObj" keyword for External() statements.

For Externals that cannot be resolved to a specific object type,
emit the "UnknownObj" keyword instead of just nothing. Provides
additional information within the resulting disassembly.
Update use of AcpiOsWaitEventsComplete interface.

This patch cleans up all of the AcpiOsWaitEventsComplete() invocations to
make it to be invoked inside of ACPICA in the way to accommodate Linux's
work queue implementation.

According to the report, current Linux kernel code is facing a boot time
race issue in the AcpiRemoveNotifyHandler().  This is because:
Linux is using work queues to implement a deferred handler call environment
while ACPICA expects OSPM to implement AcpiOsWaitEventsComplete() using
wait queues.  The position to invoke a "waiter" is not suitable for a
"flusher" as new invocations can be scheduled after this position and
before the deletion of the handler from its management container.

Since the following commit has deleted AcpiOsWaitEventsComplete()
parameters, it thus might not be possible for OSPM to achieve a safe
removal using wait queues.  This requires ACPICA to be changed accordingly
to "flush" handlers rather than "wait" them to be drain up:

  Commit: 5ff986a2a9db11858247b71fe242fe17617229aa
  Date: Wed, 16 May 2012 13:36:07 -0700
  Subject: Introduce AcpiOsWaitEventsComplete interface.

  This interface will block until asynchronous events like notifies
  and GPEs are complete. Within ACPICA, it is called before a notify or GPE
  handler is removed. ACPICA BZ 868.

This patch fixes this issue by invoking AcpiOsWaitEventsComplete() in the
way to "flush" things - it thus should be put to the position after handler
is removed from its management container but before it is destructed.

The technical concerns are:
1. MTX_NAMESPACE is used to protect things that AcpiOsWaitEventsComplete()
   might be waiting for, thus MTX_NAMESPACE must be unlocked before
   invoking AcpiOsWaitEventsComplete().
2. MTX_NAMESPACE is also used to implement the serialization of
   AcpiInstallNotifyHandler() and AcpiRemoveNotifyHandler().  This patch
   changes this logic, thus if there are many
   AcpiInstall/RemoveNotifyHandler() invoked in parallel, the
   AcpiOsWaitEventsComplete() might face the races which could cause it
   never running to an end.  Normally this will require additional code to
   implement a separate locking facility which is not implemented due to 3.
3. Given ACPICA users will always invoke AcpiInstallNotifyHandler() once
   during Linux module/device initialization and invoke
   AcpiRemoveNotifyHandler() once during module/device finalization,
   problem stated in 2 will not happen in Linux environment due to the
   mutual exclusive module/device existence, this fix thus is sufficient.
Same concerns can apply to AcpiInstall/RemoveGpeHandler().  Reported and
tested: Ronald Vink.  Fixed: Lv Zheng.

Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=60583
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Linux-specific header: Update support for Linux/acpi applications.

Linux kernel resident ACPICA headers include some sparse declarators for
kernel static checkers.  This patch adds code to disable them for non
__KERNEL__ defined code so that it is possible for the ACPICA user space
tool's source files to be built with Linux kernel ACPICA header files
included.  Lv Zheng.

Linux kernel build is not affected by this commit.
Linux-specific header: Add support for PPC64 compilation.

Adds PPC64 as a 64-bit architecture. Colin Ian King.