aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2010-03-10 18:23:53 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:44 -0500
commit5ceaa2f39bfa73c4398cd01e78f1c3ebde3d3383 (patch)
treea33b0a472d42c1b744eaeb0efff2e9b6a234e4d4 /include/linux
parent8c1840f15feecb6961f480cad1a7a8e53a3f2ba6 (diff)
decompress: fix new decompressor for PIC
The ARM kernel decompressor wants to be able to relocate r/w data independently from the rest of the image, and we do this by ensuring that r/w data has global visibility. Define STATIC_RW_DATA to be empty to achieve this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Alain Knaff <alain@knaff.lu> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/decompress/mm.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
index 5032b9a31ae7..ad5ec1d0475e 100644
--- a/include/linux/decompress/mm.h
+++ b/include/linux/decompress/mm.h
@@ -14,11 +14,21 @@
14 14
15/* Code active when included from pre-boot environment: */ 15/* Code active when included from pre-boot environment: */
16 16
17/*
18 * Some architectures want to ensure there is no local data in their
19 * pre-boot environment, so that data can arbitarily relocated (via
20 * GOT references). This is achieved by defining STATIC_RW_DATA to
21 * be null.
22 */
23#ifndef STATIC_RW_DATA
24#define STATIC_RW_DATA static
25#endif
26
17/* A trivial malloc implementation, adapted from 27/* A trivial malloc implementation, adapted from
18 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 28 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
19 */ 29 */
20static unsigned long malloc_ptr; 30STATIC_RW_DATA unsigned long malloc_ptr;
21static int malloc_count; 31STATIC_RW_DATA int malloc_count;
22 32
23static void *malloc(int size) 33static void *malloc(int size)
24{ 34{