Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp259120pxb; Fri, 16 Apr 2021 05:07:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuFAWG8cOKr0oHIXzdoZWbtkDt9VDmbVLviEPm9QO9RnqkKsZCsSANo6HPlObLfIlnz1FV X-Received: by 2002:a5d:568f:: with SMTP id f15mr8823280wrv.346.1618574866576; Fri, 16 Apr 2021 05:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618574866; cv=none; d=google.com; s=arc-20160816; b=BWmd0KSU9W06HP821NAKdaAht2YoDybxYVbIsA83gdOFv11ws8GVCGErYj2JLPAtwx rLzDix4lNs7+hXRF3cRlkFUjp5SAu/Pf3PBk+kBd4/xHUXwr+mBiBe09Sus9YDyMCX/8 NQYXWs44wCCWKvGZR97wIzMfAvabicphHg7dldMeN0liGTid1UDK2h6jXTl6gux5yRb/ XhoBYD52KFov+RLl43WcdMeBKriYU7zzuM8DQaw2YLjBqeTvWE3JNUHF973Vr7ZfFjmi 41RPA+WHLlc2EybgEwSNqNhR9LWvbvslhEYGmhq1IGgNdW3sfAMLDuYD3DYJyGQZ0L6w Q2JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=1LcaQ9AOBWG3yl+tcVpZxhe1BTAdEkv2MJL2a6wMJW4=; b=zjRf/4PQfCgwq0BHJO53r4LRDxKRPHZJHk2uYRfjq0/iTgq2Opojf6lBqP2q8AyLyT dBiaVbG0RXWdNYgiY4s13oRTmoQZGPqhhWIAk3DwhvAClgB26VuWPt+RJz/EKJ7NFDZu 8dcJBw4VAIcMXsdOcqD8COBL5tND7aycCa/AxqOnghlxRVaZzEcX/FA04dGTtjbA4PwB wTmixP4IMRUZ5VgRGpPBDiOkMrS2WQWRMLvOYLAAhrguzLpQBBk5g+kKZt0QH4baEG/9 ly0VNsMxDdXqFexLyaSZHWSi56ZbXjrwc52/lnlHCTjGXy3kiFJZb6rQ33t4MlsrNY/G MoEA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si4407616ejx.27.2021.04.16.05.07.23; Fri, 16 Apr 2021 05:07:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235225AbhDPKr7 (ORCPT + 99 others); Fri, 16 Apr 2021 06:47:59 -0400 Received: from foss.arm.com ([217.140.110.172]:38542 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235352AbhDPKr6 (ORCPT ); Fri, 16 Apr 2021 06:47:58 -0400 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 9AC96106F; Fri, 16 Apr 2021 03:47:33 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 11B2F3F85F; Fri, 16 Apr 2021 03:47:31 -0700 (PDT) From: Valentin Schneider To: Dietmar Eggemann , Ruifeng Zhang Cc: linux@armlinux.org.uk, sudeep.holla@arm.com, Greg KH , "Rafael J. Wysocki" , a.p.zijlstra@chello.nl, mingo@kernel.org, ruifeng.zhang1@unisoc.com, nianfu.bai@unisoc.com, linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List Subject: Re: [PATCH v2 0/1] arm: topology: parse the topology from the dt In-Reply-To: <44ab835f-3456-6bd9-97e9-5936cf5372da@arm.com> References: <20210414122326.5255-1-ruifeng.zhang0110@gmail.com> <8735vrmnc7.mognet@arm.com> <87wnt2lglo.mognet@arm.com> <44ab835f-3456-6bd9-97e9-5936cf5372da@arm.com> Date: Fri, 16 Apr 2021 11:47:29 +0100 Message-ID: <87r1jald4u.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/04/21 12:39, Dietmar Eggemann wrote: > On 16/04/2021 11:32, Valentin Schneider wrote: >> On 16/04/21 15:47, Ruifeng Zhang wrote: >>> For more requirements, if all cores in one physical cluster, the >>> {aff2} of all cores are the same value. >>> i.e. the sc9863a, >>> core0: 0000000081000000 >>> core1: 0000000081000100 >>> core2: 0000000081000200 >>> core3: 0000000081000300 >>> core4: 0000000081000400 >>> core5: 0000000081000500 >>> core6: 0000000081000600 >>> core7: 0000000081000700 >>> >>> According to MPIDR all cores will parse to the one cluster, but it's >>> the big.LITTLE system, it's need two logic cluster for schedule or >>> cpufreq. >>> So I think it's better to add the logic of parse topology from DT. >> >> Ah, so it's a slightly different issue, but still one that requires a >> different means of specifying topology. > > I'm confused. Do you have the MT bit set to 1 then? So the issue that > the mpidr handling in arm32's store_cpu_topology() is not correct does > not exist? > > With DynamIQ you have only *one* cluster, you should also be able to run > your big.LITTLE system with only an MC sched domain. > > # cat /proc/schedstat > cpu0 .... > domain0 ff ... <- MC > ... > You're right, this is actually a DynamIQ system, not a (legacy) big.LITTLE one, so all CPUs are under the same LLC (the DSU). I probably should have checked this earlier on, but this is quite obvious from sc9863a.dtsi: cpu-map { cluster0 { core0 { cpu = <&CPU0>; }; core1 { cpu = <&CPU1>; }; core2 { cpu = <&CPU2>; }; core3 { cpu = <&CPU3>; }; core4 { cpu = <&CPU4>; }; core5 { cpu = <&CPU5>; }; core6 { cpu = <&CPU6>; }; core7 { cpu = <&CPU7>; }; }; }; All CPUs are in the same cluster, and the MPIDR values actually match that. > You can introduce a cpu-map to create what we called Phantom Domains in > Android products. > > # cat /proc/schedstat > > cpu0 .... > domain0 0f ... <- MC > domain1 ff ... < DIE > > Is this what you need for your arm32 kernel system? Adding the > possibility to parse cpu-map to create Phantom Domains?