Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3762236pxt; Tue, 10 Aug 2021 10:43:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIolpOpLqohDhXE8Fv8GAJM7lQwkjbGU2Vtc/WFkE2S/mk1/Uhk2PjjMFgssDvIUrYOVjJ X-Received: by 2002:a05:6638:624:: with SMTP id h4mr28992021jar.73.1628617422248; Tue, 10 Aug 2021 10:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617422; cv=none; d=google.com; s=arc-20160816; b=u4cd8VOAfCj6QLC/aStuTgryHz6v75HUqlYFSpURizghjN1SU+hVKLxEU2FttpqEY5 rBL/rv5oNSLAEHvQ3ML+jilnkZD+3ubyr/WJzxJ1BK0lG9Kab53ZF/YaixrsyqJuyMr3 7pGqJyLbgvuTf0RpLZWBaNlpZYPBbN1HHBOt8zwZdbkjfYPLYF0U637AYo9NSWYuSkXK LIKgQthhTqKpkWLAWZ18rKoB4WejzbnNWOjy7KIwd9usFkEEwtfU7IFgUxohtohrPhOY L/v67coZBdVyNNcJBndHC3wfVtwRvHAQ+AcR/rR6FWEAO6aPYnl5fvQ0Mpf9XwMpwu4e Wdlw== 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=G4vCG3F+vMRWQyv675fG+63GfI4fPt2TyJpyfdLL254=; b=T/LBmZkLDzHI7MCoa5mAoGEHmFaTuvQL0Zm8T00vmPrGTd1xH/zv5yief6852q+ziF kDHGDUFxyyKNA/tgvyA/vWedROykEnw4sTJFcZzechgj+XyRl4sm7e1CdRWiHtlKVzED Mo9XSnfuSBzof0lG2j/iuvPHgA/hVFajYDVwxuo3UJ29ZnU17TCR7YxrRqgWVI93wd/Z 1+vdT64nCiNmgn2oLA2xhsuacWSjrRO5XnuOtvh+72SjGLrPJxJFxLOGwPMfQGQUwy6C ZZPQv1G3exIZg0qDZcV0DWBlTmWMuwqzNeu7HjyPtL10SseVaa4xVjZFZPUv4hSOx2W0 7vEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=funaZwca; 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 f13si23162673ils.29.2021.08.10.10.43.30; Tue, 10 Aug 2021 10:43:42 -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=funaZwca; 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 S235198AbhHJRmB (ORCPT + 99 others); Tue, 10 Aug 2021 13:42:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:42218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234925AbhHJRib (ORCPT ); Tue, 10 Aug 2021 13:38:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4305E610FC; Tue, 10 Aug 2021 17:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616995; bh=SWzNVkkJN/YQ3UperAk+X4Zg45n7gU01oc91TaBOFXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=funaZwca8/dcF8sa+EWBb2iQUgy62v2igYSGE2JvRLlg9JbW5ol2FgeQutKRK7uAP k1gNmlSdaT+YAaoi+jrVBO4ya/sqIrL8LdsUW1IJpTNsyt5pOx0sr0cJRiAiXfvUWJ +igYasGaYCmbODZQC/nX6oG16R8jHft/zRVGo6Wk= 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 5.4 83/85] alpha: Send stop IPI to send to online CPUs Date: Tue, 10 Aug 2021 19:30:56 +0200 Message-Id: <20210810172951.040721062@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172948.192298392@linuxfoundation.org> References: <20210810172948.192298392@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 5f90df30be20..06fd42417aa9 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -585,7 +585,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