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

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

Pull ACPI updates from Rafael Wysocki:
"These update the ACPICA code in the kernel to upstream revision
20230331, fix the ACPI SBS driver and the evaluation of the _PDC
method on Xen dom0 in the ACPI processor driver, update the ACPI
driver for Intel SoCs and clean up code in multiple places.

Specifics:

- Update the ACPICA code in the kernel to upstream revision 20230331
including the following changes:
* Delete bogus node_array array of pointers from AEST table
(Jessica Clarke)
* Add support for trace buffer extension in GICC to the ACPI MADT
parser (Xiongfeng Wang)
* Add missing macro ACPI_FUNCTION_TRACE() for
acpi_ns_repair_HID() (Xiongfeng Wang)
* Add missing tables to astable (Pedro Falcato)
* Add support for 64 bit loong_arch compilation to ACPICA (Huacai
Chen)
* Add support for ASPT table in disassembler to ACPICA (Jeremi
Piotrowski)
* Add support for Arm's MPAM ACPI table version 2 (Hesham
Almatary)
* Update all copyrights/signons in ACPICA to 2023 (Bob Moore)
* Add support for ClockInput resource (v6.5) (Niyas Sait)
* Add RISC-V INTC interrupt controller definition to the list of
supported interrupt controllers for MADT (Sunil V L)
* Add structure definitions for the RISC-V RHCT ACPI table (Sunil
V L)
* Address several cases in which the ACPICA code might lead to
undefined behavior (Tamir Duberstein)
* Make ACPICA code support flexible arrays properly (Kees Cook)
* Check null return of ACPI_ALLOCATE_ZEROED in
acpi_db_display_objects() (void0red)
* Add os specific support for Zephyr RTOS to ACPICA (Najumon)
* Update version to 20230331 (Bob Moore)

- Fix evaluating the _PDC ACPI control method when running as Xen
dom0 (Roger Pau Monne)

- Use platform devices to load ACPI PPC and PCC drivers (Petr Pavlu)

- Check for null return of devm_kzalloc() in fch_misc_setup() (Kang
Chen)

- Log a message if enable_irq_wake() fails for the ACPI SCI (Simon
Gaiser)

- Initialize the correct IOMMU fwspec while parsing ACPI VIOT
(Jean-Philippe Brucker)

- Amend indentation and prefix error messages with FW_BUG in the ACPI
SPCR parsing code (Andy Shevchenko)

- Enable ACPI sysfs support for CCEL records (Kuppuswamy
Sathyanarayanan)

- Make the APEI error injection code warn on invalid arguments when
explicitly indicated by platform (Shuai Xue)

- Add CXL error types to the error injection code in APEI (Tony Luck)

- Refactor acpi_data_prop_read_single() (Andy Shevchenko)

- Fix two issues in the ACPI SBS driver (Armin Wolf)

- Replace ternary operator with min_t() in the generic ACPI thermal
zone driver (Jiangshan Yi)

- Ensure that ACPI notify handlers are not running after removal and
clean up code in acpi_sb_notify() (Rafael Wysocki)

- Remove register_backlight_delay module option and code and remove
quirks for false-positive backlight control support advertised on
desktop boards (Hans de Goede)

- Replace irqdomain.h include with struct declarations in ACPI
headers and update several pieces of code previously including of.h
implicitly through those headers (Rob Herring)

- Fix acpi_evaluate_dsm_typed() redefinition error (Kiran K)

- Update the pm_profile sysfs attribute documentation (Rafael
Wysocki)

- Add 80862289 ACPI _HID for second PWM controller on Cherry Trail to
the ACPI driver for Intel SoCs (Hans de Goede)"

* tag 'acpi-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (64 commits)
ACPI: LPSS: Add 80862289 ACPI _HID for second PWM controller on Cherry Trail
ACPI: bus: Ensure that notify handlers are not running after removal
ACPI: bus: Add missing braces to acpi_sb_notify()
ACPI: video: Remove desktops without backlight DMI quirks
ACPI: video: Remove register_backlight_delay module option and code
ACPI: Replace irqdomain.h include with struct declarations
fpga: lattice-sysconfig-spi: Add explicit include for of.h
tpm: atmel: Add explicit include for of.h
virtio-mmio: Add explicit include for of.h
pata: ixp4xx: Add explicit include for of.h
ata: pata_macio: Add explicit include of irqdomain.h
serial: 8250_tegra: Add explicit include for of.h
net: rfkill-gpio: Add explicit include for of.h
staging: iio: resolver: ad2s1210: Add explicit include for of.h
iio: adc: ad7292: Add explicit include for of.h
ACPICA: Update version to 20230331
ACPICA: add os specific support for Zephyr RTOS
ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array
ACPICA: acpi_madt_oem_data: Fix flexible array member definition
...

