summaryrefslogtreecommitdiff
path: root/kernel/power/tuxonice_checksum.h
blob: c8196fbb0e43777aca571a557c79e6e8a8536cdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * kernel/power/tuxonice_checksum.h
 *
 * Copyright (C) 2006-2015 Nigel Cunningham (nigel at nigelcunningham com au)
 *
 * This file is released under the GPLv2.
 *
 * This file contains data checksum routines for TuxOnIce,
 * using cryptoapi. They are used to locate any modifications
 * made to pageset 2 while we're saving it.
 */

#if defined(CONFIG_TOI_CHECKSUM)
extern int toi_checksum_init(void);
extern void toi_checksum_exit(void);
void check_checksums(void);
int allocate_checksum_pages(void);
void free_checksum_pages(void);
char *tuxonice_get_next_checksum(void);
int tuxonice_calc_checksum(struct page *page, char *checksum_locn);
#else
static inline int toi_checksum_init(void) { return 0; }
static inline void toi_checksum_exit(void) { }
static inline void check_checksums(void) { };
static inline int allocate_checksum_pages(void) { return 0; };
static inline void free_checksum_pages(void) { };
static inline char *tuxonice_get_next_checksum(void) { return NULL; };
static inline int tuxonice_calc_checksum(struct page *page, char *checksum_locn)
        { return 0; }
#endif