diff options
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/mem.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/physmem.c | 15 | ||||
-rw-r--r-- | arch/um/kernel/skas/process.c | 4 |
3 files changed, 8 insertions, 13 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 72ff85693a39..d2b11f242698 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -62,7 +62,7 @@ static void setup_highmem(unsigned long highmem_start, | |||
62 | } | 62 | } |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | void mem_init(void) | 65 | void __init mem_init(void) |
66 | { | 66 | { |
67 | /* clear the zero-page */ | 67 | /* clear the zero-page */ |
68 | memset((void *) empty_zero_page, 0, PAGE_SIZE); | 68 | memset((void *) empty_zero_page, 0, PAGE_SIZE); |
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 3ba6e4c841da..5ee7e851bbc1 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
@@ -28,7 +28,8 @@ unsigned long high_physmem; | |||
28 | 28 | ||
29 | extern unsigned long long physmem_size; | 29 | extern unsigned long long physmem_size; |
30 | 30 | ||
31 | int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) | 31 | int __init init_maps(unsigned long physmem, unsigned long iomem, |
32 | unsigned long highmem) | ||
32 | { | 33 | { |
33 | struct page *p, *map; | 34 | struct page *p, *map; |
34 | unsigned long phys_len, phys_pages, highmem_len, highmem_pages; | 35 | unsigned long phys_len, phys_pages, highmem_len, highmem_pages; |
@@ -47,13 +48,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) | |||
47 | total_pages = phys_pages + iomem_pages + highmem_pages; | 48 | total_pages = phys_pages + iomem_pages + highmem_pages; |
48 | total_len = phys_len + iomem_len + highmem_len; | 49 | total_len = phys_len + iomem_len + highmem_len; |
49 | 50 | ||
50 | if(kmalloc_ok){ | 51 | map = alloc_bootmem_low_pages(total_len); |
51 | map = kmalloc(total_len, GFP_KERNEL); | ||
52 | if(map == NULL) | ||
53 | map = vmalloc(total_len); | ||
54 | } | ||
55 | else map = alloc_bootmem_low_pages(total_len); | ||
56 | |||
57 | if(map == NULL) | 52 | if(map == NULL) |
58 | return -ENOMEM; | 53 | return -ENOMEM; |
59 | 54 | ||
@@ -98,8 +93,8 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len, | |||
98 | 93 | ||
99 | extern int __syscall_stub_start; | 94 | extern int __syscall_stub_start; |
100 | 95 | ||
101 | void setup_physmem(unsigned long start, unsigned long reserve_end, | 96 | void __init setup_physmem(unsigned long start, unsigned long reserve_end, |
102 | unsigned long len, unsigned long long highmem) | 97 | unsigned long len, unsigned long long highmem) |
103 | { | 98 | { |
104 | unsigned long reserve = reserve_end - start; | 99 | unsigned long reserve = reserve_end - start; |
105 | int pfn = PFN_UP(__pa(reserve_end)); | 100 | int pfn = PFN_UP(__pa(reserve_end)); |
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index 2a69a7ce5792..48051a98525f 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c | |||
@@ -145,7 +145,7 @@ void init_idle_skas(void) | |||
145 | 145 | ||
146 | extern void start_kernel(void); | 146 | extern void start_kernel(void); |
147 | 147 | ||
148 | static int start_kernel_proc(void *unused) | 148 | static int __init start_kernel_proc(void *unused) |
149 | { | 149 | { |
150 | int pid; | 150 | int pid; |
151 | 151 | ||
@@ -165,7 +165,7 @@ extern int userspace_pid[]; | |||
165 | 165 | ||
166 | extern char cpu0_irqstack[]; | 166 | extern char cpu0_irqstack[]; |
167 | 167 | ||
168 | int start_uml_skas(void) | 168 | int __init start_uml_skas(void) |
169 | { | 169 | { |
170 | stack_protections((unsigned long) &cpu0_irqstack); | 170 | stack_protections((unsigned long) &cpu0_irqstack); |
171 | set_sigstack(cpu0_irqstack, THREAD_SIZE); | 171 | set_sigstack(cpu0_irqstack, THREAD_SIZE); |