linux-hardened/drivers/acpi
Dan Williams 4995734e97 acpi, nfit: fix acpi_check_dsm() vs zero functions implemented
QEMU 2.6 implements nascent support for nvdimm DSMs. Depending on
configuration it may only implement the function0 dsm to indicate that
no other DSMs are available. Commit 31eca76ba2 "nfit, libnvdimm:
limited/whitelisted dimm command marshaling mechanism" breaks QEMU, but
QEMU is spec compliant.  Per the spec the way to indicate that no
functions are supported is:

    If Function Index is zero, the return is a buffer containing one bit
    for each function index, starting with zero. Bit 0 indicates whether
    there is support for any functions other than function 0 for the
    specified UUID and Revision ID. If set to zero, no functions are
    supported (other than function zero) for the specified UUID and
    Revision ID.

Update the nfit driver to determine the family (interface UUID) without
requiring the implementation to define any other functions, i.e.
short-circuit acpi_check_dsm() to succeed per the spec.  The nfit driver
appears to be the only user passing funcs==0 to acpi_check_dsm(), so
this behavior change of the common routine should be limited to the
probing done by the nfit driver.

Cc: Len Brown <lenb@kernel.org>
Cc: Jerry Hoemann <jerry.hoemann@hpe.com>
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
Fixes: 31eca76ba2 ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism")
Reported-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Tested-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2016-06-24 09:07:39 -07:00
..
acpica Revert "ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()" 2016-06-15 02:16:13 +02:00
apei Power management and ACPI material for v4.6-rc1, part 1 2016-03-16 14:10:53 -07:00
pmic drivers/acpi: make pmic/intel_pmic_crc.c explicitly non-modular 2016-03-09 23:46:07 +01:00
ac.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_amba.c ACPI / amba: Remove CLK_IS_ROOT 2016-04-27 23:42:57 +02:00
acpi_apd.c ACPI / APD: Remove CLK_IS_ROOT 2016-04-27 23:42:57 +02:00
acpi_cmos_rtc.c ACPI / RTC: Fix CMOS RTC opregion handler accesses to wrong addresses 2014-09-08 15:38:41 +02:00
acpi_dbg.c remove lots of IS_ERR_VALUE abuses 2016-05-27 15:26:11 -07:00
acpi_extlog.c ACPI and power management updates for 3.17-rc1 2014-08-06 20:34:19 -07:00
acpi_ipmi.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_lpat.c ACPI / LPAT: Common table processing functions 2015-01-29 21:02:10 +08:00
acpi_lpss.c ACPI / LPSS: set PM domain via helper setter 2016-02-03 01:08:22 +01:00
acpi_memhotplug.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_pad.c ACPI / PAD: power_saving_thread() is not freezable 2015-10-26 04:42:54 +01:00
acpi_platform.c Power management and ACPI material for v4.6-rc1, part 1 2016-03-16 14:10:53 -07:00
acpi_pnp.c ACPI / PNP: constify device IDs 2016-01-04 22:10:30 +01:00
acpi_processor.c ACPI / processor: Avoid reserving IO regions too early 2016-06-02 01:57:50 +02:00
acpi_video.c ACPI / Thermal / video: fix max_level incorrect value 2016-05-30 13:53:09 +02:00
battery.c ACPI / battery: Correctly serialise with the pending async probe 2016-05-21 01:25:07 +02:00
battery.h ACPI / battery: move some ACPI_BATTERY_* definitions to header 2014-03-19 01:57:46 +01:00
bgrt.c drivers/acpi: make bgrt driver explicitly non-modular 2016-03-09 23:46:07 +01:00
blacklist.c ACPI / osi: Collect _OSI handling into one single file 2016-05-05 00:13:53 +02:00
bus.c ACPI / EC: Fix a boot EC regresion by restoring boot EC support for the DSDT EC 2016-06-07 02:29:53 +02:00
button.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
cm_sbs.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
container.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
cppc_acpi.c ACPI / CPPC: use MRTT/MPAR to decide if/when a req can be sent 2016-03-09 23:35:29 +01:00
custom_method.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
debugfs.c ACPI: fix acpi_debugfs_init prototype 2015-08-07 02:55:18 +02:00
device_pm.c ACPI / PM: Export acpi_device_fix_up_power() 2016-05-20 15:54:01 +02:00
device_sysfs.c ACPI / device_sysfs: Clean up checkpatch errors 2016-05-04 23:47:32 +02:00
dock.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
ec.c ACPI / EC: Fix a boot EC regresion by restoring boot EC support for the DSDT EC 2016-06-07 02:29:53 +02:00
ec_sys.c ACPI / EC: Deny write access unless requested by module param 2016-03-09 23:26:15 +01:00
event.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
evged.c ACPI / GED: make evged.c explicitly non-modular 2016-05-09 22:59:25 +02:00
fan.c ACPI / fan: Make struct dev_pm_ops const 2016-03-09 23:23:21 +01:00
glue.c Merge branch 'acpi-pci' 2015-11-07 01:30:10 +01:00
gsi.c ACPI: Rename acpi_gsi_get_irq_type to acpi_dev_get_irq_type and export symbol 2016-01-01 03:20:25 +01:00
hed.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
int340x_thermal.c ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() 2015-09-15 03:05:45 +02:00
internal.h Merge branch 'acpi-ec' 2016-06-09 23:48:54 +02:00
ioapic.c x86/irq, ACPI: Implement ACPI driver to support IOAPIC hotplug 2015-02-05 15:09:26 +01:00
Kconfig Merge branches 'acpi-pci', 'acpi-misc' and 'acpi-tools' 2016-05-16 16:45:48 +02:00
Makefile Merge branches 'acpi-numa', 'acpi-tables' and 'acpi-osi' 2016-05-16 16:45:25 +02:00
nfit.c acpi, nfit: fix acpi_check_dsm() vs zero functions implemented 2016-06-24 09:07:39 -07:00
nfit.h Merge branch 'for-4.7/acpi6.1' into libnvdimm-for-next 2016-05-18 10:07:19 -07:00
numa.c ACPI / SRAT: fix SRAT parsing order with both LAPIC and X2APIC present 2016-04-21 22:13:03 +02:00
nvs.c ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem. 2014-05-27 18:13:08 +02:00
osi.c ACPI / osi: Collect _OSI handling into one single file 2016-05-05 00:13:53 +02:00
osl.c Merge branches 'acpi-numa', 'acpi-tables' and 'acpi-osi' 2016-05-16 16:45:25 +02:00
pci_irq.c x86/ACPI/PCI: Recognize that Interrupt Line 255 means "not connected" 2016-03-09 01:23:35 +01:00
pci_link.c ACPI,PCI,IRQ: remove SCI penalize function 2016-05-05 01:10:32 +02:00
pci_root.c x86/PCI/ACPI: Fix regression caused by commit 4d6b4e69a2 2015-12-02 02:30:15 +01:00
pci_slot.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
power.c Merge branch 'acpi-pm' 2015-09-01 03:38:43 +02:00
proc.c ACPI: change acpi_sleep_proc_init() to return void 2015-09-15 03:03:15 +02:00
processor_core.c ACPI / processor: Introduce invalid_phys_cpuid() 2015-05-13 23:28:16 +02:00
processor_driver.c ACPI / sleep: move acpi_processor_sleep to sleep.c 2016-02-22 00:53:56 +01:00
processor_idle.c Power management and ACPI material for v4.6-rc1, part 1 2016-03-16 14:10:53 -07:00
processor_pdc.c ACPI / processor: Introduce invalid_logical_cpuid() 2015-05-13 23:28:14 +02:00
processor_perflib.c Merge branch 'pm-cpufreq' 2015-09-01 15:52:35 +02:00
processor_thermal.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
processor_throttling.c ACPI / processor: Avoid reserving IO regions too early 2016-06-02 01:57:50 +02:00
property.c ACPI / property: fix data node parsing in acpi_get_next_subnode() 2016-03-17 03:06:38 +01:00
reboot.c
resource.c PCI: ACPI: IA64: fix IO port generic range check 2016-03-22 23:07:49 +01:00
sbs.c ACPI / SBS: fix inconsistent indenting inside if statement 2016-01-04 22:14:27 +01:00
sbshc.c Revert "ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook" 2015-11-16 23:26:45 +01:00
sbshc.h
scan.c ACPI / scan: AMBA bus probing support 2016-02-16 19:58:25 +01:00
sleep.c ACPI / PM: Introduce efi poweroff for HW-full platforms without _S5 2016-04-09 02:11:43 +02:00
sleep.h ACPICA: Drop Linux-specific waking vector functions 2016-01-04 22:05:20 +01:00
sysfs.c ACPI / sysfs: fix error code in get_status() 2016-05-05 15:28:58 +02:00
tables.c ACPI / tables: Fix DSDT override mechanism 2016-05-06 13:20:11 +02:00
thermal.c linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS 2015-10-10 11:32:30 +08:00
utils.c acpi, nfit: fix acpi_check_dsm() vs zero functions implemented 2016-06-24 09:07:39 -07:00
video_detect.c video / backlight: remove the backlight_device_registered API 2016-05-04 23:41:14 +02:00
wakeup.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00