Pull more ACPI updates from Rafael Wysocki: "These fix two regressions introduced during the 5.0 cycle, in ACPICA and in device PM, cause the values returned by _ADR to be stored in 64 bits and fix two ACPI documentation issues. Specifics: - Update the ACPICA code in the kernel to upstream revision 20190509 including one regression fix: * Prevent excessive ACPI debug messages from being printed by moving the ACPI_DEBUG_DEFAULT definition to the right place (Erik Schmauss). - Set the enable_for_wake bits for wakeup GPEs during suspend to idle to allow acpi_enable_all_wakeup_gpes() to enable them as aproppriate and make wakeup devices sighaling events through ACPI GPEs work with suspend-to-idle again (Rajat Jain). - Use 64 bits to store the return values of _ADR which are assumed to be 64-bit by some bus specs and may contain nonzero bits in the upper 32 bits part for some devices (Pierre-Louis Bossart). - Fix two minor issues with the ACPI documentation (Sakari Ailus)" * tag 'acpi-5.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: Set enable_for_wake for wakeup GPEs during suspend-to-idle Documentation: ACPI: Direct references are allowed to devices only Documentation: ACPI: Use tabs for graph ASL indentation ACPICA: Update version to 20190509 ACPICA: Linux: move ACPI_DEBUG_DEFAULT flag out of ifndef ACPI: bus: change _ADR representation to 64 bits
Unified · Split
| @@ -45,8 +45,8 @@ the ANOD object which is also the final target node of the reference. · 44 unmodified lines | ||
| 45 | 45 | Name (_DSD, Package () { |
| 46 | 46 | ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), |
| 47 | 47 | Package () { |
| 48 | − Package () { "node@0", NOD0 }, | |
| 49 | − Package () { "node@1", NOD1 }, | |
| 48 | + Package () { "node@0", "NOD0" }, | |
| 49 | + Package () { "node@1", "NOD1" }, | |
| 50 | 50 | } |
| 51 | 51 | }) |
| 52 | 52 | Name (NOD0, Package() { |
| @@ -58,7 +58,7 @@ the ANOD object which is also the final target node of the reference. · 5 unmodified lines | ||
| 58 | 58 | Name (NOD1, Package() { |
| 59 | 59 | ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), |
| 60 | 60 | Package () { |
| 61 | − Package () { "anothernode", ANOD }, | |
| 61 | + Package () { "anothernode", "ANOD" }, | |
| 62 | 62 | } |
| 63 | 63 | }) |
| 64 | 64 | Name (ANOD, Package() { |
| @@ -45,7 +45,7 @@ with "port" and must be followed by the "@" character and the number of the · 44 unmodified lines | ||
| 45 | 45 | port as its key. The target object it refers to should be called "PRTX", where |
| 46 | 46 | "X" is the number of the port. An example of such a package would be:: |
| 47 | 47 | |
| 48 | − Package() { "port@4", PRT4 } | |
| 48 | + Package() { "port@4", "PRT4" } | |
| 49 | 49 | |
| 50 | 50 | Further on, endpoints are located under the port nodes. The hierarchical |
| 51 | 51 | data extension key of the endpoint nodes must begin with |
| @@ -54,7 +54,7 @@ endpoint. The object it refers to should be called "EPXY", where "X" is the · 2 unmodified lines | ||
| 54 | 54 | number of the port and "Y" is the number of the endpoint. An example of such a |
| 55 | 55 | package would be:: |
| 56 | 56 | |
| 57 | − Package() { "endpoint@0", EP40 } | |
| 57 | + Package() { "endpoint@0", "EP40" } | |
| 58 | 58 | |
| 59 | 59 | Each port node contains a property extension key "port", the value of which is |
| 60 | 60 | the number of the port. Each endpoint is similarly numbered with a property |
| @@ -82,68 +82,68 @@ A simple example of this is show below:: · 21 unmodified lines | ||
| 82 | 82 | |
| 83 | 83 | Scope (\_SB.PCI0.I2C2) |
| 84 | 84 | { |
| 85 | − Device (CAM0) | |
| 86 | − { | |
| 87 | − Name (_DSD, Package () { | |
| 88 | − ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 89 | − Package () { | |
| 90 | − Package () { "compatible", Package () { "nokia,smia" } }, | |
| 91 | − }, | |
| 92 | − ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), | |
| 93 | − Package () { | |
| 94 | − Package () { "port@0", PRT0 }, | |
| 95 | − } | |
| 96 | − }) | |
| 97 | − Name (PRT0, Package() { | |
| 98 | − ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 99 | − Package () { | |
| 100 | − Package () { "reg", 0 }, | |
| 101 | − }, | |
| 102 | − ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), | |
| 103 | − Package () { | |
| 104 | − Package () { "endpoint@0", EP00 }, | |
| 105 | − } | |
| 106 | − }) | |
| 107 | − Name (EP00, Package() { | |
| 108 | − ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 109 | − Package () { | |
| 110 | − Package () { "reg", 0 }, | |
| 111 | − Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, "port@4", "endpoint@0" } }, | |
| 112 | − } | |
| 113 | − }) | |
| 114 | − } | |
| 85 | + Device (CAM0) | |
| 86 | + { | |
| 87 | + Name (_DSD, Package () { | |
| 88 | + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 89 | + Package () { | |
| 90 | + Package () { "compatible", Package () { "nokia,smia" } }, | |
| 91 | + }, | |
| 92 | + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), | |
| 93 | + Package () { | |
| 94 | + Package () { "port@0", "PRT0" }, | |
| 95 | + } | |
| 96 | + }) | |
| 97 | + Name (PRT0, Package() { | |
| 98 | + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 99 | + Package () { | |
| 100 | + Package () { "reg", 0 }, | |
| 101 | + }, | |
| 102 | + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), | |
| 103 | + Package () { | |
| 104 | + Package () { "endpoint@0", "EP00" }, | |
| 105 | + } | |
| 106 | + }) | |
| 107 | + Name (EP00, Package() { | |
| 108 | + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 109 | + Package () { | |
| 110 | + Package () { "reg", 0 }, | |
| 111 | + Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, "port@4", "endpoint@0" } }, | |
| 112 | + } | |
| 113 | + }) | |
| 114 | + } | |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | Scope (\_SB.PCI0) |
| 118 | 118 | { |
| 119 | − Device (ISP) | |
| 120 | − { | |
| 121 | − Name (_DSD, Package () { | |
| 122 | − ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), | |
| 123 | − Package () { | |
| 124 | − Package () { "port@4", PRT4 }, | |
| 125 | − } | |
| 126 | − }) | |
| 127 | − | |
| 128 | − Name (PRT4, Package() { | |
| 129 | − ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 130 | − Package () { | |
| 131 | − Package () { "reg", 4 }, /* CSI-2 port number */ | |
| 132 | − }, | |
| 133 | − ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), | |
| 134 | − Package () { | |
| 135 | − Package () { "endpoint@0", EP40 }, | |
| 136 | − } | |
| 137 | − }) | |
| 138 | − | |
| 139 | − Name (EP40, Package() { | |
| 140 | − ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 141 | − Package () { | |
| 142 | − Package () { "reg", 0 }, | |
| 143 | − Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, "port@0", "endpoint@0" } }, | |
| 144 | − } | |
| 145 | − }) | |
| 146 | − } | |
| 119 | + Device (ISP) | |
| 120 | + { | |
| 121 | + Name (_DSD, Package () { | |
| 122 | + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), | |
| 123 | + Package () { | |
| 124 | + Package () { "port@4", "PRT4" }, | |
| 125 | + } | |
| 126 | + }) | |
| 127 | + | |
| 128 | + Name (PRT4, Package() { | |
| 129 | + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 130 | + Package () { | |
| 131 | + Package () { "reg", 4 }, /* CSI-2 port number */ | |
| 132 | + }, | |
| 133 | + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), | |
| 134 | + Package () { | |
| 135 | + Package () { "endpoint@0", "EP40" }, | |
| 136 | + } | |
| 137 | + }) | |
| 138 | + | |
| 139 | + Name (EP40, Package() { | |
| 140 | + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | |
| 141 | + Package () { | |
| 142 | + Package () { "reg", 0 }, | |
| 143 | + Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, "port@0", "endpoint@0" } }, | |
| 144 | + } | |
| 145 | + }) | |
| 146 | + } | |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | Here, the port 0 of the "CAM0" device is connected to the port 4 of |
| @@ -428,8 +428,10 @@ static ssize_t acpi_device_adr_show(struct device *dev, · 427 unmodified lines | ||
| 428 | 428 | { |
| 429 | 429 | struct acpi_device *acpi_dev = to_acpi_device(dev); |
| 430 | 430 | |
| 431 | − return sprintf(buf, "0x%08x\n", | |
| 432 | − (unsigned int)(acpi_dev->pnp.bus_address)); | |
| 431 | + if (acpi_dev->pnp.bus_address > U32_MAX) | |
| 432 | + return sprintf(buf, "0x%016llx\n", acpi_dev->pnp.bus_address); | |
| 433 | + else | |
| 434 | + return sprintf(buf, "0x%08llx\n", acpi_dev->pnp.bus_address); | |
| 433 | 435 | } |
| 434 | 436 | static DEVICE_ATTR(adr, 0444, acpi_device_adr_show, NULL); |
| 435 | 437 | |
| @@ -977,6 +977,8 @@ static int acpi_s2idle_prepare(void) · 976 unmodified lines | ||
| 977 | 977 | if (acpi_sci_irq_valid()) |
| 978 | 978 | enable_irq_wake(acpi_sci_irq); |
| 979 | 979 | |
| 980 | + acpi_enable_wakeup_devices(ACPI_STATE_S0); | |
| 981 | + | |
| 980 | 982 | /* Change the configuration of GPEs to avoid spurious wakeup. */ |
| 981 | 983 | acpi_enable_all_wakeup_gpes(); |
| 982 | 984 | acpi_os_wait_events_complete(); |
| @@ -1027,6 +1029,8 @@ static void acpi_s2idle_restore(void) · 44 unmodified lines | ||
| 1027 | 1029 | { |
| 1028 | 1030 | acpi_enable_all_runtime_gpes(); |
| 1029 | 1031 | |
| 1032 | + acpi_disable_wakeup_devices(ACPI_STATE_S0); | |
| 1033 | + | |
| 1030 | 1034 | if (acpi_sci_irq_valid()) |
| 1031 | 1035 | disable_irq_wake(acpi_sci_irq); |
| 1032 | 1036 | |
| @@ -230,7 +230,7 @@ struct acpi_device_dir { · 229 unmodified lines | ||
| 230 | 230 | /* Plug and Play */ |
| 231 | 231 | |
| 232 | 232 | typedef char acpi_bus_id[8]; |
| 233 | −typedef unsigned long acpi_bus_address; | |
| 233 | +typedef u64 acpi_bus_address; | |
| 234 | 234 | typedef char acpi_device_name[40]; |
| 235 | 235 | typedef char acpi_device_class[20]; |
| 236 | 236 | |
| @@ -12,7 +12,7 @@ · 11 unmodified lines | ||
| 12 | 12 | |
| 13 | 13 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 14 | 14 | |
| 15 | −#define ACPI_CA_VERSION 0x20190405 | |
| 15 | +#define ACPI_CA_VERSION 0x20190509 | |
| 16 | 16 | |
| 17 | 17 | #include <acpi/acconfig.h> |
| 18 | 18 | #include <acpi/actypes.h> |
| @@ -66,6 +66,11 @@ · 65 unmodified lines | ||
| 66 | 66 | |
| 67 | 67 | #define ACPI_INIT_FUNCTION __init |
| 68 | 68 | |
| 69 | +/* Use a specific bugging default separate from ACPICA */ | |
| 70 | + | |
| 71 | +#undef ACPI_DEBUG_DEFAULT | |
| 72 | +#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) | |
| 73 | + | |
| 69 | 74 | #ifndef CONFIG_ACPI |
| 70 | 75 | |
| 71 | 76 | /* External globals for __KERNEL__, stubs is needed */ |
| @@ -82,11 +87,6 @@ · 10 unmodified lines | ||
| 82 | 87 | #define ACPI_NO_ERROR_MESSAGES |
| 83 | 88 | #undef ACPI_DEBUG_OUTPUT |
| 84 | 89 | |
| 85 | −/* Use a specific bugging default separate from ACPICA */ | |
| 86 | − | |
| 87 | −#undef ACPI_DEBUG_DEFAULT | |
| 88 | −#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) | |
| 89 | − | |
| 90 | 90 | /* External interface for __KERNEL__, stub is needed */ |
| 91 | 91 | |
| 92 | 92 | #define ACPI_EXTERNAL_RETURN_STATUS(prototype) \ |