On Sun, 27 Sep 2009, Helge Deller wrote:
Tim, thanks for your work!
Sadly it broke the parisc build in two places:
a) THREAD_SIZE can't be used in the vmlinux.lds.S file
b) It generates linker errors like "local symbol 0: discarded in section
`.exit.text' from kernel/built-in.o".
Sorry about that -- I should have tried harder to get someone to test this
one, since parisc is one of the architectures for which I don't have a
cross-compiler.
Attached patch below fixes both issues. Tested with 32- and 64-bit parisc
kernel.
The .exit.text change looks fine.
[...]
Rather than adding a new definition in asm-offsets.c, I think it'll be
better to do something like the following to make the normal THREAD_SIZE
definition available in the linker script and other assembly files:
-Tim Abbott
parisc: Make THREAD_SIZE available to assembly files and linker scripts.
Signed-off-by: Tim Abbott<tabbott@xxxxxxxxxxx>
---
arch/parisc/include/asm/thread_info.h | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h
index ac775a7..51bca20 100644
--- a/arch/parisc/include/asm/thread_info.h
+++ b/arch/parisc/include/asm/thread_info.h
@@ -32,6 +32,11 @@ struct thread_info {
#define init_thread_info (init_thread_union.thread_info)
#define init_stack (init_thread_union.stack)
+/* how to get the thread information struct from C */
+#define current_thread_info() ((struct thread_info *)mfctl(30))
+
+#endif /* !__ASSEMBLY */
+
/* thread information allocation */
#define THREAD_SIZE_ORDER 2
@@ -40,11 +45,6 @@ struct thread_info {
#define THREAD_SIZE (PAGE_SIZE<< THREAD_SIZE_ORDER)
#define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER)
-/* how to get the thread information struct from C */
-#define current_thread_info() ((struct thread_info *)mfctl(30))
-
-#endif /* !__ASSEMBLY */
-
#define PREEMPT_ACTIVE_BIT 28
#define PREEMPT_ACTIVE (1<< PREEMPT_ACTIVE_BIT)