aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-02-06ACPICA: All acpica: Update copyrights to 2018Bob Moore197-198/+198
including tool signons. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: trivial style fix, no functional changeErik Schmauss1-3/+4
ACPICA commit 83f3375d6dcb3af812c91aaf47abcac9fc330527 This adds a semi-colon at the end of a macro call so that it can be processed correctly with source code formatting tools. Link: https://github.com/acpica/acpica/commit/83f3375d Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Fix a couple memory leaks during package object resolutionBob Moore1-8/+13
ACPICA commit 69d4415360446b4a1826dab76ba0cd6d24710ddd A couple memory leaks during resolution of individual package elements. Link: https://github.com/acpica/acpica/commit/69d44153 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Recognize the Windows 10 version 1607 and 1703 OSI stringsMario Limonciello1-0/+2
ACPICA commit 35a4a3ea723b3066f575e63e5f0116f7ce65e713 The public Microsoft document listing recognized OSI strings [1] shows that these two strings were introduced. version 1607 / Anniversary Update / "Redstone 1" version 1703 / Creators Update / "Redstone 2" [1] http://download.microsoft.com/download/7/e/7/7e7662cf-cbea-470b-a97e-ce7ce0d98dc2/winacpi_osi.docx Link: https://github.com/acpica/acpica/commit/35a4a3ea Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Rename a global variable, no functional changeBob Moore2-2/+2
ACPICA commit ab9c83985e8b2b25dc1c173b753280a8d04922b5 Rename to add the standard prefix for globals. Link: https://github.com/acpica/acpica/commit/ab9c8398 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Create and deploy safe version of strncpyBob Moore5-9/+22
ACPICA commit 64ad9c69a1bd534a466e060a33c0bbf5fc9e189c acpi_ut_safe_strncpy - copy and terminate string. Strncpy is not guaranteed to terminate the copied string if the input is longer than the length of the target. No functional change. Link: https://github.com/acpica/acpica/commit/64ad9c69 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Cleanup the global variables and update commentsBob Moore2-55/+29
ACPICA commit 8519ba376636565350c3fa0db5621c61d34c34b2 Mostly cleanup/reformatting. Some restructuring. No functional change. Link: https://github.com/acpica/acpica/commit/8519ba37 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Debugger: fix slight indentation issueErik Schmauss1-1/+1
ACPICA commit c75af007d35c0afe8791ac39b7749c7442f49912 The %*s format specifier prints a string with a width indicated by an integer. In the case of acpi_os_printf() ("%*s", acpi_gbl_nesting_level, " "), a single space is printed to the console when acpi_gbl_nesting_level is 0 or 1. This change increments acpi_gbl_nesting_level so that there is one space printed when acpi_gbl_nesting_level is 0 and two spaces printed when acpi_gbl_nesting_level is 1. Link: https://github.com/acpica/acpica/commit/c75af007 Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Fix a regression in the acpi_evaluate_object_type() interfaceBob Moore1-4/+5
ACPICA commit 9ab548ef154b992208524d61770caca90a9762be The optional Pathname parameter inadvertently became required. Introduced in April 2017. Link: https://github.com/acpica/acpica/commit/9ab548ef Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Update for a few debug output statementsBob Moore2-4/+16
ACPICA commit 900e96a9c6c6d67c2e18e8c2576dc4742221fc71 Implement a very small indent for trace output. Link: https://github.com/acpica/acpica/commit/900e96a9 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-05ACPICA: Debug output, no functional changeBob Moore1-7/+7
ACPICA commit 04fffc50a131662f57a41ca517c75d32d2479a1c Fix use of return macros and other debug output changes. Link: https://github.com/acpica/acpica/commit/04fffc50 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-12-04ACPICA: Rename variable to match upstreamRafael J. Wysocki1-4/+4
There is a variable name mismatch in acpi_ut_strtoul_multiply64() between the ACPICA code in the kernel and the corresponding upstream code which may be problematic if changes to this particular piece of code are made upstream and ported to Linux, so rename the variable in question to match its name in the upstream code. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Update linkage for get mutex name interfaceBob Moore2-7/+8
ACPICA commit cb9a3906ec35da7a6e0b8972f8e6e7895e59c208 Always enable the function. Link: https://github.com/acpica/acpica/commit/cb9a3906 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Update mutex error messages, no functional changeBob Moore1-4/+5
ACPICA commit 22f2b0beb45d277841ed02bc613df1009e5b20cf Add mutex name on certain acquire/release errors. Link: https://github.com/acpica/acpica/commit/22f2b0be Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Debugger: add "background" command for method executionBob Moore4-66/+206
ACPICA commit d7b44738a48caa9f669b8dbf0024d456711aec31 Allows a single task to execute in the background, while control returns to the debugger prompt. Also, cleanup the debugger help screen. Link: https://github.com/acpica/acpica/commit/d7b44738 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Namespace: fix memory leak from building prefixed pathnameErik Schmauss1-1/+4
ACPICA commit f8ca5db30605467b851f86d152079631c27eeca8 Link: https://github.com/acpica/acpica/commit/f8ca5db3 Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Enhance error messages from namespace create/lookup operationsBob Moore12-25/+270
ACPICA commit b09c8d7bdc8c5a3db0a8d38bfd6182c023885e12 1) Emit the full pathname (scope+name) instead of just the name 2) For AE_ALREADY_EXISTS and AE_NOT_FOUND, use the "firmware error" string to point to the true problem. Link: https://github.com/acpica/acpica/commit/b09c8d7b Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: ACPICA: style edits to utility function output, no functional changeErik Schmauss1-1/+1
ACPICA commit 8070a23749f1c2eedec313f42f564b5375054137 Link: https://github.com/acpica/acpica/commit/8070a237 Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Add an additional error message for EC timeoutsBob Moore1-0/+10
ACPICA commit 24dd370b14711b7b3f31d7ca6326f9e0bd177c4e AE_TIME is seen to be returned from the EC driver/handler so often that an additional error message is added to help clarify the problem. Link: https://github.com/acpica/acpica/commit/24dd370b Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Update output from ACPI_EXCEPTION macroBob Moore2-7/+4
ACPICA commit b2858b2cc83e1481950a2c976f62d4e1d758bc85 Changes line prefix from "ACPI Exception" to simply "ACPI Error" to match the ACPI_ERROR macro. ACPI_EXCEPTION takes the ACPI status as an argument, decodes and displays it along with the error message. Link: https://github.com/acpica/acpica/commit/b2858b2c Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Use local 64-bit divide support for string conversionsBob Moore1-15/+21
ACPICA commit f230f4df26d07b97ef00be39156ecee64250447d On 32-bit platforms, 64-bit divide often requires a library function which may not be present in the build. Link: https://github.com/acpica/acpica/commit/f230f4df Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Utilities: Cleanup style issue for bit clearingLv Zheng1-2/+2
ACPICA commit b49a0e1e26f3c61df7113f18f441c83739eb5514 It's reported in Linux community that change to utmath.c contains a style problem: [.../utmath.c:137]: (style) Same expression on both sides of '^='. [.../utmath.c:174]: (style) Same expression on both sides of '^='. This patch fixes this problem. ACPICA BZ 1422, reported by David Binderman, fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/b49a0e1e Link: https://bugs.acpica.org/show_bug.cgi?id=1422 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: iASL: change processing of external op namespace nodes for correctnessErik Schmauss2-6/+8
ACPICA commit aa866a9b4f24bbec9f158d10325b486d7d12d90f The declaration External (ABCD.EFGH) creates two nodes in the namespace: ABCD and EFGH where ABCD is marked as an implicit external node. ABCD is labeled as implicit because there does not exist a specific External (ABCD) declaration. Before this change, the declaration External (ABCD.EFGH) and External (ABCD.EFGH.IJKL) creates the namespace nodes ABCD, EFGH, and IJKL where ABCD and EFGH are labeled as implicit external nodes. This is incorrect. The only implicit node should be ABCD because EFGH and IJKL are explicit nodes. This change fixes the labeling procecess of external op namespace nodes so that nodes are properly labeled as implicit external. Due to this commit, the below ASL code results in a compilation error. definition_block ("DSDT.aml", "DSDT", 0x02, "INTEL", "BDW ", 0x0) { External(\_SB.PCI0.GFX0, device_obj) External(\_SB.PCI0.GFX0.ALSI) Scope(\_SB) { Device(PCI0) { Device(GFX0) { Name(_ADR, 0x00020000) } } } } Link: https://github.com/acpica/acpica/commit/aa866a9b Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Tools: Deploy -vd option (build date/time) across all toolsBob Moore1-0/+3
ACPICA commit 336131640a1574b86240b32eca3150195f9270d6 Common option for all tools. Link: https://github.com/acpica/acpica/commit/33613164 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Rename AE_AML_INFINITE_LOOP exceptionBob Moore1-1/+1
ACPICA commit e017213698374e01225f641ba0917516d8e91427 More appropriately renamed to AE_AML_LOOP_TIMEOUT, now that a real timer is used for the implementation. Link: https://github.com/acpica/acpica/commit/e0172136 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Dispatcher: Introduce timeout mechanism for infinite loop detectionLv Zheng3-9/+10
ACPICA commit 9605023e7e6d1f05581502766c8cf2905bcc03d9 This patch implements a new infinite loop detection mechanism to replace the old one, it uses acpi_os_get_timer() to limit loop execution into a determined time slice. This is useful in case some hardware/firmware operations really require the AML interpreter to wait while the old mechanism could expire too fast on recent machines. The new mechanism converts old acpi_gbl_max_loop_iterations to store the user configurable value for the new mechanism in order to allow users to be still able to configure this value for acpiexec via command line. This patch also removes wrong initilization code of acpi_gbl_max_loop_iterations accordingly (it should have been initialized by ACPI_INIT_GLOBAL, and the default value is also properly tuned for acpiexec). Reported by M. Foronda, fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/9605023e Link: https://bugzilla.kernel.org/show_bug.cgi?id=156501 Reported-by: M. Foronda <josemauricioforonda@gmail.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Avoid null pointer dereference on Op.Colin Ian King1-3/+3
ACPICA commit 08a00639b0d6756e8ba1421419fc3728904651d9 The calls to acpi_os_acquire_object can result in a null being assigned to Op (for example if a mutex acquire fails) which can lead to a null pointer dereference on Op on the call to ASL_CV_TRANSFER_COMMENTS (via function cv_transfer_comments). Move the block into the previous block that checks for a null Op so that we never can call cv_transfer_comments with a null Op. Detected by: coverity_scan CID#1371660 ("Dereference after null check") Link: https://github.com/acpica/acpica/commit/08a00639 Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: disassembler: getting rid of error messageErik Schmauss1-8/+1
ACPICA commit 7d542c6f97e27f7d0e90be1afd98097c3840e007 This error message tends to clutter up the disassembled ASL file with information that is unnecessary. Link: https://github.com/acpica/acpica/commit/7d542c6f Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Disassembler: reset parser_state's Aml pointer when parsing bad externalsErik Schmauss1-0/+1
ACPICA commit e7e25137471d7f75960fdb8caf757db0426245ca Link: https://github.com/acpica/acpica/commit/e7e25137 Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-27ACPICA: Fix an off-by-one error in acpi_get_timer_duration().Jung-uk Kim1-15/+14
ACPICA commit b4fd33f3c2af014aeec978d46392d286fd7f52b3 Delta calculation has an off-by-one error when there is a rollover. For example, when start_ticks is 0x00FFFFFF and end_ticks is 0x00000000 (for 24-bit timer), delta_ticks should be 1 (one) but it was 0 (zero). Link: https://github.com/acpica/acpica/commit/b4fd33f3 Signed-off-by: Jung-uk Kim <jkim@free_BSD.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-13Merge branch 'acpica'Rafael J. Wysocki19-404/+786
* acpica: ACPICA: Update version to 20170831 ACPICA: Update acpi_get_timer for 64-bit interface to acpi_hw_read ACPICA: String conversions: Update to add new behaviors ACPICA: String conversions: Cleanup/format comments. No functional changes ACPICA: Restructure/cleanup all string-to-integer conversion functions ACPICA: Header support for the PDTT ACPI table ACPICA: acpiexec: Add testability of deferred table verification ACPICA: Hardware: Enable 64-bit support of hardware accesses
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-04ACPICA: Update acpi_get_timer for 64-bit interface to acpi_hw_readBob Moore1-1/+9
ACPICA commit 1cdcf16447c15694faa564c0cd8e357b910344a0 Return value from acpi_hw_read is now 64 bits, but the ACPI PM Timer is defined by the ACPI spec to be 32 bits. Link: https://github.com/acpica/acpica/commit/1cdcf16447c1 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-10-04ACPICA: String conversions: Update to add new behaviorsBob Moore3-21/+78
ACPICA commit e3574138af82a25d76324559848689946982dbd0 1) Allow whitespace in string before the constant 2) ut_strtoul64 now always creates a 64-bit integer; iASL will truncate this to the lower 32-bits if the table being compiled is a 32-bit table (DSDT revision less than 2). Link: https://github.com/acpica/acpica/commit/e3574138af82 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-10-04ACPICA: String conversions: Cleanup/format comments. No functional changesBob Moore2-78/+74
ACPICA commit 33e38cd2406709b13fa0a7821e588505b3771163 Cleanup some of the language used in the large comments, especially the ones that reference the rules in the ACPI spec. Fixed some typos. Link: https://github.com/acpica/acpica/commit/33e38cd24067 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-10-04ACPICA: Restructure/cleanup all string-to-integer conversion functionsBob Moore12-249/+673
ACPICA commit 610046d444ad781cc36673bf1f030abe50cbc61f Improve adherence to ACPI spec for implicit and explicit conversions Adds octal support for constants in ASL code Adds integer overflow errors for constants during ASL compilation Eliminates most of the existing complex flags parameters Simplify support for implicit/explicit runtime conversions Adds one new file, utilities/utstrsuppt.c Link: https://github.com/acpica/acpica/commit/610046d444ad Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-10-04ACPICA: acpiexec: Add testability of deferred table verificationLv Zheng1-3/+6
ACPICA commit 04c28c7549e694ea85f40bcc816039e5fbb4169c This patch adds testability of deferred table verification mechanism. As acpiexec uses dynamically allocated root table list from its very early stage, a change to acpi_reallocate_root_table() is required to allow deferred table verification mechanism to be triggered in such an environment. Note that acpi_gbl_enable_table_validation is still TRUE by default, thus: 1. Developers need to manually set acpi_gbl_enable_table_validation to FALSE for acpiexec to enable this test. 2. For all other OSPMs (Linux, BSDs, etc.), this commit is a no-op. Link: https://github.com/acpica/acpica/commit/04c28c7549e6 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-10-04ACPICA: Hardware: Enable 64-bit support of hardware accessesLv Zheng5-155/+49
ACPICA commit 6b0a604d171334f61a18bc92b44ec0437b11bf98 This patch enable 64-bit support for acpi_hw_read()/acpi_hw_write() and then convert acpi_read()/acpi_write() to invoke them. BZ 1287, fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/6b0a604d1713 Link: https://bugs.acpica.org/show_bug.cgi?id=1287 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-09-03Merge branches 'acpi-scan' and 'acpi-pm'Rafael J. Wysocki2-9/+29
* acpi-scan: ACPI / scan: Enable GPEs before scanning the namespace ACPICA: Make it possible to enable runtime GPEs earlier ACPICA: Dispatch active GPEs at init time * acpi-pm: ACPI / PM: Add debug statements to acpi_pm_notify_handler() ACPI: Add debug statements to acpi_global_event_handler() ACPI / sleep: Make acpi_sleep_syscore_init() static ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() ACPI / PM: Split acpi_device_wakeup() PCI / PM: Skip bridges in pci_enable_wake()
2017-09-03Merge branch 'acpica'Rafael J. Wysocki39-611/+1331
* acpica: (32 commits) ACPICA: Update version to 20170728 ACPICA: Revert "Update resource descriptor handling" ACPICA: Resources: Allow _DMA method in walk resources ACPICA: Ensure all instances of AE_AML_INTERNAL have error messages ACPICA: Implement deferred resolution of reference package elements ACPICA: Debugger: Improve support for Alias objects ACPICA: Interpreter: Update handling for Alias operator ACPICA: EFI/EDK2: Cleanup to enable /WX for MSVC builds ACPICA: acpidump: Add DSDT/FACS instance support for Linux and EFI ACPICA: CLib: Add short multiply/shift support ACPICA: EFI/EDK2: Sort acpi.h inclusion order ACPICA: Add a comment, no functional change ACPICA: Namespace: Update/fix an error message ACPICA: iASL: Add support for the SDEI table ACPICA: Divergences: reduce access size definitions ACPICA: Update version to 20170629 ACPICA: Update resource descriptor handling ACPICA: iasl: Update to IORT SMMUv3 disassembling ACPICA: Disassembler: skip parsing of incorrect external declarations ACPICA: iASL: Ensure that the target node is valid in acpi_ex_create_alias ...
2017-08-22ACPICA: Fix acpi_evaluate_object_typed()Rafael J. Wysocki1-3/+7
Commit 2d2a954375a0 (ACPICA: Update two error messages to emit control method name) causes acpi_evaluate_object_typed() to fail if its pathname argument is NULL, but some callers of that function in the kernel, particularly acpi_nondev_subnode_data_ok(), pass NULL as pathname to it and expect it to work. For this reason, make acpi_evaluate_object_typed() check if its pathname argument is NULL and fall back to using the pathname of its handle argument if that is the case. Reported-by: Sakari Ailus <sakari.ailus@intel.com> Tested-by: Yang, Hyungwoo <hyungwoo.yang@intel.com> Fixes: 2d2a954375a0 (ACPICA: Update two error messages to emit control method name) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-17ACPICA: Make it possible to enable runtime GPEs earlierRafael J. Wysocki2-0/+10
Runtime GPEs have corresponding _Lxx/_Exx methods and are enabled automatically during the initialization of the ACPI subsystem through acpi_update_all_gpes() with the assumption that acpi_setup_gpe_for_wake() will be called in advance for all of the GPEs pointed to by _PRW objects in the namespace that may be affected by acpi_update_all_gpes(). That is, acpi_ev_initialize_gpe_block() can only be called for a GPE block after acpi_setup_gpe_for_wake() has been called for all of the _PRW (wakeup) GPEs in it. The platform firmware on some systems, however, expects GPEs to be enabled before the enumeration of devices which is when acpi_setup_gpe_for_wake() is called and that goes against the above assumption. For this reason, introduce a new flag to be set by acpi_ev_initialize_gpe_block() when automatically enabling a GPE to indicate to acpi_setup_gpe_for_wake() that it needs to drop the reference to the GPE coming from acpi_ev_initialize_gpe_block() and modify acpi_setup_gpe_for_wake() accordingly. These changes allow acpi_setup_gpe_for_wake() and acpi_ev_initialize_gpe_block() to be invoked in any order. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2017-08-17ACPICA: Dispatch active GPEs at init timeRafael J. Wysocki1-9/+19
In some cases GPEs are already active when they are enabled by acpi_ev_initialize_gpe_block() and whatever happens next may depend on the result of handling the events signaled by them, so the events should not be discarded (which is what happens currently) and they should be handled as soon as reasonably possible. For this reason, modify acpi_ev_initialize_gpe_block() to dispatch GPEs with the status flag set in-band right after enabling them. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2017-08-03ACPICA: Revert "Update resource descriptor handling"Erik Schmauss1-9/+5
ACPICA commit f3300640c63df138d133740b54e2c0a1befa4086 This reverts commit c8eac10178b387f9eb1935694e509d4518da77bb. Link: https://github.com/acpica/acpica/commit/f3300640 Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03ACPICA: Resources: Allow _DMA method in walk resourcesBob Moore1-3/+4
ACPICA commit af661c00afac7aa481a961fa48c6540a99ad64a6 The _DMA object contains a resource template, this change adds support for the walk resources function so that ACPI devices containing a _DMA object can actually parse it to detect DMA ranges for the respective bus. Link: https://github.com/acpica/acpica/commit/af661c00 Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03ACPICA: Ensure all instances of AE_AML_INTERNAL have error messagesBob Moore5-0/+18
ACPICA commit ea9152daaec30760fa4c25285998f58233ec0db5 This exception is only meaningful with an associated error message. Link: https://github.com/acpica/acpica/commit/ea9152da Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03ACPICA: Implement deferred resolution of reference package elementsBob Moore16-345/+661
ACPICA commit 0c08790c56fdf0dc081ae869495a09d8c4230854 This change defers the resolution of package elements that are named references until after the entire namespace has been loaded from the definition block. This allows such references to be in fact forward references for both module level code and control methods. Link: https://github.com/acpica/acpica/commit/0c08790c Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03ACPICA: Debugger: Improve support for Alias objectsBob Moore2-13/+58
ACPICA commit 916993dbcd45b46e01f6c9b8337a01513f5d8dcc Properly resolve alias objects for display. General cleanup of related output. Link: https://github.com/acpica/acpica/commit/916993db Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03ACPICA: Interpreter: Update handling for Alias operatorBob Moore1-47/+14
ACPICA commit 719d0bdd48e3e8e7a62a86c04922b9f41da6def0 Provide common creation code for the Alias operator. All objects are now handled the same, with the only exception being the Method() operator. It has a special internal Alias type. Link: https://github.com/acpica/acpica/commit/719d0bdd Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03ACPICA: EFI/EDK2: Cleanup to enable /WX for MSVC buildsLv Zheng1-3/+3
ACPICA commit a7c6d65a5dab20b1e191c197e09af337fc54b341 /WX turns warning into fatal erros for MSVC builds. We need /WX- during EDK2 porting to allow agile development. Now it is time to enable /WX and some explicit type conversion cleanups are required for enabling /WX. Lv Zheng. Link: https://github.com/acpica/acpica/commit/a7c6d65a Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>