diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 3 | ||||
-rw-r--r-- | arch/s390/appldata/appldata_base.c | 1 | ||||
-rw-r--r-- | arch/s390/defconfig | 13 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 6 | ||||
-rw-r--r-- | arch/s390/kernel/compat_signal.c | 12 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 2 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 55 | ||||
-rw-r--r-- | arch/s390/kernel/signal.c | 12 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 1 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 20 | ||||
-rw-r--r-- | arch/s390/kernel/vmlinux.lds.S | 8 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 32 |
12 files changed, 103 insertions, 62 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 608193cfe43f..245b81bc7157 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -236,9 +236,6 @@ config WARN_STACK_SIZE | |||
236 | This allows you to specify the maximum frame size a function may | 236 | This allows you to specify the maximum frame size a function may |
237 | have without the compiler complaining about it. | 237 | have without the compiler complaining about it. |
238 | 238 | ||
239 | config ARCH_POPULATES_NODE_MAP | ||
240 | def_bool y | ||
241 | |||
242 | source "mm/Kconfig" | 239 | source "mm/Kconfig" |
243 | 240 | ||
244 | comment "I/O subsystem configuration" | 241 | comment "I/O subsystem configuration" |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 45c9fa7d7545..af1e8fc7d985 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -310,6 +310,7 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp, | |||
310 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) { | 310 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) { |
311 | return -EFAULT; | 311 | return -EFAULT; |
312 | } | 312 | } |
313 | interval = 0; | ||
313 | sscanf(buf, "%i", &interval); | 314 | sscanf(buf, "%i", &interval); |
314 | if (interval <= 0) { | 315 | if (interval <= 0) { |
315 | P_ERROR("Timer CPU interval has to be > 0!\n"); | 316 | P_ERROR("Timer CPU interval has to be > 0!\n"); |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index a3257398ea8d..7cd51e73e274 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18 | 3 | # Linux kernel version: 2.6.19-rc2 |
4 | # Wed Oct 4 19:45:46 2006 | 4 | # Wed Oct 18 17:11:10 2006 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_LOCKDEP_SUPPORT=y | 7 | CONFIG_LOCKDEP_SUPPORT=y |
@@ -119,7 +119,6 @@ CONFIG_PACK_STACK=y | |||
119 | CONFIG_CHECK_STACK=y | 119 | CONFIG_CHECK_STACK=y |
120 | CONFIG_STACK_GUARD=256 | 120 | CONFIG_STACK_GUARD=256 |
121 | # CONFIG_WARN_STACK is not set | 121 | # CONFIG_WARN_STACK is not set |
122 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
123 | CONFIG_SELECT_MEMORY_MODEL=y | 122 | CONFIG_SELECT_MEMORY_MODEL=y |
124 | CONFIG_FLATMEM_MANUAL=y | 123 | CONFIG_FLATMEM_MANUAL=y |
125 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 124 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -211,6 +210,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=y | |||
211 | CONFIG_INET6_XFRM_MODE_TUNNEL=y | 210 | CONFIG_INET6_XFRM_MODE_TUNNEL=y |
212 | CONFIG_INET6_XFRM_MODE_BEET=y | 211 | CONFIG_INET6_XFRM_MODE_BEET=y |
213 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 212 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
213 | CONFIG_IPV6_SIT=y | ||
214 | # CONFIG_IPV6_TUNNEL is not set | 214 | # CONFIG_IPV6_TUNNEL is not set |
215 | # CONFIG_IPV6_SUBTREES is not set | 215 | # CONFIG_IPV6_SUBTREES is not set |
216 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 216 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
@@ -528,6 +528,7 @@ CONFIG_EXT3_FS=y | |||
528 | CONFIG_EXT3_FS_XATTR=y | 528 | CONFIG_EXT3_FS_XATTR=y |
529 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 529 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
530 | # CONFIG_EXT3_FS_SECURITY is not set | 530 | # CONFIG_EXT3_FS_SECURITY is not set |
531 | # CONFIG_EXT4DEV_FS is not set | ||
531 | CONFIG_JBD=y | 532 | CONFIG_JBD=y |
532 | # CONFIG_JBD_DEBUG is not set | 533 | # CONFIG_JBD_DEBUG is not set |
533 | CONFIG_FS_MBCACHE=y | 534 | CONFIG_FS_MBCACHE=y |
@@ -646,10 +647,6 @@ CONFIG_MSDOS_PARTITION=y | |||
646 | # CONFIG_NLS is not set | 647 | # CONFIG_NLS is not set |
647 | 648 | ||
648 | # | 649 | # |
649 | # Distributed Lock Manager | ||
650 | # | ||
651 | |||
652 | # | ||
653 | # Instrumentation Support | 650 | # Instrumentation Support |
654 | # | 651 | # |
655 | 652 | ||
@@ -669,7 +666,6 @@ CONFIG_MAGIC_SYSRQ=y | |||
669 | # CONFIG_UNUSED_SYMBOLS is not set | 666 | # CONFIG_UNUSED_SYMBOLS is not set |
670 | CONFIG_DEBUG_KERNEL=y | 667 | CONFIG_DEBUG_KERNEL=y |
671 | CONFIG_LOG_BUF_SHIFT=17 | 668 | CONFIG_LOG_BUF_SHIFT=17 |
672 | # CONFIG_DETECT_SOFTLOCKUP is not set | ||
673 | # CONFIG_SCHEDSTATS is not set | 669 | # CONFIG_SCHEDSTATS is not set |
674 | # CONFIG_DEBUG_SLAB is not set | 670 | # CONFIG_DEBUG_SLAB is not set |
675 | CONFIG_DEBUG_PREEMPT=y | 671 | CONFIG_DEBUG_PREEMPT=y |
@@ -690,6 +686,7 @@ CONFIG_DEBUG_FS=y | |||
690 | # CONFIG_FRAME_POINTER is not set | 686 | # CONFIG_FRAME_POINTER is not set |
691 | # CONFIG_UNWIND_INFO is not set | 687 | # CONFIG_UNWIND_INFO is not set |
692 | CONFIG_FORCED_INLINING=y | 688 | CONFIG_FORCED_INLINING=y |
689 | CONFIG_HEADERS_CHECK=y | ||
693 | # CONFIG_RCU_TORTURE_TEST is not set | 690 | # CONFIG_RCU_TORTURE_TEST is not set |
694 | # CONFIG_LKDTM is not set | 691 | # CONFIG_LKDTM is not set |
695 | 692 | ||
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index e15e1489aef5..5b33f823863a 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -295,6 +295,7 @@ static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i) | |||
295 | * | 295 | * |
296 | * This is really horribly ugly. | 296 | * This is really horribly ugly. |
297 | */ | 297 | */ |
298 | #ifdef CONFIG_SYSVIPC | ||
298 | asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr) | 299 | asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr) |
299 | { | 300 | { |
300 | if (call >> 16) /* hack for backward compatibility */ | 301 | if (call >> 16) /* hack for backward compatibility */ |
@@ -338,6 +339,7 @@ asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr) | |||
338 | 339 | ||
339 | return -ENOSYS; | 340 | return -ENOSYS; |
340 | } | 341 | } |
342 | #endif | ||
341 | 343 | ||
342 | asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low) | 344 | asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low) |
343 | { | 345 | { |
@@ -755,7 +757,9 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | |||
755 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) | 757 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) |
756 | error = -EFAULT; | 758 | error = -EFAULT; |
757 | } | 759 | } |
758 | copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)); | 760 | if (copy_to_user(args->__unused, tmp.__unused, |
761 | sizeof(tmp.__unused))) | ||
762 | error = -EFAULT; | ||
759 | } | 763 | } |
760 | return error; | 764 | return error; |
761 | } | 765 | } |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index d49b876a83bf..861888ab8c13 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -169,12 +169,12 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
169 | compat_old_sigset_t mask; | 169 | compat_old_sigset_t mask; |
170 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 170 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
171 | __get_user(sa_handler, &act->sa_handler) || | 171 | __get_user(sa_handler, &act->sa_handler) || |
172 | __get_user(sa_restorer, &act->sa_restorer)) | 172 | __get_user(sa_restorer, &act->sa_restorer) || |
173 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
174 | __get_user(mask, &act->sa_mask)) | ||
173 | return -EFAULT; | 175 | return -EFAULT; |
174 | new_ka.sa.sa_handler = (__sighandler_t) sa_handler; | 176 | new_ka.sa.sa_handler = (__sighandler_t) sa_handler; |
175 | new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; | 177 | new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; |
176 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
177 | __get_user(mask, &act->sa_mask); | ||
178 | siginitset(&new_ka.sa.sa_mask, mask); | 178 | siginitset(&new_ka.sa.sa_mask, mask); |
179 | } | 179 | } |
180 | 180 | ||
@@ -185,10 +185,10 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
185 | sa_restorer = (unsigned long) old_ka.sa.sa_restorer; | 185 | sa_restorer = (unsigned long) old_ka.sa.sa_restorer; |
186 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | 186 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || |
187 | __put_user(sa_handler, &oact->sa_handler) || | 187 | __put_user(sa_handler, &oact->sa_handler) || |
188 | __put_user(sa_restorer, &oact->sa_restorer)) | 188 | __put_user(sa_restorer, &oact->sa_restorer) || |
189 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
190 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
189 | return -EFAULT; | 191 | return -EFAULT; |
190 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
191 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
192 | } | 192 | } |
193 | 193 | ||
194 | return ret; | 194 | return ret; |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index cb0efae6802f..71e54ef0931e 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1664,4 +1664,4 @@ sys_getcpu_wrapper: | |||
1664 | llgtr %r2,%r2 # unsigned * | 1664 | llgtr %r2,%r2 # unsigned * |
1665 | llgtr %r3,%r3 # unsigned * | 1665 | llgtr %r3,%r3 # unsigned * |
1666 | llgtr %r4,%r4 # struct getcpu_cache * | 1666 | llgtr %r4,%r4 # struct getcpu_cache * |
1667 | jg sys_tee | 1667 | jg sys_getcpu |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 49f2b68e32b1..2aa13e8e000a 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -70,6 +70,7 @@ struct { | |||
70 | #define CHUNK_READ_WRITE 0 | 70 | #define CHUNK_READ_WRITE 0 |
71 | #define CHUNK_READ_ONLY 1 | 71 | #define CHUNK_READ_ONLY 1 |
72 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ | 72 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ |
73 | unsigned long __initdata zholes_size[MAX_NR_ZONES]; | ||
73 | static unsigned long __initdata memory_end; | 74 | static unsigned long __initdata memory_end; |
74 | 75 | ||
75 | /* | 76 | /* |
@@ -357,6 +358,21 @@ void machine_power_off(void) | |||
357 | */ | 358 | */ |
358 | void (*pm_power_off)(void) = machine_power_off; | 359 | void (*pm_power_off)(void) = machine_power_off; |
359 | 360 | ||
361 | static void __init | ||
362 | add_memory_hole(unsigned long start, unsigned long end) | ||
363 | { | ||
364 | unsigned long dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; | ||
365 | |||
366 | if (end <= dma_pfn) | ||
367 | zholes_size[ZONE_DMA] += end - start + 1; | ||
368 | else if (start > dma_pfn) | ||
369 | zholes_size[ZONE_NORMAL] += end - start + 1; | ||
370 | else { | ||
371 | zholes_size[ZONE_DMA] += dma_pfn - start + 1; | ||
372 | zholes_size[ZONE_NORMAL] += end - dma_pfn; | ||
373 | } | ||
374 | } | ||
375 | |||
360 | static int __init early_parse_mem(char *p) | 376 | static int __init early_parse_mem(char *p) |
361 | { | 377 | { |
362 | memory_end = memparse(p, &p); | 378 | memory_end = memparse(p, &p); |
@@ -434,7 +450,7 @@ setup_lowcore(void) | |||
434 | lc->extended_save_area_addr = (__u32) | 450 | lc->extended_save_area_addr = (__u32) |
435 | __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0); | 451 | __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0); |
436 | /* enable extended save area */ | 452 | /* enable extended save area */ |
437 | ctl_set_bit(14, 29); | 453 | __ctl_set_bit(14, 29); |
438 | } | 454 | } |
439 | #endif | 455 | #endif |
440 | set_prefix((u32)(unsigned long) lc); | 456 | set_prefix((u32)(unsigned long) lc); |
@@ -478,6 +494,7 @@ setup_memory(void) | |||
478 | { | 494 | { |
479 | unsigned long bootmap_size; | 495 | unsigned long bootmap_size; |
480 | unsigned long start_pfn, end_pfn, init_pfn; | 496 | unsigned long start_pfn, end_pfn, init_pfn; |
497 | unsigned long last_rw_end; | ||
481 | int i; | 498 | int i; |
482 | 499 | ||
483 | /* | 500 | /* |
@@ -533,27 +550,39 @@ setup_memory(void) | |||
533 | /* | 550 | /* |
534 | * Register RAM areas with the bootmem allocator. | 551 | * Register RAM areas with the bootmem allocator. |
535 | */ | 552 | */ |
553 | last_rw_end = start_pfn; | ||
536 | 554 | ||
537 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | 555 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { |
538 | unsigned long start_chunk, end_chunk, pfn; | 556 | unsigned long start_chunk, end_chunk; |
539 | 557 | ||
540 | if (memory_chunk[i].type != CHUNK_READ_WRITE) | 558 | if (memory_chunk[i].type != CHUNK_READ_WRITE) |
541 | continue; | 559 | continue; |
542 | start_chunk = PFN_DOWN(memory_chunk[i].addr); | 560 | start_chunk = (memory_chunk[i].addr + PAGE_SIZE - 1); |
543 | end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size) - 1; | 561 | start_chunk >>= PAGE_SHIFT; |
544 | end_chunk = min(end_chunk, end_pfn); | 562 | end_chunk = (memory_chunk[i].addr + memory_chunk[i].size); |
545 | if (start_chunk >= end_chunk) | 563 | end_chunk >>= PAGE_SHIFT; |
546 | continue; | 564 | if (start_chunk < start_pfn) |
547 | add_active_range(0, start_chunk, end_chunk); | 565 | start_chunk = start_pfn; |
548 | pfn = max(start_chunk, start_pfn); | 566 | if (end_chunk > end_pfn) |
549 | for (; pfn <= end_chunk; pfn++) | 567 | end_chunk = end_pfn; |
550 | page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); | 568 | if (start_chunk < end_chunk) { |
569 | /* Initialize storage key for RAM pages */ | ||
570 | for (init_pfn = start_chunk ; init_pfn < end_chunk; | ||
571 | init_pfn++) | ||
572 | page_set_storage_key(init_pfn << PAGE_SHIFT, | ||
573 | PAGE_DEFAULT_KEY); | ||
574 | free_bootmem(start_chunk << PAGE_SHIFT, | ||
575 | (end_chunk - start_chunk) << PAGE_SHIFT); | ||
576 | if (last_rw_end < start_chunk) | ||
577 | add_memory_hole(last_rw_end, start_chunk - 1); | ||
578 | last_rw_end = end_chunk; | ||
579 | } | ||
551 | } | 580 | } |
552 | 581 | ||
553 | psw_set_key(PAGE_DEFAULT_KEY); | 582 | psw_set_key(PAGE_DEFAULT_KEY); |
554 | 583 | ||
555 | free_bootmem_with_active_regions(0, max_pfn); | 584 | if (last_rw_end < end_pfn - 1) |
556 | reserve_bootmem(0, PFN_PHYS(start_pfn)); | 585 | add_memory_hole(last_rw_end, end_pfn - 1); |
557 | 586 | ||
558 | /* | 587 | /* |
559 | * Reserve the bootmem bitmap itself as well. We do this in two | 588 | * Reserve the bootmem bitmap itself as well. We do this in two |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 4392a77cbae8..4c8a7954ef48 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -80,10 +80,10 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
80 | old_sigset_t mask; | 80 | old_sigset_t mask; |
81 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 81 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
82 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || | 82 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || |
83 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) | 83 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) || |
84 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
85 | __get_user(mask, &act->sa_mask)) | ||
84 | return -EFAULT; | 86 | return -EFAULT; |
85 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
86 | __get_user(mask, &act->sa_mask); | ||
87 | siginitset(&new_ka.sa.sa_mask, mask); | 87 | siginitset(&new_ka.sa.sa_mask, mask); |
88 | } | 88 | } |
89 | 89 | ||
@@ -92,10 +92,10 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
92 | if (!ret && oact) { | 92 | if (!ret && oact) { |
93 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | 93 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || |
94 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || | 94 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || |
95 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) | 95 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) || |
96 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
97 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
96 | return -EFAULT; | 98 | return -EFAULT; |
97 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
98 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
99 | } | 99 | } |
100 | 100 | ||
101 | return ret; | 101 | return ret; |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index e59baec56520..a4ceae3dbcf1 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -320,3 +320,4 @@ SYSCALL(sys_tee,sys_tee,sys_tee_wrapper) | |||
320 | SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice_wrapper) | 320 | SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice_wrapper) |
321 | NI_SYSCALL /* 310 sys_move_pages */ | 321 | NI_SYSCALL /* 310 sys_move_pages */ |
322 | SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) | 322 | SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) |
323 | SYSCALL(sys_epoll_pwait,sys_epoll_pwait,sys_ni_syscall) | ||
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 66375a5e3d12..92ecffbc8d82 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -462,7 +462,8 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
462 | local_irq_enable(); | 462 | local_irq_enable(); |
463 | 463 | ||
464 | if (regs->psw.mask & PSW_MASK_PSTATE) { | 464 | if (regs->psw.mask & PSW_MASK_PSTATE) { |
465 | get_user(*((__u16 *) opcode), (__u16 __user *) location); | 465 | if (get_user(*((__u16 *) opcode), (__u16 __user *) location)) |
466 | return; | ||
466 | if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) { | 467 | if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) { |
467 | if (current->ptrace & PT_PTRACED) | 468 | if (current->ptrace & PT_PTRACED) |
468 | force_sig(SIGTRAP, current); | 469 | force_sig(SIGTRAP, current); |
@@ -470,20 +471,25 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
470 | signal = SIGILL; | 471 | signal = SIGILL; |
471 | #ifdef CONFIG_MATHEMU | 472 | #ifdef CONFIG_MATHEMU |
472 | } else if (opcode[0] == 0xb3) { | 473 | } else if (opcode[0] == 0xb3) { |
473 | get_user(*((__u16 *) (opcode+2)), location+1); | 474 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
475 | return; | ||
474 | signal = math_emu_b3(opcode, regs); | 476 | signal = math_emu_b3(opcode, regs); |
475 | } else if (opcode[0] == 0xed) { | 477 | } else if (opcode[0] == 0xed) { |
476 | get_user(*((__u32 *) (opcode+2)), | 478 | if (get_user(*((__u32 *) (opcode+2)), |
477 | (__u32 __user *)(location+1)); | 479 | (__u32 __user *)(location+1))) |
480 | return; | ||
478 | signal = math_emu_ed(opcode, regs); | 481 | signal = math_emu_ed(opcode, regs); |
479 | } else if (*((__u16 *) opcode) == 0xb299) { | 482 | } else if (*((__u16 *) opcode) == 0xb299) { |
480 | get_user(*((__u16 *) (opcode+2)), location+1); | 483 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
484 | return; | ||
481 | signal = math_emu_srnm(opcode, regs); | 485 | signal = math_emu_srnm(opcode, regs); |
482 | } else if (*((__u16 *) opcode) == 0xb29c) { | 486 | } else if (*((__u16 *) opcode) == 0xb29c) { |
483 | get_user(*((__u16 *) (opcode+2)), location+1); | 487 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
488 | return; | ||
484 | signal = math_emu_stfpc(opcode, regs); | 489 | signal = math_emu_stfpc(opcode, regs); |
485 | } else if (*((__u16 *) opcode) == 0xb29d) { | 490 | } else if (*((__u16 *) opcode) == 0xb29d) { |
486 | get_user(*((__u16 *) (opcode+2)), location+1); | 491 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
492 | return; | ||
487 | signal = math_emu_lfpc(opcode, regs); | 493 | signal = math_emu_lfpc(opcode, regs); |
488 | #endif | 494 | #endif |
489 | } else | 495 | } else |
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index af9e69a03011..fe0f2e97ba7b 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S | |||
@@ -83,13 +83,7 @@ SECTIONS | |||
83 | __setup_end = .; | 83 | __setup_end = .; |
84 | __initcall_start = .; | 84 | __initcall_start = .; |
85 | .initcall.init : { | 85 | .initcall.init : { |
86 | *(.initcall1.init) | 86 | INITCALLS |
87 | *(.initcall2.init) | ||
88 | *(.initcall3.init) | ||
89 | *(.initcall4.init) | ||
90 | *(.initcall5.init) | ||
91 | *(.initcall6.init) | ||
92 | *(.initcall7.init) | ||
93 | } | 87 | } |
94 | __initcall_end = .; | 88 | __initcall_end = .; |
95 | __con_initcall_start = .; | 89 | __con_initcall_start = .; |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index d99891718709..e1881c31b1cb 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -84,6 +84,7 @@ void show_mem(void) | |||
84 | printk("%d pages swap cached\n",cached); | 84 | printk("%d pages swap cached\n",cached); |
85 | } | 85 | } |
86 | 86 | ||
87 | extern unsigned long __initdata zholes_size[]; | ||
87 | /* | 88 | /* |
88 | * paging_init() sets up the page tables | 89 | * paging_init() sets up the page tables |
89 | */ | 90 | */ |
@@ -100,15 +101,16 @@ void __init paging_init(void) | |||
100 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; | 101 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; |
101 | static const int ssm_mask = 0x04000000L; | 102 | static const int ssm_mask = 0x04000000L; |
102 | unsigned long ro_start_pfn, ro_end_pfn; | 103 | unsigned long ro_start_pfn, ro_end_pfn; |
103 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | 104 | unsigned long zones_size[MAX_NR_ZONES]; |
104 | 105 | ||
105 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); | 106 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); |
106 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); | 107 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); |
107 | 108 | ||
108 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 109 | memset(zones_size, 0, sizeof(zones_size)); |
109 | max_zone_pfns[ZONE_DMA] = max_low_pfn; | 110 | zones_size[ZONE_DMA] = max_low_pfn; |
110 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | 111 | free_area_init_node(0, &contig_page_data, zones_size, |
111 | free_area_init_nodes(max_zone_pfns); | 112 | __pa(PAGE_OFFSET) >> PAGE_SHIFT, |
113 | zholes_size); | ||
112 | 114 | ||
113 | /* unmap whole virtual address space */ | 115 | /* unmap whole virtual address space */ |
114 | 116 | ||
@@ -168,16 +170,26 @@ void __init paging_init(void) | |||
168 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | | 170 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | |
169 | _KERN_REGION_TABLE; | 171 | _KERN_REGION_TABLE; |
170 | static const int ssm_mask = 0x04000000L; | 172 | static const int ssm_mask = 0x04000000L; |
173 | unsigned long zones_size[MAX_NR_ZONES]; | ||
174 | unsigned long dma_pfn, high_pfn; | ||
171 | unsigned long ro_start_pfn, ro_end_pfn; | 175 | unsigned long ro_start_pfn, ro_end_pfn; |
172 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | ||
173 | 176 | ||
177 | memset(zones_size, 0, sizeof(zones_size)); | ||
178 | dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; | ||
179 | high_pfn = max_low_pfn; | ||
174 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); | 180 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); |
175 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); | 181 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); |
176 | 182 | ||
177 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 183 | if (dma_pfn > high_pfn) |
178 | max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); | 184 | zones_size[ZONE_DMA] = high_pfn; |
179 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | 185 | else { |
180 | free_area_init_nodes(max_zone_pfns); | 186 | zones_size[ZONE_DMA] = dma_pfn; |
187 | zones_size[ZONE_NORMAL] = high_pfn - dma_pfn; | ||
188 | } | ||
189 | |||
190 | /* Initialize mem_map[]. */ | ||
191 | free_area_init_node(0, &contig_page_data, zones_size, | ||
192 | __pa(PAGE_OFFSET) >> PAGE_SHIFT, zholes_size); | ||
181 | 193 | ||
182 | /* | 194 | /* |
183 | * map whole physical memory to virtual memory (identity mapping) | 195 | * map whole physical memory to virtual memory (identity mapping) |