Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2994522imu; Mon, 19 Nov 2018 09:07:01 -0800 (PST) X-Google-Smtp-Source: AJdET5edWH0y/csSZNNw8GdAR5cRQ0J4jNp9poFHPgHzcjjgcHF+PmTvOA2PE8I0mvsdtYtwual6 X-Received: by 2002:a63:2222:: with SMTP id i34mr19196878pgi.83.1542647221482; Mon, 19 Nov 2018 09:07:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542647221; cv=none; d=google.com; s=arc-20160816; b=Uea4UCZfbNUHVaJRn8ReD/ewrxfM0MUGJlPDlsJUu693+yRMDjmt9RTJPUduLUxBV7 GoOQQu+MjNtaNh4ypHwcoVGk8Ez/837tDhDe/N1W6WgEsrw6AZbDbNcWT53b/yxerlj4 t+u/sBbAuiSR8rpioYvIam4i7HMuFULBAx1Mn9hQSbWkrWlXrG8pgdOUfHRMGh/er/7W EU4p9B8BVHCDv+vs6ORuXJ5orE+M450wo4/G80mNdhaniUUq2MhzvoEfX7vKToHRAsQh XiwtGsLdyLpBOPvSFVIcnHpUN0iBw0rkP8talYnTkKnEs4mgNJTDgMjVGIAfK4kdQCZr RVsg== 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=eH85aaXQ8utIV0qoMHw3Us39y+fuqmK+CouKS6SjlQo=; b=1HDRbJkVC9aMX/XOhEf0mHABumpyFLazJ1FGsevAFG9A8u2WmuMU6rxGbIxy/AytjN YpUB/amobfax8aOrMFdD9z9HpiwOSthGN8j7b6DbYtOO513qK/cOIQNRIxo1WL70ke0v 67KnmQ1sPDo/vYQxx0U1NlHmCEazysTJQBCjTvVzTGTT+zKtx9vc9lhE2//uQy494b3t aQU0wPejc/6Cc7qLJS4efpDCK7chlgF8yioY+A/MfnoxPup5dw3AhJvewGdH1qMKnnxL L5BoG4O76aJ7Gz7OR9BmX03mJru6f1Xg9zrc4x9g+EMOzL5LXUlJ3BOXdVsvJmqXU4YE bz0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mV9MU+iJ; 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 y5-v6si37468752pgv.38.2018.11.19.09.06.46; Mon, 19 Nov 2018 09:07:01 -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=mV9MU+iJ; 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 S2406823AbeKTD3m (ORCPT + 99 others); Mon, 19 Nov 2018 22:29:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:44428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406762AbeKTD3l (ORCPT ); Mon, 19 Nov 2018 22:29:41 -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 2601B214DA; Mon, 19 Nov 2018 17:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542647123; bh=IulhjosOKyxX6XWZOThxxzN98EQprnHatfCoRkKK3SM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mV9MU+iJjwDz8dnAP/q23cfAr7v2p5zS38RtX2338kIDVHIKV23K3LlC+ysJ9IxQj Ut4o7/+qnac6fdTOKHGdZaaXUZM6XB3uj/cticvLOuTTLQXyqC4b4jxB3iVvmP3Keo TlkbKLKWhBjx/ELIVAEEKkhEriCmHmwpAqEmI98s= 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 3.18 58/90] MIPS: kexec: Mark CPU offline before disabling local IRQ Date: Mon, 19 Nov 2018 17:29:40 +0100 Message-Id: <20181119162630.131797951@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162620.585061184@linuxfoundation.org> References: <20181119162620.585061184@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 3.18-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 @@ -34,6 +34,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 (!cpu_isset(cpu, cpus_in_crash)) crash_save_cpu(regs, cpu); --- a/arch/mips/kernel/machine_kexec.c +++ b/arch/mips/kernel/machine_kexec.c @@ -95,6 +95,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. */