Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'acpi-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
"These update the ACPICA kernel code to upstream revision 20210730,
clean up the ACPI companion binding code, optimize the I2C handling in
the XPower PMIC driver, add 16550-compatible Serial Port Subtype
support to the SPCR parsing code, add a few LoongArch support bits,
add a ne quirk to the button driver, add new PCH FIVR methods to the
DPTF code, replace deprecated CPU-hotplug functions in the processor
driver, improve the acpi_os_map_memory() handling on non-x86 and do
some assorted cleanups.

Specifics:

- Update ACPICA code in the kernel to upstream revision 20210730
including the following changes:
- Add support for the AEST table (data compiler) to iASL (Bob
Moore)
- Fix an if statement (add parens) (Bob Moore)
- Drop trailing semicolon from some macros (Bob Moore)
- Fix compilation of WPBT table with no command-line arguments in
iASL (Bob Moore)
- Add method name "_DIS" for use with aslmethod.c (Bob Moore)
- Add new DBG2 Serial Port Subtypes (Marcin Wojtas)

- Add new PCH FIVR methods to the DPTF code (Srinivas Pandruvada)

- Add support for the new 16550-compatible Serial Port Subtype to the
SPCR table parsing code (Marcin Wojtas)

- Add DMI quirk for Lenovo Yoga 9 (14INTL5) to the ACPI button driver
(Ulrich Huber)

- Add LoongArch support for ACPI_PROCESSOR/ACPI_NUMA (Huacai Chen)

- Add memory semantics to acpi_os_map_memory() (Lorenzo Pieralisi)

- Replace deprecated CPU-hotplug functions in the ACPI processor
driver (Sebastian Andrzej Siewior)

- Optimize I2C-bus handling in the XPower PMIC driver (Hans de Goede)

- Make platform-profile catch profile changes initiated by user space
and notify user processes of them (Hans de Goede)

- Clean up the ACPI companion binding and unbinding code and update
debug messaging in the ACPI power resources code (Rafael Wysocki)

- Clean up a couple of code pieces related to configfs (Andy
Shevchenko)

- Rearrange the FPDT table parsing code to avoid printing warning
messages for reserved record types (Adrian Huang)"

* tag 'acpi-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (27 commits)
ACPI: power: Drop name from struct acpi_power_resource
ACPI: power: Use acpi_handle_debug() to print debug messages
ACPI: tables: FPDT: Do not print FW_BUG message if record types are reserved
ACPI: button: Add DMI quirk for Lenovo Yoga 9 (14INTL5)
ACPI: Add memory semantics to acpi_os_map_memory()
ACPI: SPCR: Add support for the new 16550-compatible Serial Port Subtype
ACPI: platform-profile: call sysfs_notify() from platform_profile_store()
ACPICA: Update version to 20210730
ACPICA: Add method name "_DIS" For use with aslmethod.c
ACPICA: iASL: Fix for WPBT table with no command-line arguments
ACPICA: Headers: Add new DBG2 Serial Port Subtypes
ACPICA: Macros should not use a trailing semicolon
ACPICA: Fix an if statement (add parens)
ACPICA: iASL: Add support for the AEST table (data compiler)
ACPI: processor: Replace deprecated CPU-hotplug functions
ACPI: DPTF: Add new PCH FIVR methods
ACPI: configfs: Make get_header() to return error pointer
ACPI: configfs: Use sysfs_emit() in "show" functions
driver core: Split device_platform_notify()
software nodes: Split software_node_notify()
...

