aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Frysinger <michael.frysinger@analog.com>2007-06-11 03:31:30 -0400
committerBryan Wu <bryan.wu@analog.com>2007-06-11 03:31:30 -0400
commit321f6e0f5183e489448ae61af79cca1b7fe43e88 (patch)
tree2ae5df766db693a63a5504325e299799aee9dc02 /arch
parent5716e514ed526a819775c45a73f1c8b65309e9d3 (diff)
Blackfin arch: mark our memory init functions with __init so they get freed after init
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/mm/blackfin_sram.c8
-rw-r--r--arch/blackfin/mm/init.c20
2 files changed, 14 insertions, 14 deletions
diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/blackfin_sram.c
index 3c9e63503f68..024176411473 100644
--- a/arch/blackfin/mm/blackfin_sram.c
+++ b/arch/blackfin/mm/blackfin_sram.c
@@ -7,7 +7,7 @@
7 * Description: SRAM driver for Blackfin ADSP-BF5xx 7 * Description: SRAM driver for Blackfin ADSP-BF5xx
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2007 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -80,7 +80,7 @@ static struct l1_sram_piece l1_inst_sram[CONFIG_L1_MAX_PIECE];
80#endif 80#endif
81 81
82/* L1 Scratchpad SRAM initialization function */ 82/* L1 Scratchpad SRAM initialization function */
83void l1sram_init(void) 83void __init l1sram_init(void)
84{ 84{
85 printk(KERN_INFO "Blackfin Scratchpad data SRAM: %d KB\n", 85 printk(KERN_INFO "Blackfin Scratchpad data SRAM: %d KB\n",
86 L1_SCRATCH_LENGTH >> 10); 86 L1_SCRATCH_LENGTH >> 10);
@@ -94,7 +94,7 @@ void l1sram_init(void)
94 spin_lock_init(&l1sram_lock); 94 spin_lock_init(&l1sram_lock);
95} 95}
96 96
97void l1_data_sram_init(void) 97void __init l1_data_sram_init(void)
98{ 98{
99#if L1_DATA_A_LENGTH != 0 99#if L1_DATA_A_LENGTH != 0
100 printk(KERN_INFO "Blackfin DATA_A SRAM: %d KB\n", 100 printk(KERN_INFO "Blackfin DATA_A SRAM: %d KB\n",
@@ -120,7 +120,7 @@ void l1_data_sram_init(void)
120 spin_lock_init(&l1_data_sram_lock); 120 spin_lock_init(&l1_data_sram_lock);
121} 121}
122 122
123void l1_inst_sram_init(void) 123void __init l1_inst_sram_init(void)
124{ 124{
125#if L1_CODE_LENGTH != 0 125#if L1_CODE_LENGTH != 0
126 printk(KERN_INFO "Blackfin Instruction SRAM: %d KB\n", 126 printk(KERN_INFO "Blackfin Instruction SRAM: %d KB\n",
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index d6cf1059560d..570356dbe028 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -7,7 +7,7 @@
7 * Description: 7 * Description:
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2007 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -53,7 +53,7 @@ static unsigned long empty_bad_page;
53 53
54unsigned long empty_zero_page; 54unsigned long empty_zero_page;
55 55
56void show_mem(void) 56void __init show_mem(void)
57{ 57{
58 unsigned long i; 58 unsigned long i;
59 int free = 0, total = 0, reserved = 0, shared = 0; 59 int free = 0, total = 0, reserved = 0, shared = 0;
@@ -86,7 +86,7 @@ void show_mem(void)
86 * The parameters are pointers to where to stick the starting and ending 86 * The parameters are pointers to where to stick the starting and ending
87 * addresses of available kernel virtual memory. 87 * addresses of available kernel virtual memory.
88 */ 88 */
89void paging_init(void) 89void __init paging_init(void)
90{ 90{
91 /* 91 /*
92 * make sure start_mem is page aligned, otherwise bootmem and 92 * make sure start_mem is page aligned, otherwise bootmem and
@@ -125,7 +125,7 @@ void paging_init(void)
125 } 125 }
126} 126}
127 127
128void mem_init(void) 128void __init mem_init(void)
129{ 129{
130 unsigned int codek = 0, datak = 0, initk = 0; 130 unsigned int codek = 0, datak = 0, initk = 0;
131 unsigned long tmp; 131 unsigned long tmp;
@@ -169,7 +169,7 @@ void mem_init(void)
169} 169}
170 170
171#ifdef CONFIG_BLK_DEV_INITRD 171#ifdef CONFIG_BLK_DEV_INITRD
172void free_initrd_mem(unsigned long start, unsigned long end) 172void __init free_initrd_mem(unsigned long start, unsigned long end)
173{ 173{
174 int pages = 0; 174 int pages = 0;
175 for (; start < end; start += PAGE_SIZE) { 175 for (; start < end; start += PAGE_SIZE) {
@@ -183,14 +183,14 @@ void free_initrd_mem(unsigned long start, unsigned long end)
183} 183}
184#endif 184#endif
185 185
186void free_initmem(void) 186void __init free_initmem(void)
187{ 187{
188#ifdef CONFIG_RAMKERNEL 188#ifdef CONFIG_RAMKERNEL
189 unsigned long addr; 189 unsigned long addr;
190/* 190 /*
191 * the following code should be cool even if these sections 191 * the following code should be cool even if these sections
192 * are not page aligned. 192 * are not page aligned.
193 */ 193 */
194 addr = PAGE_ALIGN((unsigned long)(__init_begin)); 194 addr = PAGE_ALIGN((unsigned long)(__init_begin));
195 /* next to check that the page we free is not a partial page */ 195 /* next to check that the page we free is not a partial page */
196 for (; addr + PAGE_SIZE < (unsigned long)(__init_end); 196 for (; addr + PAGE_SIZE < (unsigned long)(__init_end);