From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DC29C433F5 for ; Wed, 6 Oct 2021 13:51:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D31D6103E for ; Wed, 6 Oct 2021 13:51:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6D31D6103E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AlFS7johFTsId8JSRvUzMg5snGfiBftE+nZtGzlYG38=; b=4tG0mtJC47G097 Cv/lXEgb0Ak4FqTAWB8hTabjkpgvk8IrQAblT9iHGDmS4WBQxn1kscl9AZlTr32ZItBBCSY+HDZzE frlRSWqRDj8JGyxgMZ/q3Tiz9M3GWNwbaEX8J4IVi+JzA/57ndHhstW6o4dYqwmqqJzBjvSvK3JPU 88yB1XzBCP7FEBUE9jAoj5HOdOisHzHOTw5pAoGugThsDMSX8R1KI5bmX2Woc+UqRxITBE2nOQLyp WpQdkS9cAYxoT9dxzEuWWd9oadyFFzaHC8ktROwaHccJr9PnZarfGRLiFce03UdqCnOi/aqXBskrt 1WvBwLH/+Ksq9XgXYDhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY7JP-00EXMK-Or; Wed, 06 Oct 2021 13:50:23 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY7JL-00EXKn-Qm for linux-arm-kernel@lists.infradead.org; Wed, 06 Oct 2021 13:50:21 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4FE691FB; Wed, 6 Oct 2021 06:50:14 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 39F0B3F66F; Wed, 6 Oct 2021 06:50:10 -0700 (PDT) From: Valentin Schneider To: Barry Song <21cnbao@gmail.com> Cc: Dietmar Eggemann , LKML , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Aubrey Li , Borislav Petkov , Daniel Bristot de Oliveira , Ben Segall , Catalin Marinas , Greg Kroah-Hartman , Guodong Xu , "H. Peter Anvin" , Jonathan Cameron , Juri Lelli , "Cc\: Len Brown" , ACPI Devel Maling List , LAK , Linuxarm , Mark Rutland , Mel Gorman , msys.mizuma@gmail.com, "Zengtao \(B\)" , "Rafael J. Wysocki" , Steven Rostedt , Barry Song , Sudeep Holla , Thomas Gleixner , "Rafael J. Wysocki" , Tim Chen , Will Deacon , x86 , yangyicong , Tian Tao Subject: Re: [PATCH RESEND 1/3] topology: Represent clusters of CPUs within a die In-Reply-To: References: <20210924085104.44806-1-21cnbao@gmail.com> <20210924085104.44806-2-21cnbao@gmail.com> <87o883l9c8.mognet@arm.com> Date: Wed, 06 Oct 2021 14:49:49 +0100 Message-ID: <87lf36l0ua.mognet@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_065019_928251_FEEEF2CF X-CRM114-Status: GOOD ( 15.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 06/10/21 09:43, Barry Song wrote: > > Hi Valentin, > Yep, this is a very good question. I'd like change the code to: > diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c > index 7cb31d959f33..fc0836f460fb 100644 > --- a/drivers/base/arch_topology.c > +++ b/drivers/base/arch_topology.c > @@ -622,7 +622,8 @@ void update_siblings_masks(unsigned int cpuid) > if (cpuid_topo->package_id != cpu_topo->package_id) > continue; > > - if (cpuid_topo->cluster_id == cpu_topo->cluster_id) { > + if (cpuid_topo->cluster_id == cpu_topo->cluster_id && > + cpuid_topo->cluster_id != -1) { > cpumask_set_cpu(cpu, &cpuid_topo->cluster_sibling); > cpumask_set_cpu(cpuid, &cpu_topo->cluster_sibling); > } > > This should be consistent with Tim's patch3/3 for x86 in case > id is BAD_APICID: > static bool match_l2c(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o) > { > ... > /* Do not match if we do not have a valid APICID for cpu: */ > if (per_cpu(cpu_l2c_id, cpu1) == BAD_APICID) > return false; > ... > } > LGTM. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel