ANDROID: vendor hooks: Export symbols for bootloader based hibernation

To add encryption support to bootloader based hibernation, export
symbols snapshot_get_image_size and alloc_swapdev_block.

These symbols can be used by vendor implementation to be called before
and after storing the snapshot image.

Bug: 260069271
Change-Id: I0d44bf833a97fce5bc5213712b2b2523a9e22607
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
This commit is contained in:
Shreyas K K
2022-12-05 15:59:49 +05:30
committed by Todd Kjos
parent 37a7d66607
commit 72ec9e1cd2
3 changed files with 3 additions and 0 deletions

View File

@@ -522,6 +522,7 @@ extern int init_swap_address_space(unsigned int type, unsigned long nr_pages);
extern void exit_swap_address_space(unsigned int type);
extern struct swap_info_struct *get_swap_device(swp_entry_t entry);
sector_t swap_page_sector(struct page *page);
extern sector_t alloc_swapdev_block(int swap);
static inline void put_swap_device(struct swap_info_struct *si)
{

View File

@@ -2078,6 +2078,7 @@ unsigned long snapshot_get_image_size(void)
{
return nr_copy_pages + nr_meta_pages + 1;
}
EXPORT_SYMBOL_GPL(snapshot_get_image_size);
static int init_header(struct swsusp_info *info)
{

View File

@@ -187,6 +187,7 @@ sector_t alloc_swapdev_block(int swap)
}
return 0;
}
EXPORT_SYMBOL_GPL(alloc_swapdev_block);
/**
* free_all_swap_pages - free swap pages allocated for saving image data.