This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Wed May 1 10:19:18 2024 Envelope-to: j@jasper.es Delivery-date: Tue, 25 Jun 2013 22:47:31 +0200 Received: from localhost ([127.0.0.1] helo=squeeze.vs19.net) by squeeze.vs19.net with esmtp (Exim 4.80) (envelope-from ) id 1Ura9D-0001v2-6S for j@jasper.es; Tue, 25 Jun 2013 22:47:31 +0200 Original-Recipient: rfc822;jasper@telfort.nl Received: from pop3.telfort.nl [213.75.3.52] by squeeze.vs19.net with POP3 (fetchmail-6.3.18) for (single-drop); Tue, 25 Jun 2013 22:47:31 +0200 (CEST) Received: from cpxmta-msg05.kpnxchange.com (10.94.114.26) by cpxmbs-msg01.support.local (8.6.060.20) id 51B06D95003E7108 for jasper@telfort.nl; Tue, 25 Jun 2013 22:35:07 +0200 Received: from cpsmtpb-ews09.kpnxchange.com (213.75.39.14) by cpxmta-msg05.kpnxchange.com (8.6.060.14) id 51AE8066023F08D3 for jasper@telfort.nl; Tue, 25 Jun 2013 22:35:07 +0200 Received: from cpsps-ews13.kpnxchange.com ([10.94.84.180]) by cpsmtpb-ews09.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Tue, 25 Jun 2013 22:35:07 +0200 Received: from vger.kernel.org ([209.132.180.67]) by cpsps-ews13.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Tue, 25 Jun 2013 22:35:07 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753903Ab3FYUew (ORCPT ); Tue, 25 Jun 2013 16:34:52 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:48446 "EHLO e23smtp03.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753768Ab3FYUes (ORCPT ); Tue, 25 Jun 2013 16:34:48 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 26 Jun 2013 06:25:19 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 26 Jun 2013 06:25:15 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 7FF8A2CE8044; Wed, 26 Jun 2013 06:34:42 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r5PKJhjd4784476; Wed, 26 Jun 2013 06:19:43 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r5PKYdhm026786; Wed, 26 Jun 2013 06:34:42 +1000 Received: from srivatsabhat.in.ibm.com ([9.79.199.80]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r5PKYWn8026734; Wed, 26 Jun 2013 06:34:33 +1000 From: "Srivatsa S. Bhat" Subject: [PATCH v2 31/45] alpha/smp: Use get/put_online_cpus_atomic() to prevent CPU offline To: tglx@linutronix.de, peterz@infradead.org, tj@kernel.org, oleg@redhat.com, paulmck@linux.vnet.ibm.com, rusty@rustcorp.com.au, mingo@kernel.org, akpm@linux-foundation.org, namhyung@kernel.org, walken@google.com, vincent.guittot@linaro.org, laijs@cn.fujitsu Cc: rostedt@goodmis.org, wangyun@linux.vnet.ibm.com, xiaoguangrong@linux.vnet.ibm.com, sbw@mit.edu, fweisbec@gmail.com, zhong@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, srivatsa.bhat@linux.vnet.ibm.com, linux-pm@vger.kernel.org, linux-arch@vger.kernel.or Date: Wed, 26 Jun 2013 02:01:18 +0530 Message-Id: <20130625203118.16593.49712.stgit@srivatsabhat.in.ibm.com> In-Reply-To: <20130625202452.16593.22810.stgit@srivatsabhat.in.ibm.com> References: <20130625202452.16593.22810.stgit@srivatsabhat.in.ibm.com> User-Agent: StGIT/0.14.3 Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13062520-6102-0000-0000-000003C1C4A7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-Id: X-Mailing-List: linux-kernel@vger.kernel.org X-OriginalArrivalTime: 25 Jun 2013 20:35:07.0168 (UTC) FILETIME=[7AC6B200:01CE71E3] X-RcptDomain: telfort.nl Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Thomas Gleixner Cc: linux-alpha@vger.kernel.org Signed-off-by: Srivatsa S. Bhat --- arch/alpha/kernel/smp.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 7b60834..e147268 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -497,7 +497,6 @@ smp_cpus_done(unsigned int max_cpus) ((bogosum + 2500) / (5000/HZ)) % 100); } - void smp_percpu_timer_interrupt(struct pt_regs *regs) { @@ -681,7 +680,7 @@ ipi_flush_tlb_mm(void *x) void flush_tlb_mm(struct mm_struct *mm) { - preempt_disable(); + get_online_cpus_atomic(); if (mm == current->active_mm) { flush_tlb_current(mm); @@ -693,7 +692,7 @@ flush_tlb_mm(struct mm_struct *mm) if (mm->context[cpu]) mm->context[cpu] = 0; } - preempt_enable(); + put_online_cpus_atomic(); return; } } @@ -702,7 +701,7 @@ flush_tlb_mm(struct mm_struct *mm) printk(KERN_CRIT "flush_tlb_mm: timed out\n"); } - preempt_enable(); + put_online_cpus_atomic(); } EXPORT_SYMBOL(flush_tlb_mm); @@ -730,7 +729,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) struct flush_tlb_page_struct data; struct mm_struct *mm = vma->vm_mm; - preempt_disable(); + get_online_cpus_atomic(); if (mm == current->active_mm) { flush_tlb_current_page(mm, vma, addr); @@ -742,7 +741,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) if (mm->context[cpu]) mm->context[cpu] = 0; } - preempt_enable(); + put_online_cpus_atomic(); return; } } @@ -755,7 +754,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) printk(KERN_CRIT "flush_tlb_page: timed out\n"); } - preempt_enable(); + put_online_cpus_atomic(); } EXPORT_SYMBOL(flush_tlb_page); @@ -786,7 +785,7 @@ flush_icache_user_range(struct vm_area_struct *vma, struct page *page, if ((vma->vm_flags & VM_EXEC) == 0) return; - preempt_disable(); + get_online_cpus_atomic(); if (mm == current->active_mm) { __load_new_mm_context(mm); @@ -798,7 +797,7 @@ flush_icache_user_range(struct vm_area_struct *vma, struct page *page, if (mm->context[cpu]) mm->context[cpu] = 0; } - preempt_enable(); + put_online_cpus_atomic(); return; } } @@ -807,5 +806,5 @@ flush_icache_user_range(struct vm_area_struct *vma, struct page *page, printk(KERN_CRIT "flush_icache_page: timed out\n"); } - preempt_enable(); + put_online_cpus_atomic(); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/