aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2005-01-14 23:31:39 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-14 23:31:39 -0800
commit7e275196b1ae38c9d620928af1933c7f8f1ca928 (patch)
tree5adc8da84fcfa87f843fef3eceb1b8c8405fe53a /arch
parent7e2066ed3d2281a336201c23209c533d72f57acd (diff)
downloadhistory-7e275196b1ae38c9d620928af1933c7f8f1ca928.tar.gz
[PATCH] s390: Core changes
s390 core changes: - Fix mm_struct leak on cpu hotplug. - Improved cpu detection logic to avoid long delay at system start. - Call cpu_relax() in cpu hotplug wait loop. - Remove #define of account_system_vtime for CONFIG_VIRT_CPU_ACCOUNTING=n. - Regenerate default configuration. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/defconfig8
-rw-r--r--arch/s390/kernel/setup.c2
-rw-r--r--arch/s390/kernel/smp.c60
3 files changed, 34 insertions, 36 deletions
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index 20021ab924c284..ba0ba4fe193a0e 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -1,10 +1,11 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10
-# Mon Dec 27 11:03:23 2004
+# Linux kernel version: 2.6.11-rc1
+# Fri Jan 14 14:56:51 2005
#
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_S390=y
CONFIG_UID16=y
@@ -142,6 +143,7 @@ CONFIG_SCSI_LOGGING=y
#
# CONFIG_SCSI_SPI_ATTRS is not set
CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_ISCSI_ATTRS is not set
#
# SCSI low-level drivers
@@ -184,6 +186,7 @@ CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# Multi-device support (RAID and LVM)
@@ -530,6 +533,7 @@ CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set
#
# Security options
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 3c5ee57787c185..6fbc5279e4bb89 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -98,6 +98,8 @@ void __devinit cpu_init (void)
clear_thread_flag(TIF_USEDFPU);
current->used_math = 0;
+ atomic_inc(&init_mm.mm_count);
+ current->active_mm = &init_mm;
if (current->mm)
BUG();
enter_lazy_tlb(&init_mm, current);
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 67a16e645f3d65..d2c61ca2b5307d 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -486,48 +486,38 @@ void smp_ctl_clear_bit(int cr, int bit) {
* Lets check how many CPUs we have.
*/
-#ifdef CONFIG_HOTPLUG_CPU
-
void
__init smp_check_cpus(unsigned int max_cpus)
{
- int cpu;
+ int cpu, num_cpus;
+ __u16 boot_cpu_addr;
/*
* cpu 0 is the boot cpu. See smp_prepare_boot_cpu.
*/
- for (cpu = 1; cpu < max_cpus; cpu++)
- cpu_set(cpu, cpu_possible_map);
-}
-#else /* CONFIG_HOTPLUG_CPU */
+ boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr;
+ __cpu_logical_map[0] = boot_cpu_addr;
+ current_thread_info()->cpu = 0;
+ num_cpus = 1;
+ for (cpu = 0; cpu <= 65535 && num_cpus < max_cpus; cpu++) {
+ if ((__u16) cpu == boot_cpu_addr)
+ continue;
+ __cpu_logical_map[num_cpus] = (__u16) cpu;
+ if (signal_processor(num_cpus, sigp_sense) ==
+ sigp_not_operational)
+ continue;
+ cpu_set(num_cpus, cpu_present_map);
+ num_cpus++;
+ }
-void
-__init smp_check_cpus(unsigned int max_cpus)
-{
- int curr_cpu, num_cpus;
- __u16 boot_cpu_addr;
+ for (cpu = 1; cpu < max_cpus; cpu++)
+ cpu_set(cpu, cpu_possible_map);
- boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr;
- current_thread_info()->cpu = 0;
- num_cpus = 1;
- for (curr_cpu = 0;
- curr_cpu <= 65535 && num_cpus < max_cpus; curr_cpu++) {
- if ((__u16) curr_cpu == boot_cpu_addr)
- continue;
- __cpu_logical_map[num_cpus] = (__u16) curr_cpu;
- if (signal_processor(num_cpus, sigp_sense) ==
- sigp_not_operational)
- continue;
- cpu_set(num_cpus, cpu_possible_map);
- num_cpus++;
- }
- printk("Detected %d CPU's\n",(int) num_cpus);
- printk("Boot cpu address %2X\n", boot_cpu_addr);
+ printk("Detected %d CPU's\n",(int) num_cpus);
+ printk("Boot cpu address %2X\n", boot_cpu_addr);
}
-#endif /* CONFIG_HOTPLUG_CPU */
-
/*
* Activate a secondary processor.
*/
@@ -571,8 +561,6 @@ static void __init smp_create_idle(unsigned int cpu)
p = fork_idle(cpu);
if (IS_ERR(p))
panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
- atomic_inc(&init_mm.mm_count);
- p->active_mm = &init_mm;
current_set[cpu] = p;
}
@@ -681,7 +669,8 @@ __cpu_up(unsigned int cpu)
eieio();
signal_processor(cpu,sigp_restart);
- while (!cpu_online(cpu));
+ while (!cpu_online(cpu))
+ cpu_relax();
return 0;
}
@@ -736,13 +725,15 @@ void
__cpu_die(unsigned int cpu)
{
/* Wait until target cpu is down */
- while (!cpu_stopped(cpu));
+ while (!cpu_stopped(cpu))
+ cpu_relax();
printk("Processor %d spun down\n", cpu);
}
void
cpu_die(void)
{
+ idle_task_exit();
signal_processor(smp_processor_id(), sigp_stop);
BUG();
for(;;);
@@ -806,6 +797,7 @@ void __devinit smp_prepare_boot_cpu(void)
void smp_cpus_done(unsigned int max_cpus)
{
+ cpu_present_map = cpu_possible_map;
}
/*