+491 -179
+40
Documentation/ABI/testing/sysfs-platform-dptf
··· 111 111 Description: 112 112 (RW) The PCH FIVR (Fully Integrated Voltage Regulator) switching frequency in MHz, 113 113 when FIVR clock is 38.4MHz. 114 + 115 + What: /sys/bus/platform/devices/INTC1045:00/pch_fivr_switch_frequency/fivr_switching_freq_mhz 116 + Date: September, 2021 117 + KernelVersion: v5.15 118 + Contact: linux-acpi@vger.kernel.org 119 + Description: 120 + (RO) Get the FIVR switching control frequency in MHz. 121 + 122 + What: /sys/bus/platform/devices/INTC1045:00/pch_fivr_switch_frequency/fivr_switching_fault_status 123 + Date: September, 2021 124 + KernelVersion: v5.15 125 + Contact: linux-acpi@vger.kernel.org 126 + Description: 127 + (RO) Read the FIVR switching frequency control fault status. 128 + 129 + What: /sys/bus/platform/devices/INTC1045:00/pch_fivr_switch_frequency/ssc_clock_info 130 + Date: September, 2021 131 + KernelVersion: v5.15 132 + Contact: linux-acpi@vger.kernel.org 133 + Description: 134 + (RO) Presents SSC (spread spectrum clock) information for EMI 135 + (Electro magnetic interference) control. This is a bit mask. 136 + Bits Description 137 + [7:0] Sets clock spectrum spread percentage: 138 + 0x00=0.2% , 0x3F=10% 139 + 1 LSB = 0.1% increase in spread (for 140 + settings 0x01 thru 0x1C) 141 + 1 LSB = 0.2% increase in spread (for 142 + settings 0x1E thru 0x3F) 143 + [8] When set to 1, enables spread 144 + spectrum clock 145 + [9] 0: Triangle mode. FFC frequency 146 + walks around the Fcenter in a linear 147 + fashion 148 + 1: Random walk mode. FFC frequency 149 + changes randomly within the SSC 150 + (Spread spectrum clock) range 151 + [10] 0: No white noise. 1: Add white noise 152 + to spread waveform 153 + [11] When 1, future writes are ignored.
+7
Documentation/ABI/testing/sysfs-platform_profile
··· 26 26 Description: Reading this file gives the current selected profile for this 27 27 device. Writing this file with one of the strings from 28 28 platform_profile_choices changes the profile to the new value. 29 + 30 + This file can be monitored for changes by polling for POLLPRI, 31 + POLLPRI will be signalled on any changes, independent of those 32 + changes coming from a userspace write; or coming from another 33 + source such as e.g. a hotkey triggered profile change handled 34 + either directly by the embedded-controller or fully handled 35 + inside the kernel.
+3
arch/arm64/include/asm/acpi.h
··· 50 50 void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size); 51 51 #define acpi_os_ioremap acpi_os_ioremap 52 52 53 + void __iomem *acpi_os_memmap(acpi_physical_address phys, acpi_size size); 54 + #define acpi_os_memmap acpi_os_memmap 55 + 53 56 typedef u64 phys_cpuid_t; 54 57 #define PHYS_CPUID_INVALID INVALID_HWID 55 58
+16 -3
arch/arm64/kernel/acpi.c
··· 273 273 return __pgprot(PROT_DEVICE_nGnRnE); 274 274 } 275 275 276 - void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) 276 + static void __iomem *__acpi_os_ioremap(acpi_physical_address phys, 277 + acpi_size size, bool memory) 277 278 { 278 279 efi_memory_desc_t *md, *region = NULL; 279 280 pgprot_t prot; ··· 300 299 * It is fine for AML to remap regions that are not represented in the 301 300 * EFI memory map at all, as it only describes normal memory, and MMIO 302 301 * regions that require a virtual mapping to make them accessible to 303 - * the EFI runtime services. 302 + * the EFI runtime services. Determine the region default 303 + * attributes by checking the requested memory semantics. 304 304 */ 305 - prot = __pgprot(PROT_DEVICE_nGnRnE); 305 + prot = memory ? __pgprot(PROT_NORMAL_NC) : 306 + __pgprot(PROT_DEVICE_nGnRnE); 306 307 if (region) { 307 308 switch (region->type) { 308 309 case EFI_LOADER_CODE: ··· 362 359 } 363 360 } 364 361 return __ioremap(phys, size, prot); 362 + } 363 + 364 + void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) 365 + { 366 + return __acpi_os_ioremap(phys, size, false); 367 + } 368 + 369 + void __iomem *acpi_os_memmap(acpi_physical_address phys, acpi_size size) 370 + { 371 + return __acpi_os_ioremap(phys, size, true); 365 372 } 366 373 367 374 /*
+2 -2
drivers/acpi/Kconfig
··· 280 280 281 281 config ACPI_PROCESSOR 282 282 tristate "Processor" 283 - depends on X86 || IA64 || ARM64 283 + depends on X86 || IA64 || ARM64 || LOONGARCH 284 284 select ACPI_PROCESSOR_IDLE 285 - select ACPI_CPU_FREQ_PSS if X86 || IA64 285 + select ACPI_CPU_FREQ_PSS if X86 || IA64 || LOONGARCH 286 286 default y 287 287 help 288 288 This driver adds support for the ACPI Processor package. It is required
+27 -27
drivers/acpi/acpi_configfs.c
··· 70 70 if (!table->header) 71 71 pr_err("table not loaded\n"); 72 72 73 - return table->header; 73 + return table->header ?: ERR_PTR(-EINVAL); 74 74 } 75 75 76 76 static ssize_t acpi_table_aml_read(struct config_item *cfg, ··· 78 78 { 79 79 struct acpi_table_header *h = get_header(cfg); 80 80 81 - if (!h) 82 - return -EINVAL; 81 + if (IS_ERR(h)) 82 + return PTR_ERR(h); 83 83 84 84 if (data) 85 85 memcpy(data, h, h->length); ··· 100 100 { 101 101 struct acpi_table_header *h = get_header(cfg); 102 102 103 - if (!h) 104 - return -EINVAL; 103 + if (IS_ERR(h)) 104 + return PTR_ERR(h); 105 105 106 - return sprintf(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->signature); 106 + return sysfs_emit(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->signature); 107 107 } 108 108 109 109 static ssize_t acpi_table_length_show(struct config_item *cfg, char *str) 110 110 { 111 111 struct acpi_table_header *h = get_header(cfg); 112 112 113 - if (!h) 114 - return -EINVAL; 113 + if (IS_ERR(h)) 114 + return PTR_ERR(h); 115 115 116 - return sprintf(str, "%d\n", h->length); 116 + return sysfs_emit(str, "%d\n", h->length); 117 117 } 118 118 119 119 static ssize_t acpi_table_revision_show(struct config_item *cfg, char *str) 120 120 { 121 121 struct acpi_table_header *h = get_header(cfg); 122 122 123 - if (!h) 124 - return -EINVAL; 123 + if (IS_ERR(h)) 124 + return PTR_ERR(h); 125 125 126 - return sprintf(str, "%d\n", h->revision); 126 + return sysfs_emit(str, "%d\n", h->revision); 127 127 } 128 128 129 129 static ssize_t acpi_table_oem_id_show(struct config_item *cfg, char *str) 130 130 { 131 131 struct acpi_table_header *h = get_header(cfg); 132 132 133 - if (!h) 134 - return -EINVAL; 133 + if (IS_ERR(h)) 134 + return PTR_ERR(h); 135 135 136 - return sprintf(str, "%.*s\n", ACPI_OEM_ID_SIZE, h->oem_id); 136 + return sysfs_emit(str, "%.*s\n", ACPI_OEM_ID_SIZE, h->oem_id); 137 137 } 138 138 139 139 static ssize_t acpi_table_oem_table_id_show(struct config_item *cfg, char *str) 140 140 { 141 141 struct acpi_table_header *h = get_header(cfg); 142 142 143 - if (!h) 144 - return -EINVAL; 143 + if (IS_ERR(h)) 144 + return PTR_ERR(h); 145 145 146 - return sprintf(str, "%.*s\n", ACPI_OEM_TABLE_ID_SIZE, h->oem_table_id); 146 + return sysfs_emit(str, "%.*s\n", ACPI_OEM_TABLE_ID_SIZE, h->oem_table_id); 147 147 } 148 148 149 149 static ssize_t acpi_table_oem_revision_show(struct config_item *cfg, char *str) 150 150 { 151 151 struct acpi_table_header *h = get_header(cfg); 152 152 153 - if (!h) 154 - return -EINVAL; 153 + if (IS_ERR(h)) 154 + return PTR_ERR(h); 155 155 156 - return sprintf(str, "%d\n", h->oem_revision); 156 + return sysfs_emit(str, "%d\n", h->oem_revision); 157 157 } 158 158 159 159 static ssize_t acpi_table_asl_compiler_id_show(struct config_item *cfg, ··· 161 161 { 162 162 struct acpi_table_header *h = get_header(cfg); 163 163 164 - if (!h) 165 - return -EINVAL; 164 + if (IS_ERR(h)) 165 + return PTR_ERR(h); 166 166 167 - return sprintf(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->asl_compiler_id); 167 + return sysfs_emit(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->asl_compiler_id); 168 168 } 169 169 170 170 static ssize_t acpi_table_asl_compiler_revision_show(struct config_item *cfg, ··· 172 172 { 173 173 struct acpi_table_header *h = get_header(cfg); 174 174 175 - if (!h) 176 - return -EINVAL; 175 + if (IS_ERR(h)) 176 + return PTR_ERR(h); 177 177 178 - return sprintf(str, "%d\n", h->asl_compiler_revision); 178 + return sysfs_emit(str, "%d\n", h->asl_compiler_revision); 179 179 } 180 180 181 181 CONFIGFS_ATTR_RO(acpi_table_, signature);
+3 -4
drivers/acpi/acpi_fpdt.c
··· 220 220 break; 221 221 222 222 default: 223 - pr_err(FW_BUG "Invalid record %d found.\n", record_header->type); 224 - return -EINVAL; 223 + /* Other types are reserved in ACPI 6.4 spec. */ 224 + break; 225 225 } 226 226 } 227 227 return 0; ··· 254 254 subtable->type); 255 255 break; 256 256 default: 257 - pr_info(FW_BUG "Invalid subtable type %d found.\n", 258 - subtable->type); 257 + /* Other types are reserved in ACPI 6.4 spec. */ 259 258 break; 260 259 } 261 260 offset += sizeof(*subtable);
+2 -2
drivers/acpi/acpi_pad.c
··· 249 249 250 250 static void acpi_pad_idle_cpus(unsigned int num_cpus) 251 251 { 252 - get_online_cpus(); 252 + cpus_read_lock(); 253 253 254 254 num_cpus = min_t(unsigned int, num_cpus, num_online_cpus()); 255 255 set_power_saving_task_num(num_cpus); 256 256 257 - put_online_cpus(); 257 + cpus_read_unlock(); 258 258 } 259 259 260 260 static uint32_t acpi_pad_idle_cpus_num(void)
+4 -4
drivers/acpi/acpi_processor.c
··· 182 182 return -ENODEV; 183 183 184 184 cpu_maps_update_begin(); 185 - cpu_hotplug_begin(); 185 + cpus_write_lock(); 186 186 187 187 ret = acpi_map_cpu(pr->handle, pr->phys_id, pr->acpi_id, &pr->id); 188 188 if (ret) ··· 203 203 pr->flags.need_hotplug_init = 1; 204 204 205 205 out: 206 - cpu_hotplug_done(); 206 + cpus_write_unlock(); 207 207 cpu_maps_update_done(); 208 208 return ret; 209 209 } ··· 454 454 per_cpu(processors, pr->id) = NULL; 455 455 456 456 cpu_maps_update_begin(); 457 - cpu_hotplug_begin(); 457 + cpus_write_lock(); 458 458 459 459 /* Remove the CPU. */ 460 460 arch_unregister_cpu(pr->id); 461 461 acpi_unmap_cpu(pr->id); 462 462 463 - cpu_hotplug_done(); 463 + cpus_write_unlock(); 464 464 cpu_maps_update_done(); 465 465 466 466 try_offline_node(cpu_to_node(pr->id));
+2 -3
drivers/acpi/acpica/dswexec.c
··· 561 561 op->common. 562 562 node->object, 563 563 NULL); 564 - if ACPI_FAILURE 565 - (status) { 564 + if (ACPI_FAILURE(status)) { 566 565 ACPI_EXCEPTION((AE_INFO, status, 567 566 "While writing to buffer field")); 568 - } 567 + } 569 568 } 570 569 ACPI_FREE(namepath); 571 570 status = AE_OK;
+6 -6
drivers/acpi/bus.c
··· 498 498 acpi_evaluate_ost(handle, type, ost_code, NULL); 499 499 } 500 500 501 - static void acpi_device_notify(acpi_handle handle, u32 event, void *data) 501 + static void acpi_notify_device(acpi_handle handle, u32 event, void *data) 502 502 { 503 503 struct acpi_device *device = data; 504 504 505 505 device->driver->ops.notify(device, event); 506 506 } 507 507 508 - static void acpi_device_notify_fixed(void *data) 508 + static void acpi_notify_device_fixed(void *data) 509 509 { 510 510 struct acpi_device *device = data; 511 511 512 512 /* Fixed hardware devices have no handles */ 513 - acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device); 513 + acpi_notify_device(NULL, ACPI_FIXED_HARDWARE_EVENT, device); 514 514 } 515 515 516 516 static u32 acpi_device_fixed_event(void *data) 517 517 { 518 - acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_device_notify_fixed, data); 518 + acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_notify_device_fixed, data); 519 519 return ACPI_INTERRUPT_HANDLED; 520 520 } 521 521 ··· 536 536 else 537 537 status = acpi_install_notify_handler(device->handle, 538 538 ACPI_DEVICE_NOTIFY, 539 - acpi_device_notify, 539 + acpi_notify_device, 540 540 device); 541 541 542 542 if (ACPI_FAILURE(status)) ··· 554 554 acpi_device_fixed_event); 555 555 else 556 556 acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, 557 - acpi_device_notify); 557 + acpi_notify_device); 558 558 } 559 559 560 560 /* Handle events targeting \_SB device (at present only graceful shutdown) */
+11
drivers/acpi/button.c
··· 79 79 }, 80 80 { 81 81 /* 82 + * Lenovo Yoga 9 14ITL5, initial notification of the LID device 83 + * never happens. 84 + */ 85 + .matches = { 86 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 87 + DMI_MATCH(DMI_PRODUCT_NAME, "82BG"), 88 + }, 89 + .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN, 90 + }, 91 + { 92 + /* 82 93 * Medion Akoya E2215T, notification of the LID device only 83 94 * happens on close, not on open and _LID always returns closed. 84 95 */
+9
drivers/acpi/dptf/dptf_pch_fivr.c
··· 90 90 91 91 PCH_FIVR_SHOW(freq_mhz_low_clock, GFC0) 92 92 PCH_FIVR_SHOW(freq_mhz_high_clock, GFC1) 93 + PCH_FIVR_SHOW(ssc_clock_info, GEMI) 94 + PCH_FIVR_SHOW(fivr_switching_freq_mhz, GFCS) 95 + PCH_FIVR_SHOW(fivr_switching_fault_status, GFFS) 93 96 PCH_FIVR_STORE(freq_mhz_low_clock, RFC0) 94 97 PCH_FIVR_STORE(freq_mhz_high_clock, RFC1) 95 98 96 99 static DEVICE_ATTR_RW(freq_mhz_low_clock); 97 100 static DEVICE_ATTR_RW(freq_mhz_high_clock); 101 + static DEVICE_ATTR_RO(ssc_clock_info); 102 + static DEVICE_ATTR_RO(fivr_switching_freq_mhz); 103 + static DEVICE_ATTR_RO(fivr_switching_fault_status); 98 104 99 105 static struct attribute *fivr_attrs[] = { 100 106 &dev_attr_freq_mhz_low_clock.attr, 101 107 &dev_attr_freq_mhz_high_clock.attr, 108 + &dev_attr_ssc_clock_info.attr, 109 + &dev_attr_fivr_switching_freq_mhz.attr, 110 + &dev_attr_fivr_switching_fault_status.attr, 102 111 NULL 103 112 }; 104 113
+14 -37
drivers/acpi/glue.c
··· 285 285 } 286 286 EXPORT_SYMBOL_GPL(acpi_unbind_one); 287 287 288 - static int acpi_device_notify(struct device *dev) 288 + void acpi_device_notify(struct device *dev) 289 289 { 290 290 struct acpi_bus_type *type = acpi_get_bus_type(dev); 291 291 struct acpi_device *adev; 292 292 int ret; 293 293 294 294 ret = acpi_bind_one(dev, NULL); 295 - if (ret && type) { 296 - struct acpi_device *adev; 295 + if (ret) { 296 + if (!type) 297 + goto err; 297 298 298 299 adev = type->find_companion(dev); 299 300 if (!adev) { 300 - pr_debug("Unable to get handle for %s\n", dev_name(dev)); 301 - ret = -ENODEV; 302 - goto out; 301 + dev_dbg(dev, "ACPI companion not found\n"); 302 + goto err; 303 303 } 304 304 ret = acpi_bind_one(dev, adev); 305 305 if (ret) 306 - goto out; 306 + goto err; 307 307 } 308 308 adev = ACPI_COMPANION(dev); 309 - if (!adev) 310 - goto out; 311 309 312 310 if (dev_is_platform(dev)) 313 311 acpi_configure_pmsi_domain(dev); ··· 315 317 else if (adev->handler && adev->handler->bind) 316 318 adev->handler->bind(dev); 317 319 318 - out: 319 - if (!ret) { 320 - struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 320 + acpi_handle_debug(ACPI_HANDLE(dev), "Bound to device %s\n", 321 + dev_name(dev)); 321 322 322 - acpi_get_name(ACPI_HANDLE(dev), ACPI_FULL_PATHNAME, &buffer); 323 - pr_debug("Device %s -> %s\n", dev_name(dev), (char *)buffer.pointer); 324 - kfree(buffer.pointer); 325 - } else { 326 - pr_debug("Device %s -> No ACPI support\n", dev_name(dev)); 327 - } 323 + return; 328 324 329 - return ret; 325 + err: 326 + dev_dbg(dev, "No ACPI support\n"); 330 327 } 331 328 332 - static int acpi_device_notify_remove(struct device *dev) 329 + void acpi_device_notify_remove(struct device *dev) 333 330 { 334 331 struct acpi_device *adev = ACPI_COMPANION(dev); 335 332 struct acpi_bus_type *type; 336 333 337 334 if (!adev) 338 - return 0; 335 + return; 339 336 340 337 type = acpi_get_bus_type(dev); 341 338 if (type && type->cleanup) ··· 339 346 adev->handler->unbind(dev); 340 347 341 348 acpi_unbind_one(dev); 342 - return 0; 343 - } 344 - 345 - int acpi_platform_notify(struct device *dev, enum kobject_action action) 346 - { 347 - switch (action) { 348 - case KOBJ_ADD: 349 - acpi_device_notify(dev); 350 - break; 351 - case KOBJ_REMOVE: 352 - acpi_device_notify_remove(dev); 353 - break; 354 - default: 355 - break; 356 - } 357 - return 0; 358 349 }
+1 -1
drivers/acpi/numa/Kconfig
··· 2 2 config ACPI_NUMA 3 3 bool "NUMA support" 4 4 depends on NUMA 5 - depends on (X86 || IA64 || ARM64) 5 + depends on (X86 || IA64 || ARM64 || LOONGARCH) 6 6 default y if IA64 || ARM64 7 7 8 8 config ACPI_HMAT
+1 -1
drivers/acpi/numa/srat.c
··· 206 206 return acpi_numa < 0; 207 207 } 208 208 209 - #if defined(CONFIG_X86) || defined(CONFIG_ARM64) 209 + #if defined(CONFIG_X86) || defined(CONFIG_ARM64) || defined(CONFIG_LOONGARCH) 210 210 /* 211 211 * Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for 212 212 * I/O localities since SRAT does not list them. I/O localities are
+16 -7
drivers/acpi/osl.c
··· 284 284 #define should_use_kmap(pfn) page_is_ram(pfn) 285 285 #endif 286 286 287 - static void __iomem *acpi_map(acpi_physical_address pg_off, unsigned long pg_sz) 287 + static void __iomem *acpi_map(acpi_physical_address pg_off, unsigned long pg_sz, 288 + bool memory) 288 289 { 289 290 unsigned long pfn; 290 291 ··· 295 294 return NULL; 296 295 return (void __iomem __force *)kmap(pfn_to_page(pfn)); 297 296 } else 298 - return acpi_os_ioremap(pg_off, pg_sz); 297 + return memory ? acpi_os_memmap(pg_off, pg_sz) : 298 + acpi_os_ioremap(pg_off, pg_sz); 299 299 } 300 300 301 301 static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr) ··· 311 309 } 312 310 313 311 /** 314 - * acpi_os_map_iomem - Get a virtual address for a given physical address range. 312 + * __acpi_os_map_iomem - Get a virtual address for a given physical address range. 315 313 * @phys: Start of the physical address range to map. 316 314 * @size: Size of the physical address range to map. 315 + * @memory: true if remapping memory, false if IO 317 316 * 318 317 * Look up the given physical address range in the list of existing ACPI memory 319 318 * mappings. If found, get a reference to it and return a pointer to it (its ··· 324 321 * During early init (when acpi_permanent_mmap has not been set yet) this 325 322 * routine simply calls __acpi_map_table() to get the job done. 326 323 */ 327 - void __iomem __ref 328 - *acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) 324 + static void __iomem __ref 325 + *__acpi_os_map_iomem(acpi_physical_address phys, acpi_size size, bool memory) 329 326 { 330 327 struct acpi_ioremap *map; 331 328 void __iomem *virt; ··· 356 353 357 354 pg_off = round_down(phys, PAGE_SIZE); 358 355 pg_sz = round_up(phys + size, PAGE_SIZE) - pg_off; 359 - virt = acpi_map(phys, size); 356 + virt = acpi_map(phys, size, memory); 360 357 if (!virt) { 361 358 mutex_unlock(&acpi_ioremap_lock); 362 359 kfree(map); ··· 375 372 mutex_unlock(&acpi_ioremap_lock); 376 373 return map->virt + (phys - map->phys); 377 374 } 375 + 376 + void __iomem *__ref 377 + acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) 378 + { 379 + return __acpi_os_map_iomem(phys, size, false); 380 + } 378 381 EXPORT_SYMBOL_GPL(acpi_os_map_iomem); 379 382 380 383 void *__ref acpi_os_map_memory(acpi_physical_address phys, acpi_size size) 381 384 { 382 - return (void *)acpi_os_map_iomem(phys, size); 385 + return (void *)__acpi_os_map_iomem(phys, size, true); 383 386 } 384 387 EXPORT_SYMBOL_GPL(acpi_os_map_memory); 385 388
+3
drivers/acpi/platform_profile.c
··· 106 106 } 107 107 108 108 err = cur_profile->profile_set(cur_profile, i); 109 + if (!err) 110 + sysfs_notify(acpi_kobj, NULL, "platform_profile"); 111 + 109 112 mutex_unlock(&profile_lock); 110 113 if (err) 111 114 return err;
+42 -5
drivers/acpi/pmic/intel_pmic_xpower.c
··· 178 178 { 179 179 int data, ret; 180 180 181 - /* GPIO1 LDO regulator needs special handling */ 182 - if (reg == XPOWER_GPI1_CTRL) 183 - return regmap_update_bits(regmap, reg, GPI1_LDO_MASK, 184 - on ? GPI1_LDO_ON : GPI1_LDO_OFF); 185 - 186 181 ret = iosf_mbi_block_punit_i2c_access(); 187 182 if (ret) 188 183 return ret; 184 + 185 + /* GPIO1 LDO regulator needs special handling */ 186 + if (reg == XPOWER_GPI1_CTRL) { 187 + ret = regmap_update_bits(regmap, reg, GPI1_LDO_MASK, 188 + on ? GPI1_LDO_ON : GPI1_LDO_OFF); 189 + goto out; 190 + } 189 191 190 192 if (regmap_read(regmap, reg, &data)) { 191 193 ret = -EIO; ··· 236 234 return ret; 237 235 238 236 if (adc_ts_pin_ctrl & AXP288_ADC_TS_CURRENT_ON_OFF_MASK) { 237 + /* 238 + * AXP288_ADC_TS_PIN_CTRL reads are cached by the regmap, so 239 + * this does to a single I2C-transfer, and thus there is no 240 + * need to explicitly call iosf_mbi_block_punit_i2c_access(). 241 + */ 239 242 ret = regmap_update_bits(regmap, AXP288_ADC_TS_PIN_CTRL, 240 243 AXP288_ADC_TS_CURRENT_ON_OFF_MASK, 241 244 AXP288_ADC_TS_CURRENT_ON_ONDEMAND); ··· 250 243 /* Wait a bit after switching the current-source */ 251 244 usleep_range(6000, 10000); 252 245 } 246 + 247 + ret = iosf_mbi_block_punit_i2c_access(); 248 + if (ret) 249 + return ret; 253 250 254 251 ret = regmap_bulk_read(regmap, AXP288_GP_ADC_H, buf, 2); 255 252 if (ret == 0) ··· 265 254 AXP288_ADC_TS_CURRENT_ON); 266 255 } 267 256 257 + iosf_mbi_unblock_punit_i2c_access(); 258 + 259 + return ret; 260 + } 261 + 262 + static int intel_xpower_exec_mipi_pmic_seq_element(struct regmap *regmap, 263 + u16 i2c_address, u32 reg_address, 264 + u32 value, u32 mask) 265 + { 266 + int ret; 267 + 268 + if (i2c_address != 0x34) { 269 + pr_err("%s: Unexpected i2c-addr: 0x%02x (reg-addr 0x%x value 0x%x mask 0x%x)\n", 270 + __func__, i2c_address, reg_address, value, mask); 271 + return -ENXIO; 272 + } 273 + 274 + ret = iosf_mbi_block_punit_i2c_access(); 275 + if (ret) 276 + return ret; 277 + 278 + ret = regmap_update_bits(regmap, reg_address, mask, value); 279 + 280 + iosf_mbi_unblock_punit_i2c_access(); 281 + 268 282 return ret; 269 283 } 270 284 ··· 297 261 .get_power = intel_xpower_pmic_get_power, 298 262 .update_power = intel_xpower_pmic_update_power, 299 263 .get_raw_temp = intel_xpower_pmic_get_raw_temp, 264 + .exec_mipi_pmic_seq_element = intel_xpower_exec_mipi_pmic_seq_element, 300 265 .power_table = power_table, 301 266 .power_table_count = ARRAY_SIZE(power_table), 302 267 .thermal_table = thermal_table,
+23 -15
drivers/acpi/power.c
··· 48 48 struct acpi_power_resource { 49 49 struct acpi_device device; 50 50 struct list_head list_node; 51 - char *name; 52 51 u32 system_level; 53 52 u32 order; 54 53 unsigned int ref_count; ··· 68 69 /* -------------------------------------------------------------------------- 69 70 Power Resource Management 70 71 -------------------------------------------------------------------------- */ 72 + 73 + static inline const char *resource_dev_name(struct acpi_power_resource *pr) 74 + { 75 + return dev_name(&pr->device.dev); 76 + } 71 77 72 78 static inline 73 79 struct acpi_power_resource *to_power_resource(struct acpi_device *device) ··· 268 264 269 265 dep->dev = dev; 270 266 list_add_tail(&dep->node, &resource->dependents); 271 - dev_dbg(dev, "added power dependency to [%s]\n", resource->name); 267 + dev_dbg(dev, "added power dependency to [%s]\n", 268 + resource_dev_name(resource)); 272 269 273 270 unlock: 274 271 mutex_unlock(&resource->resource_lock); ··· 288 283 list_del(&dep->node); 289 284 kfree(dep); 290 285 dev_dbg(dev, "removed power dependency to [%s]\n", 291 - resource->name); 286 + resource_dev_name(resource)); 292 287 break; 293 288 } 294 289 } ··· 361 356 362 357 static int __acpi_power_on(struct acpi_power_resource *resource) 363 358 { 359 + acpi_handle handle = resource->device.handle; 364 360 struct acpi_power_dependent_device *dep; 365 361 acpi_status status = AE_OK; 366 362 367 - status = acpi_evaluate_object(resource->device.handle, "_ON", NULL, NULL); 363 + status = acpi_evaluate_object(handle, "_ON", NULL, NULL); 368 364 if (ACPI_FAILURE(status)) { 369 365 resource->state = ACPI_POWER_RESOURCE_STATE_UNKNOWN; 370 366 return -ENODEV; ··· 373 367 374 368 resource->state = ACPI_POWER_RESOURCE_STATE_ON; 375 369 376 - pr_debug("Power resource [%s] turned on\n", resource->name); 370 + acpi_handle_debug(handle, "Power resource turned on\n"); 377 371 378 372 /* 379 373 * If there are other dependents on this power resource we need to ··· 386 380 387 381 list_for_each_entry(dep, &resource->dependents, node) { 388 382 dev_dbg(dep->dev, "runtime resuming because [%s] turned on\n", 389 - resource->name); 383 + resource_dev_name(resource)); 390 384 pm_request_resume(dep->dev); 391 385 } 392 386 ··· 398 392 int result = 0; 399 393 400 394 if (resource->ref_count++) { 401 - pr_debug("Power resource [%s] already on\n", resource->name); 395 + acpi_handle_debug(resource->device.handle, 396 + "Power resource already on\n"); 402 397 } else { 403 398 result = __acpi_power_on(resource); 404 399 if (result) ··· 420 413 421 414 static int __acpi_power_off(struct acpi_power_resource *resource) 422 415 { 416 + acpi_handle handle = resource->device.handle; 423 417 acpi_status status; 424 418 425 - status = acpi_evaluate_object(resource->device.handle, "_OFF", 426 - NULL, NULL); 419 + status = acpi_evaluate_object(handle, "_OFF", NULL, NULL); 427 420 if (ACPI_FAILURE(status)) { 428 421 resource->state = ACPI_POWER_RESOURCE_STATE_UNKNOWN; 429 422 return -ENODEV; ··· 431 424 432 425 resource->state = ACPI_POWER_RESOURCE_STATE_OFF; 433 426 434 - pr_debug("Power resource [%s] turned off\n", resource->name); 427 + acpi_handle_debug(handle, "Power resource turned off\n"); 435 428 436 429 return 0; 437 430 } ··· 441 434 int result = 0; 442 435 443 436 if (!resource->ref_count) { 444 - pr_debug("Power resource [%s] already off\n", resource->name); 437 + acpi_handle_debug(resource->device.handle, 438 + "Power resource already off\n"); 445 439 return 0; 446 440 } 447 441 448 442 if (--resource->ref_count) { 449 - pr_debug("Power resource [%s] still in use\n", resource->name); 443 + acpi_handle_debug(resource->device.handle, 444 + "Power resource still in use\n"); 450 445 } else { 451 446 result = __acpi_power_off(resource); 452 447 if (result) ··· 958 949 mutex_init(&resource->resource_lock); 959 950 INIT_LIST_HEAD(&resource->list_node); 960 951 INIT_LIST_HEAD(&resource->dependents); 961 - resource->name = device->pnp.bus_id; 962 952 strcpy(acpi_device_name(device), ACPI_POWER_DEVICE_NAME); 963 953 strcpy(acpi_device_class(device), ACPI_POWER_CLASS); 964 954 device->power.state = ACPI_STATE_UNKNOWN; ··· 1012 1004 1013 1005 if (state == ACPI_POWER_RESOURCE_STATE_OFF 1014 1006 && resource->ref_count) { 1015 - dev_dbg(&resource->device.dev, "Turning ON\n"); 1007 + acpi_handle_debug(resource->device.handle, "Turning ON\n"); 1016 1008 __acpi_power_on(resource); 1017 1009 } 1018 1010 ··· 1042 1034 */ 1043 1035 if (!resource->ref_count && 1044 1036 resource->state != ACPI_POWER_RESOURCE_STATE_OFF) { 1045 - dev_dbg(&resource->device.dev, "Turning OFF\n"); 1037 + acpi_handle_debug(resource->device.handle, "Turning OFF\n"); 1046 1038 __acpi_power_off(resource); 1047 1039 } 1048 1040
+2 -2
drivers/acpi/processor_idle.c
··· 1301 1301 if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) { 1302 1302 1303 1303 /* Protect against cpu-hotplug */ 1304 - get_online_cpus(); 1304 + cpus_read_lock(); 1305 1305 cpuidle_pause_and_lock(); 1306 1306 1307 1307 /* Disable all cpuidle devices */ ··· 1330 1330 } 1331 1331 } 1332 1332 cpuidle_resume_and_unlock(); 1333 - put_online_cpus(); 1333 + cpus_read_unlock(); 1334 1334 } 1335 1335 1336 1336 return 0;
+1
drivers/acpi/spcr.c
··· 136 136 break; 137 137 case ACPI_DBG2_16550_COMPATIBLE: 138 138 case ACPI_DBG2_16550_SUBSET: 139 + case ACPI_DBG2_16550_WITH_GAS: 139 140 uart = "uart"; 140 141 break; 141 142 default:
+3
drivers/base/base.h
··· 202 202 static inline int devtmpfs_create_node(struct device *dev) { return 0; } 203 203 static inline int devtmpfs_delete_node(struct device *dev) { return 0; } 204 204 #endif 205 + 206 + void software_node_notify(struct device *dev); 207 + void software_node_notify_remove(struct device *dev);
+16 -19
drivers/base/core.c
··· 2002 2002 } 2003 2003 #endif 2004 2004 2005 - static int 2006 - device_platform_notify(struct device *dev, enum kobject_action action) 2005 + static void device_platform_notify(struct device *dev) 2007 2006 { 2008 - int ret; 2007 + acpi_device_notify(dev); 2009 2008 2010 - ret = acpi_platform_notify(dev, action); 2011 - if (ret) 2012 - return ret; 2009 + software_node_notify(dev); 2013 2010 2014 - ret = software_node_notify(dev, action); 2015 - if (ret) 2016 - return ret; 2017 - 2018 - if (platform_notify && action == KOBJ_ADD) 2011 + if (platform_notify) 2019 2012 platform_notify(dev); 2020 - else if (platform_notify_remove && action == KOBJ_REMOVE) 2013 + } 2014 + 2015 + static void device_platform_notify_remove(struct device *dev) 2016 + { 2017 + acpi_device_notify_remove(dev); 2018 + 2019 + software_node_notify_remove(dev); 2020 + 2021 + if (platform_notify_remove) 2021 2022 platform_notify_remove(dev); 2022 - return 0; 2023 2023 } 2024 2024 2025 2025 /** ··· 3292 3292 } 3293 3293 3294 3294 /* notify platform of device entry */ 3295 - error = device_platform_notify(dev, KOBJ_ADD); 3296 - if (error) 3297 - goto platform_error; 3295 + device_platform_notify(dev); 3298 3296 3299 3297 error = device_create_file(dev, &dev_attr_uevent); 3300 3298 if (error) ··· 3395 3397 SymlinkError: 3396 3398 device_remove_file(dev, &dev_attr_uevent); 3397 3399 attrError: 3398 - device_platform_notify(dev, KOBJ_REMOVE); 3399 - platform_error: 3400 + device_platform_notify_remove(dev); 3400 3401 kobject_uevent(&dev->kobj, KOBJ_REMOVE); 3401 3402 glue_dir = get_glue_dir(dev); 3402 3403 kobject_del(&dev->kobj); ··· 3540 3543 bus_remove_device(dev); 3541 3544 device_pm_remove(dev); 3542 3545 driver_deferred_probe_del(dev); 3543 - device_platform_notify(dev, KOBJ_REMOVE); 3546 + device_platform_notify_remove(dev); 3544 3547 device_remove_properties(dev); 3545 3548 device_links_purge(dev); 3546 3549
+32 -29
drivers/base/swnode.c
··· 11 11 #include <linux/property.h> 12 12 #include <linux/slab.h> 13 13 14 + #include "base.h" 15 + 14 16 struct swnode { 15 17 struct kobject kobj; 16 18 struct fwnode_handle fwnode; ··· 1055 1053 * balance. 1056 1054 */ 1057 1055 if (device_is_registered(dev)) 1058 - software_node_notify(dev, KOBJ_ADD); 1056 + software_node_notify(dev); 1059 1057 1060 1058 return 0; 1061 1059 } ··· 1076 1074 return; 1077 1075 1078 1076 if (device_is_registered(dev)) 1079 - software_node_notify(dev, KOBJ_REMOVE); 1077 + software_node_notify_remove(dev); 1078 + 1080 1079 set_secondary_fwnode(dev, NULL); 1081 1080 kobject_put(&swnode->kobj); 1082 1081 } ··· 1120 1117 } 1121 1118 EXPORT_SYMBOL_GPL(device_create_managed_software_node); 1122 1119 1123 - int software_node_notify(struct device *dev, unsigned long action) 1120 + void software_node_notify(struct device *dev) 1124 1121 { 1125 1122 struct swnode *swnode; 1126 1123 int ret; 1127 1124 1128 1125 swnode = dev_to_swnode(dev); 1129 1126 if (!swnode) 1130 - return 0; 1127 + return; 1131 1128 1132 - switch (action) { 1133 - case KOBJ_ADD: 1134 - ret = sysfs_create_link(&dev->kobj, &swnode->kobj, "software_node"); 1135 - if (ret) 1136 - break; 1129 + ret = sysfs_create_link(&dev->kobj, &swnode->kobj, "software_node"); 1130 + if (ret) 1131 + return; 1137 1132 1138 - ret = sysfs_create_link(&swnode->kobj, &dev->kobj, 1139 - dev_name(dev)); 1140 - if (ret) { 1141 - sysfs_remove_link(&dev->kobj, "software_node"); 1142 - break; 1143 - } 1144 - kobject_get(&swnode->kobj); 1145 - break; 1146 - case KOBJ_REMOVE: 1147 - sysfs_remove_link(&swnode->kobj, dev_name(dev)); 1133 + ret = sysfs_create_link(&swnode->kobj, &dev->kobj, dev_name(dev)); 1134 + if (ret) { 1148 1135 sysfs_remove_link(&dev->kobj, "software_node"); 1149 - kobject_put(&swnode->kobj); 1150 - 1151 - if (swnode->managed) { 1152 - set_secondary_fwnode(dev, NULL); 1153 - kobject_put(&swnode->kobj); 1154 - } 1155 - break; 1156 - default: 1157 - break; 1136 + return; 1158 1137 } 1159 1138 1160 - return 0; 1139 + kobject_get(&swnode->kobj); 1140 + } 1141 + 1142 + void software_node_notify_remove(struct device *dev) 1143 + { 1144 + struct swnode *swnode; 1145 + 1146 + swnode = dev_to_swnode(dev); 1147 + if (!swnode) 1148 + return; 1149 + 1150 + sysfs_remove_link(&swnode->kobj, dev_name(dev)); 1151 + sysfs_remove_link(&dev->kobj, "software_node"); 1152 + kobject_put(&swnode->kobj); 1153 + 1154 + if (swnode->managed) { 1155 + set_secondary_fwnode(dev, NULL); 1156 + kobject_put(&swnode->kobj); 1157 + } 1161 1158 } 1162 1159 1163 1160 static int __init software_node_init(void)
+1
include/acpi/acnames.h
··· 20 20 #define METHOD_NAME__CLS "_CLS" 21 21 #define METHOD_NAME__CRS "_CRS" 22 22 #define METHOD_NAME__DDN "_DDN" 23 + #define METHOD_NAME__DIS "_DIS" 23 24 #define METHOD_NAME__DMA "_DMA" 24 25 #define METHOD_NAME__HID "_HID" 25 26 #define METHOD_NAME__INI "_INI"
+1 -1
include/acpi/acoutput.h
··· 415 415 /* Conditional execution */ 416 416 417 417 #define ACPI_DEBUG_EXEC(a) a 418 - #define ACPI_DEBUG_ONLY_MEMBERS(a) a; 418 + #define ACPI_DEBUG_ONLY_MEMBERS(a) a 419 419 #define _VERBOSE_STRUCTURES 420 420 421 421 /* Various object display routines for debug */
+8
include/acpi/acpi_io.h
··· 14 14 } 15 15 #endif 16 16 17 + #ifndef acpi_os_memmap 18 + static inline void __iomem *acpi_os_memmap(acpi_physical_address phys, 19 + acpi_size size) 20 + { 21 + return ioremap_cache(phys, size); 22 + } 23 + #endif 24 + 17 25 extern bool acpi_permanent_mmap; 18 26 19 27 void __iomem __ref
+1 -1
include/acpi/acpixf.h
··· 12 12 13 13 /* Current ACPICA subsystem version in YYYYMMDD format */ 14 14 15 - #define ACPI_CA_VERSION 0x20210604 15 + #define ACPI_CA_VERSION 0x20210730 16 16 17 17 #include <acpi/acconfig.h> 18 18 #include <acpi/actypes.h>
+15 -1
include/acpi/actbl1.h
··· 24 24 * file. Useful because they make it more difficult to inadvertently type in 25 25 * the wrong signature. 26 26 */ 27 + #define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */ 27 28 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ 28 29 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ 29 30 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ ··· 483 482 * DBG2 - Debug Port Table 2 484 483 * Version 0 (Both main table and subtables) 485 484 * 486 - * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015 485 + * Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020 487 486 * 488 487 ******************************************************************************/ 489 488 ··· 533 532 534 533 #define ACPI_DBG2_16550_COMPATIBLE 0x0000 535 534 #define ACPI_DBG2_16550_SUBSET 0x0001 535 + #define ACPI_DBG2_MAX311XE_SPI 0x0002 536 536 #define ACPI_DBG2_ARM_PL011 0x0003 537 + #define ACPI_DBG2_MSM8X60 0x0004 538 + #define ACPI_DBG2_16550_NVIDIA 0x0005 539 + #define ACPI_DBG2_TI_OMAP 0x0006 540 + #define ACPI_DBG2_APM88XXXX 0x0008 541 + #define ACPI_DBG2_MSM8974 0x0009 542 + #define ACPI_DBG2_SAM5250 0x000A 543 + #define ACPI_DBG2_INTEL_USIF 0x000B 544 + #define ACPI_DBG2_IMX6 0x000C 537 545 #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D 538 546 #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E 539 547 #define ACPI_DBG2_ARM_DCC 0x000F 540 548 #define ACPI_DBG2_BCM2835 0x0010 549 + #define ACPI_DBG2_SDM845_1_8432MHZ 0x0011 550 + #define ACPI_DBG2_16550_WITH_GAS 0x0012 551 + #define ACPI_DBG2_SDM845_7_372MHZ 0x0013 552 + #define ACPI_DBG2_INTEL_LPSS 0x0014 541 553 542 554 #define ACPI_DBG2_1394_STANDARD 0x0000 543 555
+170
include/acpi/actbl2.h
··· 69 69 70 70 /******************************************************************************* 71 71 * 72 + * AEST - Arm Error Source Table 73 + * 74 + * Conforms to: ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document 75 + * September 2020. 76 + * 77 + ******************************************************************************/ 78 + 79 + struct acpi_table_aest { 80 + struct acpi_table_header header; 81 + void *node_array[]; 82 + }; 83 + 84 + /* Common Subtable header - one per Node Structure (Subtable) */ 85 + 86 + struct acpi_aest_hdr { 87 + u8 type; 88 + u16 length; 89 + u8 reserved; 90 + u32 node_specific_offset; 91 + u32 node_interface_offset; 92 + u32 node_interrupt_offset; 93 + u32 node_interrupt_count; 94 + u64 timestamp_rate; 95 + u64 reserved1; 96 + u64 error_injection_rate; 97 + }; 98 + 99 + /* Values for Type above */ 100 + 101 + #define ACPI_AEST_PROCESSOR_ERROR_NODE 0 102 + #define ACPI_AEST_MEMORY_ERROR_NODE 1 103 + #define ACPI_AEST_SMMU_ERROR_NODE 2 104 + #define ACPI_AEST_VENDOR_ERROR_NODE 3 105 + #define ACPI_AEST_GIC_ERROR_NODE 4 106 + #define ACPI_AEST_NODE_TYPE_RESERVED 5 /* 5 and above are reserved */ 107 + 108 + /* 109 + * AEST subtables (Error nodes) 110 + */ 111 + 112 + /* 0: Processor Error */ 113 + 114 + typedef struct acpi_aest_processor { 115 + u32 processor_id; 116 + u8 resource_type; 117 + u8 reserved; 118 + u8 flags; 119 + u8 revision; 120 + u64 processor_affinity; 121 + 122 + } acpi_aest_processor; 123 + 124 + /* Values for resource_type above, related structs below */ 125 + 126 + #define ACPI_AEST_CACHE_RESOURCE 0 127 + #define ACPI_AEST_TLB_RESOURCE 1 128 + #define ACPI_AEST_GENERIC_RESOURCE 2 129 + #define ACPI_AEST_RESOURCE_RESERVED 3 /* 3 and above are reserved */ 130 + 131 + /* 0R: Processor Cache Resource Substructure */ 132 + 133 + typedef struct acpi_aest_processor_cache { 134 + u32 cache_reference; 135 + u32 reserved; 136 + 137 + } acpi_aest_processor_cache; 138 + 139 + /* Values for cache_type above */ 140 + 141 + #define ACPI_AEST_CACHE_DATA 0 142 + #define ACPI_AEST_CACHE_INSTRUCTION 1 143 + #define ACPI_AEST_CACHE_UNIFIED 2 144 + #define ACPI_AEST_CACHE_RESERVED 3 /* 3 and above are reserved */ 145 + 146 + /* 1R: Processor TLB Resource Substructure */ 147 + 148 + typedef struct acpi_aest_processor_tlb { 149 + u32 tlb_level; 150 + u32 reserved; 151 + 152 + } acpi_aest_processor_tlb; 153 + 154 + /* 2R: Processor Generic Resource Substructure */ 155 + 156 + typedef struct acpi_aest_processor_generic { 157 + u8 *resource; 158 + 159 + } acpi_aest_processor_generic; 160 + 161 + /* 1: Memory Error */ 162 + 163 + typedef struct acpi_aest_memory { 164 + u32 srat_proximity_domain; 165 + 166 + } acpi_aest_memory; 167 + 168 + /* 2: Smmu Error */ 169 + 170 + typedef struct acpi_aest_smmu { 171 + u32 iort_node_reference; 172 + u32 subcomponent_reference; 173 + 174 + } acpi_aest_smmu; 175 + 176 + /* 3: Vendor Defined */ 177 + 178 + typedef struct acpi_aest_vendor { 179 + u32 acpi_hid; 180 + u32 acpi_uid; 181 + u8 vendor_specific_data[16]; 182 + 183 + } acpi_aest_vendor; 184 + 185 + /* 4: Gic Error */ 186 + 187 + typedef struct acpi_aest_gic { 188 + u32 interface_type; 189 + u32 instance_id; 190 + 191 + } acpi_aest_gic; 192 + 193 + /* Values for interface_type above */ 194 + 195 + #define ACPI_AEST_GIC_CPU 0 196 + #define ACPI_AEST_GIC_DISTRIBUTOR 1 197 + #define ACPI_AEST_GIC_REDISTRIBUTOR 2 198 + #define ACPI_AEST_GIC_ITS 3 199 + #define ACPI_AEST_GIC_RESERVED 4 /* 4 and above are reserved */ 200 + 201 + /* Node Interface Structure */ 202 + 203 + typedef struct acpi_aest_node_interface { 204 + u8 type; 205 + u8 reserved[3]; 206 + u32 flags; 207 + u64 address; 208 + u32 error_record_index; 209 + u32 error_record_count; 210 + u64 error_record_implemented; 211 + u64 error_status_reporting; 212 + u64 addressing_mode; 213 + 214 + } acpi_aest_node_interface; 215 + 216 + /* Values for Type field above */ 217 + 218 + #define ACPI_AEST_NODE_SYSTEM_REGISTER 0 219 + #define ACPI_AEST_NODE_MEMORY_MAPPED 1 220 + #define ACPI_AEST_XFACE_RESERVED 2 /* 2 and above are reserved */ 221 + 222 + /* Node Interrupt Structure */ 223 + 224 + typedef struct acpi_aest_node_interrupt { 225 + u8 type; 226 + u8 reserved[2]; 227 + u8 flags; 228 + u32 gsiv; 229 + u8 iort_id; 230 + u8 reserved1[3]; 231 + 232 + } acpi_aest_node_interrupt; 233 + 234 + /* Values for Type field above */ 235 + 236 + #define ACPI_AEST_NODE_FAULT_HANDLING 0 237 + #define ACPI_AEST_NODE_ERROR_RECOVERY 1 238 + #define ACPI_AEST_XRUPT_RESERVED 2 /* 2 and above are reserved */ 239 + 240 + /******************************************************************************* 241 + * 72 242 * BDAT - BIOS Data ACPI Table 73 243 * 74 244 * Conforms to "BIOS Data ACPI Table", Interface Specification v4.0 Draft 5
+4
include/acpi/actbl3.h
··· 723 723 u16 arguments_length; 724 724 }; 725 725 726 + struct acpi_wpbt_unicode { 727 + u16 *unicode_string; 728 + }; 729 + 726 730 /******************************************************************************* 727 731 * 728 732 * WSMT - Windows SMM Security Mitigations Table
+5 -7
include/linux/acpi.h
··· 249 249 /* the following numa functions are architecture-dependent */ 250 250 void acpi_numa_slit_init (struct acpi_table_slit *slit); 251 251 252 - #if defined(CONFIG_X86) || defined(CONFIG_IA64) 252 + #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_LOONGARCH) 253 253 void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); 254 254 #else 255 255 static inline void ··· 1380 1380 #endif 1381 1381 1382 1382 #ifdef CONFIG_ACPI 1383 - extern int acpi_platform_notify(struct device *dev, enum kobject_action action); 1383 + extern void acpi_device_notify(struct device *dev); 1384 + extern void acpi_device_notify_remove(struct device *dev); 1384 1385 #else 1385 - static inline int 1386 - acpi_platform_notify(struct device *dev, enum kobject_action action) 1387 - { 1388 - return 0; 1389 - } 1386 + static inline void acpi_device_notify(struct device *dev) { } 1387 + static inline void acpi_device_notify_remove(struct device *dev) { } 1390 1388 #endif 1391 1389 1392 1390 #endif /*_LINUX_ACPI_H*/
-2
include/linux/property.h
··· 484 484 int software_node_register(const struct software_node *node); 485 485 void software_node_unregister(const struct software_node *node); 486 486 487 - int software_node_notify(struct device *dev, unsigned long action); 488 - 489 487 struct fwnode_handle * 490 488 fwnode_create_software_node(const struct property_entry *properties, 491 489 const struct fwnode_handle *parent);