|
|
1d9674 |
From d6d5b443c82471818d43cb87c9280a0252e763e7 Mon Sep 17 00:00:00 2001
|
|
|
1d9674 |
From: Takao Indoh <indou.takao@jp.fujitsu.com>
|
|
|
1d9674 |
Date: Thu, 26 Oct 2017 20:32:48 +0900
|
|
|
1d9674 |
Subject: [PATCH 1/4] [PATCH v3 1/4] Support symbol __cpu_online_mask
|
|
|
1d9674 |
|
|
|
1d9674 |
In the upstream kernel, by commit 5aec01b83 cpu_online_mask was replaced
|
|
|
1d9674 |
with macros and new variables __cpu_online_mask was added instead of it.
|
|
|
1d9674 |
Sadump uses cpu_online_mask to check the cpu was online or not,
|
|
|
1d9674 |
therefore it also need __cpu_online_mask symbol for this in the latest
|
|
|
1d9674 |
kernel.
|
|
|
1d9674 |
|
|
|
1d9674 |
Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com>
|
|
|
1d9674 |
Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
|
|
|
1d9674 |
---
|
|
|
1d9674 |
makedumpfile.c | 9 +++++++--
|
|
|
1d9674 |
makedumpfile.h | 1 +
|
|
|
1d9674 |
sadump_info.c | 3 ++-
|
|
|
1d9674 |
3 files changed, 10 insertions(+), 3 deletions(-)
|
|
|
1d9674 |
|
|
|
1d9674 |
diff --git a/makedumpfile.c b/makedumpfile.c
|
|
|
1d9674 |
index 567ac5dc1f9e..5f2ca7d0fbc8 100644
|
|
|
1d9674 |
--- a/makedumpfile-1.6.2/makedumpfile.c
|
|
|
1d9674 |
+++ b/makedumpfile-1.6.2/makedumpfile.c
|
|
|
1d9674 |
@@ -1519,8 +1519,13 @@ get_symbol_info(void)
|
|
|
1d9674 |
SYMBOL_INIT(__per_cpu_load, "__per_cpu_load");
|
|
|
1d9674 |
SYMBOL_INIT(__per_cpu_offset, "__per_cpu_offset");
|
|
|
1d9674 |
SYMBOL_INIT(cpu_online_mask, "cpu_online_mask");
|
|
|
1d9674 |
- if (SYMBOL(cpu_online_mask) == NOT_FOUND_SYMBOL)
|
|
|
1d9674 |
- SYMBOL_INIT(cpu_online_mask, "cpu_online_map");
|
|
|
1d9674 |
+ SYMBOL_INIT(__cpu_online_mask, "__cpu_online_mask");
|
|
|
1d9674 |
+ if (SYMBOL(cpu_online_mask) == NOT_FOUND_SYMBOL) {
|
|
|
1d9674 |
+ if (SYMBOL(__cpu_online_mask) == NOT_FOUND_SYMBOL)
|
|
|
1d9674 |
+ SYMBOL_INIT(cpu_online_mask, "cpu_online_map");
|
|
|
1d9674 |
+ else
|
|
|
1d9674 |
+ SYMBOL_INIT(cpu_online_mask, "__cpu_online_mask");
|
|
|
1d9674 |
+ }
|
|
|
1d9674 |
SYMBOL_INIT(kexec_crash_image, "kexec_crash_image");
|
|
|
1d9674 |
SYMBOL_INIT(node_remap_start_vaddr, "node_remap_start_vaddr");
|
|
|
1d9674 |
SYMBOL_INIT(node_remap_end_vaddr, "node_remap_end_vaddr");
|
|
|
1d9674 |
diff --git a/makedumpfile.h b/makedumpfile.h
|
|
|
1d9674 |
index f4ba02d11f09..704a6bc2f8f4 100644
|
|
|
1d9674 |
--- a/makedumpfile-1.6.2/makedumpfile.h
|
|
|
1d9674 |
+++ b/makedumpfile-1.6.2/makedumpfile.h
|
|
|
1d9674 |
@@ -1596,6 +1596,7 @@ struct symbol_table {
|
|
|
1d9674 |
unsigned long long __per_cpu_offset;
|
|
|
1d9674 |
unsigned long long __per_cpu_load;
|
|
|
1d9674 |
unsigned long long cpu_online_mask;
|
|
|
1d9674 |
+ unsigned long long __cpu_online_mask;
|
|
|
1d9674 |
unsigned long long kexec_crash_image;
|
|
|
1d9674 |
|
|
|
1d9674 |
/*
|
|
|
1d9674 |
diff --git a/sadump_info.c b/sadump_info.c
|
|
|
1d9674 |
index 257f1be5e686..7dd22e704234 100644
|
|
|
1d9674 |
--- a/makedumpfile-1.6.2/sadump_info.c
|
|
|
1d9674 |
+++ b/makedumpfile-1.6.2/sadump_info.c
|
|
|
1d9674 |
@@ -953,7 +953,8 @@ cpu_online_mask_init(void)
|
|
|
1d9674 |
return FALSE;
|
|
|
1d9674 |
}
|
|
|
1d9674 |
|
|
|
1d9674 |
- if (SIZE(cpumask) == NOT_FOUND_STRUCTURE)
|
|
|
1d9674 |
+ if ((SIZE(cpumask) == NOT_FOUND_STRUCTURE) ||
|
|
|
1d9674 |
+ (SYMBOL(__cpu_online_mask) != NOT_FOUND_SYMBOL))
|
|
|
1d9674 |
cpu_online_mask_addr = SYMBOL(cpu_online_mask);
|
|
|
1d9674 |
|
|
|
1d9674 |
else {
|
|
|
1d9674 |
--
|
|
|
1d9674 |
2.5.5
|
|
|
1d9674 |
|