From patchwork Sun Oct 8 14:12:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 115158 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp1590684qgn; Sun, 8 Oct 2017 07:13:15 -0700 (PDT) X-Received: by 10.98.30.67 with SMTP id e64mr7620868pfe.127.1507471995834; Sun, 08 Oct 2017 07:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507471995; cv=none; d=google.com; s=arc-20160816; b=zBrVlH7sHVYLgrP++UmOpLsJAY8yigbKOmOhcZlQe+3f5aphyWS6uuX/Gdw2+wN1vd SGaKzu+Lkuzejoxch2zIsV7muDJw/MuOtyq8sxSZ+wsEPveWcdxLMpqhn7c20BqjCf1T 47PXij1H2zXKdTon5DP34TeLZqAmVkL72JY7xASlYsqO1A4QOjGMfvIq7u8nLbuLXI/T 12S+kznp8IPPGEl2WY0hECH3tAswSUQKdH3JNqDtLumEep/XoUQK2dwEK5NQnQvXEjXa 7N6kjoPsLUIDsRm3tbd/w00fZ6JyAy5KznsddrLiJ1GNzBnWV5r0y20dwaCdck1SpGe6 cmag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=RlI6fz2fJ8lC4okemcvVARtP9J9//7zHDE+R2p2mSfo=; b=aweEN/V0eGNIzNrpmzzZlvIoXxPfpXI8qhc8EEVhoHajV7UE/QUFJLLy3iWMBo0+wN YBJ4b5M40oOs0lVzMy888Mc2Ajzfd9S4ty1WUJsABtvr4OFSSrNXEBNm3NEkIv6TzUG1 Y5CiWL0ZxP+KFSVqe4vnRrpg+SE9OntSUixEsRvLHsfVro2kGlajMLkUv9M1t+9cbuC1 a218Zz6A+qzkNGu5E4zGz9rjHXJrYQ5FzgO7gHlAhkTURF2jFZLFFx3BLq8RlSg+Yn1A Bdj9UFrp7HuA02w7WSz07Ccj37SumPY7lVwobW1IzFsTqMygRGkMrRCnhJBgQ+NC9A+w JQkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ihsj15Su; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si3281497plz.641.2017.10.08.07.13.11; Sun, 08 Oct 2017 07:13:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ihsj15Su; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753505AbdJHONJ (ORCPT + 26 others); Sun, 8 Oct 2017 10:13:09 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:48646 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751639AbdJHONI (ORCPT ); Sun, 8 Oct 2017 10:13:08 -0400 Received: by mail-pf0-f172.google.com with SMTP id n24so11542812pfk.5 for ; Sun, 08 Oct 2017 07:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=RlI6fz2fJ8lC4okemcvVARtP9J9//7zHDE+R2p2mSfo=; b=ihsj15SuNPO3/MmpBPwaGzjNqtg5WvplB4DmzwkG3aQdWx0At3/JSMhGiXvnqMd/N0 7qHp74A7EjDz1/94c9cvyofhEooU3axCyv7nhTtNdXYo0D1FoxAyUkjlYBjJ+aBClVQ7 K8mbRyYFjWPpn0wQloyIE20JwZoA5eM+zW8u0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RlI6fz2fJ8lC4okemcvVARtP9J9//7zHDE+R2p2mSfo=; b=ga0qIoq7N2Dz9pgfSGZKabdI/j9L6Y1e6GPlHsFt2Tk4MKQqUv8KF6fdmIrU4WsayE C0BJt3BAbWz4jftQ30aZ4gwX7LhwD8SvxzstiQFcfwoVVTiJ6aH7uvuF7vXDzBMwBrdc Eoi0j3nm7oIvJg0TYSnfgvpuP+HpOWU+F/63ZXq6LdOT351BRNlkng9vF9ZKkIBdQxTs ZGOJ2qXLVfL2hRnOCp2ISRnfRQWvewLlX/ozfRGEun24lDhBtnp7y9ceIE1bAHHVSPON mffng8PaLh7NsVOj/K84xunpexlA2yusS4XpHV45K1lMzS9qtPVSwBRCUBuwYWrSvX4c rL7Q== X-Gm-Message-State: AMCzsaWhOL9cWaCHO7ivhBp1m9iggPjE4PPnJelcLgc0I6pa4d8rtMf/ j5LG5Fi44iE7dbyrAdVyUtYXeg== X-Google-Smtp-Source: AOwi7QAob5zce/OHbiLkkU78BZg+zQYdbr3vUG4FoHucq66wrQqFhwP68mT+wBIpAk4HAkm7naRByQ== X-Received: by 10.84.176.100 with SMTP id u91mr6990310plb.10.1507471986362; Sun, 08 Oct 2017 07:13:06 -0700 (PDT) Received: from localhost.localdomain (li1068-205.members.linode.com. [106.184.3.205]) by smtp.gmail.com with ESMTPSA id q62sm9422413pga.75.2017.10.08.07.12.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Oct 2017 07:13:04 -0700 (PDT) From: Leo Yan To: Catalin Marinas , Will Deacon , Mark Rutland , James Morse , AKASHI Takahiro , Hoeun Ryu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Leo Yan , Mathieu Poirier Subject: [PATCH] arm64: kdump: Avoid to power off nonpanic CPUs Date: Sun, 8 Oct 2017 22:12:46 +0800 Message-Id: <1507471966-15367-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit a88ce63b642c ("arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores") introduces ARM64 architecture function crash_smp_send_stop() to replace the weak function, this results in the nonpanic CPUs to be hot-plugged out and CPUs are placed into low power state on ARM64 platforms with the flow: Panic CPU: machine_crash_shutdown() crash_smp_send_stop() smp_cross_call(&mask, IPI_CPU_CRASH_STOP) Nonpanic CPUs: handle_IPI() ipi_cpu_crash_stop() cpu_ops[cpu]->cpu_die() The upper patch has no issue if enabled crash dump only; but if enabled crash dump and Coresight debug module for panic dumping at the meantime, nonpanic CPUs are powered off in crash dump flow, later this may introduce conflicts with the Coresight debug module because Coresight debug registers dumping requires the CPU must be powered on for some platforms (e.g. Hi6220 on Hikey board). If we cannot keep the CPUs powered on, we can see the hardware lockup issue when access Coresight debug registers. To fix this issue, this commit removes CPU hotplug operation in func crash_smp_send_stop() and let CPUs to run into WFE/WFI states so CPUs can still be powered on after crash dump. This finally is more safe for Coresight debug module to dump registers and avoid hardware lockup. Cc: James Morse Cc: Will Deacon Cc: Catalin Marinas Cc: Mathieu Poirier Signed-off-by: Leo Yan --- arch/arm64/kernel/smp.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.7.4 diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 9f7195a..a65e68b 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -856,12 +856,6 @@ static void ipi_cpu_crash_stop(unsigned int cpu, struct pt_regs *regs) local_irq_disable(); -#ifdef CONFIG_HOTPLUG_CPU - if (cpu_ops[cpu]->cpu_die) - cpu_ops[cpu]->cpu_die(cpu); -#endif - - /* just in case */ cpu_park_loop(); #endif }