diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 6 | ||||
-rw-r--r-- | arch/s390/appldata/appldata_base.c | 3 | ||||
-rw-r--r-- | arch/s390/crypto/crypt_s390_query.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 74 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 8 | ||||
-rw-r--r-- | arch/s390/kernel/debug.c | 11 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 13 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 108 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 12 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 2 | ||||
-rw-r--r-- | arch/s390/mm/cmm.c | 6 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 4 |
12 files changed, 79 insertions, 170 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index b7ca5bf9acfc..01c5c082f970 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -14,6 +14,10 @@ config RWSEM_XCHGADD_ALGORITHM | |||
14 | bool | 14 | bool |
15 | default y | 15 | default y |
16 | 16 | ||
17 | config GENERIC_HWEIGHT | ||
18 | bool | ||
19 | default y | ||
20 | |||
17 | config GENERIC_CALIBRATE_DELAY | 21 | config GENERIC_CALIBRATE_DELAY |
18 | bool | 22 | bool |
19 | default y | 23 | default y |
@@ -460,6 +464,8 @@ config PCMCIA | |||
460 | 464 | ||
461 | source "drivers/base/Kconfig" | 465 | source "drivers/base/Kconfig" |
462 | 466 | ||
467 | source "drivers/connector/Kconfig" | ||
468 | |||
463 | source "drivers/scsi/Kconfig" | 469 | source "drivers/scsi/Kconfig" |
464 | 470 | ||
465 | source "drivers/s390/Kconfig" | 471 | source "drivers/s390/Kconfig" |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index d06a8d71c71d..54d35c130907 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -531,12 +531,11 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
531 | P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr); | 531 | P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr); |
532 | return -EBUSY; | 532 | return -EBUSY; |
533 | } | 533 | } |
534 | ops->ctl_table = kmalloc(4*sizeof(struct ctl_table), GFP_KERNEL); | 534 | ops->ctl_table = kzalloc(4*sizeof(struct ctl_table), GFP_KERNEL); |
535 | if (ops->ctl_table == NULL) { | 535 | if (ops->ctl_table == NULL) { |
536 | P_ERROR("Not enough memory for %s ctl_table!\n", ops->name); | 536 | P_ERROR("Not enough memory for %s ctl_table!\n", ops->name); |
537 | return -ENOMEM; | 537 | return -ENOMEM; |
538 | } | 538 | } |
539 | memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table)); | ||
540 | 539 | ||
541 | spin_lock(&appldata_ops_lock); | 540 | spin_lock(&appldata_ops_lock); |
542 | list_for_each(lh, &appldata_ops_list) { | 541 | list_for_each(lh, &appldata_ops_list) { |
diff --git a/arch/s390/crypto/crypt_s390_query.c b/arch/s390/crypto/crypt_s390_query.c index def02bdc44a4..54fb11d7fadd 100644 --- a/arch/s390/crypto/crypt_s390_query.c +++ b/arch/s390/crypto/crypt_s390_query.c | |||
@@ -55,7 +55,7 @@ static void query_available_functions(void) | |||
55 | printk(KERN_INFO "KMC_AES_256: %d\n", | 55 | printk(KERN_INFO "KMC_AES_256: %d\n", |
56 | crypt_s390_func_available(KMC_AES_256_ENCRYPT)); | 56 | crypt_s390_func_available(KMC_AES_256_ENCRYPT)); |
57 | 57 | ||
58 | /* query available KIMD fucntions */ | 58 | /* query available KIMD functions */ |
59 | printk(KERN_INFO "KIMD_QUERY: %d\n", | 59 | printk(KERN_INFO "KIMD_QUERY: %d\n", |
60 | crypt_s390_func_available(KIMD_QUERY)); | 60 | crypt_s390_func_available(KIMD_QUERY)); |
61 | printk(KERN_INFO "KIMD_SHA_1: %d\n", | 61 | printk(KERN_INFO "KIMD_SHA_1: %d\n", |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index cc058dc3bc8b..5e14de37c17b 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/resource.h> | 26 | #include <linux/resource.h> |
27 | #include <linux/times.h> | 27 | #include <linux/times.h> |
28 | #include <linux/utsname.h> | 28 | #include <linux/utsname.h> |
29 | #include <linux/timex.h> | ||
30 | #include <linux/smp.h> | 29 | #include <linux/smp.h> |
31 | #include <linux/smp_lock.h> | 30 | #include <linux/smp_lock.h> |
32 | #include <linux/sem.h> | 31 | #include <linux/sem.h> |
@@ -705,79 +704,6 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd, | |||
705 | return ret; | 704 | return ret; |
706 | } | 705 | } |
707 | 706 | ||
708 | /* Handle adjtimex compatibility. */ | ||
709 | |||
710 | struct timex32 { | ||
711 | u32 modes; | ||
712 | s32 offset, freq, maxerror, esterror; | ||
713 | s32 status, constant, precision, tolerance; | ||
714 | struct compat_timeval time; | ||
715 | s32 tick; | ||
716 | s32 ppsfreq, jitter, shift, stabil; | ||
717 | s32 jitcnt, calcnt, errcnt, stbcnt; | ||
718 | s32 :32; s32 :32; s32 :32; s32 :32; | ||
719 | s32 :32; s32 :32; s32 :32; s32 :32; | ||
720 | s32 :32; s32 :32; s32 :32; s32 :32; | ||
721 | }; | ||
722 | |||
723 | extern int do_adjtimex(struct timex *); | ||
724 | |||
725 | asmlinkage long sys32_adjtimex(struct timex32 __user *utp) | ||
726 | { | ||
727 | struct timex txc; | ||
728 | int ret; | ||
729 | |||
730 | memset(&txc, 0, sizeof(struct timex)); | ||
731 | |||
732 | if(get_user(txc.modes, &utp->modes) || | ||
733 | __get_user(txc.offset, &utp->offset) || | ||
734 | __get_user(txc.freq, &utp->freq) || | ||
735 | __get_user(txc.maxerror, &utp->maxerror) || | ||
736 | __get_user(txc.esterror, &utp->esterror) || | ||
737 | __get_user(txc.status, &utp->status) || | ||
738 | __get_user(txc.constant, &utp->constant) || | ||
739 | __get_user(txc.precision, &utp->precision) || | ||
740 | __get_user(txc.tolerance, &utp->tolerance) || | ||
741 | __get_user(txc.time.tv_sec, &utp->time.tv_sec) || | ||
742 | __get_user(txc.time.tv_usec, &utp->time.tv_usec) || | ||
743 | __get_user(txc.tick, &utp->tick) || | ||
744 | __get_user(txc.ppsfreq, &utp->ppsfreq) || | ||
745 | __get_user(txc.jitter, &utp->jitter) || | ||
746 | __get_user(txc.shift, &utp->shift) || | ||
747 | __get_user(txc.stabil, &utp->stabil) || | ||
748 | __get_user(txc.jitcnt, &utp->jitcnt) || | ||
749 | __get_user(txc.calcnt, &utp->calcnt) || | ||
750 | __get_user(txc.errcnt, &utp->errcnt) || | ||
751 | __get_user(txc.stbcnt, &utp->stbcnt)) | ||
752 | return -EFAULT; | ||
753 | |||
754 | ret = do_adjtimex(&txc); | ||
755 | |||
756 | if(put_user(txc.modes, &utp->modes) || | ||
757 | __put_user(txc.offset, &utp->offset) || | ||
758 | __put_user(txc.freq, &utp->freq) || | ||
759 | __put_user(txc.maxerror, &utp->maxerror) || | ||
760 | __put_user(txc.esterror, &utp->esterror) || | ||
761 | __put_user(txc.status, &utp->status) || | ||
762 | __put_user(txc.constant, &utp->constant) || | ||
763 | __put_user(txc.precision, &utp->precision) || | ||
764 | __put_user(txc.tolerance, &utp->tolerance) || | ||
765 | __put_user(txc.time.tv_sec, &utp->time.tv_sec) || | ||
766 | __put_user(txc.time.tv_usec, &utp->time.tv_usec) || | ||
767 | __put_user(txc.tick, &utp->tick) || | ||
768 | __put_user(txc.ppsfreq, &utp->ppsfreq) || | ||
769 | __put_user(txc.jitter, &utp->jitter) || | ||
770 | __put_user(txc.shift, &utp->shift) || | ||
771 | __put_user(txc.stabil, &utp->stabil) || | ||
772 | __put_user(txc.jitcnt, &utp->jitcnt) || | ||
773 | __put_user(txc.calcnt, &utp->calcnt) || | ||
774 | __put_user(txc.errcnt, &utp->errcnt) || | ||
775 | __put_user(txc.stbcnt, &utp->stbcnt)) | ||
776 | ret = -EFAULT; | ||
777 | |||
778 | return ret; | ||
779 | } | ||
780 | |||
781 | #ifdef CONFIG_SYSCTL | 707 | #ifdef CONFIG_SYSCTL |
782 | struct __sysctl_args32 { | 708 | struct __sysctl_args32 { |
783 | u32 name; | 709 | u32 name; |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 50e80138e7ad..199da68bd7be 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -551,10 +551,10 @@ sys32_newuname_wrapper: | |||
551 | llgtr %r2,%r2 # struct new_utsname * | 551 | llgtr %r2,%r2 # struct new_utsname * |
552 | jg s390x_newuname # branch to system call | 552 | jg s390x_newuname # branch to system call |
553 | 553 | ||
554 | .globl sys32_adjtimex_wrapper | 554 | .globl compat_sys_adjtimex_wrapper |
555 | sys32_adjtimex_wrapper: | 555 | compat_sys_adjtimex_wrapper: |
556 | llgtr %r2,%r2 # struct timex_emu31 * | 556 | llgtr %r2,%r2 # struct compat_timex * |
557 | jg sys32_adjtimex # branch to system call | 557 | jg compat_sys_adjtimex # branch to system call |
558 | 558 | ||
559 | .globl sys32_mprotect_wrapper | 559 | .globl sys32_mprotect_wrapper |
560 | sys32_mprotect_wrapper: | 560 | sys32_mprotect_wrapper: |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 896d39d0e4ce..06a3fbc12536 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -204,16 +204,13 @@ debug_areas_alloc(int pages_per_area, int nr_areas) | |||
204 | goto fail_malloc_areas2; | 204 | goto fail_malloc_areas2; |
205 | } | 205 | } |
206 | for(j = 0; j < pages_per_area; j++) { | 206 | for(j = 0; j < pages_per_area; j++) { |
207 | areas[i][j] = (debug_entry_t*)kmalloc(PAGE_SIZE, | 207 | areas[i][j] = kzalloc(PAGE_SIZE, GFP_KERNEL); |
208 | GFP_KERNEL); | ||
209 | if(!areas[i][j]) { | 208 | if(!areas[i][j]) { |
210 | for(j--; j >=0 ; j--) { | 209 | for(j--; j >=0 ; j--) { |
211 | kfree(areas[i][j]); | 210 | kfree(areas[i][j]); |
212 | } | 211 | } |
213 | kfree(areas[i]); | 212 | kfree(areas[i]); |
214 | goto fail_malloc_areas2; | 213 | goto fail_malloc_areas2; |
215 | } else { | ||
216 | memset(areas[i][j],0,PAGE_SIZE); | ||
217 | } | 214 | } |
218 | } | 215 | } |
219 | } | 216 | } |
@@ -249,14 +246,12 @@ debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size, | |||
249 | rc = (debug_info_t*) kmalloc(sizeof(debug_info_t), GFP_KERNEL); | 246 | rc = (debug_info_t*) kmalloc(sizeof(debug_info_t), GFP_KERNEL); |
250 | if(!rc) | 247 | if(!rc) |
251 | goto fail_malloc_rc; | 248 | goto fail_malloc_rc; |
252 | rc->active_entries = (int*)kmalloc(nr_areas * sizeof(int), GFP_KERNEL); | 249 | rc->active_entries = kcalloc(nr_areas, sizeof(int), GFP_KERNEL); |
253 | if(!rc->active_entries) | 250 | if(!rc->active_entries) |
254 | goto fail_malloc_active_entries; | 251 | goto fail_malloc_active_entries; |
255 | memset(rc->active_entries, 0, nr_areas * sizeof(int)); | 252 | rc->active_pages = kcalloc(nr_areas, sizeof(int), GFP_KERNEL); |
256 | rc->active_pages = (int*)kmalloc(nr_areas * sizeof(int), GFP_KERNEL); | ||
257 | if(!rc->active_pages) | 253 | if(!rc->active_pages) |
258 | goto fail_malloc_active_pages; | 254 | goto fail_malloc_active_pages; |
259 | memset(rc->active_pages, 0, nr_areas * sizeof(int)); | ||
260 | if((mode == ALL_AREAS) && (pages_per_area != 0)){ | 255 | if((mode == ALL_AREAS) && (pages_per_area != 0)){ |
261 | rc->areas = debug_areas_alloc(pages_per_area, nr_areas); | 256 | rc->areas = debug_areas_alloc(pages_per_area, nr_areas); |
262 | if(!rc->areas) | 257 | if(!rc->areas) |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index da6fbae8df91..4a0f5a1551ea 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -76,17 +76,17 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
76 | /* | 76 | /* |
77 | * Need to know about CPUs going idle? | 77 | * Need to know about CPUs going idle? |
78 | */ | 78 | */ |
79 | static struct notifier_block *idle_chain; | 79 | static ATOMIC_NOTIFIER_HEAD(idle_chain); |
80 | 80 | ||
81 | int register_idle_notifier(struct notifier_block *nb) | 81 | int register_idle_notifier(struct notifier_block *nb) |
82 | { | 82 | { |
83 | return notifier_chain_register(&idle_chain, nb); | 83 | return atomic_notifier_chain_register(&idle_chain, nb); |
84 | } | 84 | } |
85 | EXPORT_SYMBOL(register_idle_notifier); | 85 | EXPORT_SYMBOL(register_idle_notifier); |
86 | 86 | ||
87 | int unregister_idle_notifier(struct notifier_block *nb) | 87 | int unregister_idle_notifier(struct notifier_block *nb) |
88 | { | 88 | { |
89 | return notifier_chain_unregister(&idle_chain, nb); | 89 | return atomic_notifier_chain_unregister(&idle_chain, nb); |
90 | } | 90 | } |
91 | EXPORT_SYMBOL(unregister_idle_notifier); | 91 | EXPORT_SYMBOL(unregister_idle_notifier); |
92 | 92 | ||
@@ -95,7 +95,7 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code) | |||
95 | /* disable monitor call class 0 */ | 95 | /* disable monitor call class 0 */ |
96 | __ctl_clear_bit(8, 15); | 96 | __ctl_clear_bit(8, 15); |
97 | 97 | ||
98 | notifier_call_chain(&idle_chain, CPU_NOT_IDLE, | 98 | atomic_notifier_call_chain(&idle_chain, CPU_NOT_IDLE, |
99 | (void *)(long) smp_processor_id()); | 99 | (void *)(long) smp_processor_id()); |
100 | } | 100 | } |
101 | 101 | ||
@@ -103,7 +103,7 @@ extern void s390_handle_mcck(void); | |||
103 | /* | 103 | /* |
104 | * The idle loop on a S390... | 104 | * The idle loop on a S390... |
105 | */ | 105 | */ |
106 | void default_idle(void) | 106 | static void default_idle(void) |
107 | { | 107 | { |
108 | int cpu, rc; | 108 | int cpu, rc; |
109 | 109 | ||
@@ -116,7 +116,8 @@ void default_idle(void) | |||
116 | return; | 116 | return; |
117 | } | 117 | } |
118 | 118 | ||
119 | rc = notifier_call_chain(&idle_chain, CPU_IDLE, (void *)(long) cpu); | 119 | rc = atomic_notifier_call_chain(&idle_chain, |
120 | CPU_IDLE, (void *)(long) cpu); | ||
120 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) | 121 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) |
121 | BUG(); | 122 | BUG(); |
122 | if (rc != NOTIFY_OK) { | 123 | if (rc != NOTIFY_OK) { |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 24f62f16c0e5..0a04e4a564b2 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -78,8 +78,6 @@ extern int _text,_etext, _edata, _end; | |||
78 | 78 | ||
79 | #include <asm/setup.h> | 79 | #include <asm/setup.h> |
80 | 80 | ||
81 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; | ||
82 | |||
83 | static struct resource code_resource = { | 81 | static struct resource code_resource = { |
84 | .name = "Kernel code", | 82 | .name = "Kernel code", |
85 | .start = (unsigned long) &_text, | 83 | .start = (unsigned long) &_text, |
@@ -335,63 +333,38 @@ add_memory_hole(unsigned long start, unsigned long end) | |||
335 | } | 333 | } |
336 | } | 334 | } |
337 | 335 | ||
338 | static void __init | 336 | static int __init early_parse_mem(char *p) |
339 | parse_cmdline_early(char **cmdline_p) | 337 | { |
338 | memory_end = memparse(p, &p); | ||
339 | return 0; | ||
340 | } | ||
341 | early_param("mem", early_parse_mem); | ||
342 | |||
343 | /* | ||
344 | * "ipldelay=XXX[sm]" sets ipl delay in seconds or minutes | ||
345 | */ | ||
346 | static int __init early_parse_ipldelay(char *p) | ||
340 | { | 347 | { |
341 | char c = ' ', cn, *to = command_line, *from = COMMAND_LINE; | ||
342 | unsigned long delay = 0; | 348 | unsigned long delay = 0; |
343 | 349 | ||
344 | /* Save unparsed command line copy for /proc/cmdline */ | 350 | delay = simple_strtoul(p, &p, 0); |
345 | memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); | ||
346 | saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; | ||
347 | 351 | ||
348 | for (;;) { | 352 | switch (*p) { |
349 | /* | 353 | case 's': |
350 | * "mem=XXX[kKmM]" sets memsize | 354 | case 'S': |
351 | */ | 355 | delay *= 1000000; |
352 | if (c == ' ' && strncmp(from, "mem=", 4) == 0) { | 356 | break; |
353 | memory_end = simple_strtoul(from+4, &from, 0); | 357 | case 'm': |
354 | if ( *from == 'K' || *from == 'k' ) { | 358 | case 'M': |
355 | memory_end = memory_end << 10; | 359 | delay *= 60 * 1000000; |
356 | from++; | ||
357 | } else if ( *from == 'M' || *from == 'm' ) { | ||
358 | memory_end = memory_end << 20; | ||
359 | from++; | ||
360 | } | ||
361 | } | ||
362 | /* | ||
363 | * "ipldelay=XXX[sm]" sets ipl delay in seconds or minutes | ||
364 | */ | ||
365 | if (c == ' ' && strncmp(from, "ipldelay=", 9) == 0) { | ||
366 | delay = simple_strtoul(from+9, &from, 0); | ||
367 | if (*from == 's' || *from == 'S') { | ||
368 | delay = delay*1000000; | ||
369 | from++; | ||
370 | } else if (*from == 'm' || *from == 'M') { | ||
371 | delay = delay*60*1000000; | ||
372 | from++; | ||
373 | } | ||
374 | /* now wait for the requested amount of time */ | ||
375 | udelay(delay); | ||
376 | } | ||
377 | cn = *(from++); | ||
378 | if (!cn) | ||
379 | break; | ||
380 | if (cn == '\n') | ||
381 | cn = ' '; /* replace newlines with space */ | ||
382 | if (cn == 0x0d) | ||
383 | cn = ' '; /* replace 0x0d with space */ | ||
384 | if (cn == ' ' && c == ' ') | ||
385 | continue; /* remove additional spaces */ | ||
386 | c = cn; | ||
387 | if (to - command_line >= COMMAND_LINE_SIZE) | ||
388 | break; | ||
389 | *(to++) = c; | ||
390 | } | 360 | } |
391 | if (c == ' ' && to > command_line) to--; | 361 | |
392 | *to = '\0'; | 362 | /* now wait for the requested amount of time */ |
393 | *cmdline_p = command_line; | 363 | udelay(delay); |
364 | |||
365 | return 0; | ||
394 | } | 366 | } |
367 | early_param("ipldelay", early_parse_ipldelay); | ||
395 | 368 | ||
396 | static void __init | 369 | static void __init |
397 | setup_lowcore(void) | 370 | setup_lowcore(void) |
@@ -580,9 +553,26 @@ setup_arch(char **cmdline_p) | |||
580 | "We are running native (64 bit mode)\n"); | 553 | "We are running native (64 bit mode)\n"); |
581 | #endif /* CONFIG_64BIT */ | 554 | #endif /* CONFIG_64BIT */ |
582 | 555 | ||
556 | /* Save unparsed command line copy for /proc/cmdline */ | ||
557 | strlcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); | ||
558 | |||
559 | *cmdline_p = COMMAND_LINE; | ||
560 | *(*cmdline_p + COMMAND_LINE_SIZE - 1) = '\0'; | ||
561 | |||
583 | ROOT_DEV = Root_RAM0; | 562 | ROOT_DEV = Root_RAM0; |
563 | |||
564 | init_mm.start_code = PAGE_OFFSET; | ||
565 | init_mm.end_code = (unsigned long) &_etext; | ||
566 | init_mm.end_data = (unsigned long) &_edata; | ||
567 | init_mm.brk = (unsigned long) &_end; | ||
568 | |||
569 | memory_end = memory_size; | ||
570 | |||
571 | parse_early_param(); | ||
572 | |||
584 | #ifndef CONFIG_64BIT | 573 | #ifndef CONFIG_64BIT |
585 | memory_end = memory_size & ~0x400000UL; /* align memory end to 4MB */ | 574 | memory_end &= ~0x400000UL; |
575 | |||
586 | /* | 576 | /* |
587 | * We need some free virtual space to be able to do vmalloc. | 577 | * We need some free virtual space to be able to do vmalloc. |
588 | * On a machine with 2GB memory we make sure that we have at | 578 | * On a machine with 2GB memory we make sure that we have at |
@@ -591,17 +581,9 @@ setup_arch(char **cmdline_p) | |||
591 | if (memory_end > 1920*1024*1024) | 581 | if (memory_end > 1920*1024*1024) |
592 | memory_end = 1920*1024*1024; | 582 | memory_end = 1920*1024*1024; |
593 | #else /* CONFIG_64BIT */ | 583 | #else /* CONFIG_64BIT */ |
594 | memory_end = memory_size & ~0x200000UL; /* detected in head.s */ | 584 | memory_end &= ~0x200000UL; |
595 | #endif /* CONFIG_64BIT */ | 585 | #endif /* CONFIG_64BIT */ |
596 | 586 | ||
597 | init_mm.start_code = PAGE_OFFSET; | ||
598 | init_mm.end_code = (unsigned long) &_etext; | ||
599 | init_mm.end_data = (unsigned long) &_edata; | ||
600 | init_mm.brk = (unsigned long) &_end; | ||
601 | |||
602 | parse_cmdline_early(cmdline_p); | ||
603 | parse_early_param(); | ||
604 | |||
605 | setup_memory(); | 587 | setup_memory(); |
606 | setup_resources(); | 588 | setup_resources(); |
607 | setup_lowcore(); | 589 | setup_lowcore(); |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 7dbe00c76c6b..343120c9223d 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -665,7 +665,9 @@ __cpu_up(unsigned int cpu) | |||
665 | cpu_lowcore->current_task = (unsigned long) idle; | 665 | cpu_lowcore->current_task = (unsigned long) idle; |
666 | cpu_lowcore->cpu_data.cpu_nr = cpu; | 666 | cpu_lowcore->cpu_data.cpu_nr = cpu; |
667 | eieio(); | 667 | eieio(); |
668 | signal_processor(cpu,sigp_restart); | 668 | |
669 | while (signal_processor(cpu,sigp_restart) == sigp_busy) | ||
670 | udelay(10); | ||
669 | 671 | ||
670 | while (!cpu_online(cpu)) | 672 | while (!cpu_online(cpu)) |
671 | cpu_relax(); | 673 | cpu_relax(); |
@@ -799,9 +801,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
799 | */ | 801 | */ |
800 | print_cpu_info(&S390_lowcore.cpu_data); | 802 | print_cpu_info(&S390_lowcore.cpu_data); |
801 | 803 | ||
802 | for(i = 0; i < NR_CPUS; i++) { | 804 | for_each_possible_cpu(i) { |
803 | if (!cpu_possible(i)) | ||
804 | continue; | ||
805 | lowcore_ptr[i] = (struct _lowcore *) | 805 | lowcore_ptr[i] = (struct _lowcore *) |
806 | __get_free_pages(GFP_KERNEL|GFP_DMA, | 806 | __get_free_pages(GFP_KERNEL|GFP_DMA, |
807 | sizeof(void*) == 8 ? 1 : 0); | 807 | sizeof(void*) == 8 ? 1 : 0); |
@@ -831,7 +831,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
831 | #endif | 831 | #endif |
832 | set_prefix((u32)(unsigned long) lowcore_ptr[smp_processor_id()]); | 832 | set_prefix((u32)(unsigned long) lowcore_ptr[smp_processor_id()]); |
833 | 833 | ||
834 | for_each_cpu(cpu) | 834 | for_each_possible_cpu(cpu) |
835 | if (cpu != smp_processor_id()) | 835 | if (cpu != smp_processor_id()) |
836 | smp_create_idle(cpu); | 836 | smp_create_idle(cpu); |
837 | } | 837 | } |
@@ -868,7 +868,7 @@ static int __init topology_init(void) | |||
868 | int cpu; | 868 | int cpu; |
869 | int ret; | 869 | int ret; |
870 | 870 | ||
871 | for_each_cpu(cpu) { | 871 | for_each_possible_cpu(cpu) { |
872 | ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); | 872 | ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); |
873 | if (ret) | 873 | if (ret) |
874 | printk(KERN_WARNING "topology_init: register_cpu %d " | 874 | printk(KERN_WARNING "topology_init: register_cpu %d " |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 7c88d85c3597..2f56654da821 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -132,7 +132,7 @@ SYSCALL(sys_clone_glue,sys_clone_glue,sys32_clone_glue) /* 120 */ | |||
132 | SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) | 132 | SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) |
133 | SYSCALL(sys_newuname,s390x_newuname,sys32_newuname_wrapper) | 133 | SYSCALL(sys_newuname,s390x_newuname,sys32_newuname_wrapper) |
134 | NI_SYSCALL /* modify_ldt for i386 */ | 134 | NI_SYSCALL /* modify_ldt for i386 */ |
135 | SYSCALL(sys_adjtimex,sys_adjtimex,sys32_adjtimex_wrapper) | 135 | SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) |
136 | SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ | 136 | SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ |
137 | SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper) | 137 | SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper) |
138 | NI_SYSCALL /* old "create module" */ | 138 | NI_SYSCALL /* old "create module" */ |
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index b075ab499d05..51596f429235 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -339,19 +339,19 @@ static struct ctl_table cmm_table[] = { | |||
339 | { | 339 | { |
340 | .ctl_name = VM_CMM_PAGES, | 340 | .ctl_name = VM_CMM_PAGES, |
341 | .procname = "cmm_pages", | 341 | .procname = "cmm_pages", |
342 | .mode = 0600, | 342 | .mode = 0644, |
343 | .proc_handler = &cmm_pages_handler, | 343 | .proc_handler = &cmm_pages_handler, |
344 | }, | 344 | }, |
345 | { | 345 | { |
346 | .ctl_name = VM_CMM_TIMED_PAGES, | 346 | .ctl_name = VM_CMM_TIMED_PAGES, |
347 | .procname = "cmm_timed_pages", | 347 | .procname = "cmm_timed_pages", |
348 | .mode = 0600, | 348 | .mode = 0644, |
349 | .proc_handler = &cmm_pages_handler, | 349 | .proc_handler = &cmm_pages_handler, |
350 | }, | 350 | }, |
351 | { | 351 | { |
352 | .ctl_name = VM_CMM_TIMEOUT, | 352 | .ctl_name = VM_CMM_TIMEOUT, |
353 | .procname = "cmm_timeout", | 353 | .procname = "cmm_timeout", |
354 | .mode = 0600, | 354 | .mode = 0644, |
355 | .proc_handler = &cmm_timeout_handler, | 355 | .proc_handler = &cmm_timeout_handler, |
356 | }, | 356 | }, |
357 | { .ctl_name = 0 } | 357 | { .ctl_name = 0 } |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index df953383724d..a055894f3bd8 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -292,7 +292,7 @@ void free_initmem(void) | |||
292 | addr = (unsigned long)(&__init_begin); | 292 | addr = (unsigned long)(&__init_begin); |
293 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 293 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
294 | ClearPageReserved(virt_to_page(addr)); | 294 | ClearPageReserved(virt_to_page(addr)); |
295 | set_page_count(virt_to_page(addr), 1); | 295 | init_page_count(virt_to_page(addr)); |
296 | free_page(addr); | 296 | free_page(addr); |
297 | totalram_pages++; | 297 | totalram_pages++; |
298 | } | 298 | } |
@@ -307,7 +307,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
307 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 307 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
308 | for (; start < end; start += PAGE_SIZE) { | 308 | for (; start < end; start += PAGE_SIZE) { |
309 | ClearPageReserved(virt_to_page(start)); | 309 | ClearPageReserved(virt_to_page(start)); |
310 | set_page_count(virt_to_page(start), 1); | 310 | init_page_count(virt_to_page(start)); |
311 | free_page(start); | 311 | free_page(start); |
312 | totalram_pages++; | 312 | totalram_pages++; |
313 | } | 313 | } |