Skip to content

Commit bb1f17b

Browse files
Alexey Dobriyantorvalds
authored andcommitted
mm: consolidate init_mm definition
* create mm/init-mm.c, move init_mm there * remove INIT_MM, initialize init_mm with C99 initializer * unexport init_mm on all arches: init_mm is already unexported on x86. One strange place is some OMAP driver (drivers/video/omap/) which won't build modular, but it's already wants get_vm_area() export. Somebody should look there. [akpm@linux-foundation.org: add missing #includes] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Cc: Americo Wang <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3b0fde0 commit bb1f17b

24 files changed

Lines changed: 21 additions & 88 deletions

File tree

‎arch/alpha/kernel/init_task.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
1212
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
13-
struct mm_struct init_mm = INIT_MM(init_mm);
1413
struct task_struct init_task = INIT_TASK(init_task);
15-
16-
EXPORT_SYMBOL(init_mm);
1714
EXPORT_SYMBOL(init_task);
1815

1916
union thread_union init_thread_union

‎arch/arm/kernel/init_task.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
1616
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
17-
struct mm_struct init_mm = INIT_MM(init_mm);
18-
19-
EXPORT_SYMBOL(init_mm);
20-
2117
/*
2218
* Initial thread structure.
2319
*

‎arch/avr32/kernel/init_task.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515

1616
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
1717
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
18-
struct mm_struct init_mm = INIT_MM(init_mm);
19-
20-
EXPORT_SYMBOL(init_mm);
21-
2218
/*
2319
* Initial thread structure. Must be aligned on an 8192-byte boundary.
2420
*/

‎arch/blackfin/kernel/init_task.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535

3636
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
3737
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
38-
39-
struct mm_struct init_mm = INIT_MM(init_mm);
40-
EXPORT_SYMBOL(init_mm);
41-
4238
/*
4339
* Initial task structure.
4440
*

‎arch/cris/kernel/process.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838

3939
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
4040
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
41-
struct mm_struct init_mm = INIT_MM(init_mm);
42-
43-
EXPORT_SYMBOL(init_mm);
44-
4541
/*
4642
* Initial thread structure.
4743
*

‎arch/frv/kernel/init_task.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212

1313
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
1414
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
15-
struct mm_struct init_mm = INIT_MM(init_mm);
16-
17-
EXPORT_SYMBOL(init_mm);
18-
1915
/*
2016
* Initial thread structure.
2117
*

‎arch/h8300/kernel/init_task.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
1616
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
17-
struct mm_struct init_mm = INIT_MM(init_mm);
18-
19-
EXPORT_SYMBOL(init_mm);
20-
2117
/*
2218
* Initial task structure.
2319
*

‎arch/ia64/kernel/init_task.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919

2020
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
2121
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
22-
struct mm_struct init_mm = INIT_MM(init_mm);
23-
24-
EXPORT_SYMBOL(init_mm);
25-
2622
/*
2723
* Initial task structure.
2824
*

‎arch/m32r/kernel/init_task.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313

1414
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
1515
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
16-
struct mm_struct init_mm = INIT_MM(init_mm);
17-
18-
EXPORT_SYMBOL(init_mm);
19-
2016
/*
2117
* Initial thread structure.
2218
*

‎arch/m68k/kernel/process.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
*/
4343
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
4444
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
45-
struct mm_struct init_mm = INIT_MM(init_mm);
46-
47-
EXPORT_SYMBOL(init_mm);
48-
4945
union thread_union init_thread_union
5046
__attribute__((section(".data.init_task"), aligned(THREAD_SIZE)))
5147
= { INIT_THREAD_INFO(init_task) };

0 commit comments

Comments
 (0)