Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp873940pxb; Fri, 13 Aug 2021 08:11:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrXjef1kCZcTTnG62ngK9bkvLD9s2cOeQheB1iP7viyeO+U4rfCWGSzWP2qbp8aLIfFtOi X-Received: by 2002:a92:870b:: with SMTP id m11mr1998515ild.132.1628867506413; Fri, 13 Aug 2021 08:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628867506; cv=none; d=google.com; s=arc-20160816; b=FIe4l9nTg+bEka08KYjyn7O62KhGyFSaY5kLlXYmmM5+9+fpYVakUaBy5ont7/SMT3 pPHrE74uxCZJulv3Q+wpyI+4oPCQedMEEQ6z7+66KITfgOLhIFXZgYlyyhrUiFVRKEkj O4Hjg9mj92mrauygHGWGv41HmQzc93dRD7fJDKXs9ic3qUNgghXmoQZoQ+BD9uQGwk0W QA+GKQNC/rWqA+nMcH3EyCA0if8dsi+yAvfRD+nZfQZvjlnOGrd53Zj9vTOpn9wjFUHd Azh84Dgy8Qs0usjhRyHbryzoUifMjXwoJev0DR6QO5UJcSbQpe00cc80NQqqEJFBl8d7 vfxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fmHKZ1Y5P8zJdDec7coZdCTncA5l6DdfNiyd3EDr4no=; b=mrx7cZLFh92Uymdp7iymbLXCGMGFW0OTsjU2kuKsufoTMTi4agnhkjtLXzRel7EEC7 +4QALEOF2yQ18fs4OQaT4O1883tFyJwWOJ3neq2H27oC6vqTrFQ9TxMgCTg8gxT8O+jO Lfr1bDsv7zfx6f264FKZW0IaCX5nB6Tjzj6xAxxsg5aWs8iov2g3dz6enH7C8Ov0Izyk 4CY1MvNo1MuLZ29y54Eiah6b9w7av2/976YgQKiSYaUCNAHyo0S2kU26EyZ7SyQ7JRUq C3Tm3bZrhO8yA9RuJgDn0KBHziR3xPEp6k7Ukz6EW2mbI/lzumxaP5WQmdSDWxTAkOBi JS3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cv9Ftijk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si1580388ill.152.2021.08.13.08.11.33; Fri, 13 Aug 2021 08:11:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cv9Ftijk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241215AbhHMPJA (ORCPT + 99 others); Fri, 13 Aug 2021 11:09:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:51318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241206AbhHMPIx (ORCPT ); Fri, 13 Aug 2021 11:08:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E0DF86109E; Fri, 13 Aug 2021 15:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867306; bh=WTcoYn764YW43k/A0/6SVzKX1dcFrJatAQAOKKY6Mcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cv9Ftijk+fNhsdmCZkc9Fwi0eW509mbllaGuRLUmzbJ3sdj0A3nqknDtRjw/+kmkE G9dt/j72DMsdS1wUgszkU2g9lyD6MUyo4BEgwvh1OTP9fnxVDB9OKXN68KOgVk9Al2 SrB+oobTFbAPbJCa2iUCOlV34hF0lgYsgbr8SAy4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Prarit Bhargava , Richard Henderson , Ivan Kokshaysky , Matt Turner , Sasha Levin Subject: [PATCH 4.4 20/25] alpha: Send stop IPI to send to online CPUs Date: Fri, 13 Aug 2021 17:06:44 +0200 Message-Id: <20210813150521.373297353@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150520.718161915@linuxfoundation.org> References: <20210813150520.718161915@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Prarit Bhargava [ Upstream commit caace6ca4e06f09413fb8f8a63319594cfb7d47d ] This issue was noticed while debugging a shutdown issue where some secondary CPUs are not being shutdown correctly. A fix for that [1] requires that secondary cpus be offlined using the cpu_online_mask so that the stop operation is a no-op if CPU HOTPLUG is disabled. I, like the author in [1] looked at the architectures and found that alpha is one of two architectures that executes smp_send_stop() on all possible CPUs. On alpha, smp_send_stop() sends an IPI to all possible CPUs but only needs to send them to online CPUs. Send the stop IPI to only the online CPUs. [1] https://lkml.org/lkml/2020/1/10/250 Signed-off-by: Prarit Bhargava Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Matt Turner Signed-off-by: Sasha Levin --- arch/alpha/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 2f24447fef92..1543b571bd99 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -584,7 +584,7 @@ void smp_send_stop(void) { cpumask_t to_whom; - cpumask_copy(&to_whom, cpu_possible_mask); + cpumask_copy(&to_whom, cpu_online_mask); cpumask_clear_cpu(smp_processor_id(), &to_whom); #ifdef DEBUG_IPI_MSG if (hard_smp_processor_id() != boot_cpu_id) -- 2.30.2