From patchwork Fri Feb 19 10:25:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 8359261 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A448A9F38B for ; Fri, 19 Feb 2016 10:25:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 021A42041C for ; Fri, 19 Feb 2016 10:25:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 58AF92041B for ; Fri, 19 Feb 2016 10:25:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992702AbcBSKZc (ORCPT ); Fri, 19 Feb 2016 05:25:32 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:57334 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992584AbcBSKZS (ORCPT ); Fri, 19 Feb 2016 05:25:18 -0500 Received: from ayla.of.borg ([84.195.106.123]) by andre.telenet-ops.be with bizsmtp id LARF1s00u2fm56U01ARFAA; Fri, 19 Feb 2016 11:25:15 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1aWiFP-0002YW-Jm; Fri, 19 Feb 2016 11:25:15 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1aWiFR-00021S-43; Fri, 19 Feb 2016 11:25:17 +0100 From: Geert Uytterhoeven To: Simon Horman , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] [RFC/RFT] ARM: shmobile: emev2: Add CPU hotplug ops Date: Fri, 19 Feb 2016 11:25:13 +0100 Message-Id: <1455877513-7680-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 When doing s2ram, emev2/kzm9d crashes during system suspend with CPU1: smp_ops.cpu_die() returned, trying to resuscitate Unable to handle kernel NULL pointer dereference at virtual address 00000104 As of commit d62242d7f63d6c87 ("ARM: shmobile: Remove partial CPU Hotplug from EMEV2"), there's no longer an smp_ops.cpu_die() callback. Add standard SCU-based hotplug callbacks like on other Cortex-A9 SoCs to fix the crash during suspend. Signed-off-by: Geert Uytterhoeven --- This fixes the crash during the suspend phase, but I have no idea if resume actually works. I didn't manage to resume the machine after enabling wake-up on ttyS0 (remote access only). Can anyone with physical access to emev2/kzm9d please check if pressing a button resumes the system? Thanks! --- arch/arm/mach-shmobile/smp-emev2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c index 3a732199cf5e98c0..e6e8f2298a6a4786 100644 --- a/arch/arm/mach-shmobile/smp-emev2.c +++ b/arch/arm/mach-shmobile/smp-emev2.c @@ -53,4 +53,9 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) const struct smp_operations emev2_smp_ops __initconst = { .smp_prepare_cpus = emev2_smp_prepare_cpus, .smp_boot_secondary = emev2_boot_secondary, +#ifdef CONFIG_HOTPLUG_CPU + .cpu_can_disable = shmobile_smp_cpu_can_disable, + .cpu_die = shmobile_smp_scu_cpu_die, + .cpu_kill = shmobile_smp_scu_cpu_kill, +#endif };