Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

lm32: unify asm-offsets.[ch]

Synchronize with all other architectures.
  • Loading branch information...
commit dca4911c328baeaee6ed65f821be7b45251e5a3c 1 parent 00a52b0
Michael Walle authored August 04, 2011
1  arch/lm32/include/asm/asm-offsets.h
... ...
@@ -0,0 +1 @@
  1
+#include <generated/asm-offsets.h>
51  arch/lm32/kernel/asm-offsets.c
... ...
@@ -1,33 +1,4 @@
1 1
 /*
2  
- * (C) Copyright 2007
3  
- *     Theobroma Systems <www.theobroma-systems.com>
4  
- *
5  
- * See file CREDITS for list of people who contributed to this
6  
- * project.
7  
- *
8  
- * This program is free software; you can redistribute it and/or
9  
- * modify it under the terms of the GNU General Public License as
10  
- * published by the Free Software Foundation; either version 2 of
11  
- * the License, or (at your option) any later version.
12  
- *
13  
- * This program is distributed in the hope that it will be useful,
14  
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  
- * GNU General Public License for more details.
17  
- *
18  
- * You should have received a copy of the GNU General Public License
19  
- * along with this program; if not, write to the Free Software
20  
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21  
- * MA 02111-1307 USA
22  
- */
23  
-
24  
-/*
25  
- * Based on
26  
- *
27  
- * arch/m68knommu/kernel/asm-offsets.c
28  
- */
29  
-
30  
-/*
31 2
  * This program is used to generate definitions needed by
32 3
  * assembly language modules.
33 4
  *
@@ -37,15 +8,16 @@
37 8
  * #defines from the assembly-language output.
38 9
  */
39 10
 
  11
+#define ASM_OFFSETS_C
  12
+
40 13
 #include <linux/kbuild.h>
41 14
 
42 15
 #include <linux/sched.h>
43 16
 #include <asm/processor.h>
44 17
 #include <asm/thread_info.h>
45 18
 
46  
-void output_task_struct_defines(void)
  19
+int main(void)
47 20
 {
48  
-	COMMENT("offsets into the task struct");
49 21
 	DEFINE(TASK_STATE, offsetof(struct task_struct, state));
50 22
 	DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
51 23
 	DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
@@ -55,16 +27,10 @@ void output_task_struct_defines(void)
55 27
 	DEFINE(TASK_MM, offsetof(struct task_struct, mm));
56 28
 	DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
57 29
 
58  
-	COMMENT("offsets into the thread struct in the task struct.");
59 30
 	DEFINE(TASK_KSP, offsetof(struct task_struct, thread.ksp));
60 31
 	DEFINE(TASK_USP, offsetof(struct task_struct, thread.usp));
61 32
 	DEFINE(TASK_WHICH_STACK, offsetof(struct task_struct, thread.which_stack));
62  
-	BLANK();
63  
-}
64 33
 
65  
-void output_ptreg_defines(void)
66  
-{
67  
-	COMMENT("LM32 pt_regs offsets.");
68 34
 	DEFINE(PT_R0, offsetof(struct pt_regs, r0));
69 35
 	DEFINE(PT_R1, offsetof(struct pt_regs, r1));
70 36
 	DEFINE(PT_R2, offsetof(struct pt_regs, r2));
@@ -98,28 +64,17 @@ void output_ptreg_defines(void)
98 64
 	DEFINE(PT_EA, offsetof(struct pt_regs, ea));
99 65
 	DEFINE(PT_BA, offsetof(struct pt_regs, ba));
100 66
 	DEFINE(PT_MODE, offsetof(struct pt_regs, pt_mode));
101  
-	BLANK();
102  
-}
103 67
 
104  
-void output_thread_info_defines(void)
105  
-{
106  
-	COMMENT("Offsets in thread_info structure.");
107 68
 	DEFINE(TI_TASK, offsetof(struct thread_info, task));
108 69
 	DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
109 70
 	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
110 71
 	DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
111 72
 	DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit));
112 73
 	DEFINE(_THREAD_SIZE, THREAD_SIZE);
113  
-	BLANK();
114  
-}
115 74
 
116  
-int output_thread_struct_defines(void)
117  
-{
118  
-	COMMENT("offsets into the thread struct");
119 75
 	DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
120 76
 	DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
121 77
 	DEFINE(THREAD_WHICH_STACK, offsetof(struct thread_struct, which_stack));
122  
-	BLANK();
123 78
 
124 79
 	return 0;
125 80
 }
2  arch/lm32/kernel/entry.S
@@ -6,7 +6,7 @@
6 6
 #include <asm/errno.h>
7 7
 #include <asm/setup.h>
8 8
 #include <asm/segment.h>
9  
-#include <generated/asm-offsets.h>
  9
+#include <asm/asm-offsets.h>
10 10
 #include <asm/ptrace.h>
11 11
 
12 12
 /* 

0 notes on commit dca4911

Please sign in to comment.
Something went wrong with that request. Please try again.