Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13189150rwl; Wed, 4 Jan 2023 04:57:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXsLMtQJaPg2U0WEIgY1NScfI8EYwT0v747MWOEZX0akxfDCXpJBOmmVPsq2FtQ5yKax8eq4 X-Received: by 2002:a17:902:c9d2:b0:192:ee98:664c with SMTP id q18-20020a170902c9d200b00192ee98664cmr1513466pld.54.1672837067258; Wed, 04 Jan 2023 04:57:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672837067; cv=none; d=google.com; s=arc-20160816; b=aYTZAF+A+s4rsBrPz6PDLjsG7e56dagGvwiPGDmmUYuG+jFlpgGmCDshS1Y1urPkcO 608hO78MGvKzw4MdTKzSTGhDRLfwD/BUjE8DD6OMIhM2BYOV8ps/dXrDEZjEmGBxPLbF mhO/tpV3J9DIdGCWsvQQAMyzq7nWSv4y2RqNytMH51Su3qa2WujD6iPALwpR6ZJIrHpn tWKu9ANdp9RcGuXo8FdHzlzLsgmzFVm3hhSJXyPW4I+PcIOJKhPwXctYUj0xdQyeldrt Bef1gpPxqAAuaeC+REXnn8XE6UsfhpNjsk0Rd/ZIgmVCeTycfSY5O4mx23N9BHHj8MsK HOHA== 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=raU4sBBAx5SD21nS+2dGW4vC7d1NlsSSMyiemmPRIZE=; b=dAojQeLpCZwxPndX0Vwwxz6e97cwdq/SmCObg1uJB1QSIgWN/51xZc0lGy8FI57UQt 2xEDwmgJzGQgjWC5Jx5ZXMfwTu9G6nF1Genn3nkSwqaeE/VVdpYJ0WioMkgGApY1JM/7 DriI2YDyk6DbWZPj81kb1Pycr5b9D6pd7xVtCq+SQAH9qj++iNNtcsJaqdzEI6HBTDpv Yw+haxFkMI2j4jAPecfNRA5YJ0XNykxA7vlmTiOsTC56hdKweWpDr5dpODgnlEpnCAJs a5KcBnECel9t1gbaktI6KDJivNAUNKisKfAoOnMFep7N6/wR762J/J0rdMbtoxIfTwyD vJSw== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a17090340cd00b001890c6ff01asi34135161pld.483.2023.01.04.04.57.38; Wed, 04 Jan 2023 04:57:47 -0800 (PST) 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbjADM4t (ORCPT + 57 others); Wed, 4 Jan 2023 07:56:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239307AbjADM4g (ORCPT ); Wed, 4 Jan 2023 07:56:36 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6962613EA3 for ; Wed, 4 Jan 2023 04:56:35 -0800 (PST) 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 D11261042; Wed, 4 Jan 2023 04:57:16 -0800 (PST) Received: from bogus (unknown [10.163.75.162]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B3BB63F587; Wed, 4 Jan 2023 04:56:31 -0800 (PST) Date: Wed, 4 Jan 2023 12:56:32 +0000 From: Sudeep Holla To: Conor Dooley Cc: Leyfoon Tan , Andrew Jones , Sudeep Holla , Palmer Dabbelt , Paul Walmsley , Albert Ou , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Ley Foon Tan Subject: Re: [PATCH] riscv: Move call to init_cpu_topology() to later initialization stage Message-ID: <20230104125632.ktoyt7mxjjxq5udm@bogus> References: <20230103035316.3841303-1-leyfoon.tan@starfivetech.com> <20230103065411.2l7k6r57v4phrnos@orel> <672440143ab04d3dbcc6de0a16bab3e1@EXMBX161.cuchost.com> <20230104104900.aohsn6zemfllub7r@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 On Wed, Jan 04, 2023 at 12:18:28PM +0000, Conor Dooley wrote: > Hey Sudeep, > > On Wed, Jan 04, 2023 at 10:49:00AM +0000, Sudeep Holla wrote: > > On Wed, Jan 04, 2023 at 09:49:48AM +0000, Conor Dooley wrote: > > > > [...] > > > > > >> Uhh, so where did this "capacity-dmips-mhz" property actually come from? > > > >> I had a quick check of qemu with grep & I don't see anything there that > > > >> would add this property. > > > >> This property should not be valid on anything other than arm AFAICT. > > > > > > > >This DT parameter is not in default Qemu. I've added it for testing (see test steps in below). > > > >This is preparation to support asymmetric CPU topology for RISC-V. > > > > > > The property is only valid on arm, so how does arm64 deal with such > > > asymmetric topologies without it? > > > > I don't think we can deal with asymmetric topologies without this. > > Yes we can detect the difference in the CPU types but we can only assume > > there are symmetric in terms of performance in absence of this property. > > > I looked at the bindings for it and forgot that the arm directory of > bindings applies to both arm and arm64. I see now that it is also used > on arm64. > > > > > > Why should we "fix" something that may never be a valid dts? > > > > > > > I would not say invalid. But surely absence of it must be handled and > > we do that for sure. IIRC, here the presence of it is causing the issue. > > And if it is present means someone is trying to build it(I do understand > > this is Qemu but is quite common these days for power and performance > > balance in many SoC) > > I said "invalid" as the binding is defined for arm{,64} in arm/cpus.yaml > & documented in the same directory in cpu-capacity.txt, but not yet on > riscv. All bets are off if your cpu node is using invalid properties > IMO, at least this one will fail to boot! > > However, I see no reason (at this point) that we should deviate from > what arm{,64} is doing & that documenation should probably move to a > shared location at some point. > I prefer making this binding generic rather than patching to handle RISC-V differently in the generic code. Since it is optional, the platform need not use it if it is not needed. -- Regards, Sudeep