diff options
| -rw-r--r-- | arch/s390/include/asm/cpu.h | 6 | ||||
| -rw-r--r-- | arch/s390/kernel/head.S | 1 | ||||
| -rw-r--r-- | arch/s390/kernel/head64.S | 8 | ||||
| -rw-r--r-- | arch/s390/kernel/smp.c | 5 |
4 files changed, 13 insertions, 7 deletions
diff --git a/arch/s390/include/asm/cpu.h b/arch/s390/include/asm/cpu.h new file mode 100644 index 000000000000..702ad46841cf --- /dev/null +++ b/arch/s390/include/asm/cpu.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef _ASM_S390_CPU_H | ||
| 2 | #define _ASM_S390_CPU_H | ||
| 3 | |||
| 4 | #define MAX_CPU_ADDRESS 255 | ||
| 5 | |||
| 6 | #endif /* _ASM_S390_CPU_H */ | ||
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index ec6882348520..c52b4f7742fa 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <asm/asm-offsets.h> | 27 | #include <asm/asm-offsets.h> |
| 28 | #include <asm/thread_info.h> | 28 | #include <asm/thread_info.h> |
| 29 | #include <asm/page.h> | 29 | #include <asm/page.h> |
| 30 | #include <asm/cpu.h> | ||
| 30 | 31 | ||
| 31 | #ifdef CONFIG_64BIT | 32 | #ifdef CONFIG_64BIT |
| 32 | #define ARCH_OFFSET 4 | 33 | #define ARCH_OFFSET 4 |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index bdcb3f05bcd1..6a250808092b 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
| @@ -62,9 +62,9 @@ startup_continue: | |||
| 62 | clr %r11,%r12 | 62 | clr %r11,%r12 |
| 63 | je 5f # no more space in prefix array | 63 | je 5f # no more space in prefix array |
| 64 | 4: | 64 | 4: |
| 65 | ahi %r8,1 # next cpu (r8 += 1) | 65 | ahi %r8,1 # next cpu (r8 += 1) |
| 66 | cl %r8,.Llast_cpu-.LPG1(%r13) # is last possible cpu ? | 66 | chi %r8,MAX_CPU_ADDRESS # is last possible cpu ? |
| 67 | jl 1b # jump if not last cpu | 67 | jle 1b # jump if not last cpu |
| 68 | 5: | 68 | 5: |
| 69 | lhi %r1,2 # mode 2 = esame (dump) | 69 | lhi %r1,2 # mode 2 = esame (dump) |
| 70 | j 6f | 70 | j 6f |
| @@ -130,8 +130,6 @@ startup_continue: | |||
| 130 | #ifdef CONFIG_ZFCPDUMP | 130 | #ifdef CONFIG_ZFCPDUMP |
| 131 | .Lcurrent_cpu: | 131 | .Lcurrent_cpu: |
| 132 | .long 0x0 | 132 | .long 0x0 |
| 133 | .Llast_cpu: | ||
| 134 | .long 0x0000ffff | ||
| 135 | .Lpref_arr_ptr: | 133 | .Lpref_arr_ptr: |
| 136 | .long zfcpdump_prefix_array | 134 | .long zfcpdump_prefix_array |
| 137 | #endif /* CONFIG_ZFCPDUMP */ | 135 | #endif /* CONFIG_ZFCPDUMP */ |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index be2cae083406..9261495ca2c3 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
| @@ -49,6 +49,7 @@ | |||
| 49 | #include <asm/sclp.h> | 49 | #include <asm/sclp.h> |
| 50 | #include <asm/cputime.h> | 50 | #include <asm/cputime.h> |
| 51 | #include <asm/vdso.h> | 51 | #include <asm/vdso.h> |
| 52 | #include <asm/cpu.h> | ||
| 52 | #include "entry.h" | 53 | #include "entry.h" |
| 53 | 54 | ||
| 54 | static struct task_struct *current_set[NR_CPUS]; | 55 | static struct task_struct *current_set[NR_CPUS]; |
| @@ -300,7 +301,7 @@ static int smp_rescan_cpus_sigp(cpumask_t avail) | |||
| 300 | logical_cpu = cpumask_first(&avail); | 301 | logical_cpu = cpumask_first(&avail); |
| 301 | if (logical_cpu >= nr_cpu_ids) | 302 | if (logical_cpu >= nr_cpu_ids) |
| 302 | return 0; | 303 | return 0; |
| 303 | for (cpu_id = 0; cpu_id <= 65535; cpu_id++) { | 304 | for (cpu_id = 0; cpu_id <= MAX_CPU_ADDRESS; cpu_id++) { |
| 304 | if (cpu_known(cpu_id)) | 305 | if (cpu_known(cpu_id)) |
| 305 | continue; | 306 | continue; |
| 306 | __cpu_logical_map[logical_cpu] = cpu_id; | 307 | __cpu_logical_map[logical_cpu] = cpu_id; |
| @@ -379,7 +380,7 @@ static void __init smp_detect_cpus(void) | |||
| 379 | /* Use sigp detection algorithm if sclp doesn't work. */ | 380 | /* Use sigp detection algorithm if sclp doesn't work. */ |
| 380 | if (sclp_get_cpu_info(info)) { | 381 | if (sclp_get_cpu_info(info)) { |
| 381 | smp_use_sigp_detection = 1; | 382 | smp_use_sigp_detection = 1; |
| 382 | for (cpu = 0; cpu <= 65535; cpu++) { | 383 | for (cpu = 0; cpu <= MAX_CPU_ADDRESS; cpu++) { |
| 383 | if (cpu == boot_cpu_addr) | 384 | if (cpu == boot_cpu_addr) |
| 384 | continue; | 385 | continue; |
| 385 | __cpu_logical_map[CPU_INIT_NO] = cpu; | 386 | __cpu_logical_map[CPU_INIT_NO] = cpu; |
