From patchwork Fri May 9 00:48:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 4139761 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3B4A2BFF02 for ; Fri, 9 May 2014 00:50:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8048D202EA for ; Fri, 9 May 2014 00:50:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B731F202DD for ; Fri, 9 May 2014 00:50:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WiYz8-0004He-P9; Fri, 09 May 2014 00:48:22 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WiYz5-0004G3-Uy; Fri, 09 May 2014 00:48:20 +0000 Received: from geoff by merlin.infradead.org with local (Exim 4.80.1 #2 (Red Hat Linux)) id 1WiYz3-0007in-J6; Fri, 09 May 2014 00:48:17 +0000 Message-Id: <56b0c0f2834cba63db1f75966f2ee756ab347205.1399594544.git.geoff@infradead.org> In-Reply-To: References: From: Geoff Levand Patch-Date: Wed, 7 May 2014 13:00:32 -0700 Subject: [PATCH 3/8] arm64: Add spin-table cpu_die To: Catalin Marinas , Will Deacon Date: Fri, 09 May 2014 00:48:17 +0000 Cc: Deepak Saxena , kexec@lists.infradead.org, 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=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, 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 Add two new minimal routines smp_spin_table_cpu_disable() and smp_spin_table_cpu_die() and hook them up to the smp_spin_table_ops instance. Kexec support will use smp_spin_table_cpu_die() for re-boot of spin table CPUs, but also needs a compatible smp_spin_table_cpu_disable() to allow execution to reach smp_spin_table_cpu_die(). Signed-off-by: Geoff Levand --- arch/arm64/kernel/smp_spin_table.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c index 7a530d2..26c780b 100644 --- a/arch/arm64/kernel/smp_spin_table.c +++ b/arch/arm64/kernel/smp_spin_table.c @@ -142,10 +142,23 @@ static void smp_spin_table_cpu_postboot(void) raw_spin_unlock(&boot_lock); } +static int smp_spin_table_cpu_disable(unsigned int cpu) +{ + return 0; +} + +static void smp_spin_table_cpu_die(unsigned int cpu) +{ + while (1) + cpu_relax(); +} + const struct cpu_operations smp_spin_table_ops = { .name = "spin-table", .cpu_init = smp_spin_table_cpu_init, .cpu_prepare = smp_spin_table_cpu_prepare, .cpu_boot = smp_spin_table_cpu_boot, .cpu_postboot = smp_spin_table_cpu_postboot, + .cpu_disable = smp_spin_table_cpu_disable, + .cpu_die = smp_spin_table_cpu_die, };