summaryrefslogtreecommitdiff
path: root/arch/x86/power/hibernate_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-04-11 09:56:05 +0300
committerIngo Molnar <mingo@kernel.org>2017-04-11 09:56:05 +0300
commite5185a76a23b2d56fb2327ad8bd58fb1bcaa52b1 (patch)
tree07a09b5e19a4d55c4a097b280eb64bd159ca0eb9 /arch/x86/power/hibernate_64.c
parentb678c91aefa7ce05a5d195e0a5c7a357b62d3283 (diff)
parent4729277156cf18acd9b9b04d6ef8c2a8a7bf00dc (diff)
downloadlinux-e5185a76a23b2d56fb2327ad8bd58fb1bcaa52b1.tar.xz
Merge branch 'x86/boot' into x86/mm, to avoid conflict
There's a conflict between ongoing level-5 paging support and the E820 rewrite. Since the E820 rewrite is essentially ready, merge it into x86/mm to reduce tree conflicts. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/power/hibernate_64.c')
-rw-r--r--arch/x86/power/hibernate_64.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c
index 2a9f993bbbf0..6a61194ffd58 100644
--- a/arch/x86/power/hibernate_64.c
+++ b/arch/x86/power/hibernate_64.c
@@ -16,6 +16,7 @@
#include <crypto/hash.h>
+#include <asm/e820/api.h>
#include <asm/init.h>
#include <asm/proto.h>
#include <asm/page.h>
@@ -214,12 +215,12 @@ struct restore_data_record {
#if IS_BUILTIN(CONFIG_CRYPTO_MD5)
/**
- * get_e820_md5 - calculate md5 according to given e820 map
+ * get_e820_md5 - calculate md5 according to given e820 table
*
- * @map: the e820 map to be calculated
+ * @table: the e820 table to be calculated
* @buf: the md5 result to be stored to
*/
-static int get_e820_md5(struct e820map *map, void *buf)
+static int get_e820_md5(struct e820_table *table, void *buf)
{
struct scatterlist sg;
struct crypto_ahash *tfm;
@@ -232,10 +233,9 @@ static int get_e820_md5(struct e820map *map, void *buf)
{
AHASH_REQUEST_ON_STACK(req, tfm);
- size = offsetof(struct e820map, map)
- + sizeof(struct e820entry) * map->nr_map;
+ size = offsetof(struct e820_table, entries) + sizeof(struct e820_entry) * table->nr_entries;
ahash_request_set_tfm(req, tfm);
- sg_init_one(&sg, (u8 *)map, size);
+ sg_init_one(&sg, (u8 *)table, size);
ahash_request_set_callback(req, 0, NULL, NULL);
ahash_request_set_crypt(req, &sg, buf, size);
@@ -250,7 +250,7 @@ static int get_e820_md5(struct e820map *map, void *buf)
static void hibernation_e820_save(void *buf)
{
- get_e820_md5(e820_saved, buf);
+ get_e820_md5(e820_table_firmware, buf);
}
static bool hibernation_e820_mismatch(void *buf)
@@ -263,7 +263,7 @@ static bool hibernation_e820_mismatch(void *buf)
if (!memcmp(result, buf, MD5_DIGEST_SIZE))
return false;
- ret = get_e820_md5(e820_saved, result);
+ ret = get_e820_md5(e820_table_firmware, result);
if (ret)
return true;