OpenCloudOS-Kernel/drivers/platform/x86/dell
Juergen Gross 77089467fc platform/x86/dell: add buffer allocation/free functions for SMI calls
The dcdbas driver is used to call SMI handlers for both, dcdbas and
dell-smbios-smm. Both drivers allocate a buffer for communicating
with the SMI handler. The physical buffer address is then passed to
the called SMI handler via %ebx.

Unfortunately this doesn't work when running in Xen dom0, as the
physical address obtained via virt_to_phys() is only a guest physical
address, and not a machine physical address as needed by SMI.

The problem in dcdbas is easy to correct, as dcdbas is using
dma_alloc_coherent() for allocating the buffer, and the machine
physical address is available via the DMA address returned in the DMA
handle.

In order to avoid duplicating the buffer allocation code in
dell-smbios-smm, add a generic buffer allocation function to dcdbas
and use it for both drivers. This is especially fine regarding driver
dependencies, as dell-smbios-smm is already calling dcdbas to generate
the SMI request.

Signed-off-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20220318150950.16843-1-jgross@suse.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-04-27 21:45:28 +02:00
..
dell-wmi-sysman platform/x86: dell-wmi-sysman: Change user experience when Admin/System Password is modified 2021-06-28 11:53:24 +02:00
Kconfig platform/x86: dell-wmi-descriptor: disable by default 2021-11-16 10:56:53 +01:00
Makefile platform/x86: dell-privacy: Add support for Dell hardware privacy 2021-06-16 17:47:51 +02:00
alienware-wmi.c platform/x86: Adjust Dell drivers to a personal email address 2021-04-07 19:47:23 +02:00
dcdbas.c platform/x86/dell: add buffer allocation/free functions for SMI calls 2022-04-27 21:45:28 +02:00
dcdbas.h platform/x86/dell: add buffer allocation/free functions for SMI calls 2022-04-27 21:45:28 +02:00
dell-laptop.c platform/x86: dell-laptop: Add quirk entry for Latitude 7520 2022-04-27 16:50:13 +02:00
dell-rbtn.c
dell-rbtn.h
dell-smbios-base.c platform/x86: Adjust Dell drivers to a personal email address 2021-04-07 19:47:23 +02:00
dell-smbios-smm.c platform/x86/dell: add buffer allocation/free functions for SMI calls 2022-04-27 21:45:28 +02:00
dell-smbios-wmi.c platform/x86: dell-smbios-wmi: Add missing kfree in error-exit from run_smbios_call 2021-08-26 16:09:43 +02:00
dell-smbios.h
dell-smo8800.c platform/x86: dell-smo8800: Convert to be a platform driver 2021-08-12 09:26:28 +02:00
dell-wmi-aio.c
dell-wmi-base.c platform/x86: dell-wmi: Recognise or support new switches 2021-09-21 15:21:06 +02:00
dell-wmi-descriptor.c platform/x86: Adjust Dell drivers to a personal email address 2021-04-07 19:47:23 +02:00
dell-wmi-descriptor.h
dell-wmi-led.c
dell-wmi-privacy.c platform/x86: dell-privacy: Add support for Dell hardware privacy 2021-06-16 17:47:51 +02:00
dell-wmi-privacy.h platform/x86: dell-privacy: Add support for Dell hardware privacy 2021-06-16 17:47:51 +02:00
dell_rbu.c firmware: replace HOTPLUG with UEVENT in FW_ACTION defines 2021-05-13 16:14:45 +02:00