Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3042955imu; Mon, 19 Nov 2018 09:46:11 -0800 (PST) X-Google-Smtp-Source: AJdET5cmQZaakjFc4+01xrQnJiGD/XG1/7OHjzsPuYRcIU9lxtj0x7fPR0opAOiVPqer2qs3lc34 X-Received: by 2002:a17:902:5a4d:: with SMTP id f13mr24021827plm.49.1542649571760; Mon, 19 Nov 2018 09:46:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542649571; cv=none; d=google.com; s=arc-20160816; b=Gp9DHAFQNID3MFh/ru8ywyKvdloP3lpVKA1qSC/+B+6PMuOZxOsQ6uF+CpIkZXGXGe ph/rWGvgkcDc6qQst86SpYuxgrfZcuLdkBvJ4+euUeuljToYX4dNN4K8m73qYBEcRqta /QUc2MC1bW0dzYzL8KH99PYElriSMrBhXgnnueA14UJMLcrxXqmspfHsRxtGKaZ9ubNi lTJ9rEHiKXwFVHyqPjdU4PAkjZEm5hI4AWPZlVaqhie1rNM9neIoD58dRMQMh4A3yXp6 PIEhN4o66g3uWVI0I3EbAwdK/iAnhdxsgZWinxbBLyqMq37gVnktzk7LhWje6lae8oOB wbCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wnGOtKpI1Zs+F0OPlCwBJZfLUJ9Io4IydIhA35vbVL4=; b=Eo7luY6flv6qef0WvSvt8WB3yeAGPiL9kAyBMT1FLlhgUcDHHrQpu6z02nRN6eQZKW 9ArkURCP5gDDt5YuXswTroNy5wkvF1aoeKc2yZJP5l8YUq+X2pu4e9clJvDMARkoidXN RH4gUzfsWNeIDRiKR1woWYCH3M5feekTk59LkJweIeCx3mVdn1+sJmlyWZfDeAQCPMs8 Jb20k3+YCGRmm3qBT58NFaxJ4QV96sq99GhGLHCE35so5tWezGdSSpSClOSKmQlVl12f +ZAuxCQKs5qd4WxgaDZlynUz4yHyjQlcYVkO/BMG/r/1xm+MdLlb74QzzVYM37doCFE1 dkcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w7QGvqey; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si38128331pgg.1.2018.11.19.09.45.44; Mon, 19 Nov 2018 09:46:11 -0800 (PST) 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=@kernel.org header.s=default header.b=w7QGvqey; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389068AbeKTDLb (ORCPT + 99 others); Mon, 19 Nov 2018 22:11:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:47400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388269AbeKTDLa (ORCPT ); Mon, 19 Nov 2018 22:11:30 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 65143214DE; Mon, 19 Nov 2018 16:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542646038; bh=tDTUG7teSzuDFzaPAzwWzI62WVLbrWnlEcydWeJnoiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w7QGvqeyrvMQifGjY14YLjOxZh1e5ANA0JTNLs5GiI5l/zj7rZ0aG+kglsizSYH+5 zSgktHMt1lLt8SrEhWQatedlaJ3H7xh+hx4EZUuxCQEASx8NUL7o3fS+Jgr3Uyrm2j /j+dQYORtrvNzvNs5APVE8+XIQ90DtYgidisC+tY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dengcheng Zhu , Paul Burton , pburton@wavecomp.com, ralf@linux-mips.org, linux-mips@linux-mips.org, rachel.mozes@intel.com, Sasha Levin Subject: [PATCH 4.14 013/124] MIPS: kexec: Mark CPU offline before disabling local IRQ Date: Mon, 19 Nov 2018 17:27:47 +0100 Message-Id: <20181119162615.501249227@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162612.951907286@linuxfoundation.org> References: <20181119162612.951907286@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dengcheng Zhu [ Upstream commit dc57aaf95a516f70e2d527d8287a0332c481a226 ] After changing CPU online status, it will not be sent any IPIs such as in __flush_cache_all() on software coherency systems. Do this before disabling local IRQ. Signed-off-by: Dengcheng Zhu Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20571/ Cc: pburton@wavecomp.com Cc: ralf@linux-mips.org Cc: linux-mips@linux-mips.org Cc: rachel.mozes@intel.com Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/mips/kernel/crash.c | 3 +++ arch/mips/kernel/machine_kexec.c | 3 +++ 2 files changed, 6 insertions(+) --- a/arch/mips/kernel/crash.c +++ b/arch/mips/kernel/crash.c @@ -36,6 +36,9 @@ static void crash_shutdown_secondary(voi if (!cpu_online(cpu)) return; + /* We won't be sent IPIs any more. */ + set_cpu_online(cpu, false); + local_irq_disable(); if (!cpumask_test_cpu(cpu, &cpus_in_crash)) crash_save_cpu(regs, cpu); --- a/arch/mips/kernel/machine_kexec.c +++ b/arch/mips/kernel/machine_kexec.c @@ -118,6 +118,9 @@ machine_kexec(struct kimage *image) *ptr = (unsigned long) phys_to_virt(*ptr); } + /* Mark offline BEFORE disabling local irq. */ + set_cpu_online(smp_processor_id(), false); + /* * we do not want to be bothered. */