diff options
author | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
commit | ee3e542fec6e69bc9fb668698889a37d93950ddf (patch) | |
tree | e74ee766a4764769ef1d3d45d266b4dea64101d3 /arch/tile | |
parent | fe2a801b50c0bb8039d627e5ae1fec249d10ff39 (diff) | |
parent | f1d6e17f540af37bb1891480143669ba7636c4cf (diff) |
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/Kconfig | 1 | ||||
-rw-r--r-- | arch/tile/Kconfig.debug | 7 | ||||
-rw-r--r-- | arch/tile/include/asm/pgtable.h | 3 | ||||
-rw-r--r-- | arch/tile/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/tile/include/asm/sections.h | 2 | ||||
-rw-r--r-- | arch/tile/include/asm/uaccess.h | 2 | ||||
-rw-r--r-- | arch/tile/kernel/irq.c | 2 | ||||
-rw-r--r-- | arch/tile/kernel/messaging.c | 2 | ||||
-rw-r--r-- | arch/tile/kernel/setup.c | 32 | ||||
-rw-r--r-- | arch/tile/kernel/smpboot.c | 8 | ||||
-rw-r--r-- | arch/tile/kernel/stack.c | 2 | ||||
-rw-r--r-- | arch/tile/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/tile/kernel/vmlinux.lds.S | 4 | ||||
-rw-r--r-- | arch/tile/mm/fault.c | 8 | ||||
-rw-r--r-- | arch/tile/mm/init.c | 26 | ||||
-rw-r--r-- | arch/tile/mm/mmap.c | 2 |
16 files changed, 40 insertions, 65 deletions
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 3aa37669ff8c..24565a7ffe6d 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
@@ -25,6 +25,7 @@ config TILE | |||
25 | select HAVE_ARCH_TRACEHOOK | 25 | select HAVE_ARCH_TRACEHOOK |
26 | select HAVE_SYSCALL_TRACEPOINTS | 26 | select HAVE_SYSCALL_TRACEPOINTS |
27 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 27 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE |
28 | select HAVE_DEBUG_STACKOVERFLOW | ||
28 | 29 | ||
29 | # FIXME: investigate whether we need/want these options. | 30 | # FIXME: investigate whether we need/want these options. |
30 | # select HAVE_IOREMAP_PROT | 31 | # select HAVE_IOREMAP_PROT |
diff --git a/arch/tile/Kconfig.debug b/arch/tile/Kconfig.debug index ddbfc3322d7f..9165ea979e85 100644 --- a/arch/tile/Kconfig.debug +++ b/arch/tile/Kconfig.debug | |||
@@ -14,13 +14,6 @@ config EARLY_PRINTK | |||
14 | with klogd/syslogd. You should normally N here, | 14 | with klogd/syslogd. You should normally N here, |
15 | unless you want to debug such a crash. | 15 | unless you want to debug such a crash. |
16 | 16 | ||
17 | config DEBUG_STACKOVERFLOW | ||
18 | bool "Check for stack overflows" | ||
19 | depends on DEBUG_KERNEL | ||
20 | help | ||
21 | This option will cause messages to be printed if free stack space | ||
22 | drops below a certain limit. | ||
23 | |||
24 | config DEBUG_EXTRA_FLAGS | 17 | config DEBUG_EXTRA_FLAGS |
25 | string "Additional compiler arguments when building with '-g'" | 18 | string "Additional compiler arguments when building with '-g'" |
26 | depends on DEBUG_INFO | 19 | depends on DEBUG_INFO |
diff --git a/arch/tile/include/asm/pgtable.h b/arch/tile/include/asm/pgtable.h index 73b1a4c9ad03..33587f16c152 100644 --- a/arch/tile/include/asm/pgtable.h +++ b/arch/tile/include/asm/pgtable.h | |||
@@ -362,9 +362,6 @@ do { \ | |||
362 | #define kern_addr_valid(addr) (1) | 362 | #define kern_addr_valid(addr) (1) |
363 | #endif /* CONFIG_FLATMEM */ | 363 | #endif /* CONFIG_FLATMEM */ |
364 | 364 | ||
365 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
366 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
367 | |||
368 | extern void vmalloc_sync_all(void); | 365 | extern void vmalloc_sync_all(void); |
369 | 366 | ||
370 | #endif /* !__ASSEMBLY__ */ | 367 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/tile/include/asm/processor.h b/arch/tile/include/asm/processor.h index 2b70dfb1442e..b3f104953da2 100644 --- a/arch/tile/include/asm/processor.h +++ b/arch/tile/include/asm/processor.h | |||
@@ -225,7 +225,7 @@ extern int do_work_pending(struct pt_regs *regs, u32 flags); | |||
225 | 225 | ||
226 | /* | 226 | /* |
227 | * Return saved (kernel) PC of a blocked thread. | 227 | * Return saved (kernel) PC of a blocked thread. |
228 | * Only used in a printk() in kernel/sched.c, so don't work too hard. | 228 | * Only used in a printk() in kernel/sched/core.c, so don't work too hard. |
229 | */ | 229 | */ |
230 | #define thread_saved_pc(t) ((t)->thread.pc) | 230 | #define thread_saved_pc(t) ((t)->thread.pc) |
231 | 231 | ||
diff --git a/arch/tile/include/asm/sections.h b/arch/tile/include/asm/sections.h index d062d463fca9..7d8a935a9238 100644 --- a/arch/tile/include/asm/sections.h +++ b/arch/tile/include/asm/sections.h | |||
@@ -34,7 +34,7 @@ extern char __sys_cmpxchg_grab_lock[]; | |||
34 | extern char __start_atomic_asm_code[], __end_atomic_asm_code[]; | 34 | extern char __start_atomic_asm_code[], __end_atomic_asm_code[]; |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* Handle the discontiguity between _sdata and _stext. */ | 37 | /* Handle the discontiguity between _sdata and _text. */ |
38 | static inline int arch_is_kernel_data(unsigned long addr) | 38 | static inline int arch_is_kernel_data(unsigned long addr) |
39 | { | 39 | { |
40 | return addr >= (unsigned long)_sdata && | 40 | return addr >= (unsigned long)_sdata && |
diff --git a/arch/tile/include/asm/uaccess.h b/arch/tile/include/asm/uaccess.h index 8a082bc6bca5..e4d44bd7df27 100644 --- a/arch/tile/include/asm/uaccess.h +++ b/arch/tile/include/asm/uaccess.h | |||
@@ -442,7 +442,7 @@ extern unsigned long __copy_in_user_inatomic( | |||
442 | static inline unsigned long __must_check | 442 | static inline unsigned long __must_check |
443 | __copy_in_user(void __user *to, const void __user *from, unsigned long n) | 443 | __copy_in_user(void __user *to, const void __user *from, unsigned long n) |
444 | { | 444 | { |
445 | might_sleep(); | 445 | might_fault(); |
446 | return __copy_in_user_inatomic(to, from, n); | 446 | return __copy_in_user_inatomic(to, from, n); |
447 | } | 447 | } |
448 | 448 | ||
diff --git a/arch/tile/kernel/irq.c b/arch/tile/kernel/irq.c index 02e628065012..3ccf2cd7182e 100644 --- a/arch/tile/kernel/irq.c +++ b/arch/tile/kernel/irq.c | |||
@@ -220,7 +220,7 @@ void __init init_IRQ(void) | |||
220 | ipi_init(); | 220 | ipi_init(); |
221 | } | 221 | } |
222 | 222 | ||
223 | void __cpuinit setup_irq_regs(void) | 223 | void setup_irq_regs(void) |
224 | { | 224 | { |
225 | /* Enable interrupt delivery. */ | 225 | /* Enable interrupt delivery. */ |
226 | unmask_irqs(~0UL); | 226 | unmask_irqs(~0UL); |
diff --git a/arch/tile/kernel/messaging.c b/arch/tile/kernel/messaging.c index 0858ee6b520f..00331af9525d 100644 --- a/arch/tile/kernel/messaging.c +++ b/arch/tile/kernel/messaging.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* All messages are stored here */ | 25 | /* All messages are stored here */ |
26 | static DEFINE_PER_CPU(HV_MsgState, msg_state); | 26 | static DEFINE_PER_CPU(HV_MsgState, msg_state); |
27 | 27 | ||
28 | void __cpuinit init_messaging(void) | 28 | void init_messaging(void) |
29 | { | 29 | { |
30 | /* Allocate storage for messages in kernel space */ | 30 | /* Allocate storage for messages in kernel space */ |
31 | HV_MsgState *state = &__get_cpu_var(msg_state); | 31 | HV_MsgState *state = &__get_cpu_var(msg_state); |
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c index 7a5aa1a7864e..eceb8344280f 100644 --- a/arch/tile/kernel/setup.c +++ b/arch/tile/kernel/setup.c | |||
@@ -58,8 +58,8 @@ struct pglist_data node_data[MAX_NUMNODES] __read_mostly; | |||
58 | EXPORT_SYMBOL(node_data); | 58 | EXPORT_SYMBOL(node_data); |
59 | 59 | ||
60 | /* Information on the NUMA nodes that we compute early */ | 60 | /* Information on the NUMA nodes that we compute early */ |
61 | unsigned long __cpuinitdata node_start_pfn[MAX_NUMNODES]; | 61 | unsigned long node_start_pfn[MAX_NUMNODES]; |
62 | unsigned long __cpuinitdata node_end_pfn[MAX_NUMNODES]; | 62 | unsigned long node_end_pfn[MAX_NUMNODES]; |
63 | unsigned long __initdata node_memmap_pfn[MAX_NUMNODES]; | 63 | unsigned long __initdata node_memmap_pfn[MAX_NUMNODES]; |
64 | unsigned long __initdata node_percpu_pfn[MAX_NUMNODES]; | 64 | unsigned long __initdata node_percpu_pfn[MAX_NUMNODES]; |
65 | unsigned long __initdata node_free_pfn[MAX_NUMNODES]; | 65 | unsigned long __initdata node_free_pfn[MAX_NUMNODES]; |
@@ -84,7 +84,7 @@ unsigned long __initdata boot_pc = (unsigned long)start_kernel; | |||
84 | 84 | ||
85 | #ifdef CONFIG_HIGHMEM | 85 | #ifdef CONFIG_HIGHMEM |
86 | /* Page frame index of end of lowmem on each controller. */ | 86 | /* Page frame index of end of lowmem on each controller. */ |
87 | unsigned long __cpuinitdata node_lowmem_end_pfn[MAX_NUMNODES]; | 87 | unsigned long node_lowmem_end_pfn[MAX_NUMNODES]; |
88 | 88 | ||
89 | /* Number of pages that can be mapped into lowmem. */ | 89 | /* Number of pages that can be mapped into lowmem. */ |
90 | static unsigned long __initdata mappable_physpages; | 90 | static unsigned long __initdata mappable_physpages; |
@@ -290,7 +290,7 @@ static void *__init setup_pa_va_mapping(void) | |||
290 | * This is up to 4 mappings for lowmem, one mapping per memory | 290 | * This is up to 4 mappings for lowmem, one mapping per memory |
291 | * controller, plus one for our text segment. | 291 | * controller, plus one for our text segment. |
292 | */ | 292 | */ |
293 | static void __cpuinit store_permanent_mappings(void) | 293 | static void store_permanent_mappings(void) |
294 | { | 294 | { |
295 | int i; | 295 | int i; |
296 | 296 | ||
@@ -307,8 +307,8 @@ static void __cpuinit store_permanent_mappings(void) | |||
307 | hv_store_mapping(addr, pages << PAGE_SHIFT, pa); | 307 | hv_store_mapping(addr, pages << PAGE_SHIFT, pa); |
308 | } | 308 | } |
309 | 309 | ||
310 | hv_store_mapping((HV_VirtAddr)_stext, | 310 | hv_store_mapping((HV_VirtAddr)_text, |
311 | (uint32_t)(_einittext - _stext), 0); | 311 | (uint32_t)(_einittext - _text), 0); |
312 | } | 312 | } |
313 | 313 | ||
314 | /* | 314 | /* |
@@ -329,6 +329,7 @@ static void __init setup_memory(void) | |||
329 | #if defined(CONFIG_HIGHMEM) || defined(__tilegx__) | 329 | #if defined(CONFIG_HIGHMEM) || defined(__tilegx__) |
330 | long lowmem_pages; | 330 | long lowmem_pages; |
331 | #endif | 331 | #endif |
332 | unsigned long physpages = 0; | ||
332 | 333 | ||
333 | /* We are using a char to hold the cpu_2_node[] mapping */ | 334 | /* We are using a char to hold the cpu_2_node[] mapping */ |
334 | BUILD_BUG_ON(MAX_NUMNODES > 127); | 335 | BUILD_BUG_ON(MAX_NUMNODES > 127); |
@@ -388,8 +389,8 @@ static void __init setup_memory(void) | |||
388 | continue; | 389 | continue; |
389 | } | 390 | } |
390 | } | 391 | } |
391 | if (num_physpages + PFN_DOWN(range.size) > maxmem_pfn) { | 392 | if (physpages + PFN_DOWN(range.size) > maxmem_pfn) { |
392 | int max_size = maxmem_pfn - num_physpages; | 393 | int max_size = maxmem_pfn - physpages; |
393 | if (max_size > 0) { | 394 | if (max_size > 0) { |
394 | pr_err("Maxmem reduced node %d to %d pages\n", | 395 | pr_err("Maxmem reduced node %d to %d pages\n", |
395 | i, max_size); | 396 | i, max_size); |
@@ -446,7 +447,7 @@ static void __init setup_memory(void) | |||
446 | node_start_pfn[i] = start; | 447 | node_start_pfn[i] = start; |
447 | node_end_pfn[i] = end; | 448 | node_end_pfn[i] = end; |
448 | node_controller[i] = range.controller; | 449 | node_controller[i] = range.controller; |
449 | num_physpages += size; | 450 | physpages += size; |
450 | max_pfn = end; | 451 | max_pfn = end; |
451 | 452 | ||
452 | /* Mark node as online */ | 453 | /* Mark node as online */ |
@@ -465,7 +466,7 @@ static void __init setup_memory(void) | |||
465 | * we're willing to use at 8 million pages (32GB of 4KB pages). | 466 | * we're willing to use at 8 million pages (32GB of 4KB pages). |
466 | */ | 467 | */ |
467 | cap = 8 * 1024 * 1024; /* 8 million pages */ | 468 | cap = 8 * 1024 * 1024; /* 8 million pages */ |
468 | if (num_physpages > cap) { | 469 | if (physpages > cap) { |
469 | int num_nodes = num_online_nodes(); | 470 | int num_nodes = num_online_nodes(); |
470 | int cap_each = cap / num_nodes; | 471 | int cap_each = cap / num_nodes; |
471 | unsigned long dropped_pages = 0; | 472 | unsigned long dropped_pages = 0; |
@@ -476,10 +477,10 @@ static void __init setup_memory(void) | |||
476 | node_end_pfn[i] = node_start_pfn[i] + cap_each; | 477 | node_end_pfn[i] = node_start_pfn[i] + cap_each; |
477 | } | 478 | } |
478 | } | 479 | } |
479 | num_physpages -= dropped_pages; | 480 | physpages -= dropped_pages; |
480 | pr_warning("Only using %ldMB memory;" | 481 | pr_warning("Only using %ldMB memory;" |
481 | " ignoring %ldMB.\n", | 482 | " ignoring %ldMB.\n", |
482 | num_physpages >> (20 - PAGE_SHIFT), | 483 | physpages >> (20 - PAGE_SHIFT), |
483 | dropped_pages >> (20 - PAGE_SHIFT)); | 484 | dropped_pages >> (20 - PAGE_SHIFT)); |
484 | pr_warning("Consider using a larger page size.\n"); | 485 | pr_warning("Consider using a larger page size.\n"); |
485 | } | 486 | } |
@@ -497,7 +498,7 @@ static void __init setup_memory(void) | |||
497 | 498 | ||
498 | lowmem_pages = (mappable_physpages > MAXMEM_PFN) ? | 499 | lowmem_pages = (mappable_physpages > MAXMEM_PFN) ? |
499 | MAXMEM_PFN : mappable_physpages; | 500 | MAXMEM_PFN : mappable_physpages; |
500 | highmem_pages = (long) (num_physpages - lowmem_pages); | 501 | highmem_pages = (long) (physpages - lowmem_pages); |
501 | 502 | ||
502 | pr_notice("%ldMB HIGHMEM available.\n", | 503 | pr_notice("%ldMB HIGHMEM available.\n", |
503 | pages_to_mb(highmem_pages > 0 ? highmem_pages : 0)); | 504 | pages_to_mb(highmem_pages > 0 ? highmem_pages : 0)); |
@@ -514,7 +515,6 @@ static void __init setup_memory(void) | |||
514 | pr_warning("Use a HIGHMEM enabled kernel.\n"); | 515 | pr_warning("Use a HIGHMEM enabled kernel.\n"); |
515 | max_low_pfn = MAXMEM_PFN; | 516 | max_low_pfn = MAXMEM_PFN; |
516 | max_pfn = MAXMEM_PFN; | 517 | max_pfn = MAXMEM_PFN; |
517 | num_physpages = MAXMEM_PFN; | ||
518 | node_end_pfn[0] = MAXMEM_PFN; | 518 | node_end_pfn[0] = MAXMEM_PFN; |
519 | } else { | 519 | } else { |
520 | pr_notice("%ldMB memory available.\n", | 520 | pr_notice("%ldMB memory available.\n", |
@@ -935,7 +935,7 @@ subsys_initcall(topology_init); | |||
935 | * So the values we set up here in the hypervisor may be overridden on | 935 | * So the values we set up here in the hypervisor may be overridden on |
936 | * the boot cpu as arguments are parsed. | 936 | * the boot cpu as arguments are parsed. |
937 | */ | 937 | */ |
938 | static __cpuinit void init_super_pages(void) | 938 | static void init_super_pages(void) |
939 | { | 939 | { |
940 | #ifdef CONFIG_HUGETLB_SUPER_PAGES | 940 | #ifdef CONFIG_HUGETLB_SUPER_PAGES |
941 | int i; | 941 | int i; |
@@ -950,7 +950,7 @@ static __cpuinit void init_super_pages(void) | |||
950 | * | 950 | * |
951 | * Called from setup_arch() on the boot cpu, or online_secondary(). | 951 | * Called from setup_arch() on the boot cpu, or online_secondary(). |
952 | */ | 952 | */ |
953 | void __cpuinit setup_cpu(int boot) | 953 | void setup_cpu(int boot) |
954 | { | 954 | { |
955 | /* The boot cpu sets up its permanent mappings much earlier. */ | 955 | /* The boot cpu sets up its permanent mappings much earlier. */ |
956 | if (!boot) | 956 | if (!boot) |
diff --git a/arch/tile/kernel/smpboot.c b/arch/tile/kernel/smpboot.c index 44bab29bf2f3..a535655b7089 100644 --- a/arch/tile/kernel/smpboot.c +++ b/arch/tile/kernel/smpboot.c | |||
@@ -133,14 +133,14 @@ static __init int reset_init_affinity(void) | |||
133 | } | 133 | } |
134 | late_initcall(reset_init_affinity); | 134 | late_initcall(reset_init_affinity); |
135 | 135 | ||
136 | static struct cpumask cpu_started __cpuinitdata; | 136 | static struct cpumask cpu_started; |
137 | 137 | ||
138 | /* | 138 | /* |
139 | * Activate a secondary processor. Very minimal; don't add anything | 139 | * Activate a secondary processor. Very minimal; don't add anything |
140 | * to this path without knowing what you're doing, since SMP booting | 140 | * to this path without knowing what you're doing, since SMP booting |
141 | * is pretty fragile. | 141 | * is pretty fragile. |
142 | */ | 142 | */ |
143 | static void __cpuinit start_secondary(void) | 143 | static void start_secondary(void) |
144 | { | 144 | { |
145 | int cpuid = smp_processor_id(); | 145 | int cpuid = smp_processor_id(); |
146 | 146 | ||
@@ -183,7 +183,7 @@ static void __cpuinit start_secondary(void) | |||
183 | /* | 183 | /* |
184 | * Bring a secondary processor online. | 184 | * Bring a secondary processor online. |
185 | */ | 185 | */ |
186 | void __cpuinit online_secondary(void) | 186 | void online_secondary(void) |
187 | { | 187 | { |
188 | /* | 188 | /* |
189 | * low-memory mappings have been cleared, flush them from | 189 | * low-memory mappings have been cleared, flush them from |
@@ -210,7 +210,7 @@ void __cpuinit online_secondary(void) | |||
210 | cpu_startup_entry(CPUHP_ONLINE); | 210 | cpu_startup_entry(CPUHP_ONLINE); |
211 | } | 211 | } |
212 | 212 | ||
213 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | 213 | int __cpu_up(unsigned int cpu, struct task_struct *tidle) |
214 | { | 214 | { |
215 | /* Wait 5s total for all CPUs for them to come online */ | 215 | /* Wait 5s total for all CPUs for them to come online */ |
216 | static int timeout; | 216 | static int timeout; |
diff --git a/arch/tile/kernel/stack.c b/arch/tile/kernel/stack.c index ed258b8ae320..af8dfc9665f6 100644 --- a/arch/tile/kernel/stack.c +++ b/arch/tile/kernel/stack.c | |||
@@ -442,7 +442,7 @@ void _KBacktraceIterator_init_current(struct KBacktraceIterator *kbt, ulong pc, | |||
442 | regs_to_pt_regs(®s, pc, lr, sp, r52)); | 442 | regs_to_pt_regs(®s, pc, lr, sp, r52)); |
443 | } | 443 | } |
444 | 444 | ||
445 | /* This is called only from kernel/sched.c, with esp == NULL */ | 445 | /* This is called only from kernel/sched/core.c, with esp == NULL */ |
446 | void show_stack(struct task_struct *task, unsigned long *esp) | 446 | void show_stack(struct task_struct *task, unsigned long *esp) |
447 | { | 447 | { |
448 | struct KBacktraceIterator kbt; | 448 | struct KBacktraceIterator kbt; |
diff --git a/arch/tile/kernel/time.c b/arch/tile/kernel/time.c index 5ac397ec6986..7c353d8c2da9 100644 --- a/arch/tile/kernel/time.c +++ b/arch/tile/kernel/time.c | |||
@@ -159,7 +159,7 @@ static DEFINE_PER_CPU(struct clock_event_device, tile_timer) = { | |||
159 | .set_mode = tile_timer_set_mode, | 159 | .set_mode = tile_timer_set_mode, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | void __cpuinit setup_tile_timer(void) | 162 | void setup_tile_timer(void) |
163 | { | 163 | { |
164 | struct clock_event_device *evt = &__get_cpu_var(tile_timer); | 164 | struct clock_event_device *evt = &__get_cpu_var(tile_timer); |
165 | 165 | ||
diff --git a/arch/tile/kernel/vmlinux.lds.S b/arch/tile/kernel/vmlinux.lds.S index 631f10de12fe..a13ed902afbb 100644 --- a/arch/tile/kernel/vmlinux.lds.S +++ b/arch/tile/kernel/vmlinux.lds.S | |||
@@ -27,7 +27,6 @@ SECTIONS | |||
27 | .intrpt1 (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */ | 27 | .intrpt1 (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */ |
28 | { | 28 | { |
29 | _text = .; | 29 | _text = .; |
30 | _stext = .; | ||
31 | *(.intrpt1) | 30 | *(.intrpt1) |
32 | } :intrpt1 =0 | 31 | } :intrpt1 =0 |
33 | 32 | ||
@@ -36,6 +35,7 @@ SECTIONS | |||
36 | 35 | ||
37 | /* Now the real code */ | 36 | /* Now the real code */ |
38 | . = ALIGN(0x20000); | 37 | . = ALIGN(0x20000); |
38 | _stext = .; | ||
39 | .text : AT (ADDR(.text) - LOAD_OFFSET) { | 39 | .text : AT (ADDR(.text) - LOAD_OFFSET) { |
40 | HEAD_TEXT | 40 | HEAD_TEXT |
41 | SCHED_TEXT | 41 | SCHED_TEXT |
@@ -58,11 +58,13 @@ SECTIONS | |||
58 | #define LOAD_OFFSET PAGE_OFFSET | 58 | #define LOAD_OFFSET PAGE_OFFSET |
59 | 59 | ||
60 | . = ALIGN(PAGE_SIZE); | 60 | . = ALIGN(PAGE_SIZE); |
61 | __init_begin = .; | ||
61 | VMLINUX_SYMBOL(_sinitdata) = .; | 62 | VMLINUX_SYMBOL(_sinitdata) = .; |
62 | INIT_DATA_SECTION(16) :data =0 | 63 | INIT_DATA_SECTION(16) :data =0 |
63 | PERCPU_SECTION(L2_CACHE_BYTES) | 64 | PERCPU_SECTION(L2_CACHE_BYTES) |
64 | . = ALIGN(PAGE_SIZE); | 65 | . = ALIGN(PAGE_SIZE); |
65 | VMLINUX_SYMBOL(_einitdata) = .; | 66 | VMLINUX_SYMBOL(_einitdata) = .; |
67 | __init_end = .; | ||
66 | 68 | ||
67 | _sdata = .; /* Start of data section */ | 69 | _sdata = .; /* Start of data section */ |
68 | 70 | ||
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index 3d2b81c163a6..f7f99f90cbe0 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
@@ -573,10 +573,10 @@ out_of_memory: | |||
573 | down_read(&mm->mmap_sem); | 573 | down_read(&mm->mmap_sem); |
574 | goto survive; | 574 | goto survive; |
575 | } | 575 | } |
576 | pr_alert("VM: killing process %s\n", tsk->comm); | 576 | if (is_kernel_mode) |
577 | if (!is_kernel_mode) | 577 | goto no_context; |
578 | do_group_exit(SIGKILL); | 578 | pagefault_out_of_memory(); |
579 | goto no_context; | 579 | return 0; |
580 | 580 | ||
581 | do_sigbus: | 581 | do_sigbus: |
582 | up_read(&mm->mmap_sem); | 582 | up_read(&mm->mmap_sem); |
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c index 2749515a0547..e182958c707d 100644 --- a/arch/tile/mm/init.c +++ b/arch/tile/mm/init.c | |||
@@ -562,7 +562,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base) | |||
562 | prot = ktext_set_nocache(prot); | 562 | prot = ktext_set_nocache(prot); |
563 | } | 563 | } |
564 | 564 | ||
565 | BUG_ON(address != (unsigned long)_stext); | 565 | BUG_ON(address != (unsigned long)_text); |
566 | pte = NULL; | 566 | pte = NULL; |
567 | for (; address < (unsigned long)_einittext; | 567 | for (; address < (unsigned long)_einittext; |
568 | pfn++, address += PAGE_SIZE) { | 568 | pfn++, address += PAGE_SIZE) { |
@@ -720,7 +720,7 @@ static void __init init_free_pfn_range(unsigned long start, unsigned long end) | |||
720 | } | 720 | } |
721 | init_page_count(page); | 721 | init_page_count(page); |
722 | __free_pages(page, order); | 722 | __free_pages(page, order); |
723 | totalram_pages += count; | 723 | adjust_managed_page_count(page, count); |
724 | 724 | ||
725 | page += count; | 725 | page += count; |
726 | pfn += count; | 726 | pfn += count; |
@@ -821,7 +821,6 @@ static void __init set_max_mapnr_init(void) | |||
821 | 821 | ||
822 | void __init mem_init(void) | 822 | void __init mem_init(void) |
823 | { | 823 | { |
824 | int codesize, datasize, initsize; | ||
825 | int i; | 824 | int i; |
826 | #ifndef __tilegx__ | 825 | #ifndef __tilegx__ |
827 | void *last; | 826 | void *last; |
@@ -846,26 +845,14 @@ void __init mem_init(void) | |||
846 | set_max_mapnr_init(); | 845 | set_max_mapnr_init(); |
847 | 846 | ||
848 | /* this will put all bootmem onto the freelists */ | 847 | /* this will put all bootmem onto the freelists */ |
849 | totalram_pages += free_all_bootmem(); | 848 | free_all_bootmem(); |
850 | 849 | ||
851 | #ifndef CONFIG_64BIT | 850 | #ifndef CONFIG_64BIT |
852 | /* count all remaining LOWMEM and give all HIGHMEM to page allocator */ | 851 | /* count all remaining LOWMEM and give all HIGHMEM to page allocator */ |
853 | set_non_bootmem_pages_init(); | 852 | set_non_bootmem_pages_init(); |
854 | #endif | 853 | #endif |
855 | 854 | ||
856 | codesize = (unsigned long)&_etext - (unsigned long)&_text; | 855 | mem_init_print_info(NULL); |
857 | datasize = (unsigned long)&_end - (unsigned long)&_sdata; | ||
858 | initsize = (unsigned long)&_einittext - (unsigned long)&_sinittext; | ||
859 | initsize += (unsigned long)&_einitdata - (unsigned long)&_sinitdata; | ||
860 | |||
861 | pr_info("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init, %ldk highmem)\n", | ||
862 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), | ||
863 | num_physpages << (PAGE_SHIFT-10), | ||
864 | codesize >> 10, | ||
865 | datasize >> 10, | ||
866 | initsize >> 10, | ||
867 | (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)) | ||
868 | ); | ||
869 | 856 | ||
870 | /* | 857 | /* |
871 | * In debug mode, dump some interesting memory mappings. | 858 | * In debug mode, dump some interesting memory mappings. |
@@ -1024,16 +1011,13 @@ static void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
1024 | pte_clear(&init_mm, addr, ptep); | 1011 | pte_clear(&init_mm, addr, ptep); |
1025 | continue; | 1012 | continue; |
1026 | } | 1013 | } |
1027 | __ClearPageReserved(page); | ||
1028 | init_page_count(page); | ||
1029 | if (pte_huge(*ptep)) | 1014 | if (pte_huge(*ptep)) |
1030 | BUG_ON(!kdata_huge); | 1015 | BUG_ON(!kdata_huge); |
1031 | else | 1016 | else |
1032 | set_pte_at(&init_mm, addr, ptep, | 1017 | set_pte_at(&init_mm, addr, ptep, |
1033 | pfn_pte(pfn, PAGE_KERNEL)); | 1018 | pfn_pte(pfn, PAGE_KERNEL)); |
1034 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); | 1019 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); |
1035 | free_page(addr); | 1020 | free_reserved_page(page); |
1036 | totalram_pages++; | ||
1037 | } | 1021 | } |
1038 | pr_info("Freeing %s: %ldk freed\n", what, (end - begin) >> 10); | 1022 | pr_info("Freeing %s: %ldk freed\n", what, (end - begin) >> 10); |
1039 | } | 1023 | } |
diff --git a/arch/tile/mm/mmap.c b/arch/tile/mm/mmap.c index f96f4cec602a..d67d91ebf63e 100644 --- a/arch/tile/mm/mmap.c +++ b/arch/tile/mm/mmap.c | |||
@@ -66,10 +66,8 @@ void arch_pick_mmap_layout(struct mm_struct *mm) | |||
66 | if (!is_32bit || rlimit(RLIMIT_STACK) == RLIM_INFINITY) { | 66 | if (!is_32bit || rlimit(RLIMIT_STACK) == RLIM_INFINITY) { |
67 | mm->mmap_base = TASK_UNMAPPED_BASE; | 67 | mm->mmap_base = TASK_UNMAPPED_BASE; |
68 | mm->get_unmapped_area = arch_get_unmapped_area; | 68 | mm->get_unmapped_area = arch_get_unmapped_area; |
69 | mm->unmap_area = arch_unmap_area; | ||
70 | } else { | 69 | } else { |
71 | mm->mmap_base = mmap_base(mm); | 70 | mm->mmap_base = mmap_base(mm); |
72 | mm->get_unmapped_area = arch_get_unmapped_area_topdown; | 71 | mm->get_unmapped_area = arch_get_unmapped_area_topdown; |
73 | mm->unmap_area = arch_unmap_area_topdown; | ||
74 | } | 72 | } |
75 | } | 73 | } |