Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3761342pxt; Tue, 10 Aug 2021 10:42:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSiZtIO/NjzSIPxGkOcK7q5pkLSSYL8c0S5xfksUKxPxPON08SmHmncESfR2JCGLaP8LTr X-Received: by 2002:a17:906:cb11:: with SMTP id lk17mr15329854ejb.271.1628617340907; Tue, 10 Aug 2021 10:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617340; cv=none; d=google.com; s=arc-20160816; b=VMsKrkNvaSN5rUCITeT6IyvhzRWnEtGJlW46bPg5MW3+3DXH5S7i/TCkeZVw2LQg9K HJGf04F20ZetzfVszL8GwFdKLKsHsyHHKWnnWogCbdK6F/Nh1g+al1AZ2O4VkwGd+ArE MmUZ2qy+qAONDpiSyL6P/+ux57UC0G1fq3/3GiCxkfVcTCPWxe22pUTIYnNJhmyupyvZ uSLUNjGR5hmqquF7YN1tkL8GsG7K4mDTCjyUMjGe4jVtUBhIjkZzJywmHAM17Olhv4Ux 4u4Hj5PYZdMwFa6H9fdLUsgPgyucrAWEpfK9VkOnR3aPit5DSEX6rqyBPOXyPPN1i5J1 fXNw== 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=FSU8AnqG92CeHnxY65VcyhtuQKWObu0z2Q8OZ6xkPt0=; b=Ix/RWv5Te0cJnoF3v1z7Y3af1uI6YVxNM27rOOHJLRKWH2jptuu8LEM6f9Jd52rBbC cabMSIy8E5Ys7veS8yAseRf0cMq/jGtINQwIGaDpbu3gvzHdc1+WZsCmkuW7/fFXIyWC 6uNZfeBQPz3Y2EUZYuxIQftTKSZvOj6Nq2KjKGtZIboSLSlS7kGB7vQwr5tt6LMm3l3/ fNozbSZbb90bIQheTQ8ozRGE+Zpk7bL0BTCzLQGTfeIhKmVCRFQ7Vjc9qNuzAI1x52Lz FS1ayXLBkr/I4lwsZnQzWbq25R9c0xgTCSLXWkLPr93IPRH+MbNf0HZxPlRsRrSBoArA 218Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=td8SUrcl; 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 hr12si24079701ejc.464.2021.08.10.10.41.56; Tue, 10 Aug 2021 10:42:20 -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=td8SUrcl; 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 S233529AbhHJRgq (ORCPT + 99 others); Tue, 10 Aug 2021 13:36:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:36868 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232253AbhHJRdk (ORCPT ); Tue, 10 Aug 2021 13:33:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 07A4E61075; Tue, 10 Aug 2021 17:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616798; bh=SryW2t5Ze+b9tM3zx8bHTZ7bmm+Zqps8jt+VAt59OcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=td8SUrclf9GvviuIdw9pqZyjNuUbajJYK0JomuYhlp+vnM4BVfJ3XE6UNqOdBxeXe aomIBwmU28JI85zReNCSDS5Ez58rwUApOKeahOTkLXEIlhrtBrnbHepw99g15VoktO brH4drklsm3ddkztjZdKZz8FBcxxEZvkbhy2G0+Y= 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.19 52/54] alpha: Send stop IPI to send to online CPUs Date: Tue, 10 Aug 2021 19:30:46 +0200 Message-Id: <20210810172945.923147335@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172944.179901509@linuxfoundation.org> References: <20210810172944.179901509@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 d0dccae53ba9..8a89b9adb4fe 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