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: 279879797 Change-Id: I0d44bf833a97fce5bc5213712b2b2523a9e22607 Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
This commit is contained in:
parent
17537ba480
commit
62db17973a
@ -518,6 +518,7 @@ extern int init_swap_address_space(unsigned int type, unsigned long nr_pages);
|
|||||||
extern void exit_swap_address_space(unsigned int type);
|
extern void exit_swap_address_space(unsigned int type);
|
||||||
extern struct swap_info_struct *get_swap_device(swp_entry_t entry);
|
extern struct swap_info_struct *get_swap_device(swp_entry_t entry);
|
||||||
sector_t swap_page_sector(struct page *page);
|
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)
|
static inline void put_swap_device(struct swap_info_struct *si)
|
||||||
{
|
{
|
||||||
|
@ -2082,6 +2082,7 @@ unsigned long snapshot_get_image_size(void)
|
|||||||
{
|
{
|
||||||
return nr_copy_pages + nr_meta_pages + 1;
|
return nr_copy_pages + nr_meta_pages + 1;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(snapshot_get_image_size);
|
||||||
|
|
||||||
static int init_header(struct swsusp_info *info)
|
static int init_header(struct swsusp_info *info)
|
||||||
{
|
{
|
||||||
|
@ -188,6 +188,7 @@ sector_t alloc_swapdev_block(int swap)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(alloc_swapdev_block);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* free_all_swap_pages - free swap pages allocated for saving image data.
|
* free_all_swap_pages - free swap pages allocated for saving image data.
|
||||||
|
Loading…
Reference in New Issue
Block a user