Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2585141iob; Fri, 6 May 2022 06:17:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg3eF6PYOS1tzkmQ/+cfC0+vgQIkP5OykwfsdbTwfc93KkcQcDU1WQlEcF3f1NUvB0l8Lj X-Received: by 2002:a05:6402:1e8b:b0:41c:59f6:2c26 with SMTP id f11-20020a0564021e8b00b0041c59f62c26mr3411767edf.156.1651843036299; Fri, 06 May 2022 06:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651843036; cv=none; d=google.com; s=arc-20160816; b=P9bS07qYl+9ig0JzVm5g/VbZyyYeTSP84UOEOTgtaf7Km2FCmApYnBk7Jp8st0267B S2Jta974tZ06ZJ2VtAPliqQC5J/RJcBQhJGYOOaSoCmx4dzCCa1cKqu747XI2Pt4mymc fWegZ5/ysC4Rx1hza9xyPmIvMvC4U2v2iXU2lIQUxIn72UQQFwGYD5t13+TufBp0SlK+ mfPtsYLgzVsPmf6YS7LZwFmRR8RDx7zDQpWHc0uKualf7scSkInznvZL1rEEd52kIGYv osJ9bSYzqwce7syB9TecQWOA7pJR3bsNNcil48/ZJk6Nwaf+iMTglfw2FQcXMkLN/DSC 2f7w== 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=91Y3eyHDv2oPE5BUGhWnk8lPMkawI2F5A+ITpsCtcQ4=; b=utPYITYSsrRxoE4ow1GSvQrRJYeC6Iz8oCHor/LUa+IQnlVXg/gW8SWsFbx7lGP7vD 9Y0HKh04jCwtGI8lVb/51gCsOUEgb4Sdp3cHr9AfVLZhvdzOxupn4/0JE7PPr0gfNz7e 3zrXa4brki0PM1NfY4dBKvQD9VcDg9U1Dx6e9goq4m+gT77kX2692Jiknm8gpw10sblG dALl7MOrHT1E4wwhvgaxKRCbbrRkRTLaCBwCI9Tn0MansaDizDvKEVoaZ+8bZyvKIak1 IYeDFANAVCpylHJ2sJdI4VmJ7aaBkHyTNznRdXp7cE9TM5bxGk3UWGwlYBk2UqC6kQaj LF4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sXJt1j5k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p9-20020a170906604900b006f3845f95f1si4678474ejj.621.2022.05.06.06.16.49; Fri, 06 May 2022 06:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sXJt1j5k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1353834AbiEDQxb (ORCPT + 99 others); Wed, 4 May 2022 12:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353731AbiEDQwL (ORCPT ); Wed, 4 May 2022 12:52:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9D2647053; Wed, 4 May 2022 09:48:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8C3A1B8279F; Wed, 4 May 2022 16:48:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20EB0C385BD; Wed, 4 May 2022 16:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651682908; bh=yd24OcPBlVIUgxJ+YzdgSDislzfz6tX0jHWJ+szSPI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sXJt1j5kuQv5ALCD9/V8GFdWA17rWLN1zbH/0mlSMWwWSSmVSMz94YN3YFgIifquL cl8kQvA+kJilK0ZUttR9660Crc3AP9sOJLxV696PTBlk2ir3ZdnMsTLLlUea0rzkz/ iHdlBnMmhYV3I01yiswY6z4J8OYPsfaHkosLxH8M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudeep Holla , Wang Qing Subject: [PATCH 5.4 26/84] arch_topology: Do not set llc_sibling if llc_id is invalid Date: Wed, 4 May 2022 18:44:07 +0200 Message-Id: <20220504152929.640436437@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504152927.744120418@linuxfoundation.org> References: <20220504152927.744120418@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Qing commit 1dc9f1a66e1718479e1c4f95514e1750602a3cb9 upstream. When ACPI is not enabled, cpuid_topo->llc_id = cpu_topo->llc_id = -1, which will set llc_sibling 0xff(...), this is misleading. Don't set llc_sibling(default 0) if we don't know the cache topology. Reviewed-by: Sudeep Holla Signed-off-by: Wang Qing Fixes: 37c3ec2d810f ("arm64: topology: divorce MC scheduling domain from core_siblings") Cc: stable Link: https://lore.kernel.org/r/1649644580-54626-1-git-send-email-wangqing@vivo.com Signed-off-by: Greg Kroah-Hartman --- drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -457,7 +457,7 @@ void update_siblings_masks(unsigned int for_each_online_cpu(cpu) { cpu_topo = &cpu_topology[cpu]; - if (cpuid_topo->llc_id == cpu_topo->llc_id) { + if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) { cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling); cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling); }