aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2014-10-09 18:30:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:26:04 -0400
commit7f8998c7aef3ac9c5f3f2943e083dfa6302e90d0 (patch)
tree76e7971a0c7a615a553c9071d66c02b5ffbde847
parent578b25dfce2990d8bab5631f33a4283bd5b01556 (diff)
nosave: consolidate __nosave_{begin,end} in <asm/sections.h>
The different architectures used their own (and different) declarations: extern __visible const void __nosave_begin, __nosave_end; extern const void __nosave_begin, __nosave_end; extern long __nosave_begin, __nosave_end; Consolidate them using the first variant in <asm/sections.h>. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/arm/kernel/hibernate.c3
-rw-r--r--arch/mips/include/asm/suspend.h7
-rw-r--r--arch/mips/power/cpu.c2
-rw-r--r--arch/powerpc/kernel/suspend.c4
-rw-r--r--arch/s390/kernel/suspend.c6
-rw-r--r--arch/sh/include/asm/sections.h1
-rw-r--r--arch/sparc/power/hibernate.c4
-rw-r--r--arch/unicore32/include/mach/pm.h3
-rw-r--r--arch/unicore32/kernel/hibernate.c1
-rw-r--r--arch/x86/power/hibernate_32.c4
-rw-r--r--arch/x86/power/hibernate_64.c4
-rw-r--r--include/asm-generic/sections.h4
12 files changed, 12 insertions, 31 deletions
diff --git a/arch/arm/kernel/hibernate.c b/arch/arm/kernel/hibernate.c
index bb8b79648643..c4cc50e58c13 100644
--- a/arch/arm/kernel/hibernate.c
+++ b/arch/arm/kernel/hibernate.c
@@ -21,8 +21,7 @@
21#include <asm/idmap.h> 21#include <asm/idmap.h>
22#include <asm/suspend.h> 22#include <asm/suspend.h>
23#include <asm/memory.h> 23#include <asm/memory.h>
24 24#include <asm/sections.h>
25extern const void __nosave_begin, __nosave_end;
26 25
27int pfn_is_nosave(unsigned long pfn) 26int pfn_is_nosave(unsigned long pfn)
28{ 27{
diff --git a/arch/mips/include/asm/suspend.h b/arch/mips/include/asm/suspend.h
deleted file mode 100644
index 3adac3b53d19..000000000000
--- a/arch/mips/include/asm/suspend.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_SUSPEND_H
2#define __ASM_SUSPEND_H
3
4/* References to section boundaries */
5extern const void __nosave_begin, __nosave_end;
6
7#endif /* __ASM_SUSPEND_H */
diff --git a/arch/mips/power/cpu.c b/arch/mips/power/cpu.c
index 521e5963df05..2129e67723ff 100644
--- a/arch/mips/power/cpu.c
+++ b/arch/mips/power/cpu.c
@@ -7,7 +7,7 @@
7 * Author: Hu Hongbing <huhb@lemote.com> 7 * Author: Hu Hongbing <huhb@lemote.com>
8 * Wu Zhangjin <wuzhangjin@gmail.com> 8 * Wu Zhangjin <wuzhangjin@gmail.com>
9 */ 9 */
10#include <asm/suspend.h> 10#include <asm/sections.h>
11#include <asm/fpu.h> 11#include <asm/fpu.h>
12#include <asm/dsp.h> 12#include <asm/dsp.h>
13 13
diff --git a/arch/powerpc/kernel/suspend.c b/arch/powerpc/kernel/suspend.c
index 0167d53da30c..a531154cc0f3 100644
--- a/arch/powerpc/kernel/suspend.c
+++ b/arch/powerpc/kernel/suspend.c
@@ -9,9 +9,7 @@
9 9
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <asm/page.h> 11#include <asm/page.h>
12 12#include <asm/sections.h>
13/* References to section boundaries */
14extern const void __nosave_begin, __nosave_end;
15 13
16/* 14/*
17 * pfn_is_nosave - check if given pfn is in the 'nosave' section 15 * pfn_is_nosave - check if given pfn is in the 'nosave' section
diff --git a/arch/s390/kernel/suspend.c b/arch/s390/kernel/suspend.c
index a7a7537ce1e7..1c4c5accd220 100644
--- a/arch/s390/kernel/suspend.c
+++ b/arch/s390/kernel/suspend.c
@@ -13,14 +13,10 @@
13#include <asm/ipl.h> 13#include <asm/ipl.h>
14#include <asm/cio.h> 14#include <asm/cio.h>
15#include <asm/pci.h> 15#include <asm/pci.h>
16#include <asm/sections.h>
16#include "entry.h" 17#include "entry.h"
17 18
18/* 19/*
19 * References to section boundaries
20 */
21extern const void __nosave_begin, __nosave_end;
22
23/*
24 * The restore of the saved pages in an hibernation image will set 20 * The restore of the saved pages in an hibernation image will set
25 * the change and referenced bits in the storage key for each page. 21 * the change and referenced bits in the storage key for each page.
26 * Overindication of the referenced bits after an hibernation cycle 22 * Overindication of the referenced bits after an hibernation cycle
diff --git a/arch/sh/include/asm/sections.h b/arch/sh/include/asm/sections.h
index 1b6199740e98..7a99e6af6372 100644
--- a/arch/sh/include/asm/sections.h
+++ b/arch/sh/include/asm/sections.h
@@ -3,7 +3,6 @@
3 3
4#include <asm-generic/sections.h> 4#include <asm-generic/sections.h>
5 5
6extern long __nosave_begin, __nosave_end;
7extern long __machvec_start, __machvec_end; 6extern long __machvec_start, __machvec_end;
8extern char __uncached_start, __uncached_end; 7extern char __uncached_start, __uncached_end;
9extern char __start_eh_frame[], __stop_eh_frame[]; 8extern char __start_eh_frame[], __stop_eh_frame[];
diff --git a/arch/sparc/power/hibernate.c b/arch/sparc/power/hibernate.c
index 42b0b8ce699a..17bd2e167e07 100644
--- a/arch/sparc/power/hibernate.c
+++ b/arch/sparc/power/hibernate.c
@@ -9,11 +9,9 @@
9#include <asm/hibernate.h> 9#include <asm/hibernate.h>
10#include <asm/visasm.h> 10#include <asm/visasm.h>
11#include <asm/page.h> 11#include <asm/page.h>
12#include <asm/sections.h>
12#include <asm/tlb.h> 13#include <asm/tlb.h>
13 14
14/* References to section boundaries */
15extern const void __nosave_begin, __nosave_end;
16
17struct saved_context saved_context; 15struct saved_context saved_context;
18 16
19/* 17/*
diff --git a/arch/unicore32/include/mach/pm.h b/arch/unicore32/include/mach/pm.h
index 4dcd34ae194c..77b522694e74 100644
--- a/arch/unicore32/include/mach/pm.h
+++ b/arch/unicore32/include/mach/pm.h
@@ -36,8 +36,5 @@ extern int puv3_pm_enter(suspend_state_t state);
36/* Defined in hibernate_asm.S */ 36/* Defined in hibernate_asm.S */
37extern int restore_image(pgd_t *resume_pg_dir, struct pbe *restore_pblist); 37extern int restore_image(pgd_t *resume_pg_dir, struct pbe *restore_pblist);
38 38
39/* References to section boundaries */
40extern const void __nosave_begin, __nosave_end;
41
42extern struct pbe *restore_pblist; 39extern struct pbe *restore_pblist;
43#endif 40#endif
diff --git a/arch/unicore32/kernel/hibernate.c b/arch/unicore32/kernel/hibernate.c
index d75ef8b6cb56..9969ec374abb 100644
--- a/arch/unicore32/kernel/hibernate.c
+++ b/arch/unicore32/kernel/hibernate.c
@@ -18,6 +18,7 @@
18#include <asm/page.h> 18#include <asm/page.h>
19#include <asm/pgtable.h> 19#include <asm/pgtable.h>
20#include <asm/pgalloc.h> 20#include <asm/pgalloc.h>
21#include <asm/sections.h>
21#include <asm/suspend.h> 22#include <asm/suspend.h>
22 23
23#include "mach/pm.h" 24#include "mach/pm.h"
diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c
index 7d28c885d238..291226b952a9 100644
--- a/arch/x86/power/hibernate_32.c
+++ b/arch/x86/power/hibernate_32.c
@@ -13,13 +13,11 @@
13#include <asm/page.h> 13#include <asm/page.h>
14#include <asm/pgtable.h> 14#include <asm/pgtable.h>
15#include <asm/mmzone.h> 15#include <asm/mmzone.h>
16#include <asm/sections.h>
16 17
17/* Defined in hibernate_asm_32.S */ 18/* Defined in hibernate_asm_32.S */
18extern int restore_image(void); 19extern int restore_image(void);
19 20
20/* References to section boundaries */
21extern const void __nosave_begin, __nosave_end;
22
23/* Pointer to the temporary resume page tables */ 21/* Pointer to the temporary resume page tables */
24pgd_t *resume_pg_dir; 22pgd_t *resume_pg_dir;
25 23
diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c
index 35e2bb6c0f37..009947d419a6 100644
--- a/arch/x86/power/hibernate_64.c
+++ b/arch/x86/power/hibernate_64.c
@@ -17,11 +17,9 @@
17#include <asm/page.h> 17#include <asm/page.h>
18#include <asm/pgtable.h> 18#include <asm/pgtable.h>
19#include <asm/mtrr.h> 19#include <asm/mtrr.h>
20#include <asm/sections.h>
20#include <asm/suspend.h> 21#include <asm/suspend.h>
21 22
22/* References to section boundaries */
23extern __visible const void __nosave_begin, __nosave_end;
24
25/* Defined in hibernate_asm_64.S */ 23/* Defined in hibernate_asm_64.S */
26extern asmlinkage __visible int restore_image(void); 24extern asmlinkage __visible int restore_image(void);
27 25
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index f1a24b5c3b90..b58fd667f87b 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -3,6 +3,8 @@
3 3
4/* References to section boundaries */ 4/* References to section boundaries */
5 5
6#include <linux/compiler.h>
7
6/* 8/*
7 * Usage guidelines: 9 * Usage guidelines:
8 * _text, _data: architecture specific, don't use them in arch-independent code 10 * _text, _data: architecture specific, don't use them in arch-independent code
@@ -37,6 +39,8 @@ extern char __start_rodata[], __end_rodata[];
37/* Start and end of .ctors section - used for constructor calls. */ 39/* Start and end of .ctors section - used for constructor calls. */
38extern char __ctors_start[], __ctors_end[]; 40extern char __ctors_start[], __ctors_end[];
39 41
42extern __visible const void __nosave_begin, __nosave_end;
43
40/* function descriptor handling (if any). Override 44/* function descriptor handling (if any). Override
41 * in asm/sections.h */ 45 * in asm/sections.h */
42#ifndef dereference_function_descriptor 46#ifndef dereference_function_descriptor