From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Carstens Subject: Re: [patch 27/34] s390: Use generic idle loop Date: Sat, 23 Mar 2013 10:38:26 +0100 Message-ID: <20130323093826.GC3530@osiris> References: <20130321214930.752934102@linutronix.de> <20130321215235.090816526@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20130321215235.090816526@linutronix.de> Sender: linux-kernel-owner@vger.kernel.org To: Thomas Gleixner Cc: LKML , linux-arch@vger.kernel.org, Linus Torvalds , Andrew Morton , Rusty Russell , Paul McKenney , Ingo Molnar , Peter Zijlstra , "Srivatsa S. Bhat" , Magnus Damm List-Id: linux-arch.vger.kernel.org On Thu, Mar 21, 2013 at 09:53:18PM -0000, Thomas Gleixner wrote: > Signed-off-by: Thomas Gleixner > Cc: Heiko Carstens > --- > arch/s390/kernel/process.c | 25 +++++++------------------ > arch/s390/kernel/smp.c | 3 +-- > 2 files changed, 8 insertions(+), 20 deletions(-) Please merge the patch below into your patch to fix some issues. Signed-off-by: Heiko Carstens --- arch/s390/Kconfig | 1 + arch/s390/kernel/process.c | 13 +++++-------- arch/s390/kernel/vtime.c | 5 ----- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index eb8fb62..749513d 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -97,6 +97,7 @@ config S390 select CLONE_BACKWARDS2 select GENERIC_CLOCKEVENTS select GENERIC_CPU_DEVICES if !SMP + select GENERIC_IDLE_LOOP select GENERIC_KERNEL_THREAD select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL_OLD diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 546afed..2bc3edd 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -61,16 +61,8 @@ unsigned long thread_saved_pc(struct task_struct *tsk) return sf->gprs[8]; } -/* - * The idle function on a S390... - */ void arch_cpu_idle(void) { - if (test_thread_flag(TIF_MCCK_PENDING)) { - local_irq_enable(); - return; - } - local_mcck_disable(); if (test_thread_flag(TIF_MCCK_PENDING)) { local_mcck_enable(); @@ -87,6 +79,11 @@ void arch_cpu_idle_exit(void) s390_handle_mcck(); } +void arch_cpu_idle_dead(void) +{ + cpu_die(); +} + extern void __kprobes kernel_thread_starter(void); /* diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index a0042ac..3fb0935 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c @@ -158,8 +158,6 @@ void __kprobes vtime_stop_cpu(void) unsigned long psw_mask; trace_hardirqs_on(); - /* Don't trace preempt off for idle. */ - stop_critical_timings(); /* Wait for external, I/O or machine check interrupt. */ psw_mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_DAT | @@ -169,9 +167,6 @@ void __kprobes vtime_stop_cpu(void) /* Call the assembler magic in entry.S */ psw_idle(idle, psw_mask); - /* Reenable preemption tracer. */ - start_critical_timings(); - /* Account time spent with enabled wait psw loaded as idle time. */ idle->sequence++; smp_wmb(); -- 1.7.12.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:34090 "EHLO e06smtp13.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753050Ab3CWJib (ORCPT ); Sat, 23 Mar 2013 05:38:31 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 23 Mar 2013 09:36:14 -0000 Date: Sat, 23 Mar 2013 10:38:26 +0100 From: Heiko Carstens Subject: Re: [patch 27/34] s390: Use generic idle loop Message-ID: <20130323093826.GC3530@osiris> References: <20130321214930.752934102@linutronix.de> <20130321215235.090816526@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130321215235.090816526@linutronix.de> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Thomas Gleixner Cc: LKML , linux-arch@vger.kernel.org, Linus Torvalds , Andrew Morton , Rusty Russell , Paul McKenney , Ingo Molnar , Peter Zijlstra , "Srivatsa S. Bhat" , Magnus Damm Message-ID: <20130323093826.4vFdVnLkVdnBEtsJOAp8uxzKWcFAJF1ul2d5rxj5Nvw@z> On Thu, Mar 21, 2013 at 09:53:18PM -0000, Thomas Gleixner wrote: > Signed-off-by: Thomas Gleixner > Cc: Heiko Carstens > --- > arch/s390/kernel/process.c | 25 +++++++------------------ > arch/s390/kernel/smp.c | 3 +-- > 2 files changed, 8 insertions(+), 20 deletions(-) Please merge the patch below into your patch to fix some issues. Signed-off-by: Heiko Carstens --- arch/s390/Kconfig | 1 + arch/s390/kernel/process.c | 13 +++++-------- arch/s390/kernel/vtime.c | 5 ----- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index eb8fb62..749513d 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -97,6 +97,7 @@ config S390 select CLONE_BACKWARDS2 select GENERIC_CLOCKEVENTS select GENERIC_CPU_DEVICES if !SMP + select GENERIC_IDLE_LOOP select GENERIC_KERNEL_THREAD select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL_OLD diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 546afed..2bc3edd 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -61,16 +61,8 @@ unsigned long thread_saved_pc(struct task_struct *tsk) return sf->gprs[8]; } -/* - * The idle function on a S390... - */ void arch_cpu_idle(void) { - if (test_thread_flag(TIF_MCCK_PENDING)) { - local_irq_enable(); - return; - } - local_mcck_disable(); if (test_thread_flag(TIF_MCCK_PENDING)) { local_mcck_enable(); @@ -87,6 +79,11 @@ void arch_cpu_idle_exit(void) s390_handle_mcck(); } +void arch_cpu_idle_dead(void) +{ + cpu_die(); +} + extern void __kprobes kernel_thread_starter(void); /* diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index a0042ac..3fb0935 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c @@ -158,8 +158,6 @@ void __kprobes vtime_stop_cpu(void) unsigned long psw_mask; trace_hardirqs_on(); - /* Don't trace preempt off for idle. */ - stop_critical_timings(); /* Wait for external, I/O or machine check interrupt. */ psw_mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_DAT | @@ -169,9 +167,6 @@ void __kprobes vtime_stop_cpu(void) /* Call the assembler magic in entry.S */ psw_idle(idle, psw_mask); - /* Reenable preemption tracer. */ - start_critical_timings(); - /* Account time spent with enabled wait psw loaded as idle time. */ idle->sequence++; smp_wmb(); -- 1.7.12.4