android_kernel_samsung_sm8650/include/linux/mem_relinquish.h
Keir Fraser 102dcecb67 ANDROID: Define mem_relinquish interface for releasing memory to a hypervisor.
On PKVM/ARM64 this uses the ARM SMCCC relinquish hypercall when available.

Bug: 240239989
Change-Id: Ifa85b641a48f348a2364cf8c6b06b6417f1eeedb
Signed-off-by: Keir Fraser <keirf@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
2022-12-15 16:13:00 +00:00

21 lines
441 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2022 Google LLC
* Author: Keir Fraser <keirf@google.com>
*/
#ifndef __MEM_RELINQUISH_H__
#define __MEM_RELINQUISH_H__
#ifdef CONFIG_ARCH_HAS_MEM_RELINQUISH
#include <asm/mem_relinquish.h>
#else /* !CONFIG_ARCH_HAS_MEM_RELINQUISH */
static inline void page_relinquish(struct page *page) { }
#endif /* CONFIG_ARCH_HAS_MEM_RELINQUISH */
#endif /* __MEM_RELINQUISH_H__ */