]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mm: Unbreak modules that use the DMA API
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 15 Dec 2017 16:20:12 +0000 (10:20 -0600)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 18 Dec 2017 12:06:13 +0000 (13:06 +0100)
commit026ba37afc8bcc2d492ad053c09c0a54d8dc8ff6
tree040527509a454f3c8d1e11a571071092b6756843
parent34d0162c7c0b27174c2c694de03b8a12b8312f0d
x86/mm: Unbreak modules that use the DMA API

Commit eb1556174f52 ("x86/mm: Add Secure Encrypted Virtualization (SEV)
support") changed sme_active() from an inline function that referenced
sme_me_mask to a non-inlined function in order to make the sev_enabled
variable a static variable.  This function was marked EXPORT_SYMBOL_GPL
because at the time the patch was submitted, sme_me_mask was marked
EXPORT_SYMBOL_GPL.

Commit 7791f8563c94 ("x86/mm: Unbreak modules that rely on external
PAGE_KERNEL availability") changed sme_me_mask variable from
EXPORT_SYMBOL_GPL to EXPORT_SYMBOL, allowing external modules the ability
to build with CONFIG_AMD_MEM_ENCRYPT=y.  Now, however, with sev_active()
no longer an inline function and marked as EXPORT_SYMBOL_GPL, external
modules that use the DMA API are once again broken in 4.15. Since the DMA
API is meant to be used by external modules, this needs to be changed.

Change the sme_active() and sev_active() functions from EXPORT_SYMBOL_GPL
to EXPORT_SYMBOL.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Link: https://lkml.kernel.org/r/20171215162011.14125.7113.stgit@tlendack-t1.amdoffice.net
arch/x86/mm/mem_encrypt.c