+1014 -439
+11 -9
Documentation/ABI/stable/sysfs-acpi-pmprofile
··· 2 2 Date: 03-Nov-2011 3 3 KernelVersion: v3.2 4 4 Contact: linux-acpi@vger.kernel.org 5 - Description: The ACPI pm_profile sysfs interface exports the platform 6 - power management (and performance) requirement expectations 7 - as provided by BIOS. The integer value is directly passed as 8 - retrieved from the FADT ACPI table. 5 + Description: The ACPI pm_profile sysfs interface exposes the preferred 6 + power management (and performance) profile of the platform 7 + as provided in the ACPI FADT Preferred_PM_Profile field. 9 8 10 - Values: For possible values see ACPI specification: 11 - 5.2.9 Fixed ACPI Description Table (FADT) 12 - Field: Preferred_PM_Profile 9 + The integer value is directly passed as retrieved from the FADT. 13 10 14 - Currently these values are defined by spec: 11 + Values: For the possible values refer to the Preferred_PM_Profile field 12 + definition in Table 5.9 "FADT Format", Section 5.2.9 "Fixed ACPI 13 + Description Table (FADT)" of the ACPI specification. 14 + 15 + As of ACPI 6.5, the following values are defined: 15 16 16 17 == ================= 17 18 0 Unspecified ··· 23 22 5 SOHO Server 24 23 6 Appliance PC 25 24 7 Performance Server 26 - >7 Reserved 25 + 8 Tablet 26 + >8 Reserved 27 27 == =================
+2
drivers/acpi/acpi_apd.c
··· 83 83 if (!acpi_dev_get_property(adev, "clk-name", ACPI_TYPE_STRING, &obj)) { 84 84 clk_data->name = devm_kzalloc(&adev->dev, obj->string.length, 85 85 GFP_KERNEL); 86 + if (!clk_data->name) 87 + return -ENOMEM; 86 88 87 89 strcpy(clk_data->name, obj->string.pointer); 88 90 } else {
+7
drivers/acpi/acpi_lpss.c
··· 271 271 .resume_from_noirq = true, 272 272 }; 273 273 274 + static const struct lpss_device_desc bsw_pwm2_dev_desc = { 275 + .flags = LPSS_SAVE_CTX_ONCE | LPSS_NO_D3_DELAY, 276 + .prv_offset = 0x800, 277 + .resume_from_noirq = true, 278 + }; 279 + 274 280 static const struct lpss_device_desc byt_uart_dev_desc = { 275 281 .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX, 276 282 .clk_con_id = "baudclk", ··· 374 368 /* Braswell LPSS devices */ 375 369 { "80862286", LPSS_ADDR(lpss_dma_desc) }, 376 370 { "80862288", LPSS_ADDR(bsw_pwm_dev_desc) }, 371 + { "80862289", LPSS_ADDR(bsw_pwm2_dev_desc) }, 377 372 { "8086228A", LPSS_ADDR(bsw_uart_dev_desc) }, 378 373 { "8086228E", LPSS_ADDR(bsw_spi_dev_desc) }, 379 374 { "808622C0", LPSS_ADDR(lpss_dma_desc) },
+40 -2
drivers/acpi/acpi_processor.c
··· 15 15 #include <linux/kernel.h> 16 16 #include <linux/module.h> 17 17 #include <linux/pci.h> 18 + #include <linux/platform_device.h> 18 19 19 20 #include <acpi/processor.h> 20 21 ··· 149 148 return result; 150 149 } 151 150 151 + /* Create a platform device to represent a CPU frequency control mechanism. */ 152 + static void cpufreq_add_device(const char *name) 153 + { 154 + struct platform_device *pdev; 155 + 156 + pdev = platform_device_register_simple(name, PLATFORM_DEVID_NONE, NULL, 0); 157 + if (IS_ERR(pdev)) 158 + pr_info("%s device creation failed: %ld\n", name, PTR_ERR(pdev)); 159 + } 160 + 161 + #ifdef CONFIG_X86 162 + /* Check presence of Processor Clocking Control by searching for \_SB.PCCH. */ 163 + static void __init acpi_pcc_cpufreq_init(void) 164 + { 165 + acpi_status status; 166 + acpi_handle handle; 167 + 168 + status = acpi_get_handle(NULL, "\\_SB", &handle); 169 + if (ACPI_FAILURE(status)) 170 + return; 171 + 172 + if (acpi_has_method(handle, "PCCH")) 173 + cpufreq_add_device("pcc-cpufreq"); 174 + } 175 + #else 176 + static void __init acpi_pcc_cpufreq_init(void) {} 177 + #endif /* CONFIG_X86 */ 178 + 152 179 /* Initialization */ 153 180 #ifdef CONFIG_ACPI_HOTPLUG_CPU 154 181 int __weak acpi_map_cpu(acpi_handle handle, ··· 309 280 dev_dbg(&device->dev, "Failed to get CPU physical ID.\n"); 310 281 311 282 pr->id = acpi_map_cpuid(pr->phys_id, pr->acpi_id); 312 - if (!cpu0_initialized && !acpi_has_cpu_in_madt()) { 283 + if (!cpu0_initialized) { 313 284 cpu0_initialized = 1; 314 285 /* 315 286 * Handle UP system running SMP kernel, with no CPU 316 287 * entry in MADT 317 288 */ 318 - if (invalid_logical_cpuid(pr->id) && (num_online_cpus() == 1)) 289 + if (!acpi_has_cpu_in_madt() && invalid_logical_cpuid(pr->id) && 290 + (num_online_cpus() == 1)) 319 291 pr->id = 0; 292 + /* 293 + * Check availability of Processor Performance Control by 294 + * looking at the presence of the _PCT object under the first 295 + * processor definition. 296 + */ 297 + if (acpi_has_method(pr->handle, "_PCT")) 298 + cpufreq_add_device("acpi-cpufreq"); 320 299 } 321 300 322 301 /* ··· 723 686 acpi_processor_check_duplicates(); 724 687 acpi_scan_add_handler_with_hotplug(&processor_handler, "processor"); 725 688 acpi_scan_add_handler(&processor_container_handler); 689 + acpi_pcc_cpufreq_init(); 726 690 } 727 691 728 692 #ifdef CONFIG_ACPI_PROCESSOR_CSTATE
-38
drivers/acpi/acpi_video.c
··· 70 70 static int only_lcd = -1; 71 71 module_param(only_lcd, int, 0444); 72 72 73 - static int register_backlight_delay; 74 - module_param(register_backlight_delay, int, 0444); 75 - MODULE_PARM_DESC(register_backlight_delay, 76 - "Delay in seconds before doing fallback (non GPU driver triggered) " 77 - "backlight registration, set to 0 to disable."); 78 - 79 73 static bool may_report_brightness_keys; 80 74 static int register_count; 81 75 static DEFINE_MUTEX(register_count_mutex); ··· 78 84 static int acpi_video_bus_add(struct acpi_device *device); 79 85 static void acpi_video_bus_remove(struct acpi_device *device); 80 86 static void acpi_video_bus_notify(struct acpi_device *device, u32 event); 81 - static void acpi_video_bus_register_backlight_work(struct work_struct *ignored); 82 - static DECLARE_DELAYED_WORK(video_bus_register_backlight_work, 83 - acpi_video_bus_register_backlight_work); 84 87 85 88 /* 86 89 * Indices in the _BCL method response: the first two items are special, ··· 2087 2096 kfree(video); 2088 2097 } 2089 2098 2090 - static void acpi_video_bus_register_backlight_work(struct work_struct *ignored) 2091 - { 2092 - acpi_video_register_backlight(); 2093 - } 2094 - 2095 2099 static int __init is_i740(struct pci_dev *dev) 2096 2100 { 2097 2101 if (dev->device == 0x00D1) ··· 2169 2183 return false; 2170 2184 } 2171 2185 2172 - /* 2173 - * At least one graphics driver has reported that no LCD is connected 2174 - * via the native interface. cancel the registration for fallback acpi_video0. 2175 - * If another driver still deems this necessary, it can explicitly register it. 2176 - */ 2177 - void acpi_video_report_nolcd(void) 2178 - { 2179 - cancel_delayed_work(&video_bus_register_backlight_work); 2180 - } 2181 - EXPORT_SYMBOL(acpi_video_report_nolcd); 2182 - 2183 2186 int acpi_video_register(void) 2184 2187 { 2185 2188 int ret = 0; ··· 2197 2222 */ 2198 2223 register_count = 1; 2199 2224 2200 - /* 2201 - * acpi_video_bus_add() skips registering the userspace visible 2202 - * backlight_device. The intend is for this to be registered by the 2203 - * drm/kms driver calling acpi_video_register_backlight() *after* it is 2204 - * done setting up its own native backlight device. The delayed work 2205 - * ensures that acpi_video_register_backlight() always gets called 2206 - * eventually, in case there is no drm/kms driver or it is disabled. 2207 - */ 2208 - if (register_backlight_delay) 2209 - schedule_delayed_work(&video_bus_register_backlight_work, 2210 - register_backlight_delay * HZ); 2211 - 2212 2225 leave: 2213 2226 mutex_unlock(&register_count_mutex); 2214 2227 return ret; ··· 2207 2244 { 2208 2245 mutex_lock(&register_count_mutex); 2209 2246 if (register_count) { 2210 - cancel_delayed_work_sync(&video_bus_register_backlight_work); 2211 2247 acpi_bus_unregister_driver(&acpi_video_bus); 2212 2248 register_count = 0; 2213 2249 may_report_brightness_keys = false;
+1 -1
drivers/acpi/acpica/acapps.h
··· 3 3 * 4 4 * Module Name: acapps - common include for ACPI applications/tools 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/accommon.h
··· 3 3 * 4 4 * Name: accommon.h - Common include files for generation of ACPICA source 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acconvert.h
··· 3 3 * 4 4 * Module Name: acapps - common include for ACPI applications/tools 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acdebug.h
··· 3 3 * 4 4 * Name: acdebug.h - ACPI/AML debugger 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acdispat.h
··· 3 3 * 4 4 * Name: acdispat.h - dispatcher (parser to interpreter interface) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acevents.h
··· 3 3 * 4 4 * Name: acevents.h - Event subcomponent prototypes and defines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acglobal.h
··· 3 3 * 4 4 * Name: acglobal.h - Declarations for global variables 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/achware.h
··· 3 3 * 4 4 * Name: achware.h -- hardware specific interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acinterp.h
··· 3 3 * 4 4 * Name: acinterp.h - Interpreter subcomponent prototypes and defines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -2
drivers/acpi/acpica/aclocal.h
··· 3 3 * 4 4 * Name: aclocal.h - Internal data types used across the ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 1122 1122 #define ACPI_RESOURCE_NAME_PIN_GROUP 0x90 1123 1123 #define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION 0x91 1124 1124 #define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG 0x92 1125 - #define ACPI_RESOURCE_NAME_LARGE_MAX 0x92 1125 + #define ACPI_RESOURCE_NAME_CLOCK_INPUT 0x93 1126 + #define ACPI_RESOURCE_NAME_LARGE_MAX 0x94 1126 1127 1127 1128 /***************************************************************************** 1128 1129 *
+1 -1
drivers/acpi/acpica/acmacros.h
··· 3 3 * 4 4 * Name: acmacros.h - C macros for the entire subsystem. 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acnamesp.h
··· 3 3 * 4 4 * Name: acnamesp.h - Namespace subcomponent prototypes and defines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acobject.h
··· 3 3 * 4 4 * Name: acobject.h - Definition of union acpi_operand_object (Internal object only) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acopcode.h
··· 3 3 * 4 4 * Name: acopcode.h - AML opcode information for the AML parser and interpreter 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acparser.h
··· 3 3 * 4 4 * Module Name: acparser.h - AML Parser subcomponent prototypes and defines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acpredef.h
··· 3 3 * 4 4 * Name: acpredef - Information table for ACPI predefined methods and objects 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -1
drivers/acpi/acpica/acresrc.h
··· 3 3 * 4 4 * Name: acresrc.h - Resource Manager function prototypes 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 306 306 extern struct acpi_rsconvert_info acpi_rs_convert_pin_group[]; 307 307 extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_function[]; 308 308 extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_config[]; 309 + extern struct acpi_rsconvert_info acpi_rs_convert_clock_input[]; 309 310 310 311 /* These resources require separate get/set tables */ 311 312 ··· 362 361 extern struct acpi_rsdump_info acpi_rs_dump_pin_group[]; 363 362 extern struct acpi_rsdump_info acpi_rs_dump_pin_group_function[]; 364 363 extern struct acpi_rsdump_info acpi_rs_dump_pin_group_config[]; 364 + extern struct acpi_rsdump_info acpi_rs_dump_clock_input[]; 365 365 #endif 366 366 367 367 #endif /* __ACRESRC_H__ */
+1 -1
drivers/acpi/acpica/acstruct.h
··· 3 3 * 4 4 * Name: acstruct.h - Internal structs 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/actables.h
··· 3 3 * 4 4 * Name: actables.h - ACPI table management 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -1
drivers/acpi/acpica/acutils.h
··· 3 3 * 4 4 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 53 53 extern const char *acpi_gbl_fc_decode[]; 54 54 extern const char *acpi_gbl_pt_decode[]; 55 55 extern const char *acpi_gbl_ptyp_decode[]; 56 + extern const char *acpi_gbl_clock_input_mode[]; 57 + extern const char *acpi_gbl_clock_input_scale[]; 56 58 #endif 57 59 58 60 /*
+1 -1
drivers/acpi/acpica/amlcode.h
··· 5 5 * Declarations and definitions contained herein are derived 6 6 * directly from the ACPI specification. 7 7 * 8 - * Copyright (C) 2000 - 2022, Intel Corp. 8 + * Copyright (C) 2000 - 2023, Intel Corp. 9 9 * 10 10 *****************************************************************************/ 11 11
+22 -2
drivers/acpi/acpica/amlresrc.h
··· 3 3 * 4 4 * Module Name: amlresrc.h - AML resource descriptors 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 70 70 #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ 71 71 #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */ 72 72 #define ACPI_RESTAG_VENDORDATA "_VEN" 73 + #define ACPI_RESTAG_FQN "_FQN" 74 + #define ACPI_RESTAG_FQD "_FQD" 73 75 74 76 /* Default sizes for "small" resource descriptors */ 75 77 ··· 261 259 struct aml_resource_extended_irq { 262 260 AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; 263 261 u8 interrupt_count; 264 - u32 interrupts[1]; 262 + union { 263 + u32 interrupt; 264 + ACPI_FLEX_ARRAY(u32, interrupts); 265 + }; 265 266 /* res_source_index, res_source optional fields follow */ 266 267 }; 267 268 ··· 432 427 */ 433 428 }; 434 429 430 + #define AML_RESOURCE_CLOCK_INPUT_REVISION 1 /* ACPI 6.5 */ 431 + 432 + struct aml_resource_clock_input { 433 + AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id; 434 + u16 flags; 435 + u16 frequency_divisor; 436 + u32 frequency_numerator; 437 + /* 438 + * Optional fields follow immediately: 439 + * 1) Resource Source index 440 + * 2) Resource Source String 441 + */ 442 + }; 443 + 435 444 #define AML_RESOURCE_PIN_CONFIG_REVISION 1 /* ACPI 6.2 */ 436 445 437 446 struct aml_resource_pin_group { ··· 552 533 struct aml_resource_pin_group pin_group; 553 534 struct aml_resource_pin_group_function pin_group_function; 554 535 struct aml_resource_pin_group_config pin_group_config; 536 + struct aml_resource_clock_input clock_input; 555 537 556 538 /* Utility overlays */ 557 539
+1 -1
drivers/acpi/acpica/dbhistry.c
··· 3 3 * 4 4 * Module Name: dbhistry - debugger HISTORY command 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3
drivers/acpi/acpica/dbnames.c
··· 652 652 object_info = 653 653 ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info)); 654 654 655 + if (!object_info) 656 + return (AE_NO_MEMORY); 657 + 655 658 /* Walk the namespace from the root */ 656 659 657 660 (void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+1 -1
drivers/acpi/acpica/dsargs.c
··· 4 4 * Module Name: dsargs - Support for execution of dynamic arguments for static 5 5 * objects (regions, fields, buffer fields, etc.) 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/dscontrol.c
··· 4 4 * Module Name: dscontrol - Support for execution control opcodes - 5 5 * if/else/while/return 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/dsdebug.c
··· 3 3 * 4 4 * Module Name: dsdebug - Parser/Interpreter interface - debugging 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dsfield.c
··· 3 3 * 4 4 * Module Name: dsfield - Dispatcher field routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dsinit.c
··· 3 3 * 4 4 * Module Name: dsinit - Object initialization namespace walk 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dsmethod.c
··· 3 3 * 4 4 * Module Name: dsmethod - Parser/Interpreter interface - control method parsing 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dsobject.c
··· 3 3 * 4 4 * Module Name: dsobject - Dispatcher object management routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dsopcode.c
··· 3 3 * 4 4 * Module Name: dsopcode - Dispatcher support for regions and fields 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dspkginit.c
··· 3 3 * 4 4 * Module Name: dspkginit - Completion of deferred package initialization 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dswexec.c
··· 4 4 * Module Name: dswexec - Dispatcher method execution callbacks; 5 5 * dispatch to interpreter. 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/dswload.c
··· 3 3 * 4 4 * Module Name: dswload - Dispatcher first pass namespace load callbacks 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dswload2.c
··· 3 3 * 4 4 * Module Name: dswload2 - Dispatcher second pass namespace load callbacks 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dswscope.c
··· 3 3 * 4 4 * Module Name: dswscope - Scope stack manipulation 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+9 -4
drivers/acpi/acpica/dswstate.c
··· 3 3 * 4 4 * Module Name: dswstate - Dispatcher parse tree walk management routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 576 576 ACPI_FUNCTION_TRACE(ds_init_aml_walk); 577 577 578 578 walk_state->parser_state.aml = 579 - walk_state->parser_state.aml_start = aml_start; 580 - walk_state->parser_state.aml_end = 581 - walk_state->parser_state.pkg_end = aml_start + aml_length; 579 + walk_state->parser_state.aml_start = 580 + walk_state->parser_state.aml_end = 581 + walk_state->parser_state.pkg_end = aml_start; 582 + /* Avoid undefined behavior: applying zero offset to null pointer */ 583 + if (aml_length != 0) { 584 + walk_state->parser_state.aml_end += aml_length; 585 + walk_state->parser_state.pkg_end += aml_length; 586 + } 582 587 583 588 /* The next_op of the next_walk will be the beginning of the method */ 584 589
+1 -1
drivers/acpi/acpica/evevent.c
··· 3 3 * 4 4 * Module Name: evevent - Fixed Event handling and dispatch 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evglock.c
··· 3 3 * 4 4 * Module Name: evglock - Global Lock support 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evgpe.c
··· 3 3 * 4 4 * Module Name: evgpe - General Purpose Event handling and dispatch 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evgpeblk.c
··· 3 3 * 4 4 * Module Name: evgpeblk - GPE block creation and initialization. 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evgpeinit.c
··· 3 3 * 4 4 * Module Name: evgpeinit - System GPE initialization and update 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evgpeutil.c
··· 3 3 * 4 4 * Module Name: evgpeutil - GPE utilities 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evhandler.c
··· 3 3 * 4 4 * Module Name: evhandler - Support for Address Space handlers 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evmisc.c
··· 3 3 * 4 4 * Module Name: evmisc - Miscellaneous event manager support functions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evregion.c
··· 3 3 * 4 4 * Module Name: evregion - Operation Region support 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -3
drivers/acpi/acpica/evrgnini.c
··· 3 3 * 4 4 * Module Name: evrgnini- ACPI address_space (op_region) init 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 430 430 { 431 431 union acpi_operand_object *region_desc = 432 432 (union acpi_operand_object *)handle; 433 - struct acpi_data_table_space_context *local_region_context; 433 + struct acpi_data_table_mapping *local_region_context; 434 434 435 435 ACPI_FUNCTION_TRACE(ev_data_table_region_setup); 436 436 ··· 445 445 /* Create a new context */ 446 446 447 447 local_region_context = 448 - ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_data_table_space_context)); 448 + ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_data_table_mapping)); 449 449 if (!(local_region_context)) { 450 450 return_ACPI_STATUS(AE_NO_MEMORY); 451 451 }
+1 -1
drivers/acpi/acpica/evxface.c
··· 3 3 * 4 4 * Module Name: evxface - External interfaces for ACPI events 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evxfevnt.c
··· 3 3 * 4 4 * Module Name: evxfevnt - External Interfaces, ACPI event disable/enable 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evxfgpe.c
··· 3 3 * 4 4 * Module Name: evxfgpe - External Interfaces for General Purpose Events (GPEs) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evxfregn.c
··· 4 4 * Module Name: evxfregn - External Interfaces, ACPI Operation Regions and 5 5 * Address Spaces. 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/exconcat.c
··· 3 3 * 4 4 * Module Name: exconcat - Concatenate-type AML operators 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exconfig.c
··· 3 3 * 4 4 * Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exconvrt.c
··· 3 3 * 4 4 * Module Name: exconvrt - Object conversion routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/excreate.c
··· 3 3 * 4 4 * Module Name: excreate - Named object creation 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exdebug.c
··· 3 3 * 4 4 * Module Name: exdebug - Support for stores to the AML Debug Object 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exdump.c
··· 3 3 * 4 4 * Module Name: exdump - Interpreter debug output routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exfield.c
··· 3 3 * 4 4 * Module Name: exfield - AML execution - field_unit read/write 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exfldio.c
··· 3 3 * 4 4 * Module Name: exfldio - Aml Field I/O 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exmisc.c
··· 3 3 * 4 4 * Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exmutex.c
··· 3 3 * 4 4 * Module Name: exmutex - ASL Mutex Acquire/Release functions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exnames.c
··· 3 3 * 4 4 * Module Name: exnames - interpreter/scanner name load/execute 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exoparg1.c
··· 3 3 * 4 4 * Module Name: exoparg1 - AML execution - opcodes with 1 argument 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exoparg2.c
··· 3 3 * 4 4 * Module Name: exoparg2 - AML execution - opcodes with 2 arguments 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exoparg3.c
··· 3 3 * 4 4 * Module Name: exoparg3 - AML execution - opcodes with 3 arguments 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exoparg6.c
··· 3 3 * 4 4 * Module Name: exoparg6 - AML execution - opcodes with 6 arguments 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exprep.c
··· 3 3 * 4 4 * Module Name: exprep - ACPI AML field prep utilities 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -3
drivers/acpi/acpica/exregion.c
··· 3 3 * 4 4 * Module Name: exregion - ACPI default op_region (address space) handlers 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 509 509 u64 *value, 510 510 void *handler_context, void *region_context) 511 511 { 512 - struct acpi_data_table_space_context *mapping; 512 + struct acpi_data_table_mapping *mapping; 513 513 char *pointer; 514 514 515 515 ACPI_FUNCTION_TRACE(ex_data_table_space_handler); 516 516 517 - mapping = (struct acpi_data_table_space_context *) region_context; 517 + mapping = (struct acpi_data_table_mapping *) region_context; 518 518 pointer = ACPI_CAST_PTR(char, mapping->pointer) + 519 519 (address - ACPI_PTR_TO_PHYSADDR(mapping->pointer)); 520 520
+1 -1
drivers/acpi/acpica/exresnte.c
··· 3 3 * 4 4 * Module Name: exresnte - AML Interpreter object resolution 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exresolv.c
··· 3 3 * 4 4 * Module Name: exresolv - AML Interpreter object resolution 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exresop.c
··· 3 3 * 4 4 * Module Name: exresop - AML Interpreter operand/object resolution 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exserial.c
··· 3 3 * 4 4 * Module Name: exserial - field_unit support for serial address spaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exstore.c
··· 3 3 * 4 4 * Module Name: exstore - AML Interpreter object store support 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exstoren.c
··· 4 4 * Module Name: exstoren - AML Interpreter object store support, 5 5 * Store to Node (namespace object) 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/exstorob.c
··· 3 3 * 4 4 * Module Name: exstorob - AML object store support, store to object 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exsystem.c
··· 3 3 * 4 4 * Module Name: exsystem - Interface to OS services 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/extrace.c
··· 3 3 * 4 4 * Module Name: extrace - Support for interpreter execution tracing 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exutils.c
··· 3 3 * 4 4 * Module Name: exutils - interpreter/scanner utilities 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwacpi.c
··· 3 3 * 4 4 * Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwesleep.c
··· 4 4 * Name: hwesleep.c - ACPI Hardware Sleep/Wake Support functions for the 5 5 * extended FADT-V5 sleep registers. 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/hwgpe.c
··· 3 3 * 4 4 * Module Name: hwgpe - Low level GPE enable/disable/clear functions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwsleep.c
··· 4 4 * Name: hwsleep.c - ACPI Hardware Sleep/Wake Support functions for the 5 5 * original/legacy sleep/PM registers. 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/hwtimer.c
··· 3 3 * 4 4 * Name: hwtimer.c - ACPI Power Management Timer Interface 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwvalid.c
··· 3 3 * 4 4 * Module Name: hwvalid - I/O request validation 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwxface.c
··· 3 3 * 4 4 * Module Name: hwxface - Public ACPICA hardware interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwxfsleep.c
··· 3 3 * 4 4 * Name: hwxfsleep.c - ACPI Hardware Sleep/Wake External Interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsarguments.c
··· 3 3 * 4 4 * Module Name: nsarguments - Validation of args for ACPI predefined methods 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsconvert.c
··· 4 4 * Module Name: nsconvert - Object conversions for objects returned by 5 5 * predefined methods 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/nsdump.c
··· 3 3 * 4 4 * Module Name: nsdump - table dumping routines for debug 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsdumpdv.c
··· 3 3 * 4 4 * Module Name: nsdump - table dumping routines for debug 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsinit.c
··· 3 3 * 4 4 * Module Name: nsinit - namespace initialization 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsload.c
··· 3 3 * 4 4 * Module Name: nsload - namespace loading/expanding/contracting procedures 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsparse.c
··· 3 3 * 4 4 * Module Name: nsparse - namespace interface to AML parser 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nspredef.c
··· 3 3 * 4 4 * Module Name: nspredef - Validation of ACPI predefined methods and objects 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsprepkg.c
··· 3 3 * 4 4 * Module Name: nsprepkg - Validation of package objects for predefined names 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsrepair.c
··· 3 3 * 4 4 * Module Name: nsrepair - Repair for objects returned by predefined methods 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/nsrepair2.c
··· 4 4 * Module Name: nsrepair2 - Repair for objects returned by specific 5 5 * predefined methods 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10 ··· 499 499 char *source; 500 500 char *dest; 501 501 502 - ACPI_FUNCTION_NAME(ns_repair_HID); 502 + ACPI_FUNCTION_TRACE(ns_repair_HID); 503 503 504 504 /* We only care about string _HID objects (not integers) */ 505 505
+1 -1
drivers/acpi/acpica/nsutils.c
··· 4 4 * Module Name: nsutils - Utilities for accessing ACPI namespace, accessing 5 5 * parents and siblings and Scope manipulation 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/nswalk.c
··· 3 3 * 4 4 * Module Name: nswalk - Functions for walking the ACPI namespace 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsxfname.c
··· 4 4 * Module Name: nsxfname - Public interfaces to the ACPI subsystem 5 5 * ACPI Namespace oriented interfaces 6 6 * 7 - * Copyright (C) 2000 - 2022, Intel Corp. 7 + * Copyright (C) 2000 - 2023, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/psargs.c
··· 3 3 * 4 4 * Module Name: psargs - Parse AML opcode arguments 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psloop.c
··· 3 3 * 4 4 * Module Name: psloop - Main AML parse loop 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psobject.c
··· 3 3 * 4 4 * Module Name: psobject - Support for parse objects 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psopcode.c
··· 3 3 * 4 4 * Module Name: psopcode - Parser/Interpreter opcode information table 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psopinfo.c
··· 3 3 * 4 4 * Module Name: psopinfo - AML opcode information functions and dispatch tables 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psparse.c
··· 3 3 * 4 4 * Module Name: psparse - Parser top level AML parse routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psscope.c
··· 3 3 * 4 4 * Module Name: psscope - Parser scope stack management routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/pstree.c
··· 3 3 * 4 4 * Module Name: pstree - Parser op tree manipulation/traversal/search 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psutils.c
··· 3 3 * 4 4 * Module Name: psutils - Parser miscellaneous utilities (Parser only) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/pswalk.c
··· 3 3 * 4 4 * Module Name: pswalk - Parser routines to walk parsed op tree(s) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psxface.c
··· 3 3 * 4 4 * Module Name: psxface - Parser external interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+8 -3
drivers/acpi/acpica/rsaddr.c
··· 272 272 acpi_rs_get_address_common(struct acpi_resource *resource, 273 273 union aml_resource *aml) 274 274 { 275 + struct aml_resource_address address; 276 + 275 277 ACPI_FUNCTION_ENTRY(); 278 + 279 + /* Avoid undefined behavior: member access within misaligned address */ 280 + 281 + memcpy(&address, aml, sizeof(address)); 276 282 277 283 /* Validate the Resource Type */ 278 284 279 - if ((aml->address.resource_type > 2) && 280 - (aml->address.resource_type < 0xC0)) { 285 + if ((address.resource_type > 2) && (address.resource_type < 0xC0)) { 281 286 return (FALSE); 282 287 } 283 288 ··· 303 298 /* Generic resource type, just grab the type_specific byte */ 304 299 305 300 resource->data.address.info.type_specific = 306 - aml->address.specific_flags; 301 + address.specific_flags; 307 302 } 308 303 309 304 return (TRUE);
+41 -10
drivers/acpi/acpica/rscalc.c
··· 320 320 321 321 break; 322 322 323 + case ACPI_RESOURCE_TYPE_CLOCK_INPUT: 324 + 325 + total_size = (acpi_rs_length)(total_size + 326 + resource->data. 327 + clock_input. 328 + resource_source. 329 + string_length); 330 + 331 + break; 332 + 323 333 case ACPI_RESOURCE_TYPE_SERIAL_BUS: 324 334 325 335 total_size = ··· 606 596 } 607 597 break; 608 598 609 - case ACPI_RESOURCE_NAME_SERIAL_BUS: 599 + case ACPI_RESOURCE_NAME_SERIAL_BUS:{ 610 600 611 - minimum_aml_resource_length = 612 - acpi_gbl_resource_aml_serial_bus_sizes 613 - [aml_resource->common_serial_bus.type]; 614 - extra_struct_bytes += 615 - aml_resource->common_serial_bus.resource_length - 616 - minimum_aml_resource_length; 617 - break; 601 + /* Avoid undefined behavior: member access within misaligned address */ 602 + 603 + struct aml_resource_common_serialbus 604 + common_serial_bus; 605 + memcpy(&common_serial_bus, aml_resource, 606 + sizeof(common_serial_bus)); 607 + 608 + minimum_aml_resource_length = 609 + acpi_gbl_resource_aml_serial_bus_sizes 610 + [common_serial_bus.type]; 611 + extra_struct_bytes += 612 + common_serial_bus.resource_length - 613 + minimum_aml_resource_length; 614 + break; 615 + } 618 616 619 617 case ACPI_RESOURCE_NAME_PIN_CONFIG: 620 618 ··· 668 650 669 651 break; 670 652 653 + case ACPI_RESOURCE_NAME_CLOCK_INPUT: 654 + extra_struct_bytes = 655 + acpi_rs_stream_option_length(resource_length, 656 + minimum_aml_resource_length); 657 + 658 + break; 659 + 671 660 default: 672 661 673 662 break; ··· 688 663 */ 689 664 if (acpi_ut_get_resource_type(aml_buffer) == 690 665 ACPI_RESOURCE_NAME_SERIAL_BUS) { 666 + 667 + /* Avoid undefined behavior: member access within misaligned address */ 668 + 669 + struct aml_resource_common_serialbus common_serial_bus; 670 + memcpy(&common_serial_bus, aml_resource, 671 + sizeof(common_serial_bus)); 672 + 691 673 buffer_size = 692 674 acpi_gbl_resource_struct_serial_bus_sizes 693 - [aml_resource->common_serial_bus.type] + 694 - extra_struct_bytes; 675 + [common_serial_bus.type] + extra_struct_bytes; 695 676 } else { 696 677 buffer_size = 697 678 acpi_gbl_resource_struct_sizes[resource_index] +
+17
drivers/acpi/acpica/rsdumpinfo.c
··· 301 301 "VendorData", NULL}, 302 302 }; 303 303 304 + struct acpi_rsdump_info acpi_rs_dump_clock_input[7] = { 305 + {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_clock_input), 306 + "ClockInput", NULL}, 307 + {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(clock_input.revision_id), "RevisionId", 308 + NULL}, 309 + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(clock_input.frequency_numerator), 310 + "FrequencyNumerator", NULL}, 311 + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(clock_input.frequency_divisor), 312 + "FrequencyDivisor", NULL}, 313 + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(clock_input.scale), "Scale", 314 + acpi_gbl_clock_input_scale}, 315 + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(clock_input.mode), "Mode", 316 + acpi_gbl_clock_input_mode}, 317 + {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(clock_input.resource_source), 318 + "ResourceSource", NULL}, 319 + }; 320 + 304 321 struct acpi_rsdump_info acpi_rs_dump_pin_config[11] = { 305 322 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_config), 306 323 "PinConfig", NULL},
+5
drivers/acpi/acpica/rsinfo.c
··· 49 49 acpi_rs_convert_pin_group, /* 0x16, ACPI_RESOURCE_TYPE_PIN_GROUP */ 50 50 acpi_rs_convert_pin_group_function, /* 0x17, ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ 51 51 acpi_rs_convert_pin_group_config, /* 0x18, ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ 52 + acpi_rs_convert_clock_input, /* 0x19, ACPI_RESOURCE_TYPE_CLOCK_INPUT */ 52 53 }; 53 54 54 55 /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ ··· 95 94 acpi_rs_convert_pin_group, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */ 96 95 acpi_rs_convert_pin_group_function, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */ 97 96 acpi_rs_convert_pin_group_config, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */ 97 + acpi_rs_convert_clock_input, /* 0x13, ACPI_RESOURCE_NAME_CLOCK_INPUT */ 98 98 }; 99 99 100 100 /* Subtype table for serial_bus -- I2C, SPI, UART, and CSI2 */ ··· 138 136 acpi_rs_dump_pin_group, /* ACPI_RESOURCE_TYPE_PIN_GROUP */ 139 137 acpi_rs_dump_pin_group_function, /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ 140 138 acpi_rs_dump_pin_group_config, /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ 139 + acpi_rs_dump_clock_input, /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ 141 140 }; 142 141 143 142 struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = { ··· 181 178 sizeof(struct aml_resource_pin_group), /* ACPI_RESOURCE_TYPE_PIN_GROUP */ 182 179 sizeof(struct aml_resource_pin_group_function), /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ 183 180 sizeof(struct aml_resource_pin_group_config), /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ 181 + sizeof(struct aml_resource_clock_input), /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ 184 182 }; 185 183 186 184 const u8 acpi_gbl_resource_struct_sizes[] = { ··· 225 221 ACPI_RS_SIZE(struct acpi_resource_pin_group), 226 222 ACPI_RS_SIZE(struct acpi_resource_pin_group_function), 227 223 ACPI_RS_SIZE(struct acpi_resource_pin_group_config), 224 + ACPI_RS_SIZE(struct acpi_resource_clock_input), 228 225 }; 229 226 230 227 const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = {
+9 -3
drivers/acpi/acpica/rslist.c
··· 55 55 aml_resource = ACPI_CAST_PTR(union aml_resource, aml); 56 56 57 57 if (acpi_ut_get_resource_type(aml) == ACPI_RESOURCE_NAME_SERIAL_BUS) { 58 - if (aml_resource->common_serial_bus.type > 59 - AML_RESOURCE_MAX_SERIALBUSTYPE) { 58 + 59 + /* Avoid undefined behavior: member access within misaligned address */ 60 + 61 + struct aml_resource_common_serialbus common_serial_bus; 62 + memcpy(&common_serial_bus, aml_resource, 63 + sizeof(common_serial_bus)); 64 + 65 + if (common_serial_bus.type > AML_RESOURCE_MAX_SERIALBUSTYPE) { 60 66 conversion_table = NULL; 61 67 } else { 62 68 /* This is an I2C, SPI, UART, or CSI2 serial_bus descriptor */ 63 69 64 70 conversion_table = 65 71 acpi_gbl_convert_resource_serial_bus_dispatch 66 - [aml_resource->common_serial_bus.type]; 72 + [common_serial_bus.type]; 67 73 } 68 74 } else { 69 75 conversion_table =
+6 -4
drivers/acpi/acpica/rsmisc.c
··· 194 194 195 195 case ACPI_RSC_COUNT_SERIAL_VEN: 196 196 197 - item_count = ACPI_GET16(source) - info->value; 197 + ACPI_MOVE_16_TO_16(&temp16, source); 198 + item_count = temp16 - info->value; 198 199 199 200 resource->length = resource->length + item_count; 200 201 ACPI_SET16(destination, item_count); ··· 203 202 204 203 case ACPI_RSC_COUNT_SERIAL_RES: 205 204 205 + ACPI_MOVE_16_TO_16(&temp16, source); 206 206 item_count = (aml_resource_length + 207 207 sizeof(struct aml_resource_large_header)) 208 - - ACPI_GET16(source) - info->value; 208 + - temp16 - info->value; 209 209 210 210 resource->length = resource->length + item_count; 211 211 ACPI_SET16(destination, item_count); ··· 291 289 292 290 /* Copy the resource_source string */ 293 291 292 + ACPI_MOVE_16_TO_16(&temp16, source); 294 293 source = 295 - ACPI_ADD_PTR(void, aml, 296 - (ACPI_GET16(source) + info->value)); 294 + ACPI_ADD_PTR(void, aml, (temp16 + info->value)); 297 295 acpi_rs_move_data(target, source, item_count, 298 296 info->opcode); 299 297 break;
+49
drivers/acpi/acpica/rsserial.c
··· 111 111 112 112 /******************************************************************************* 113 113 * 114 + * acpi_rs_convert_clock_input 115 + * 116 + ******************************************************************************/ 117 + 118 + struct acpi_rsconvert_info acpi_rs_convert_clock_input[8] = { 119 + {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_CLOCK_INPUT, 120 + ACPI_RS_SIZE(struct acpi_resource_clock_input), 121 + ACPI_RSC_TABLE_SIZE(acpi_rs_convert_clock_input)}, 122 + 123 + {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_CLOCK_INPUT, 124 + sizeof(struct aml_resource_clock_input), 125 + 0} 126 + , 127 + 128 + {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.clock_input.revision_id), 129 + AML_OFFSET(clock_input.revision_id), 130 + 1} 131 + , 132 + 133 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.clock_input.mode), 134 + AML_OFFSET(clock_input.flags), 135 + 0} 136 + , 137 + 138 + {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.clock_input.scale), 139 + AML_OFFSET(clock_input.flags), 140 + 1} 141 + , 142 + 143 + {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.clock_input.frequency_divisor), 144 + AML_OFFSET(clock_input.frequency_divisor), 145 + 2} 146 + , 147 + 148 + {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.clock_input.frequency_numerator), 149 + AML_OFFSET(clock_input.frequency_numerator), 150 + 4} 151 + , 152 + 153 + /* Resource Source */ 154 + {ACPI_RSC_SOURCE, ACPI_RS_OFFSET(data.clock_input.resource_source), 155 + 0, 156 + sizeof(struct aml_resource_clock_input)} 157 + , 158 + 159 + }; 160 + 161 + /******************************************************************************* 162 + * 114 163 * acpi_rs_convert_pinfunction 115 164 * 116 165 ******************************************************************************/
+1 -1
drivers/acpi/acpica/tbdata.c
··· 3 3 * 4 4 * Module Name: tbdata - Table manager data structure functions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbfadt.c
··· 3 3 * 4 4 * Module Name: tbfadt - FADT table utilities 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbfind.c
··· 3 3 * 4 4 * Module Name: tbfind - find table 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbinstal.c
··· 3 3 * 4 4 * Module Name: tbinstal - ACPI table installation and removal 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbprint.c
··· 3 3 * 4 4 * Module Name: tbprint - Table output utilities 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+4 -3
drivers/acpi/acpica/tbutils.c
··· 3 3 * 4 4 * Module Name: tbutils - ACPI Table utilities 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 165 165 static acpi_physical_address 166 166 acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) 167 167 { 168 + u32 address32; 168 169 u64 address64; 169 170 170 171 /* ··· 177 176 * 32-bit platform, RSDT: Return 32-bit table entry 178 177 * 64-bit platform, RSDT: Expand 32-bit to 64-bit and return 179 178 */ 180 - return ((acpi_physical_address) 181 - (*ACPI_CAST_PTR(u32, table_entry))); 179 + ACPI_MOVE_32_TO_32(&address32, table_entry); 180 + return address32; 182 181 } else { 183 182 /* 184 183 * 32-bit platform, XSDT: Truncate 64-bit to 32-bit and return
+1 -1
drivers/acpi/acpica/tbxface.c
··· 3 3 * 4 4 * Module Name: tbxface - ACPI table-oriented external interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbxfload.c
··· 3 3 * 4 4 * Module Name: tbxfload - Table load/unload external interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbxfroot.c
··· 3 3 * 4 4 * Module Name: tbxfroot - Find the root ACPI table (RSDT) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utaddress.c
··· 3 3 * 4 4 * Module Name: utaddress - op_region address range check 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utalloc.c
··· 3 3 * 4 4 * Module Name: utalloc - local memory allocation routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utascii.c
··· 3 3 * 4 4 * Module Name: utascii - Utility ascii functions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utbuffer.c
··· 3 3 * 4 4 * Module Name: utbuffer - Buffer dump routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utcache.c
··· 3 3 * 4 4 * Module Name: utcache - local cache allocation routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utcksum.c
··· 3 3 * 4 4 * Module Name: utcksum - Support generating table checksums 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utcopy.c
··· 3 3 * 4 4 * Module Name: utcopy - Internal to external object translation utilities 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utdebug.c
··· 3 3 * 4 4 * Module Name: utdebug - Debug print/trace routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utdecode.c
··· 3 3 * 4 4 * Module Name: utdecode - Utility decoding routines (value-to-string) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/uteval.c
··· 3 3 * 4 4 * Module Name: uteval - Object evaluation 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utglobal.c
··· 3 3 * 4 4 * Module Name: utglobal - Global variables for the ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/uthex.c
··· 3 3 * 4 4 * Module Name: uthex -- Hex/ASCII support functions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utids.c
··· 3 3 * 4 4 * Module Name: utids - support for device Ids - HID, UID, CID, SUB, CLS 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utinit.c
··· 3 3 * 4 4 * Module Name: utinit - Common ACPI subsystem initialization 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utlock.c
··· 3 3 * 4 4 * Module Name: utlock - Reader/Writer lock interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utobject.c
··· 3 3 * 4 4 * Module Name: utobject - ACPI object create/delete/size/cache routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utosi.c
··· 3 3 * 4 4 * Module Name: utosi - Support for the _OSI predefined control method 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utpredef.c
··· 3 3 * 4 4 * Module Name: utpredef - support functions for predefined names 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utprint.c
··· 3 3 * 4 4 * Module Name: utprint - Formatted printing routines 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+11
drivers/acpi/acpica/utresdecode.c
··· 284 284 "Input Schmitt Trigger", 285 285 }; 286 286 287 + const char *acpi_gbl_clock_input_mode[] = { 288 + "Fixed", 289 + "Variable", 290 + }; 291 + 292 + const char *acpi_gbl_clock_input_scale[] = { 293 + "Hz", 294 + "KHz", 295 + "MHz", 296 + }; 297 + 287 298 #endif
+12 -5
drivers/acpi/acpica/utresrc.c
··· 57 57 ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group), 58 58 ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group_function), 59 59 ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group_config), 60 + ACPI_AML_SIZE_LARGE(struct aml_resource_clock_input), 61 + 60 62 }; 61 63 62 64 const u8 acpi_gbl_resource_aml_serial_bus_sizes[] = { ··· 116 114 ACPI_VARIABLE_LENGTH, /* 10 pin_group */ 117 115 ACPI_VARIABLE_LENGTH, /* 11 pin_group_function */ 118 116 ACPI_VARIABLE_LENGTH, /* 12 pin_group_config */ 117 + ACPI_VARIABLE_LENGTH, /* 13 clock_input */ 119 118 }; 120 119 121 120 /******************************************************************************* ··· 361 358 aml_resource = ACPI_CAST_PTR(union aml_resource, aml); 362 359 if (resource_type == ACPI_RESOURCE_NAME_SERIAL_BUS) { 363 360 361 + /* Avoid undefined behavior: member access within misaligned address */ 362 + 363 + struct aml_resource_common_serialbus common_serial_bus; 364 + memcpy(&common_serial_bus, aml_resource, 365 + sizeof(common_serial_bus)); 366 + 364 367 /* Validate the bus_type field */ 365 368 366 - if ((aml_resource->common_serial_bus.type == 0) || 367 - (aml_resource->common_serial_bus.type > 368 - AML_RESOURCE_MAX_SERIALBUSTYPE)) { 369 + if ((common_serial_bus.type == 0) || 370 + (common_serial_bus.type > AML_RESOURCE_MAX_SERIALBUSTYPE)) { 369 371 if (walk_state) { 370 372 ACPI_ERROR((AE_INFO, 371 373 "Invalid/unsupported SerialBus resource descriptor: BusType 0x%2.2X", 372 - aml_resource->common_serial_bus. 373 - type)); 374 + common_serial_bus.type)); 374 375 } 375 376 return (AE_AML_INVALID_RESOURCE_TYPE); 376 377 }
+1 -1
drivers/acpi/acpica/uttrack.c
··· 3 3 * 4 4 * Module Name: uttrack - Memory allocation tracking routines (debug only) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utuuid.c
··· 3 3 * 4 4 * Module Name: utuuid -- UUID support functions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utxface.c
··· 3 3 * 4 4 * Module Name: utxface - External interfaces, miscellaneous utility functions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utxfinit.c
··· 3 3 * 4 4 * Module Name: utxfinit - External interfaces for ACPICA initialization 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+13 -1
drivers/acpi/apei/einj.c
··· 489 489 if (rc) 490 490 return rc; 491 491 val = apei_exec_ctx_get_output(&ctx); 492 - if (val != EINJ_STATUS_SUCCESS) 492 + if (val == EINJ_STATUS_FAIL) 493 493 return -EBUSY; 494 + else if (val == EINJ_STATUS_INVAL) 495 + return -EINVAL; 494 496 497 + /* 498 + * The error is injected into the platform successfully, then it needs 499 + * to trigger the error. 500 + */ 495 501 rc = apei_exec_run(&ctx, ACPI_EINJ_GET_TRIGGER_TABLE); 496 502 if (rc) 497 503 return rc; ··· 590 584 "0x00000200\tPlatform Correctable\n", 591 585 "0x00000400\tPlatform Uncorrectable non-fatal\n", 592 586 "0x00000800\tPlatform Uncorrectable fatal\n", 587 + "0x00001000\tCXL.cache Protocol Correctable\n", 588 + "0x00002000\tCXL.cache Protocol Uncorrectable non-fatal\n", 589 + "0x00004000\tCXL.cache Protocol Uncorrectable fatal\n", 590 + "0x00008000\tCXL.mem Protocol Correctable\n", 591 + "0x00010000\tCXL.mem Protocol Uncorrectable non-fatal\n", 592 + "0x00020000\tCXL.mem Protocol Uncorrectable fatal\n", 593 593 }; 594 594 595 595 static int available_error_type_show(struct seq_file *m, void *v)
+3 -1
drivers/acpi/bus.c
··· 589 589 acpi_remove_notify_handler(device->handle, type, 590 590 acpi_notify_device); 591 591 } 592 + acpi_os_wait_events_complete(); 592 593 } 593 594 594 595 /* Handle events targeting \_SB device (at present only graceful shutdown) */ ··· 624 623 if (event == ACPI_SB_NOTIFY_SHUTDOWN_REQUEST) { 625 624 if (!work_busy(&acpi_sb_work)) 626 625 schedule_work(&acpi_sb_work); 627 - } else 626 + } else { 628 627 pr_warn("event %x is not supported by \\_SB device\n", event); 628 + } 629 629 } 630 630 631 631 static int __init acpi_setup_sb_notify_handler(void)
+15 -3
drivers/acpi/ec.c
··· 1083 1083 acpi_handle handle, acpi_ec_query_func func, 1084 1084 void *data) 1085 1085 { 1086 - struct acpi_ec_query_handler *handler = 1087 - kzalloc(sizeof(struct acpi_ec_query_handler), GFP_KERNEL); 1086 + struct acpi_ec_query_handler *handler; 1088 1087 1088 + if (!handle && !func) 1089 + return -EINVAL; 1090 + 1091 + handler = kzalloc(sizeof(*handler), GFP_KERNEL); 1089 1092 if (!handler) 1090 1093 return -ENOMEM; 1091 1094 ··· 1100 1097 kref_init(&handler->kref); 1101 1098 list_add(&handler->node, &ec->list); 1102 1099 mutex_unlock(&ec->mutex); 1100 + 1103 1101 return 0; 1104 1102 } 1105 1103 EXPORT_SYMBOL_GPL(acpi_ec_add_query_handler); ··· 1113 1109 1114 1110 mutex_lock(&ec->mutex); 1115 1111 list_for_each_entry_safe(handler, tmp, &ec->list, node) { 1116 - if (remove_all || query_bit == handler->query_bit) { 1112 + /* 1113 + * When remove_all is false, only remove custom query handlers 1114 + * which have handler->func set. This is done to preserve query 1115 + * handlers discovered thru ACPI, as they should continue handling 1116 + * EC queries. 1117 + */ 1118 + if (remove_all || (handler->func && handler->query_bit == query_bit)) { 1117 1119 list_del_init(&handler->node); 1118 1120 list_add(&handler->node, &free_list); 1121 + 1119 1122 } 1120 1123 } 1121 1124 mutex_unlock(&ec->mutex); ··· 1133 1122 void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit) 1134 1123 { 1135 1124 acpi_ec_remove_query_handlers(ec, false, query_bit); 1125 + flush_workqueue(ec_query_wq); 1136 1126 } 1137 1127 EXPORT_SYMBOL_GPL(acpi_ec_remove_query_handler); 1138 1128
+3 -3
drivers/acpi/nfit/core.c
··· 894 894 { 895 895 if (flush->header.length < sizeof(*flush)) 896 896 return 0; 897 - return sizeof(*flush) + sizeof(u64) * (flush->hint_count - 1); 897 + return struct_size(flush, hint_address, flush->hint_count); 898 898 } 899 899 900 900 static bool add_flush(struct acpi_nfit_desc *acpi_desc, ··· 3476 3476 BUILD_BUG_ON(sizeof(struct acpi_table_nfit) != 40); 3477 3477 BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 64); 3478 3478 BUILD_BUG_ON(sizeof(struct acpi_nfit_memory_map) != 48); 3479 - BUILD_BUG_ON(sizeof(struct acpi_nfit_interleave) != 20); 3480 - BUILD_BUG_ON(sizeof(struct acpi_nfit_smbios) != 9); 3479 + BUILD_BUG_ON(sizeof(struct acpi_nfit_interleave) != 16); 3480 + BUILD_BUG_ON(sizeof(struct acpi_nfit_smbios) != 8); 3481 3481 BUILD_BUG_ON(sizeof(struct acpi_nfit_control_region) != 80); 3482 3482 BUILD_BUG_ON(sizeof(struct acpi_nfit_data_region) != 40); 3483 3483 BUILD_BUG_ON(sizeof(struct acpi_nfit_capabilities) != 16);
+11
drivers/acpi/processor_pdc.c
··· 14 14 #include <linux/acpi.h> 15 15 #include <acpi/processor.h> 16 16 17 + #include <xen/xen.h> 18 + 17 19 #include "internal.h" 18 20 19 21 static bool __init processor_physically_present(acpi_handle handle) ··· 48 46 default: 49 47 return false; 50 48 } 49 + 50 + if (xen_initial_domain()) 51 + /* 52 + * When running as a Xen dom0 the number of processors Linux 53 + * sees can be different from the real number of processors on 54 + * the system, and we still need to execute _PDC for all of 55 + * them. 56 + */ 57 + return xen_processor_present(acpi_id); 51 58 52 59 type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0; 53 60 cpuid = acpi_get_cpuid(handle, type, acpi_id);
+34 -46
drivers/acpi/property.c
··· 971 971 enum dev_prop_type proptype, void *val) 972 972 { 973 973 const union acpi_object *obj; 974 - int ret; 974 + int ret = 0; 975 975 976 - if (proptype >= DEV_PROP_U8 && proptype <= DEV_PROP_U64) { 976 + if (proptype >= DEV_PROP_U8 && proptype <= DEV_PROP_U64) 977 977 ret = acpi_data_get_property(data, propname, ACPI_TYPE_INTEGER, &obj); 978 - if (ret) 979 - return ret; 980 - 981 - switch (proptype) { 982 - case DEV_PROP_U8: 983 - if (obj->integer.value > U8_MAX) 984 - return -EOVERFLOW; 985 - 986 - if (val) 987 - *(u8 *)val = obj->integer.value; 988 - 989 - break; 990 - case DEV_PROP_U16: 991 - if (obj->integer.value > U16_MAX) 992 - return -EOVERFLOW; 993 - 994 - if (val) 995 - *(u16 *)val = obj->integer.value; 996 - 997 - break; 998 - case DEV_PROP_U32: 999 - if (obj->integer.value > U32_MAX) 1000 - return -EOVERFLOW; 1001 - 1002 - if (val) 1003 - *(u32 *)val = obj->integer.value; 1004 - 1005 - break; 1006 - default: 1007 - if (val) 1008 - *(u64 *)val = obj->integer.value; 1009 - 1010 - break; 1011 - } 1012 - 1013 - if (!val) 1014 - return 1; 1015 - } else if (proptype == DEV_PROP_STRING) { 978 + else if (proptype == DEV_PROP_STRING) 1016 979 ret = acpi_data_get_property(data, propname, ACPI_TYPE_STRING, &obj); 1017 - if (ret) 1018 - return ret; 980 + if (ret) 981 + return ret; 1019 982 983 + switch (proptype) { 984 + case DEV_PROP_U8: 985 + if (obj->integer.value > U8_MAX) 986 + return -EOVERFLOW; 987 + if (val) 988 + *(u8 *)val = obj->integer.value; 989 + break; 990 + case DEV_PROP_U16: 991 + if (obj->integer.value > U16_MAX) 992 + return -EOVERFLOW; 993 + if (val) 994 + *(u16 *)val = obj->integer.value; 995 + break; 996 + case DEV_PROP_U32: 997 + if (obj->integer.value > U32_MAX) 998 + return -EOVERFLOW; 999 + if (val) 1000 + *(u32 *)val = obj->integer.value; 1001 + break; 1002 + case DEV_PROP_U64: 1003 + if (val) 1004 + *(u64 *)val = obj->integer.value; 1005 + break; 1006 + case DEV_PROP_STRING: 1020 1007 if (val) 1021 1008 *(char **)val = obj->string.pointer; 1022 - 1023 1009 return 1; 1024 - } else { 1025 - ret = -EINVAL; 1010 + default: 1011 + return -EINVAL; 1026 1012 } 1027 - return ret; 1013 + 1014 + /* When no storage provided return number of available values */ 1015 + return val ? 0 : 1; 1028 1016 } 1029 1017 1030 1018 #define acpi_copy_property_array_uint(items, val, nval) \
+18 -9
drivers/acpi/sbs.c
··· 473 473 -------------------------------------------------------------------------- */ 474 474 static int acpi_battery_read(struct acpi_battery *battery) 475 475 { 476 - int result = 0, saved_present = battery->present; 476 + int result, saved_present = battery->present; 477 477 u16 state; 478 478 479 479 if (battery->sbs->manager_present) { 480 480 result = acpi_smbus_read(battery->sbs->hc, SMBUS_READ_WORD, 481 481 ACPI_SBS_MANAGER, 0x01, (u8 *)&state); 482 - if (!result) 483 - battery->present = state & (1 << battery->id); 484 - state &= 0x0fff; 482 + if (result) 483 + return result; 484 + 485 + battery->present = state & (1 << battery->id); 486 + if (!battery->present) 487 + return 0; 488 + 489 + /* Masking necessary for Smart Battery Selectors */ 490 + state = 0x0fff; 485 491 state |= 1 << (battery->id + 12); 486 492 acpi_smbus_write(battery->sbs->hc, SMBUS_WRITE_WORD, 487 493 ACPI_SBS_MANAGER, 0x01, (u8 *)&state, 2); 488 - } else if (battery->id == 0) 489 - battery->present = 1; 490 - 491 - if (result || !battery->present) 492 - return result; 494 + } else { 495 + if (battery->id == 0) { 496 + battery->present = 1; 497 + } else { 498 + if (!battery->present) 499 + return 0; 500 + } 501 + } 493 502 494 503 if (saved_present != battery->present) { 495 504 battery->update_time = 0;
+7 -1
drivers/acpi/sleep.c
··· 714 714 int acpi_s2idle_prepare(void) 715 715 { 716 716 if (acpi_sci_irq_valid()) { 717 - enable_irq_wake(acpi_sci_irq); 717 + int error; 718 + 719 + error = enable_irq_wake(acpi_sci_irq); 720 + if (error) 721 + pr_warn("Warning: Failed to enable wakeup from IRQ %d: %d\n", 722 + acpi_sci_irq, error); 723 + 718 724 acpi_ec_set_gpe_wake_mask(ACPI_GPE_ENABLE); 719 725 } 720 726
+5 -8
drivers/acpi/spcr.c
··· 71 71 72 72 /** 73 73 * acpi_parse_spcr() - parse ACPI SPCR table and add preferred console 74 - * 75 74 * @enable_earlycon: set up earlycon for the console specified by the table 76 75 * @enable_console: setup the console specified by the table. 77 76 * ··· 81 82 * 82 83 * When CONFIG_ACPI_SPCR_TABLE is defined, this function should be called 83 84 * from arch initialization code as soon as the DT/ACPI decision is made. 84 - * 85 85 */ 86 86 int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console) 87 87 { ··· 95 97 if (acpi_disabled) 96 98 return -ENODEV; 97 99 98 - status = acpi_get_table(ACPI_SIG_SPCR, 0, 99 - (struct acpi_table_header **)&table); 100 - 100 + status = acpi_get_table(ACPI_SIG_SPCR, 0, (struct acpi_table_header **)&table); 101 101 if (ACPI_FAILURE(status)) 102 102 return -ENOENT; 103 103 ··· 106 110 u32 bit_width = table->serial_port.access_width; 107 111 108 112 if (bit_width > ACPI_ACCESS_BIT_MAX) { 109 - pr_err("Unacceptable wide SPCR Access Width. Defaulting to byte size\n"); 113 + pr_err(FW_BUG "Unacceptable wide SPCR Access Width. Defaulting to byte size\n"); 110 114 bit_width = ACPI_ACCESS_BIT_DEFAULT; 111 115 } 112 116 switch (ACPI_ACCESS_BIT_WIDTH((bit_width))) { 113 117 default: 114 - pr_err("Unexpected SPCR Access Width. Defaulting to byte size\n"); 118 + pr_err(FW_BUG "Unexpected SPCR Access Width. Defaulting to byte size\n"); 115 119 fallthrough; 116 120 case 8: 117 121 iotype = "mmio"; ··· 198 202 if (xgene_8250_erratum_present(table)) { 199 203 iotype = "mmio32"; 200 204 201 - /* for xgene v1 and v2 we don't know the clock rate of the 205 + /* 206 + * For xgene v1 and v2 we don't know the clock rate of the 202 207 * UART so don't attempt to change to the baud rate state 203 208 * in the table because driver cannot calculate the dividers 204 209 */
+17
drivers/acpi/sysfs.c
··· 458 458 return sysfs_create_bin_file(tables_data_kobj, &data_attr->attr); 459 459 } 460 460 461 + static int acpi_ccel_data_init(void *th, struct acpi_data_attr *data_attr) 462 + { 463 + struct acpi_table_ccel *ccel = th; 464 + 465 + if (ccel->header.length < sizeof(struct acpi_table_ccel) || 466 + !ccel->log_area_start_address || !ccel->log_area_minimum_length) { 467 + kfree(data_attr); 468 + return -EINVAL; 469 + } 470 + data_attr->addr = ccel->log_area_start_address; 471 + data_attr->attr.size = ccel->log_area_minimum_length; 472 + data_attr->attr.attr.name = "CCEL"; 473 + 474 + return sysfs_create_bin_file(tables_data_kobj, &data_attr->attr); 475 + } 476 + 461 477 static struct acpi_data_obj { 462 478 char *name; 463 479 int (*fn)(void *, struct acpi_data_attr *); 464 480 } acpi_data_objs[] = { 465 481 { ACPI_SIG_BERT, acpi_bert_data_init }, 482 + { ACPI_SIG_CCEL, acpi_ccel_data_init }, 466 483 }; 467 484 468 485 #define NUM_ACPI_DATA_OBJS ARRAY_SIZE(acpi_data_objs)
+3 -4
drivers/acpi/thermal.c
··· 419 419 * the next higher trip point 420 420 */ 421 421 tz->trips.active[i-1].temperature = 422 - (tz->trips.active[i-2].temperature < 423 - celsius_to_deci_kelvin(act) ? 424 - tz->trips.active[i-2].temperature : 425 - celsius_to_deci_kelvin(act)); 422 + min_t(unsigned long, 423 + tz->trips.active[i-2].temperature, 424 + celsius_to_deci_kelvin(act)); 426 425 427 426 break; 428 427 } else {
-35
drivers/acpi/video_detect.c
··· 130 130 return 0; 131 131 } 132 132 133 - static int video_detect_force_none(const struct dmi_system_id *d) 134 - { 135 - acpi_backlight_dmi = acpi_backlight_none; 136 - return 0; 137 - } 138 - 139 133 static const struct dmi_system_id video_detect_dmi_table[] = { 140 134 /* 141 135 * Models which should use the vendor backlight interface, ··· 760 766 .matches = { 761 767 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 762 768 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3535"), 763 - }, 764 - }, 765 - 766 - /* 767 - * Desktops which falsely report a backlight and which our heuristics 768 - * for this do not catch. 769 - */ 770 - { 771 - .callback = video_detect_force_none, 772 - /* Dell OptiPlex 9020M */ 773 - .matches = { 774 - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 775 - DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 9020M"), 776 - }, 777 - }, 778 - { 779 - .callback = video_detect_force_none, 780 - /* GIGABYTE GB-BXBT-2807 */ 781 - .matches = { 782 - DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), 783 - DMI_MATCH(DMI_PRODUCT_NAME, "GB-BXBT-2807"), 784 - }, 785 - }, 786 - { 787 - .callback = video_detect_force_none, 788 - /* MSI MS-7721 */ 789 - .matches = { 790 - DMI_MATCH(DMI_SYS_VENDOR, "MSI"), 791 - DMI_MATCH(DMI_PRODUCT_NAME, "MS-7721"), 792 769 }, 793 770 }, 794 771 { },
+3 -2
drivers/acpi/viot.c
··· 328 328 { 329 329 u32 epid; 330 330 struct viot_endpoint *ep; 331 + struct device *aliased_dev = data; 331 332 u32 domain_nr = pci_domain_nr(pdev->bus); 332 333 333 334 list_for_each_entry(ep, &viot_pci_ranges, list) { ··· 339 338 epid = ((domain_nr - ep->segment_start) << 16) + 340 339 dev_id - ep->bdf_start + ep->endpoint_id; 341 340 342 - return viot_dev_iommu_init(&pdev->dev, ep->viommu, 341 + return viot_dev_iommu_init(aliased_dev, ep->viommu, 343 342 epid); 344 343 } 345 344 } ··· 373 372 { 374 373 if (dev_is_pci(dev)) 375 374 return pci_for_each_dma_alias(to_pci_dev(dev), 376 - viot_pci_dev_iommu_init, NULL); 375 + viot_pci_dev_iommu_init, dev); 377 376 else if (dev_is_platform(dev)) 378 377 return viot_mmio_dev_iommu_init(to_platform_device(dev)); 379 378 return -ENODEV;
+1
drivers/ata/pata_ixp4xx_cf.c
··· 17 17 #include <linux/module.h> 18 18 #include <linux/libata.h> 19 19 #include <linux/irq.h> 20 + #include <linux/of.h> 20 21 #include <linux/platform_device.h> 21 22 #include <linux/regmap.h> 22 23 #include <scsi/scsi_host.h>
+1
drivers/ata/pata_macio.c
··· 21 21 #include <linux/adb.h> 22 22 #include <linux/pmu.h> 23 23 #include <linux/scatterlist.h> 24 + #include <linux/irqdomain.h> 24 25 #include <linux/of.h> 25 26 #include <linux/gfp.h> 26 27 #include <linux/pci.h>
+1 -1
drivers/char/tpm/tpm_atmel.h
··· 26 26 27 27 #ifdef CONFIG_PPC64 28 28 29 - #include <asm/prom.h> 29 + #include <linux/of.h> 30 30 31 31 #define atmel_getb(priv, offset) readb(priv->iobase + offset) 32 32 #define atmel_putb(val, priv, offset) writeb(val, priv->iobase + offset)
+22 -17
drivers/cpufreq/acpi-cpufreq.c
··· 965 965 acpi_cpufreq_driver.boost_enabled = boost_state(0); 966 966 } 967 967 968 - static int __init acpi_cpufreq_init(void) 968 + static int __init acpi_cpufreq_probe(struct platform_device *pdev) 969 969 { 970 970 int ret; 971 971 ··· 1010 1010 return ret; 1011 1011 } 1012 1012 1013 - static void __exit acpi_cpufreq_exit(void) 1013 + static int acpi_cpufreq_remove(struct platform_device *pdev) 1014 1014 { 1015 1015 pr_debug("%s\n", __func__); 1016 1016 1017 1017 cpufreq_unregister_driver(&acpi_cpufreq_driver); 1018 1018 1019 1019 free_acpi_perf_data(); 1020 + 1021 + return 0; 1022 + } 1023 + 1024 + static struct platform_driver acpi_cpufreq_platdrv = { 1025 + .driver = { 1026 + .name = "acpi-cpufreq", 1027 + }, 1028 + .remove = acpi_cpufreq_remove, 1029 + }; 1030 + 1031 + static int __init acpi_cpufreq_init(void) 1032 + { 1033 + return platform_driver_probe(&acpi_cpufreq_platdrv, acpi_cpufreq_probe); 1034 + } 1035 + 1036 + static void __exit acpi_cpufreq_exit(void) 1037 + { 1038 + platform_driver_unregister(&acpi_cpufreq_platdrv); 1020 1039 } 1021 1040 1022 1041 module_param(acpi_pstate_strict, uint, 0644); ··· 1046 1027 late_initcall(acpi_cpufreq_init); 1047 1028 module_exit(acpi_cpufreq_exit); 1048 1029 1049 - static const struct x86_cpu_id __maybe_unused acpi_cpufreq_ids[] = { 1050 - X86_MATCH_FEATURE(X86_FEATURE_ACPI, NULL), 1051 - X86_MATCH_FEATURE(X86_FEATURE_HW_PSTATE, NULL), 1052 - {} 1053 - }; 1054 - MODULE_DEVICE_TABLE(x86cpu, acpi_cpufreq_ids); 1055 - 1056 - static const struct acpi_device_id __maybe_unused processor_device_ids[] = { 1057 - {ACPI_PROCESSOR_OBJECT_HID, }, 1058 - {ACPI_PROCESSOR_DEVICE_HID, }, 1059 - {}, 1060 - }; 1061 - MODULE_DEVICE_TABLE(acpi, processor_device_ids); 1062 - 1063 - MODULE_ALIAS("acpi"); 1030 + MODULE_ALIAS("platform:acpi-cpufreq");
+24 -10
drivers/cpufreq/pcc-cpufreq.c
··· 384 384 return ret; 385 385 } 386 386 387 - static int __init pcc_cpufreq_probe(void) 387 + static int __init pcc_cpufreq_evaluate(void) 388 388 { 389 389 acpi_status status; 390 390 struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL}; ··· 576 576 .name = "pcc-cpufreq", 577 577 }; 578 578 579 - static int __init pcc_cpufreq_init(void) 579 + static int __init pcc_cpufreq_probe(struct platform_device *pdev) 580 580 { 581 581 int ret; 582 582 ··· 587 587 if (acpi_disabled) 588 588 return -ENODEV; 589 589 590 - ret = pcc_cpufreq_probe(); 590 + ret = pcc_cpufreq_evaluate(); 591 591 if (ret) { 592 - pr_debug("pcc_cpufreq_init: PCCH evaluation failed\n"); 592 + pr_debug("pcc_cpufreq_probe: PCCH evaluation failed\n"); 593 593 return ret; 594 594 } 595 595 ··· 607 607 return ret; 608 608 } 609 609 610 - static void __exit pcc_cpufreq_exit(void) 610 + static int pcc_cpufreq_remove(struct platform_device *pdev) 611 611 { 612 612 cpufreq_unregister_driver(&pcc_cpufreq_driver); 613 613 614 614 pcc_clear_mapping(); 615 615 616 616 free_percpu(pcc_cpu_info); 617 + 618 + return 0; 617 619 } 618 620 619 - static const struct acpi_device_id __maybe_unused processor_device_ids[] = { 620 - {ACPI_PROCESSOR_OBJECT_HID, }, 621 - {ACPI_PROCESSOR_DEVICE_HID, }, 622 - {}, 621 + static struct platform_driver pcc_cpufreq_platdrv = { 622 + .driver = { 623 + .name = "pcc-cpufreq", 624 + }, 625 + .remove = pcc_cpufreq_remove, 623 626 }; 624 - MODULE_DEVICE_TABLE(acpi, processor_device_ids); 627 + 628 + static int __init pcc_cpufreq_init(void) 629 + { 630 + return platform_driver_probe(&pcc_cpufreq_platdrv, pcc_cpufreq_probe); 631 + } 632 + 633 + static void __exit pcc_cpufreq_exit(void) 634 + { 635 + platform_driver_unregister(&pcc_cpufreq_platdrv); 636 + } 637 + 638 + MODULE_ALIAS("platform:pcc-cpufreq"); 625 639 626 640 MODULE_AUTHOR("Matthew Garrett, Naga Chumbalkar"); 627 641 MODULE_VERSION(PCC_VERSION);
+1
drivers/fpga/lattice-sysconfig-spi.c
··· 3 3 * Lattice FPGA programming over slave SPI sysCONFIG interface. 4 4 */ 5 5 6 + #include <linux/of.h> 6 7 #include <linux/spi/spi.h> 7 8 8 9 #include "lattice-sysconfig.h"
-4
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 4471 4471 amdgpu_set_panel_orientation(&aconnector->base); 4472 4472 } 4473 4473 4474 - /* If we didn't find a panel, notify the acpi video detection */ 4475 - if (dm->adev->flags & AMD_IS_APU && dm->num_of_edps == 0) 4476 - acpi_video_report_nolcd(); 4477 - 4478 4474 /* Software is initialized. Now we can register interrupt handlers. */ 4479 4475 switch (adev->asic_type) { 4480 4476 #if defined(CONFIG_DRM_AMD_DC_SI)
+1
drivers/iio/adc/ad7292.c
··· 8 8 #include <linux/bitfield.h> 9 9 #include <linux/device.h> 10 10 #include <linux/module.h> 11 + #include <linux/of.h> 11 12 #include <linux/regulator/consumer.h> 12 13 #include <linux/spi/spi.h> 13 14
+1
drivers/staging/iio/resolver/ad2s1210.c
··· 7 7 #include <linux/types.h> 8 8 #include <linux/mutex.h> 9 9 #include <linux/device.h> 10 + #include <linux/of.h> 10 11 #include <linux/spi/spi.h> 11 12 #include <linux/slab.h> 12 13 #include <linux/sysfs.h>
+1
drivers/tty/serial/8250/8250_tegra.c
··· 11 11 #include <linux/delay.h> 12 12 #include <linux/io.h> 13 13 #include <linux/module.h> 14 + #include <linux/of.h> 14 15 #include <linux/reset.h> 15 16 #include <linux/slab.h> 16 17
+1
drivers/virtio/virtio_mmio.c
··· 61 61 #include <linux/io.h> 62 62 #include <linux/list.h> 63 63 #include <linux/module.h> 64 + #include <linux/of.h> 64 65 #include <linux/platform_device.h> 65 66 #include <linux/pm.h> 66 67 #include <linux/slab.h>
+20
drivers/xen/pcpu.c
··· 58 58 struct list_head list; 59 59 struct device dev; 60 60 uint32_t cpu_id; 61 + uint32_t acpi_id; 61 62 uint32_t flags; 62 63 }; 63 64 ··· 250 249 251 250 INIT_LIST_HEAD(&pcpu->list); 252 251 pcpu->cpu_id = info->xen_cpuid; 252 + pcpu->acpi_id = info->acpi_id; 253 253 pcpu->flags = info->flags; 254 254 255 255 /* Need hold on xen_pcpu_lock before pcpu list manipulations */ ··· 383 381 return ret; 384 382 } 385 383 arch_initcall(xen_pcpu_init); 384 + 385 + #ifdef CONFIG_ACPI 386 + bool __init xen_processor_present(uint32_t acpi_id) 387 + { 388 + const struct pcpu *pcpu; 389 + bool online = false; 390 + 391 + mutex_lock(&xen_pcpu_lock); 392 + list_for_each_entry(pcpu, &xen_pcpus, list) 393 + if (pcpu->acpi_id == acpi_id) { 394 + online = pcpu->flags & XEN_PCPU_FLAGS_ONLINE; 395 + break; 396 + } 397 + mutex_unlock(&xen_pcpu_lock); 398 + 399 + return online; 400 + } 401 + #endif
+1 -1
include/acpi/acbuffer.h
··· 3 3 * 4 4 * Name: acbuffer.h - Support for buffers returned by ACPI predefined names 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/acconfig.h
··· 3 3 * 4 4 * Name: acconfig.h - Global configuration constants 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/acexcep.h
··· 3 3 * 4 4 * Name: acexcep.h - Exception codes returned by the ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/acnames.h
··· 3 3 * 4 4 * Name: acnames.h - Global names and strings 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/acoutput.h
··· 3 3 * 4 4 * Name: acoutput.h -- debug output 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/acpi.h
··· 3 3 * 4 4 * Name: acpi.h - Master public include file used to interface to ACPICA 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -1
include/acpi/acpi_bus.h
··· 52 52 bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs); 53 53 union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, 54 54 u64 rev, u64 func, union acpi_object *argv4); 55 - 55 + #ifdef CONFIG_ACPI 56 56 static inline union acpi_object * 57 57 acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev, 58 58 u64 func, union acpi_object *argv4, ··· 68 68 69 69 return obj; 70 70 } 71 + #endif 71 72 72 73 #define ACPI_INIT_DSM_ARGV4(cnt, eles) \ 73 74 { \
+1 -1
include/acpi/acpiosxf.h
··· 5 5 * interfaces must be implemented by OSL to interface the 6 6 * ACPI components to the host operating system. 7 7 * 8 - * Copyright (C) 2000 - 2022, Intel Corp. 8 + * Copyright (C) 2000 - 2023, Intel Corp. 9 9 * 10 10 *****************************************************************************/ 11 11
+2 -2
include/acpi/acpixf.h
··· 3 3 * 4 4 * Name: acpixf.h - External interfaces to the ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 12 12 13 13 /* Current ACPICA subsystem version in YYYYMMDD format */ 14 14 15 - #define ACPI_CA_VERSION 0x20221020 15 + #define ACPI_CA_VERSION 0x20230331 16 16 17 17 #include <acpi/acconfig.h> 18 18 #include <acpi/actypes.h>
+31 -8
include/acpi/acrestyp.h
··· 3 3 * 4 4 * Name: acrestyp.h - Defines, types, and structures for resource descriptors 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 142 142 u8 shareable; 143 143 u8 wake_capable; 144 144 u8 interrupt_count; 145 - u8 interrupts[1]; 145 + union { 146 + u8 interrupt; 147 + ACPI_FLEX_ARRAY(u8, interrupts); 148 + }; 146 149 }; 147 150 148 151 struct acpi_resource_dma { ··· 153 150 u8 bus_master; 154 151 u8 transfer; 155 152 u8 channel_count; 156 - u8 channels[1]; 153 + union { 154 + u8 channel; 155 + ACPI_FLEX_ARRAY(u8, channels); 156 + }; 157 157 }; 158 158 159 159 struct acpi_resource_start_dependent { ··· 200 194 201 195 struct acpi_resource_vendor { 202 196 u16 byte_length; 203 - u8 byte_data[1]; 197 + u8 byte_data[]; 204 198 }; 205 199 206 200 /* Vendor resource with UUID info (introduced in ACPI 3.0) */ ··· 209 203 u16 byte_length; 210 204 u8 uuid_subtype; 211 205 u8 uuid[ACPI_UUID_LENGTH]; 212 - u8 byte_data[1]; 206 + u8 byte_data[]; 213 207 }; 214 208 215 209 struct acpi_resource_end_tag { ··· 338 332 u8 wake_capable; 339 333 u8 interrupt_count; 340 334 struct acpi_resource_source resource_source; 341 - u32 interrupts[1]; 335 + union { 336 + u32 interrupt; 337 + ACPI_FLEX_ARRAY(u32, interrupts); 338 + }; 342 339 }; 343 340 344 341 struct acpi_resource_generic_register { ··· 545 536 u8 *vendor_data; 546 537 }; 547 538 539 + struct acpi_resource_clock_input { 540 + u8 revision_id; 541 + u8 mode; 542 + u8 scale; 543 + u16 frequency_divisor; 544 + u32 frequency_numerator; 545 + struct acpi_resource_source resource_source; 546 + }; 547 + 548 548 /* Values for pin_config_type field above */ 549 549 550 550 #define ACPI_PIN_CONFIG_DEFAULT 0 ··· 631 613 #define ACPI_RESOURCE_TYPE_PIN_GROUP 22 /* ACPI 6.2 */ 632 614 #define ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION 23 /* ACPI 6.2 */ 633 615 #define ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG 24 /* ACPI 6.2 */ 634 - #define ACPI_RESOURCE_TYPE_MAX 24 616 + #define ACPI_RESOURCE_TYPE_CLOCK_INPUT 25 /* ACPI 6.5 */ 617 + #define ACPI_RESOURCE_TYPE_MAX 25 635 618 636 619 /* Master union for resource descriptors */ 637 620 ··· 666 647 struct acpi_resource_pin_group pin_group; 667 648 struct acpi_resource_pin_group_function pin_group_function; 668 649 struct acpi_resource_pin_group_config pin_group_config; 650 + struct acpi_resource_clock_input clock_input; 669 651 670 652 /* Common fields */ 671 653 ··· 699 679 u32 pin; 700 680 u64 address; /* here for 64-bit alignment */ 701 681 u32 source_index; 702 - char source[4]; /* pad to 64 bits so sizeof() works in all cases */ 682 + union { 683 + char pad[4]; /* pad to 64 bits so sizeof() works in all cases */ 684 + ACPI_FLEX_ARRAY(char, source); 685 + }; 703 686 }; 704 687 705 688 #endif /* __ACRESTYP_H__ */
+1 -1
include/acpi/actbl.h
··· 3 3 * 4 4 * Name: actbl.h - Basic ACPI Table Definitions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+54 -5
include/acpi/actbl1.h
··· 3 3 * 4 4 * Name: actbl1.h - Additional ACPI table definitions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 26 26 */ 27 27 #define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */ 28 28 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ 29 + #define ACPI_SIG_ASPT "ASPT" /* AMD Secure Processor Table */ 29 30 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ 30 31 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ 31 32 #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ ··· 108 107 struct acpi_generic_address register_region; 109 108 u64 value; /* Value used with Read/Write register */ 110 109 u64 mask; /* Bitmask required for this register instruction */ 110 + }; 111 + 112 + /* https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/acpitabl/ns-acpitabl-aspt_table */ 113 + #define ASPT_REVISION_ID 0x01 114 + struct acpi_table_aspt { 115 + struct acpi_table_header header; 116 + u32 num_entries; 117 + }; 118 + 119 + struct acpi_aspt_header { 120 + u16 type; 121 + u16 length; 122 + }; 123 + 124 + enum acpi_aspt_type { 125 + ACPI_ASPT_TYPE_GLOBAL_REGS = 0, 126 + ACPI_ASPT_TYPE_SEV_MBOX_REGS = 1, 127 + ACPI_ASPT_TYPE_ACPI_MBOX_REGS = 2, 128 + }; 129 + 130 + /* 0: ASPT Global Registers */ 131 + struct acpi_aspt_global_regs { 132 + struct acpi_aspt_header header; 133 + u32 reserved; 134 + u64 feature_reg_addr; 135 + u64 irq_en_reg_addr; 136 + u64 irq_st_reg_addr; 137 + }; 138 + 139 + /* 1: ASPT SEV Mailbox Registers */ 140 + struct acpi_aspt_sev_mbox_regs { 141 + struct acpi_aspt_header header; 142 + u8 mbox_irq_id; 143 + u8 reserved[3]; 144 + u64 cmd_resp_reg_addr; 145 + u64 cmd_buf_lo_reg_addr; 146 + u64 cmd_buf_hi_reg_addr; 147 + }; 148 + 149 + /* 2: ASPT ACPI Mailbox Registers */ 150 + struct acpi_aspt_acpi_mbox_regs { 151 + struct acpi_aspt_header header; 152 + u32 reserved1; 153 + u64 cmd_resp_reg_addr; 154 + u64 reserved2[2]; 111 155 }; 112 156 113 157 /******************************************************************************* ··· 901 855 struct acpi_dmar_header header; 902 856 u8 reserved[3]; 903 857 u8 device_number; 904 - char device_name[1]; 858 + union { 859 + char __pad; 860 + ACPI_FLEX_ARRAY(char, device_name); 861 + }; 905 862 }; 906 863 907 864 /* 5: SOC Integrated Address Translation Cache Reporting Structure */ ··· 947 898 948 899 struct acpi_drtm_vtable_list { 949 900 u32 validated_table_count; 950 - u64 validated_tables[1]; 901 + u64 validated_tables[]; 951 902 }; 952 903 953 904 /* 2) Resources List (of Resource Descriptors) */ ··· 962 913 963 914 struct acpi_drtm_resource_list { 964 915 u32 resource_count; 965 - struct acpi_drtm_resource resources[1]; 916 + struct acpi_drtm_resource resources[]; 966 917 }; 967 918 968 919 /* 3) Platform-specific Identifiers List */ ··· 985 936 struct acpi_generic_address data; /* Address of EC data register */ 986 937 u32 uid; /* Unique ID - must be same as the EC _UID method */ 987 938 u8 gpe; /* The GPE for the EC */ 988 - u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ 939 + u8 id[]; /* Full namepath of the EC in the ACPI namespace */ 989 940 }; 990 941 991 942 /*******************************************************************************
+197 -14
include/acpi/actbl2.h
··· 3 3 * 4 4 * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 35 35 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ 36 36 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ 37 37 #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ 38 + #define ACPI_SIG_MPAM "MPAM" /* Memory System Resource Partitioning and Monitoring Table */ 38 39 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ 39 40 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ 40 41 #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ ··· 48 47 #define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */ 49 48 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ 50 49 #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */ 50 + #define ACPI_SIG_RHCT "RHCT" /* RISC-V Hart Capabilities Table */ 51 51 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ 52 52 #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */ 53 53 #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */ ··· 84 82 85 83 struct acpi_table_aest { 86 84 struct acpi_table_header header; 87 - void *node_array[]; 88 85 }; 89 86 90 87 /* Common Subtable header - one per Node Structure (Subtable) */ ··· 397 396 u32 identifier; 398 397 u32 mapping_count; 399 398 u32 mapping_offset; 400 - char node_data[1]; 399 + char node_data[]; 401 400 }; 402 401 403 402 /* Values for subtable Type above */ ··· 453 452 */ 454 453 struct acpi_iort_its_group { 455 454 u32 its_count; 456 - u32 identifiers[1]; /* GIC ITS identifier array */ 455 + u32 identifiers[]; /* GIC ITS identifier array */ 457 456 }; 458 457 459 458 struct acpi_iort_named_component { 460 459 u32 node_flags; 461 460 u64 memory_properties; /* Memory access properties */ 462 461 u8 memory_address_limit; /* Memory address size limit */ 463 - char device_name[1]; /* Path of namespace object */ 462 + char device_name[]; /* Path of namespace object */ 464 463 }; 465 464 466 465 /* Masks for Flags field above */ ··· 474 473 u32 pci_segment_number; 475 474 u8 memory_address_limit; /* Memory address size limit */ 476 475 u16 pasid_capabilities; /* PASID Capabilities */ 477 - u8 reserved[1]; /* Reserved, must be zero */ 476 + u8 reserved[]; /* Reserved, must be zero */ 478 477 }; 479 478 480 479 /* Masks for ats_attribute field above */ ··· 496 495 u32 context_interrupt_offset; 497 496 u32 pmu_interrupt_count; 498 497 u32 pmu_interrupt_offset; 499 - u64 interrupts[1]; /* Interrupt array */ 498 + u64 interrupts[]; /* Interrupt array */ 500 499 }; 501 500 502 501 /* Values for Model field above */ ··· 892 891 ACPI_MADT_TYPE_MSI_PIC = 21, 893 892 ACPI_MADT_TYPE_BIO_PIC = 22, 894 893 ACPI_MADT_TYPE_LPC_PIC = 23, 895 - ACPI_MADT_TYPE_RESERVED = 24, /* 24 to 0x7F are reserved */ 894 + ACPI_MADT_TYPE_RINTC = 24, 895 + ACPI_MADT_TYPE_RESERVED = 25, /* 25 to 0x7F are reserved */ 896 896 ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */ 897 897 }; 898 898 ··· 975 973 u8 reserved[3]; /* Reserved, must be zero */ 976 974 u32 lapic_flags; 977 975 u32 uid; /* Numeric UID - ACPI 3.0 */ 978 - char uid_string[1]; /* String UID - ACPI 3.0 */ 976 + char uid_string[]; /* String UID - ACPI 3.0 */ 979 977 }; 980 978 981 979 /* 8: Platform Interrupt Source */ ··· 1015 1013 u8 reserved[3]; /* reserved - must be zero */ 1016 1014 }; 1017 1015 1018 - /* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */ 1016 + /* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 + ACPI 6.5 changes) */ 1019 1017 1020 1018 struct acpi_madt_generic_interrupt { 1021 1019 struct acpi_subtable_header header; ··· 1035 1033 u8 efficiency_class; 1036 1034 u8 reserved2[1]; 1037 1035 u16 spe_interrupt; /* ACPI 6.3 */ 1036 + u16 trbe_interrupt; /* ACPI 6.5 */ 1038 1037 }; 1039 1038 1040 1039 /* Masks for Flags field above */ ··· 1253 1250 ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ 1254 1251 }; 1255 1252 1253 + /* 24: RISC-V INTC */ 1254 + struct acpi_madt_rintc { 1255 + struct acpi_subtable_header header; 1256 + u8 version; 1257 + u8 reserved; 1258 + u32 flags; 1259 + u64 hart_id; 1260 + u32 uid; /* ACPI processor UID */ 1261 + }; 1262 + 1263 + /* Values for RISC-V INTC Version field above */ 1264 + 1265 + enum acpi_madt_rintc_version { 1266 + ACPI_MADT_RINTC_VERSION_NONE = 0, 1267 + ACPI_MADT_RINTC_VERSION_V1 = 1, 1268 + ACPI_MADT_RINTC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ 1269 + }; 1270 + 1256 1271 /* 80: OEM data */ 1257 1272 1258 1273 struct acpi_madt_oem_data { 1259 - u8 oem_data[0]; 1274 + ACPI_FLEX_ARRAY(u8, oem_data); 1260 1275 }; 1261 1276 1262 1277 /* ··· 1351 1330 u8 pci_bus; 1352 1331 u8 pci_device; 1353 1332 u8 pci_function; 1333 + }; 1334 + 1335 + /******************************************************************************* 1336 + * 1337 + * MPAM - Memory System Resource Partitioning and Monitoring 1338 + * 1339 + * Conforms to "ACPI for Memory System Resource Partitioning and Monitoring 2.0" 1340 + * Document number: ARM DEN 0065, December, 2022. 1341 + * 1342 + ******************************************************************************/ 1343 + 1344 + /* MPAM RIS locator types. Table 11, Location types */ 1345 + enum acpi_mpam_locator_type { 1346 + ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE = 0, 1347 + ACPI_MPAM_LOCATION_TYPE_MEMORY = 1, 1348 + ACPI_MPAM_LOCATION_TYPE_SMMU = 2, 1349 + ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE = 3, 1350 + ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE = 4, 1351 + ACPI_MPAM_LOCATION_TYPE_INTERCONNECT = 5, 1352 + ACPI_MPAM_LOCATION_TYPE_UNKNOWN = 0xFF 1353 + }; 1354 + 1355 + /* MPAM Functional dependency descriptor. Table 10 */ 1356 + struct acpi_mpam_func_deps { 1357 + u32 producer; 1358 + u32 reserved; 1359 + }; 1360 + 1361 + /* MPAM Processor cache locator descriptor. Table 13 */ 1362 + struct acpi_mpam_resource_cache_locator { 1363 + u64 cache_reference; 1364 + u32 reserved; 1365 + }; 1366 + 1367 + /* MPAM Memory locator descriptor. Table 14 */ 1368 + struct acpi_mpam_resource_memory_locator { 1369 + u64 proximity_domain; 1370 + u32 reserved; 1371 + }; 1372 + 1373 + /* MPAM SMMU locator descriptor. Table 15 */ 1374 + struct acpi_mpam_resource_smmu_locator { 1375 + u64 smmu_interface; 1376 + u32 reserved; 1377 + }; 1378 + 1379 + /* MPAM Memory-side cache locator descriptor. Table 16 */ 1380 + struct acpi_mpam_resource_memcache_locator { 1381 + u8 reserved[7]; 1382 + u8 level; 1383 + u32 reference; 1384 + }; 1385 + 1386 + /* MPAM ACPI device locator descriptor. Table 17 */ 1387 + struct acpi_mpam_resource_acpi_locator { 1388 + u64 acpi_hw_id; 1389 + u32 acpi_unique_id; 1390 + }; 1391 + 1392 + /* MPAM Interconnect locator descriptor. Table 18 */ 1393 + struct acpi_mpam_resource_interconnect_locator { 1394 + u64 inter_connect_desc_tbl_off; 1395 + u32 reserved; 1396 + }; 1397 + 1398 + /* MPAM Locator structure. Table 12 */ 1399 + struct acpi_mpam_resource_generic_locator { 1400 + u64 descriptor1; 1401 + u32 descriptor2; 1402 + }; 1403 + 1404 + union acpi_mpam_resource_locator { 1405 + struct acpi_mpam_resource_cache_locator cache_locator; 1406 + struct acpi_mpam_resource_memory_locator memory_locator; 1407 + struct acpi_mpam_resource_smmu_locator smmu_locator; 1408 + struct acpi_mpam_resource_memcache_locator mem_cache_locator; 1409 + struct acpi_mpam_resource_acpi_locator acpi_locator; 1410 + struct acpi_mpam_resource_interconnect_locator interconnect_ifc_locator; 1411 + struct acpi_mpam_resource_generic_locator generic_locator; 1412 + }; 1413 + 1414 + /* Memory System Component Resource Node Structure Table 9 */ 1415 + struct acpi_mpam_resource_node { 1416 + u32 identifier; 1417 + u8 ris_index; 1418 + u16 reserved1; 1419 + u8 locator_type; 1420 + union acpi_mpam_resource_locator locator; 1421 + u32 num_functional_deps; 1422 + }; 1423 + 1424 + /* Memory System Component (MSC) Node Structure. Table 4 */ 1425 + struct acpi_mpam_msc_node { 1426 + u16 length; 1427 + u8 interface_type; 1428 + u8 reserved; 1429 + u32 identifier; 1430 + u64 base_address; 1431 + u32 mmio_size; 1432 + u32 overflow_interrupt; 1433 + u32 overflow_interrupt_flags; 1434 + u32 reserved1; 1435 + u32 overflow_interrupt_affinity; 1436 + u32 error_interrupt; 1437 + u32 error_interrupt_flags; 1438 + u32 reserved2; 1439 + u32 error_interrupt_affinity; 1440 + u32 max_nrdy_usec; 1441 + u64 hardware_id_linked_device; 1442 + u32 instance_id_linked_device; 1443 + u32 num_resouce_nodes; 1444 + }; 1445 + 1446 + struct acpi_table_mpam { 1447 + struct acpi_table_header header; /* Common ACPI table header */ 1354 1448 }; 1355 1449 1356 1450 /******************************************************************************* ··· 1700 1564 u16 reserved; /* Reserved, must be zero */ 1701 1565 u32 line_count; 1702 1566 u32 line_size; 1703 - u32 line_offset[1]; /* Variable length */ 1567 + u32 line_offset[]; /* Variable length */ 1704 1568 }; 1705 1569 1706 1570 /* 3: SMBIOS Management Information Structure */ ··· 1708 1572 struct acpi_nfit_smbios { 1709 1573 struct acpi_nfit_header header; 1710 1574 u32 reserved; /* Reserved, must be zero */ 1711 - u8 data[1]; /* Variable length */ 1575 + u8 data[]; /* Variable length */ 1712 1576 }; 1713 1577 1714 1578 /* 4: NVDIMM Control Region Structure */ ··· 1765 1629 u32 device_handle; 1766 1630 u16 hint_count; 1767 1631 u8 reserved[6]; /* Reserved, must be zero */ 1768 - u64 hint_address[1]; /* Variable length */ 1632 + u64 hint_address[]; /* Variable length */ 1769 1633 }; 1770 1634 1771 1635 /* 7: Platform Capabilities Structure */ ··· 2719 2583 ACPI_RGRT_TYPE_RESERVED0 = 0, 2720 2584 ACPI_RGRT_IMAGE_TYPE_PNG = 1, 2721 2585 ACPI_RGRT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 2586 + }; 2587 + 2588 + /******************************************************************************* 2589 + * 2590 + * RHCT - RISC-V Hart Capabilities Table 2591 + * Version 1 2592 + * 2593 + ******************************************************************************/ 2594 + 2595 + struct acpi_table_rhct { 2596 + struct acpi_table_header header; /* Common ACPI table header */ 2597 + u32 reserved; 2598 + u64 time_base_freq; 2599 + u32 node_count; 2600 + u32 node_offset; 2601 + }; 2602 + 2603 + /* 2604 + * RHCT subtables 2605 + */ 2606 + struct acpi_rhct_node_header { 2607 + u16 type; 2608 + u16 length; 2609 + u16 revision; 2610 + }; 2611 + 2612 + /* Values for RHCT subtable Type above */ 2613 + 2614 + enum acpi_rhct_node_type { 2615 + ACPI_RHCT_NODE_TYPE_ISA_STRING = 0x0000, 2616 + ACPI_RHCT_NODE_TYPE_HART_INFO = 0xFFFF, 2617 + }; 2618 + 2619 + /* 2620 + * RHCT node specific subtables 2621 + */ 2622 + 2623 + /* ISA string node structure */ 2624 + struct acpi_rhct_isa_string { 2625 + u16 isa_length; 2626 + char isa[]; 2627 + }; 2628 + 2629 + /* Hart Info node structure */ 2630 + struct acpi_rhct_hart_info { 2631 + u16 num_offsets; 2632 + u32 uid; /* ACPI processor UID */ 2722 2633 }; 2723 2634 2724 2635 /*******************************************************************************
+1 -1
include/acpi/actbl3.h
··· 3 3 * 4 4 * Name: actbl3.h - ACPI Table Definitions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+6 -2
include/acpi/actypes.h
··· 3 3 * 4 4 * Name: actypes.h - Common data types for the entire ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 1239 1239 struct acpi_mem_mapping *first_mm; 1240 1240 }; 1241 1241 1242 - struct acpi_data_table_space_context { 1242 + struct acpi_data_table_mapping { 1243 1243 void *pointer; 1244 1244 }; 1245 1245 ··· 1320 1320 1321 1321 #ifndef ACPI_FALLTHROUGH 1322 1322 #define ACPI_FALLTHROUGH do {} while(0) 1323 + #endif 1324 + 1325 + #ifndef ACPI_FLEX_ARRAY 1326 + #define ACPI_FLEX_ARRAY(TYPE, NAME) TYPE NAME[0] 1323 1327 #endif 1324 1328 1325 1329 #endif /* __ACTYPES_H__ */
+1 -1
include/acpi/acuuid.h
··· 3 3 * 4 4 * Name: acuuid.h - ACPI-related UUID/GUID definitions 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -1
include/acpi/platform/acenv.h
··· 3 3 * 4 4 * Name: acenv.h - Host and compiler configuration 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 209 209 #elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI) 210 210 #include "acefi.h" 211 211 212 + #elif defined(__ZEPHYR__) 213 + #include "aczephyr.h" 212 214 #else 213 215 214 216 /* Unknown environment */
+1 -1
include/acpi/platform/acenvex.h
··· 3 3 * 4 4 * Name: acenvex.h - Extra host and compiler configuration 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+12 -1
include/acpi/platform/acgcc.h
··· 3 3 * 4 4 * Name: acgcc.h - GCC specific defines, etc. 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 60 60 #if __has_attribute(__fallthrough__) 61 61 #define ACPI_FALLTHROUGH __attribute__((__fallthrough__)) 62 62 #endif 63 + 64 + /* 65 + * Flexible array members are not allowed to be part of a union under 66 + * C99, but this is not for any technical reason. Work around the 67 + * limitation. 68 + */ 69 + #define ACPI_FLEX_ARRAY(TYPE, NAME) \ 70 + struct { \ 71 + struct { } __Empty_ ## NAME; \ 72 + TYPE NAME[]; \ 73 + } 63 74 64 75 #endif /* __ACGCC_H__ */
+1 -1
include/acpi/platform/acgccex.h
··· 3 3 * 4 4 * Name: acgccex.h - Extra GCC specific defines, etc. 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+5 -2
include/acpi/platform/aclinux.h
··· 3 3 * 4 4 * Name: aclinux.h - OS specific defines, etc. for Linux 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 180 180 #define ACPI_USE_STANDARD_HEADERS 181 181 182 182 #ifdef ACPI_USE_STANDARD_HEADERS 183 + #include <stddef.h> 183 184 #include <unistd.h> 185 + 186 + #define ACPI_OFFSET(d, f) offsetof(d, f) 184 187 #endif 185 188 186 189 /* Define/disable kernel-specific declarators */ ··· 202 199 203 200 #if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\ 204 201 defined(__aarch64__) || defined(__PPC64__) ||\ 205 - defined(__s390x__) ||\ 202 + defined(__s390x__) || defined(__loongarch__) ||\ 206 203 (defined(__riscv) && (defined(__LP64__) || defined(_LP64))) 207 204 #define ACPI_MACHINE_WIDTH 64 208 205 #define COMPILER_DEPENDENT_INT64 long
+1 -1
include/acpi/platform/aclinuxex.h
··· 3 3 * 4 4 * Name: aclinuxex.h - Extra OS specific defines, etc. for Linux 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+48
include/acpi/platform/aczephyr.h
··· 1 + /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 2 + /****************************************************************************** 3 + * 4 + * Module Name: aczephyr.h - OS specific defines, etc. 5 + * 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 + * 8 + *****************************************************************************/ 9 + 10 + #ifndef __ACZEPHYR_H__ 11 + #define __ACZEPHYR_H__ 12 + 13 + #define SEEK_SET FS_SEEK_SET 14 + #define SEEK_END FS_SEEK_END 15 + 16 + #define ACPI_MACHINE_WIDTH 64 17 + 18 + #define ACPI_NO_ERROR_MESSAGES 19 + #undef ACPI_DEBUG_OUTPUT 20 + #define ACPI_USE_SYSTEM_CLIBRARY 21 + #undef ACPI_DBG_TRACK_ALLOCATIONS 22 + #define ACPI_SINGLE_THREADED 23 + #define ACPI_USE_NATIVE_RSDP_POINTER 24 + 25 + #include <zephyr/kernel.h> 26 + #include <zephyr/device.h> 27 + #include <stdio.h> 28 + #include <stdlib.h> 29 + #include <string.h> 30 + #include <ctype.h> 31 + #include <zephyr/fs/fs.h> 32 + #include <zephyr/sys/printk.h> 33 + #include <zephyr/sys/__assert.h> 34 + 35 + /****************************************************************************** 36 + * 37 + * FUNCTION: acpi_enable_dbg_print 38 + * 39 + * PARAMETERS: Enable, - Enable/Disable debug print 40 + * 41 + * RETURN: None 42 + * 43 + * DESCRIPTION: Enable/disable debug print 44 + * 45 + *****************************************************************************/ 46 + 47 + void acpi_enable_dbg_print(bool enable); 48 + #endif
-2
include/acpi/video.h
··· 53 53 }; 54 54 55 55 #if IS_ENABLED(CONFIG_ACPI_VIDEO) 56 - extern void acpi_video_report_nolcd(void); 57 56 extern int acpi_video_register(void); 58 57 extern void acpi_video_unregister(void); 59 58 extern void acpi_video_register_backlight(void); ··· 80 81 return __acpi_video_get_backlight_type(true, NULL) == acpi_backlight_native; 81 82 } 82 83 #else 83 - static inline void acpi_video_report_nolcd(void) { return; }; 84 84 static inline int acpi_video_register(void) { return -ENODEV; } 85 85 static inline void acpi_video_unregister(void) { return; } 86 86 static inline void acpi_video_register_backlight(void) { return; }
+4 -2
include/linux/acpi.h
··· 10 10 11 11 #include <linux/errno.h> 12 12 #include <linux/ioport.h> /* for struct resource */ 13 - #include <linux/irqdomain.h> 14 13 #include <linux/resource_ext.h> 15 14 #include <linux/device.h> 15 + #include <linux/mod_devicetable.h> 16 16 #include <linux/property.h> 17 17 #include <linux/uuid.h> 18 + 19 + struct irq_domain; 20 + struct irq_domain_ops; 18 21 19 22 #ifndef _LINUX 20 23 #define _LINUX ··· 27 24 #ifdef CONFIG_ACPI 28 25 29 26 #include <linux/list.h> 30 - #include <linux/mod_devicetable.h> 31 27 #include <linux/dynamic_debug.h> 32 28 #include <linux/module.h> 33 29 #include <linux/mutex.h>
+11
include/xen/xen.h
··· 71 71 } 72 72 #endif 73 73 74 + #if defined(CONFIG_XEN_DOM0) && defined(CONFIG_ACPI) && defined(CONFIG_X86) 75 + bool __init xen_processor_present(uint32_t acpi_id); 76 + #else 77 + #include <linux/bug.h> 78 + static inline bool xen_processor_present(uint32_t acpi_id) 79 + { 80 + BUG(); 81 + return false; 82 + } 83 + #endif 84 + 74 85 #endif /* _XEN_XEN_H */
+1
net/rfkill/rfkill-gpio.c
··· 8 8 #include <linux/module.h> 9 9 #include <linux/mod_devicetable.h> 10 10 #include <linux/rfkill.h> 11 + #include <linux/of.h> 11 12 #include <linux/platform_device.h> 12 13 #include <linux/clk.h> 13 14 #include <linux/slab.h>
+1 -1
tools/power/acpi/common/cmfsize.c
··· 3 3 * 4 4 * Module Name: cmfsize - Common get file size function 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/common/getopt.c
··· 3 3 * 4 4 * Module Name: getopt 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
··· 3 3 * 4 4 * Module Name: oslinuxtbl - Linux OSL for obtaining ACPI tables 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/os_specific/service_layers/osunixdir.c
··· 3 3 * 4 4 * Module Name: osunixdir - Unix directory access interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/os_specific/service_layers/osunixmap.c
··· 3 3 * 4 4 * Module Name: osunixmap - Unix OSL for file mappings 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/os_specific/service_layers/osunixxf.c
··· 3 3 * 4 4 * Module Name: osunixxf - UNIX OSL interfaces 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/tools/acpidump/acpidump.h
··· 3 3 * 4 4 * Module Name: acpidump.h - Include file for acpi_dump utility 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/tools/acpidump/apdump.c
··· 3 3 * 4 4 * Module Name: apdump - Dump routines for ACPI tables (acpidump) 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/tools/acpidump/apfiles.c
··· 3 3 * 4 4 * Module Name: apfiles - File-related functions for acpidump utility 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/tools/acpidump/apmain.c
··· 3 3 * 4 4 * Module Name: apmain - Main module for the acpidump utility 5 5 * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 6 + * Copyright (C) 2000 - 2023, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
tools/testing/nvdimm/test/nfit.c
··· 1878 1878 static int nfit_test0_alloc(struct nfit_test *t) 1879 1879 { 1880 1880 struct acpi_nfit_system_address *spa = NULL; 1881 + struct acpi_nfit_flush_address *flush; 1881 1882 size_t nfit_size = sizeof_spa(spa) * NUM_SPA 1882 1883 + sizeof(struct acpi_nfit_memory_map) * NUM_MEM 1883 1884 + sizeof(struct acpi_nfit_control_region) * NUM_DCR 1884 1885 + offsetof(struct acpi_nfit_control_region, 1885 1886 window_size) * NUM_DCR 1886 1887 + sizeof(struct acpi_nfit_data_region) * NUM_BDW 1887 - + (sizeof(struct acpi_nfit_flush_address) 1888 - + sizeof(u64) * NUM_HINTS) * NUM_DCR 1888 + + struct_size(flush, hint_address, NUM_HINTS) * NUM_DCR 1889 1889 + sizeof(struct acpi_nfit_capabilities); 1890 1890 int i; 1891 1891