[S390] Limit cpu detection to 256 physical cpus.
Saves us more than 65k pointless IPIs. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
53f8c573ea
commit
4bb5e07b68
6
arch/s390/include/asm/cpu.h
Normal file
6
arch/s390/include/asm/cpu.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef _ASM_S390_CPU_H
|
||||||
|
#define _ASM_S390_CPU_H
|
||||||
|
|
||||||
|
#define MAX_CPU_ADDRESS 255
|
||||||
|
|
||||||
|
#endif /* _ASM_S390_CPU_H */
|
@@ -27,6 +27,7 @@
|
|||||||
#include <asm/asm-offsets.h>
|
#include <asm/asm-offsets.h>
|
||||||
#include <asm/thread_info.h>
|
#include <asm/thread_info.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
|
#include <asm/cpu.h>
|
||||||
|
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
#define ARCH_OFFSET 4
|
#define ARCH_OFFSET 4
|
||||||
|
@@ -62,9 +62,9 @@ startup_continue:
|
|||||||
clr %r11,%r12
|
clr %r11,%r12
|
||||||
je 5f # no more space in prefix array
|
je 5f # no more space in prefix array
|
||||||
4:
|
4:
|
||||||
ahi %r8,1 # next cpu (r8 += 1)
|
ahi %r8,1 # next cpu (r8 += 1)
|
||||||
cl %r8,.Llast_cpu-.LPG1(%r13) # is last possible cpu ?
|
chi %r8,MAX_CPU_ADDRESS # is last possible cpu ?
|
||||||
jl 1b # jump if not last cpu
|
jle 1b # jump if not last cpu
|
||||||
5:
|
5:
|
||||||
lhi %r1,2 # mode 2 = esame (dump)
|
lhi %r1,2 # mode 2 = esame (dump)
|
||||||
j 6f
|
j 6f
|
||||||
@@ -130,8 +130,6 @@ startup_continue:
|
|||||||
#ifdef CONFIG_ZFCPDUMP
|
#ifdef CONFIG_ZFCPDUMP
|
||||||
.Lcurrent_cpu:
|
.Lcurrent_cpu:
|
||||||
.long 0x0
|
.long 0x0
|
||||||
.Llast_cpu:
|
|
||||||
.long 0x0000ffff
|
|
||||||
.Lpref_arr_ptr:
|
.Lpref_arr_ptr:
|
||||||
.long zfcpdump_prefix_array
|
.long zfcpdump_prefix_array
|
||||||
#endif /* CONFIG_ZFCPDUMP */
|
#endif /* CONFIG_ZFCPDUMP */
|
||||||
|
@@ -49,6 +49,7 @@
|
|||||||
#include <asm/sclp.h>
|
#include <asm/sclp.h>
|
||||||
#include <asm/cputime.h>
|
#include <asm/cputime.h>
|
||||||
#include <asm/vdso.h>
|
#include <asm/vdso.h>
|
||||||
|
#include <asm/cpu.h>
|
||||||
#include "entry.h"
|
#include "entry.h"
|
||||||
|
|
||||||
static struct task_struct *current_set[NR_CPUS];
|
static struct task_struct *current_set[NR_CPUS];
|
||||||
@@ -300,7 +301,7 @@ static int smp_rescan_cpus_sigp(cpumask_t avail)
|
|||||||
logical_cpu = cpumask_first(&avail);
|
logical_cpu = cpumask_first(&avail);
|
||||||
if (logical_cpu >= nr_cpu_ids)
|
if (logical_cpu >= nr_cpu_ids)
|
||||||
return 0;
|
return 0;
|
||||||
for (cpu_id = 0; cpu_id <= 65535; cpu_id++) {
|
for (cpu_id = 0; cpu_id <= MAX_CPU_ADDRESS; cpu_id++) {
|
||||||
if (cpu_known(cpu_id))
|
if (cpu_known(cpu_id))
|
||||||
continue;
|
continue;
|
||||||
__cpu_logical_map[logical_cpu] = cpu_id;
|
__cpu_logical_map[logical_cpu] = cpu_id;
|
||||||
@@ -379,7 +380,7 @@ static void __init smp_detect_cpus(void)
|
|||||||
/* Use sigp detection algorithm if sclp doesn't work. */
|
/* Use sigp detection algorithm if sclp doesn't work. */
|
||||||
if (sclp_get_cpu_info(info)) {
|
if (sclp_get_cpu_info(info)) {
|
||||||
smp_use_sigp_detection = 1;
|
smp_use_sigp_detection = 1;
|
||||||
for (cpu = 0; cpu <= 65535; cpu++) {
|
for (cpu = 0; cpu <= MAX_CPU_ADDRESS; cpu++) {
|
||||||
if (cpu == boot_cpu_addr)
|
if (cpu == boot_cpu_addr)
|
||||||
continue;
|
continue;
|
||||||
__cpu_logical_map[CPU_INIT_NO] = cpu;
|
__cpu_logical_map[CPU_INIT_NO] = cpu;
|
||||||
|
Reference in New Issue
Block a user