scummvm random work
[patches.git] / blackfin-use-defines-not-constants.patch
CommitLineData
5e993f12 1Index: arch/blackfin/kernel/vmlinux.lds.S
2===================================================================
3--- arch/blackfin/kernel/vmlinux.lds.S (revision 3447)
4+++ arch/blackfin/kernel/vmlinux.lds.S (working copy)
5@@ -31,6 +31,8 @@
6
7 #include <asm-generic/vmlinux.lds.h>
8 #include <asm/mem_map.h>
9+#include <asm/page.h>
10+#include <asm/thread_info.h>
11
12 OUTPUT_FORMAT("elf32-bfin")
13 ENTRY(__start)
14@@ -64,7 +66,7 @@
15 .data :
16 {
17 __sdata = .;
18- . = ALIGN(0x2000);
19+ . = ALIGN(THREAD_SIZE);
20 *(.data.init_task)
21 *(.data)
22 CONSTRUCTORS
23@@ -72,14 +74,14 @@
24 . = ALIGN(32);
25 *(.data.cacheline_aligned)
26
27- . = ALIGN(0x2000);
28+ . = ALIGN(THREAD_SIZE);
29 __edata = .;
30 }
31
32 ___init_begin = .;
33 .init :
34 {
35- . = ALIGN(4096);
36+ . = ALIGN(PAGE_SIZE);
37 __sinittext = .;
38 *(.init.text)
39 __einittext = .;
40Index: include/asm-blackfin/thread_info.h
41===================================================================
42--- include/asm-blackfin/thread_info.h (revision 3447)
43+++ include/asm-blackfin/thread_info.h (working copy)
44@@ -39,6 +39,11 @@
45 */
46 #define ALIGN_PAGE_MASK 0xffffe000
47
48+/*
49+ * Size of kernel stack for each process. This must be a power of 2...
50+ */
51+#define THREAD_SIZE 8192 /* 2 pages */
52+
53 #ifndef __ASSEMBLY__
54
55 typedef unsigned long mm_segment_t;
56@@ -76,11 +81,6 @@
57 #define init_thread_info (init_thread_union.thread_info)
58 #define init_stack (init_thread_union.stack)
59
60-/*
61- * Size of kernel stack for each process. This must be a power of 2...
62- */
63-#define THREAD_SIZE 8192 /* 2 pages */
64-
65 /* How to get the thread information struct from C */
66
67 static inline struct thread_info *current_thread_info(void)
68@@ -94,7 +94,7 @@
69 struct thread_info *ti;
70 __asm__("%0 = sp;": "=&d"(ti):
71 );
72- return (struct thread_info *)((long)ti & ~8191UL);
73+ return (struct thread_info *)((long)ti & ~((long)THREAD_SIZE-1));
74 }
75
76 /* thread information allocation */