summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2005-01-04 05:15:00 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-04 05:15:00 -0800
commit1fa5e01246a4f0ec32f9bdfc910d57e30bfc0260 (patch)
tree7e44a66f9c2a8cc6e6449c04af9fc10afabf7cf0 /kernel/power
parentfc1d4be6b015e2c34847df3994d80f3eec44cc42 (diff)
[PATCH] GP-REL data support
The attached patch makes it possible to support gp-rel addressing for small variables. Since the FR-V cpu's have fixed-length instructions and plenty of general-purpose registers, one register is nominated as a base for the small data area. This makes it possible to use single-insn accesses to access global and static variables instead of having to use multiple instructions. This, however, causes problems with small variables used to pinpoint the beginning and end of sections. The compiler assumes it can use gp-rel addressing for these, but the linker then complains because the displacement is out of range. By declaring certain variables as arrays or by forcing them into named sections, the compiler is persuaded to access them as if they can be outside the displacement range. Declaring the variables as "const void" type also works. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/swsusp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c
index 4bf7fe6d2feb..05b3f8202c2d 100644
--- a/kernel/power/swsusp.c
+++ b/kernel/power/swsusp.c
@@ -72,7 +72,7 @@
#include "power.h"
/* References to section boundaries */
-extern char __nosave_begin, __nosave_end;
+extern const void __nosave_begin, __nosave_end;
/* Variables to be preserved over suspend */
static int pagedir_order_check;