efi_runtime_call() is only used for XENPF_efi_runtime_call, wrap
it and its compat function and its calling functions:
efi_compat_runtime_call()
gwstrlen()
cast_time()
cast_guid()
Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com>
---
cc: "Daniel P. Smith" <dpsmith@apertussolutions.com>
cc: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
cc: Jan Beulich <jbeulich@suse.com>
---
xen/common/efi/common-stub.c | 4 ++--
xen/common/efi/compat.c | 2 +-
xen/common/efi/runtime.c | 2 ++
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index 05a84c60fb70..f3fb9b77d426 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -26,21 +26,21 @@ int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
{
return -ENOSYS;
}
-#endif /* CONFIG_PLATFORM_OP */
int efi_runtime_call(struct xenpf_efi_runtime_call *op)
{
return -ENOSYS;
}
+#endif /* CONFIG_PLATFORM_OP */
#ifdef CONFIG_COMPAT
#ifdef CONFIG_PLATFORM_OP
int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
__attribute__((__alias__("efi_get_info")));
-#endif /* CONFIG_PLATFORM_OP */
int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
__attribute__((__alias__("efi_runtime_call")));
+#endif /* CONFIG_PLATFORM_OP */
#endif
diff --git a/xen/common/efi/compat.c b/xen/common/efi/compat.c
index 4f5f59fcac2e..f350958c96b3 100644
--- a/xen/common/efi/compat.c
+++ b/xen/common/efi/compat.c
@@ -4,10 +4,10 @@
#ifdef CONFIG_PLATFORM_OP
#define efi_get_info efi_compat_get_info
#define xenpf_efi_info compat_pf_efi_info
-#endif
#define efi_runtime_call efi_compat_runtime_call
#define xenpf_efi_runtime_call compat_pf_efi_runtime_call
+#endif
#define xenpf_efi_guid compat_pf_efi_guid
#define xenpf_efi_time compat_pf_efi_time
diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
index ab63785397e2..b1f1d677d2cb 100644
--- a/xen/common/efi/runtime.c
+++ b/xen/common/efi/runtime.c
@@ -329,6 +329,7 @@ int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
}
#endif /* CONFIG_PLATFORM_OP */
+#ifdef CONFIG_PLATFORM_OP
static long gwstrlen(XEN_GUEST_HANDLE_PARAM(CHAR16) str)
{
unsigned long len;
@@ -715,4 +716,5 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
return rc;
}
+#endif /* CONFIG_PLATFORM_OP */
#endif
--
2.34.1