diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-03-23 09:50:03 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-03-23 16:20:20 -0400 |
commit | 80c5520811d3805adcb15c570ea5e2d489fa5d0b (patch) | |
tree | ae797a7f4af39f80e77526533d06ac23b439f0ab /arch/alpha/mm/init.c | |
parent | b3e3b302cf6dc8d60b67f0e84d1fa5648889c038 (diff) | |
parent | 8c083f081d0014057901c68a0a3e0f8ca7ac8d23 (diff) |
Merge branch 'cpus4096' into irq/threaded
Conflicts:
arch/parisc/kernel/irq.c
kernel/irq/handle.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/alpha/mm/init.c')
-rw-r--r-- | arch/alpha/mm/init.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 5d7a16eab312..af71d38c8e41 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c | |||
@@ -189,9 +189,21 @@ callback_init(void * kernel_end) | |||
189 | 189 | ||
190 | if (alpha_using_srm) { | 190 | if (alpha_using_srm) { |
191 | static struct vm_struct console_remap_vm; | 191 | static struct vm_struct console_remap_vm; |
192 | unsigned long vaddr = VMALLOC_START; | 192 | unsigned long nr_pages = 0; |
193 | unsigned long vaddr; | ||
193 | unsigned long i, j; | 194 | unsigned long i, j; |
194 | 195 | ||
196 | /* calculate needed size */ | ||
197 | for (i = 0; i < crb->map_entries; ++i) | ||
198 | nr_pages += crb->map[i].count; | ||
199 | |||
200 | /* register the vm area */ | ||
201 | console_remap_vm.flags = VM_ALLOC; | ||
202 | console_remap_vm.size = nr_pages << PAGE_SHIFT; | ||
203 | vm_area_register_early(&console_remap_vm, PAGE_SIZE); | ||
204 | |||
205 | vaddr = (unsigned long)console_remap_vm.addr; | ||
206 | |||
195 | /* Set up the third level PTEs and update the virtual | 207 | /* Set up the third level PTEs and update the virtual |
196 | addresses of the CRB entries. */ | 208 | addresses of the CRB entries. */ |
197 | for (i = 0; i < crb->map_entries; ++i) { | 209 | for (i = 0; i < crb->map_entries; ++i) { |
@@ -213,12 +225,6 @@ callback_init(void * kernel_end) | |||
213 | vaddr += PAGE_SIZE; | 225 | vaddr += PAGE_SIZE; |
214 | } | 226 | } |
215 | } | 227 | } |
216 | |||
217 | /* Let vmalloc know that we've allocated some space. */ | ||
218 | console_remap_vm.flags = VM_ALLOC; | ||
219 | console_remap_vm.addr = (void *) VMALLOC_START; | ||
220 | console_remap_vm.size = vaddr - VMALLOC_START; | ||
221 | vmlist = &console_remap_vm; | ||
222 | } | 228 | } |
223 | 229 | ||
224 | callback_init_done = 1; | 230 | callback_init_done = 1; |