Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp113046ioo; Fri, 20 May 2022 15:32:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTqQQhdFhPIO0Z7hDudcYnMQE68ozCTvi49IkdvZD1mCfosulZpGPGP3pqN3t3ofQGEH/s X-Received: by 2002:a05:6402:5415:b0:42b:228:5cf with SMTP id ev21-20020a056402541500b0042b022805cfmr10531591edb.245.1653085929545; Fri, 20 May 2022 15:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653085929; cv=none; d=google.com; s=arc-20160816; b=dHRCwMucVQjSRyz8lTY8wnhyeJ7FaZGdw1JmBbVCvhaPFcl+ejVEyelAH3KLBYQpo4 4TXvS/gz0PjFC6l+lsxUXMDHjQmpcQ8LbRG2wvby8+r2+sqdCwZR5cNWOJhIuLskkg/I 7gU1mZqvaCzrN47DAftj6uwqBu5gDP1PQNPBfpLzgJBc8rjgcIxDaArKQUGPk//MSdUs aQGjy5blACxNsMESF25OtcfYmG4fKjmFhVYMcBj3RgvzwhTyf4yOpYIgJd928E8O1GM1 dus5HVV5ajaoTCqjifcBd/jYuJxT71RxJ3r62HBPECoo5e7nBn2P3iB0xjmEBOexTSRx /uRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=iyg09MXx3MxUDrIc80FSkTauSbtXFvQYu5GaFcUD4A8=; b=VH+uLwwt9nHcSVkmtmDsn6HNrAHFpHbxiF5y/u0u4BqqCWFq0soc2LVD6L9GmvrX/S lRZKypYLAMFaPEugmb0VFYSVkBcrConGz84Nw1vuG/WmhtXZjmo2C6FmKzTgXMsWNrnx yd5Z9MBYpaI2boNxNXyLzf8T8Stj+xgbL/PIfBLFiv+zZuisgY+w2uUhvnriPZ+k3EDv 1dUMpO8cAnY0O8meeYiO6ulF16aUB9eEA4+ZUST2nQqFyR7ylihVrdvPkVHiWBYivMm/ fD/ruSpbZQrKmLpOeQ96XU84zzDcNh6Cdk1pXAFSNNymMZxn6jNkKYlbz3KIkIbyZ6hl vIhQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc8-20020a1709078a0800b006f3c6ceb0efsi9799818ejc.51.2022.05.20.15.31.33; Fri, 20 May 2022 15:32:09 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350269AbiETOg3 (ORCPT + 99 others); Fri, 20 May 2022 10:36:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348785AbiETOgY (ORCPT ); Fri, 20 May 2022 10:36:24 -0400 Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D76BA57B30 for ; Fri, 20 May 2022 07:36:23 -0700 (PDT) Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-e5e433d66dso10511152fac.5 for ; Fri, 20 May 2022 07:36:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iyg09MXx3MxUDrIc80FSkTauSbtXFvQYu5GaFcUD4A8=; b=6A/ZADbDOwV84hhjbq0VUFECjbAJ6n9rXYOhPXYnmVuYdV0+TYBj4xyxGEI8vBXHq5 G4KtzH+Ak1xhfjiBCMNmdQ+GAizmpGk3hg4KY4HH3gt/9vef1utHbc6h7BmN5prMLBiE WTagxyn0/05V2ETZl1KlacfQ1gtwe2fZfhYfzQDFrXOyxsg8v1Ukm1Pf8UndwhVAaO+O raaCxetI24HzGygLTt/fL15xFyyCmqFE5CbiwNInMizTTwr+xmM2HQZX1Q+5MwfxaKf0 9I1aWW0/FurcLam2XoJ3XYq6Xt04FlTwiPza5Zk1ggNPQ5tkXI5zvOmIIXoRtm8PwrZW /qeg== X-Gm-Message-State: AOAM532q4EK3/PwrfE952cb9WowRwoTXxKTwf6kX/ePYRBqlKEK+GJS+ UyF89Lz10xwZEjkQVqw92g== X-Received: by 2002:a05:6870:d60d:b0:f1:ddfc:2f26 with SMTP id a13-20020a056870d60d00b000f1ddfc2f26mr6255111oaq.296.1653057382154; Fri, 20 May 2022 07:36:22 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id p13-20020a0568301d4d00b0060603221236sm975958oth.6.2022.05.20.07.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 07:36:21 -0700 (PDT) Received: (nullmailer pid 3813862 invoked by uid 1000); Fri, 20 May 2022 14:36:20 -0000 Date: Fri, 20 May 2022 09:36:20 -0500 From: Rob Herring To: Sudeep Holla Cc: Atish Patra , "linux-kernel@vger.kernel.org" , Atish Patra , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Qing Wang , linux-arm-kernel , linux-riscv Subject: Re: [PATCH v2 8/8] arch_topology: Add support to build llc_sibling on DT platforms Message-ID: <20220520143620.GA3788938-robh@kernel.org> References: <20220518093325.2070336-1-sudeep.holla@arm.com> <20220518093325.2070336-9-sudeep.holla@arm.com> <20220520125959.wlxz53cfqldljxjy@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220520125959.wlxz53cfqldljxjy@bogus> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Fri, May 20, 2022 at 01:59:59PM +0100, Sudeep Holla wrote: > On Thu, May 19, 2022 at 01:10:51PM -0500, Rob Herring wrote: > > On Wed, May 18, 2022 at 4:34 AM Sudeep Holla wrote: > > > > > > ACPI PPTT provides cache identifiers and especially the last level cache > > > identifier is used in obtaining last level cache siblings amongst CPUs. > > > > > > While we have the cpu map representing all the CPUs sharing last level > > > cache in the cacheinfo driver, it is populated quite late in the boot > > > while the information is needed to build scheduler domains quite early. > > > > Late is because it's a device_initcall() rather than late in the cpu > > hotplug state machine, right? > > Right. The expectation is to run in on each online CPU in CPU hotplug state > machine for some architectures. We may not need that on arm64 especially > since we get all info from DT or ACPI, but e.g. x86 uses cpuid which needs > to be executed on that CPU. That's a separate issue. I'm not suggesting changing that part (that would just be an optimization). > > The late aspect is for sysfs presumably,but I think we could decouple that. > > OK, not sure when this sched_domain info is actually needed. It think it > could be decoupled if we can wait until all the cpus are online. No need to wait for all cpus to be online. I think you keep doing it as part of cpu hotplug. The device_initcall() is used because you cannot have struct device or sysfs calls before the driver core is initialized. If we run the cacheinfo code earlier (I think the arch code will have to call it) just like the topology code and skip the sysfs parts, then you can use it. > > Do all the firmware cache parsing early and then populate the sysfs parts > > later. > > Yes that may work on DT/ACPI based systems, as I said x86 relies on cpuid. I'd assume using cpuid works at any time? > > It's not a unique problem as the DT unflattening and init code has to > > do the same thing. I'd assume the hotplug and cpu sysfs devices have > > to deal with the same thing. > > > > OK, I will take a look at how to do that. > > -- > Regards, > Sudeep