linux-stable/drivers/acpi
Jia He 12064c1768 Revert "ACPI: Add memory semantics to acpi_os_map_memory()"
This reverts commit 437b38c511.

The memory semantics added in commit 437b38c511 causes SystemMemory
Operation region, whose address range is not described in the EFI memory
map to be mapped as NormalNC memory on arm64 platforms (through
acpi_os_map_memory() in acpi_ex_system_memory_space_handler()).

This triggers the following abort on an ARM64 Ampere eMAG machine,
because presumably the physical address range area backing the Opregion
does not support NormalNC memory attributes driven on the bus.

 Internal error: synchronous external abort: 96000410 [#1] SMP
 Modules linked in:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.14.0+ #462
 Hardware name: MiTAC RAPTOR EV-883832-X3-0001/RAPTOR, BIOS 0.14 02/22/2019
 pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[...snip...]
 Call trace:
  acpi_ex_system_memory_space_handler+0x26c/0x2c8
  acpi_ev_address_space_dispatch+0x228/0x2c4
  acpi_ex_access_region+0x114/0x268
  acpi_ex_field_datum_io+0x128/0x1b8
  acpi_ex_extract_from_field+0x14c/0x2ac
  acpi_ex_read_data_from_field+0x190/0x1b8
  acpi_ex_resolve_node_to_value+0x1ec/0x288
  acpi_ex_resolve_to_value+0x250/0x274
  acpi_ds_evaluate_name_path+0xac/0x124
  acpi_ds_exec_end_op+0x90/0x410
  acpi_ps_parse_loop+0x4ac/0x5d8
  acpi_ps_parse_aml+0xe0/0x2c8
  acpi_ps_execute_method+0x19c/0x1ac
  acpi_ns_evaluate+0x1f8/0x26c
  acpi_ns_init_one_device+0x104/0x140
  acpi_ns_walk_namespace+0x158/0x1d0
  acpi_ns_initialize_devices+0x194/0x218
  acpi_initialize_objects+0x48/0x50
  acpi_init+0xe0/0x498

If the Opregion address range is not present in the EFI memory map there
is no way for us to determine the memory attributes to use to map it -
defaulting to NormalNC does not work (and it is not correct on a memory
region that may have read side-effects) and therefore commit
437b38c511 should be reverted, which means reverting back to the
original behavior whereby address ranges that are mapped using
acpi_os_map_memory() default to the safe devicenGnRnE attributes on
ARM64 if the mapped address range is not defined in the EFI memory map.

Fixes: 437b38c511 ("ACPI: Add memory semantics to acpi_os_map_memory()")
Signed-off-by: Jia He <justin.he@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-09-23 20:39:36 +02:00
..
acpica ACPICA: Fix an if statement (add parens) 2021-08-16 16:47:01 +02:00
apei ACPI: APEI: fix synchronous external aborts in user-mode 2021-06-17 14:05:28 +02:00
arm64 IOMMU Updates for Linux v5.14 2021-07-02 13:22:47 -07:00
dptf ACPI: DPTF: Add new PCH FIVR methods 2021-08-04 18:08:50 +02:00
nfit ACPI: NFIT: Fix support for virtual SPA ranges 2021-08-11 11:54:33 -07:00
numa ACPI: Add LoongArch support for ACPI_PROCESSOR/ACPI_NUMA 2021-07-16 19:09:20 +02:00
pmic ACPI / PMIC: XPower: optimize MIPI PMIQ sequence I2C-bus accesses 2021-07-16 19:05:59 +02:00
x86 ACPI: PM: s2idle: Run both AMD and Microsoft methods if both are supported 2021-09-02 18:14:34 +02:00
Kconfig Merge branches 'acpi-numa', 'acpi-glue', 'acpi-config' and 'acpi-pmic' 2021-08-30 19:30:37 +02:00
Makefile IOMMU Updates for Linux v5.14 2021-07-02 13:22:47 -07:00
ac.c
acpi_adxl.c
acpi_amba.c ACPI: AMBA: Fix resource name in /proc/iomem 2021-06-30 20:01:10 +02:00
acpi_apd.c
acpi_cmos_rtc.c
acpi_configfs.c ACPI: configfs: Make get_header() to return error pointer 2021-07-16 19:20:28 +02:00
acpi_dbg.c
acpi_extlog.c
acpi_fpdt.c ACPI: tables: FPDT: Do not print FW_BUG message if record types are reserved 2021-08-25 20:01:07 +02:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c
acpi_lpss.c Merge branch 'clk-frac-divider' into clk-next 2021-09-01 15:26:45 -07:00
acpi_memhotplug.c ACPI: memhotplug: use a single static memory group for a single memory device 2021-09-08 11:50:23 -07:00
acpi_pad.c ACPI: processor: Replace deprecated CPU-hotplug functions 2021-08-04 20:25:54 +02:00
acpi_platform.c
acpi_pnp.c
acpi_processor.c ACPI: processor: Replace deprecated CPU-hotplug functions 2021-08-04 20:25:54 +02:00
acpi_tad.c
acpi_video.c ACPI: video: Add quirk for the Dell Vostro 3350 2021-06-30 20:03:41 +02:00
acpi_watchdog.c
battery.c
bgrt.c ACPI: bgrt: Use sysfs_emit 2021-06-23 19:27:50 +02:00
blacklist.c
bus.c Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
button.c ACPI: button: Add DMI quirk for Lenovo Yoga 9 (14INTL5) 2021-08-25 19:57:01 +02:00
container.c
cppc_acpi.c ACPI: CPPC: Introduce cppc_get_nominal_perf() 2021-09-07 21:15:16 +02:00
custom_method.c
debugfs.c
device_pm.c for-5.14/drivers-2021-06-29 2021-06-30 12:21:16 -07:00
device_sysfs.c ACPI: sysfs: fix doc warnings in device_sysfs.c 2021-06-17 14:32:05 +02:00
dock.c
ec.c Merge branches 'acpi-ec', 'acpi-apei', 'acpi-soc' and 'acpi-misc' 2021-06-29 15:51:25 +02:00
ec_sys.c
event.c Merge branches 'acpi-ec', 'acpi-apei', 'acpi-soc' and 'acpi-misc' 2021-06-29 15:51:25 +02:00
evged.c
fan.c
fan.h
glue.c ACPI: glue: Eliminate acpi_platform_notify() 2021-07-16 19:17:04 +02:00
hed.c
internal.h for-5.14/drivers-2021-06-29 2021-06-30 12:21:16 -07:00
ioapic.c
irq.c
nvs.c Merge branches 'acpi-ec', 'acpi-apei', 'acpi-soc' and 'acpi-misc' 2021-06-29 15:51:25 +02:00
osi.c
osl.c Revert "ACPI: Add memory semantics to acpi_os_map_memory()" 2021-09-23 20:39:36 +02:00
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c
pci_slot.c
platform_profile.c ACPI: platform-profile: call sysfs_notify() from platform_profile_store() 2021-08-16 18:32:02 +02:00
power.c ACPI: power: Drop name from struct acpi_power_resource 2021-08-27 21:08:15 +02:00
pptt.c ACPI: tables: PPTT: Populate cache-id if provided by firmware 2021-06-07 15:55:02 +02:00
prmt.c ACPI: PRM: Find PRMT table before parsing it 2021-09-08 20:56:57 +02:00
proc.c
processor_core.c
processor_driver.c
processor_idle.c ACPI: processor: Replace deprecated CPU-hotplug functions 2021-08-04 20:25:54 +02:00
processor_pdc.c
processor_perflib.c
processor_thermal.c
processor_throttling.c Merge branches 'acpi-dptf' and 'acpi-messages' 2021-06-29 15:50:37 +02:00
property.c
reboot.c
resource.c Revert "ACPI: resources: Add checks for ACPI IRQ override" 2021-07-28 18:37:21 +02:00
sbs.c
sbshc.c Merge branches 'acpi-ec', 'acpi-apei', 'acpi-soc' and 'acpi-misc' 2021-06-29 15:51:25 +02:00
sbshc.h
scan.c ACPI: scan: Remove unneeded header linux/nls.h 2021-09-07 21:12:55 +02:00
sleep.c Merge branches 'acpi-dptf' and 'acpi-messages' 2021-06-29 15:50:37 +02:00
sleep.h
spcr.c ACPI: SPCR: Add support for the new 16550-compatible Serial Port Subtype 2021-08-16 18:38:08 +02:00
sysfs.c Merge branches 'acpi-dptf' and 'acpi-messages' 2021-06-29 15:50:37 +02:00
tables.c memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
thermal.c
tiny-power-button.c
utils.c ACPI: utils: Fix reference counting in for_each_acpi_dev_match() 2021-07-19 16:22:01 +02:00
video_detect.c
viot.c ACPI: Add driver for the VIOT table 2021-06-25 15:02:43 +02:00
wakeup.c