summaryrefslogtreecommitdiff
path: root/drivers/xen
diff options
context:
space:
mode:
authorPengpeng Hou <pengpeng.hou@isrc.iscas.ac.cn>2026-03-10 08:08:00 +0000
committerJuergen Gross <jgross@suse.com>2026-04-10 11:07:21 +0200
commit3f100dd61ad4ee7c1fb6a44775a928dcdba7515b (patch)
tree3369085f19dcfe98390ee204445383678612f336 /drivers/xen
parentbdd5de3d9e2da45852d0d21313af3a02f0e0626e (diff)
downloadlinux-next-3f100dd61ad4ee7c1fb6a44775a928dcdba7515b.tar.gz
linux-next-3f100dd61ad4ee7c1fb6a44775a928dcdba7515b.zip
xen/grant-table: guard gnttab_suspend/resume with CONFIG_HIBERNATE_CALLBACKS
In current linux.git, gnttab_suspend() and gnttab_resume() are defined and declared unconditionally. However, their only in-tree callers reside in drivers/xen/manage.c, which are guarded by CONFIG_HIBERNATE_CALLBACKS. Match the helper scope to their callers by wrapping the definitions in CONFIG_HIBERNATE_CALLBACKS and providing no-op stubs in the header. This fixes the config-scope mismatch and reduces the code footprint when hibernation callbacks are disabled. Signed-off-by: Pengpeng Hou <pengpeng.hou@isrc.iscas.ac.cn> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20260310080800.742223-1-pengpeng.hou@isrc.iscas.ac.cn>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/grant-table.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 97e27f754d39..a6abf1ccd54c 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -1579,7 +1579,7 @@ static int gnttab_setup(void)
}
return gnttab_map(0, nr_grant_frames - 1);
}
-
+#ifdef CONFIG_HIBERNATE_CALLBACKS
int gnttab_resume(void)
{
gnttab_request_version();
@@ -1592,6 +1592,7 @@ int gnttab_suspend(void)
gnttab_interface->unmap_frames();
return 0;
}
+#endif
static int gnttab_expand(unsigned int req_entries)
{