Files
RedLintu16andClaude Opus 5.5 a45821994b Import from Sony 73.1.A.2.74 open source archive
kernel_platform/common (Android common kernel, android16-6.12) from opendevices.sony.net, "Open source archive for 73.1.A.2.74" (Xperia 1 VIII), unmodified. This is the kernel Sony ships, so stock-built modules (e.g. the WLAN driver, whose source is not in the archive) match it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-14 00:28:16 +00:00

54 lines
1.5 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2022 Google LLC
* Author: Keir Fraser <[email protected]>
*/
#ifndef _LINUX_VIRTIO_BALLOON_H
#define _LINUX_VIRTIO_BALLOON_H
#include <uapi/linux/virtio_balloon.h>
struct page;
#ifdef CONFIG_VIRTIO_BALLOON_HYP_OPS
struct virtio_balloon_hyp_ops {
bool (*page_relinquish_disallowed)(void);
void (*page_relinquish)(struct page *page, unsigned int nr);
void (*post_page_relinquish_tlb_inv)(void);
};
extern struct virtio_balloon_hyp_ops *virtio_balloon_hyp_ops;
static inline bool page_relinquish_disallowed(void)
{
if (virtio_balloon_hyp_ops &&
virtio_balloon_hyp_ops->page_relinquish_disallowed)
return virtio_balloon_hyp_ops->page_relinquish_disallowed();
return false;
}
static inline void page_relinquish(struct page *page, unsigned int nr)
{
if (virtio_balloon_hyp_ops &&
virtio_balloon_hyp_ops->page_relinquish)
return virtio_balloon_hyp_ops->page_relinquish(page, nr);
}
static inline void post_page_relinquish_tlb_inv(void)
{
if (virtio_balloon_hyp_ops &&
virtio_balloon_hyp_ops->post_page_relinquish_tlb_inv)
return virtio_balloon_hyp_ops->post_page_relinquish_tlb_inv();
}
#else /* !CONFIG_VIRTIO_BALLOON_HYP_OPS */
static inline bool page_relinquish_disallowed(void) { return false; }
static inline void page_relinquish(struct page *page, unsigned int nr) { }
static inline void post_page_relinquish_tlb_inv(void) { }
#endif /* CONFIG_VIRTIO_BALLOON_HYP_OPS */
#endif /* _LINUX_VIRTIO_BALLOON_H */