Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp875277pxb; Fri, 13 Aug 2021 08:13:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnLih04OWbp2lQefomvib6Xk+Z0lh6pb09Ic2MvVhNNLndxHLnxoMxC8O8Ozq88bn9Irnn X-Received: by 2002:a92:cccd:: with SMTP id u13mr2160097ilq.13.1628867593427; Fri, 13 Aug 2021 08:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628867593; cv=none; d=google.com; s=arc-20160816; b=JnN42mmDnpvQ0bF8wXz5K7OeO2xT7TN9FkLp5RBgLqhoUEG7HWSmZgZsIvsBicuTT/ tHo63JePLqAvkf84JQvvWGFbNcBRYm0rYwntfRZW6+bg36M6S0XC2SWjXKi/9Rta8GHf vofehI6WYdPoQjyFFyF4iRS2jduPYKBadmUHLAsIuns2yDjd+Rf6xX57OchTHkeV85Px MwFV/OWr0Lz29Y4v6orjKa+BOfL83fQOdvvtYx8tvEOnFnKjMyU9raSbq72gXcFgt9Sj q97jDO0bDov12yZX5YBJZ0dxsU3BhbXEQyB1fJxSRi0Wz7gELgjuVkgDc+Y7C++MFTuW LalQ== 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=mlTadJshe6yRf0eDnTV5eiYkUOCFwoFcbHdp5uemv4M=; b=j2F2UyDGMWRaOU8RZSN6vfWX/AzT69vPjyTnY1W4lA64sf+Y09NkV9ugJR2YO9BEoM uZuktAvpQBlAg3MUI5vmjSsCRDslF+pPBkR7F95J14A91fMY8zQwpu6sRGECA2jn1/ZV aBG4dyTAU4jh2tWtIPzTggk3FCy864Tu/O1fMP44i8u0Jg94a7gw8CjGCU9kwemwxL2C sNAOaG+ZOoVqd4hSMrXbqtrRW+C19cCr3RtxOQsKBtWf9Ho9nb4MyLJ4Bbgb8QE4+LWN OPN2c6du+avE+ByKe5CIL9la0W1zmt9EVK1F67VDeuSKxF0FR3xbPgIhimZjcLU2hDyT vRTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yBjKoMH+; 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 a6si1854919iol.59.2021.08.13.08.13.01; Fri, 13 Aug 2021 08:13:13 -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=yBjKoMH+; 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 S241768AbhHMPLN (ORCPT + 99 others); Fri, 13 Aug 2021 11:11:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:54020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241596AbhHMPKg (ORCPT ); Fri, 13 Aug 2021 11:10:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BBED4610F7; Fri, 13 Aug 2021 15:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867409; bh=LYjyc63jsorzTTicwAcsOut1pYnO/rIODKOVBZpAcPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yBjKoMH+OrfgSJ13q8lSpBzr38SECm4q7vS+ByltK8O7/vHqAbkGsPjo+2HRLugV8 EdBgjZDUuEiq/CqLFio8+vufL0Gcmlw0HpfWdQAwWQ/b9b23YCHuvr/H/llJ7rPSEH 94jaCgXN3XO397bFZI/ugGE4G9VWZMfPXvumUBV8= 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.9 25/30] alpha: Send stop IPI to send to online CPUs Date: Fri, 13 Aug 2021 17:06:53 +0200 Message-Id: <20210813150523.264565868@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150522.445553924@linuxfoundation.org> References: <20210813150522.445553924@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 46bf263c3153..d2477a502ce7 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