From patchwork Fri Jul 26 05:41:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Kilari X-Patchwork-Id: 2833790 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9DC9D9F4E2 for ; Fri, 26 Jul 2013 05:42:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83B0520173 for ; Fri, 26 Jul 2013 05:42:54 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3666F2016C for ; Fri, 26 Jul 2013 05:42:53 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2anZ-0004Hf-KA; Fri, 26 Jul 2013 05:42:41 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2anX-0006oT-EA; Fri, 26 Jul 2013 05:42:39 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2anT-0006ng-6z; Fri, 26 Jul 2013 05:42:36 +0000 Received: by mail-pa0-f48.google.com with SMTP id kp13so1640489pab.35 for ; Thu, 25 Jul 2013 22:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=0lc1OEshpWCNcJYM2d4JsCjvq9RV8pThptqtn+7qZvU=; b=o5t4IBJXeEBuU4VK6xMieGrn58jHynsBuVHIPkRLjz5TT6dBF8AnFnnIlvWL/vhNyg r3sT0b+uauu0hToHv4ZNwCkwECDc9CG0mvlFyX5ecg2KXwhKefLMFdDvQ60oRT9z89QG jzTkuyQCEQqQ4k1fGYRUhFyN/b14WAx3WTKx1JeW5MJubiE4/ISnFdtXWaaye3maJ5bV QT1hGyvQGq2RGbqc3td7CYIP00GRvksj5xoRp6qXRrWOdGtw2Gk95Eo1rMHoyxjjNyH7 CMVwIJrHp/9xezIjB0ufiUfOEHsoO40DxG0gzsCC8J9HqJ7OrUXFXcMkDnYzZKdC0z2K 6e2w== X-Received: by 10.66.142.42 with SMTP id rt10mr34260428pab.1.1374817331126; Thu, 25 Jul 2013 22:42:11 -0700 (PDT) Received: from ubuntu.caveonetworks.com ([115.119.134.194]) by mx.google.com with ESMTPSA id w8sm1467500paj.4.2013.07.25.22.42.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Jul 2013 22:42:10 -0700 (PDT) From: vijay.kilari@gmail.com To: kexec@lists.infradead.org Subject: [PATCH] ARM: kexec: offline non panic CPUs on Kdump panic Date: Fri, 26 Jul 2013 11:11:27 +0530 Message-Id: <1374817287-27952-1-git-send-email-vijay.kilari@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130726_014235_391208_210DF294 X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: Prasun.Kapoor@caviumnetworks.com, linux@arm.linux.org.uk, Vijaya Kumar K , will.deacon@arm.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vijaya Kumar K In case of normal kexec kernel load, all cpu's are offlined before calling machine_kexec() under kernel_kexec() function. But in case crash panic cpus are relaxed in machine_crash_nonpanic_core() SMP function but not offlined. When crash kernel is loaded with kexec and on panic trigger machine_kexec() checks for number of cpus online. If more than one cpu is online machine_kexec() fails to load with below error kexec: error: multiple CPUs still online In machine_crash_nonpanic_core() SMP function, offline CPU before cpu_relax Signed-off-by: Vijaya Kumar K --- arch/arm/kernel/machine_kexec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 4fb074c..163b160 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c @@ -73,6 +73,7 @@ void machine_crash_nonpanic_core(void *unused) crash_save_cpu(®s, smp_processor_id()); flush_cache_all(); + set_cpu_online(smp_processor_id(), false); atomic_dec(&waiting_for_crash_ipi); while (1) cpu_relax();