Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2419367iob; Fri, 6 May 2022 02:21:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx8J5QkBwCvTeEDmu7NP+WfrLvWZTH7IVhMbgvqp/doZpr40ET3P88mpuiVAT/c437E9dL X-Received: by 2002:a17:907:6e88:b0:6da:8f01:7a8f with SMTP id sh8-20020a1709076e8800b006da8f017a8fmr2099953ejc.619.1651828895016; Fri, 06 May 2022 02:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651828895; cv=none; d=google.com; s=arc-20160816; b=Tmr4u2I37os1tyaNh38UPCcYlp9a/ouV+ORN15FM2aGeoACBZ1A8rgq/zoHYwgD55v TDKzvpwg3BjYMz7qiojmqsYqnpt5GiIPChTpBVIUJY/Su4CN+CR2y7oTrChpJjQUZo/3 aiyDRVQo+Ap5m0arAjj/vbY8sKMd4faOX5F50EEZO3yQ8QwziQ3GrYks5b/Oxb9RgbXO Es9v0KKMInvAFtbj3yOhEyybG0+miONlMxVBfgcugE8X/80dRq4jxDD3r073IXh6Wlia EQOJkXoacqrPLUBs2hbACrBXxaqF3jYPVxVkQHJtN8BTAD6+gD0GFa+4fBuZya+6Tyoo BU/g== 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=xl7IxLYS3QE/0m9oV8cI+LYX5DmPQfCH6cMM4XFNpME=; b=DQhDUnIaLnY5Ah4pQaWV7NaZTmcUjn9uc/ZomobESlh2Ar8ROTPpXNkifmAqOGCj1A UmGQ9nthzgUgoukfdbugphc+fVPLo4fR6McTxZkSIvDlNtscB12HEUZjv5dEQiCK7una MP9Tav+/Ufx0teW+lOf03m7yfJqhbv+X35J8jO/vb3/dbc707e9mzNziQichg1BmpETP xg5PXw8dmh+3n5cTQBeNJ2G9Z3ThNMJrqZFVJ40UTNMui6YaiVNvkSfIYudswuxwTLL6 +5uZ4M+W3YBm2uRd6I3XvWc7w2Jc750CJVImcKfST2/t0zou9NSNfTn/7PMp1ed2LOns LWNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ip1JqS5U; 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 hp5-20020a1709073e0500b006f3c67436edsi5105818ejc.459.2022.05.06.02.21.11; Fri, 06 May 2022 02:21:34 -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=Ip1JqS5U; 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 S1357511AbiEDRYf (ORCPT + 99 others); Wed, 4 May 2022 13:24:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355412AbiEDRET (ORCPT ); Wed, 4 May 2022 13:04:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3F1F4EDC0; Wed, 4 May 2022 09:53:02 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 74FE361794; Wed, 4 May 2022 16:53:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C694BC385A5; Wed, 4 May 2022 16:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683181; bh=GqXocJ5EJAhLTU16Rx/GrEiSpEnAcl5XCgho8hZgfqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ip1JqS5UqQog1mjHa5ozY7oCaG2Nrne0N5ck8ul5+Q+Mc5plt7+sKSTyco3W1sPGx fdahs9sfcTDP2UBX60eZZpFHmi8OoABrsFDPPkigGcPkfy+pxoCJmhZ9WaFaGWc/y9 fBN1gl1b0i9uCYrm1biRg3Lq+0J7SmT0o0nij6ac= 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.15 033/177] arch_topology: Do not set llc_sibling if llc_id is invalid Date: Wed, 4 May 2022 18:43:46 +0200 Message-Id: <20220504153055.948533399@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@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 @@ -609,7 +609,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); }