Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2954844imu; Mon, 19 Nov 2018 08:34:31 -0800 (PST) X-Google-Smtp-Source: AJdET5fNCA2KkJeaK+DAevc41Yr1xi2iIqL3lXdE4Z246xA9fvgzBzd1TajszI8y5kuk91g0rpiZ X-Received: by 2002:a62:9657:: with SMTP id c84mr10045053pfe.77.1542645270990; Mon, 19 Nov 2018 08:34:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645270; cv=none; d=google.com; s=arc-20160816; b=ALpEv0GO/Q2blgc/KfngS35KNNh7K9ejUhLgGs0p9ibXNPIY29yUP6yeWViERscPqe Xuk/g6cIIQrzffqlKII4CuwPWmkQVOw1d9oCIRy/xIWLLXEnWoBV9LabPTPoxTxZwSeq cSrK8ZkmLYTWGRDLqx6g6oQ9stvELW3E4sN0ois1X+MzMGq6/Dv7Ms9WBr5XbSH5DS9f CBZ6yAjHUA1c6alNWy9uX1zr/6Ji7c8QTuSohAaASyeq16Ez6/9NDYV7anDm7u07tJKv Orpn36MipIM+Ksa3JJgTKMhLC+JOlzxBBdGLm9JKmPK7k9HJQPFVuWUi6nm6zMK96Ua9 Ivrw== 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=Bv+M8gaU7PA0L9AVdPuTCMK3C5cP1eINO+dl9kEdFq8=; b=V/xL9IqbhfWAVlTlNMo2NMxxPTNwsO1F9IgaEeMsPwU5v2OiFD58H2lGX866+JOAHJ XomSMjiRT/g+POWr5NSuDYw9mfbUF14lhUuaJHRlaw/2HcSzuwfpqE2DqZFgX3NA/+vm 0219rRB0aaHUOqsogqyJMcF+kJmhgojgxvTXBUalkPv/nbW5BzUjeDoKFlZfDCPjXKjL DMdX1uA523cznehhLdPecxhDlf0w8zD3UAouFaNUrnWHpM/qqTJYaS0VTKwW65CUE2Vl k28AH7F75owZpgp8RplO5l+WEB9jNyaZ7ZdqdEQq3FMNHL3q+7x+Huy2R7lqG8wwjoEp J8Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YdNUsozZ; 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 a23si5169568plm.334.2018.11.19.08.34.12; Mon, 19 Nov 2018 08:34:30 -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=YdNUsozZ; 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 S1730943AbeKTC5C (ORCPT + 99 others); Mon, 19 Nov 2018 21:57:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:55478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730193AbeKTC5B (ORCPT ); Mon, 19 Nov 2018 21:57:01 -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 E89502086A; Mon, 19 Nov 2018 16:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645174; bh=y37n2POu0wVDnGWEp4rOO598CCjYLdQZYW8f/Zqwgpg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YdNUsozZ7m2/ZLJJRtAsR2anipUHBp97+bNgnCk+3AiTnSoiCW8b9Jh59Dk026z+s eirlhRqu+B9OHZsZn//plqMQ4yNRLvjDk8CPt0L+anRfxIsGmnXPDuFotsgdmxCCY4 iTx18M4B9oiEL4eysAG0UY1Fux6BH59yOM2BWp4w= 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.19 025/205] MIPS: kexec: Mark CPU offline before disabling local IRQ Date: Mon, 19 Nov 2018 17:25:32 +0100 Message-Id: <20181119162621.972351080@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@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.19-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. */