Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4664488rwb; Tue, 8 Aug 2023 11:44:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEBKygjiaT3bnHZoZY3+BLTLuT8TKsDQ/meSXbMhcJ8HPEQyXOA+s5DngrN/N07/COkwGK5 X-Received: by 2002:a17:906:28e:b0:993:d920:87d3 with SMTP id 14-20020a170906028e00b00993d92087d3mr338748ejf.25.1691520264622; Tue, 08 Aug 2023 11:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691520264; cv=none; d=google.com; s=arc-20160816; b=LCmIZ9fuKojrI8uZ3tUBmY1Ap68+aVxXCknS2qsCRrq4nXxEwceKyz/FosnBjDfOZk WvZpsmrDzu4SN37SikiS+Cb6RlVGPcY/UPrUUJSlmDU70J3vtxq6tmvpqrQXNvKe3rp/ Uz46LYCSCpTtm2xFch2CYhv39xVUnR9v9OpynP237MZG1QfTALaAF8WwI0V6wK8hb193 oD5X9OzNzYr8ASWAzv8zF6hME/82Eso1zfLzV/yqOXdHP7uomZa3/pUGnyHOsEanj3NA ixpBR0zOuQwYSR9+Csg1VXjaWrkIdYIEMZGwHHOa1NjDTCZWgM4LduuQcJBZIOcxgeYp nocw== 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:dkim-signature; bh=/diXiEy5Rar3GP8DL1v0Kz97W27qEYMY8d8jEN9wuNI=; fh=Tq6RoUdX8b03qgFg7dnQunQmNd0wjs/hndkRhQIHKXc=; b=tQEc7dnKfOrbbaRmes5UhhMB16T5YGL/zI/lZzPrfEmwm/x1vOYBIBbRlpg138xLUF YYt9iAANLJcQxBzEBw95+WCFpRkNquZrZvaaC8UbEugaxlOJn5qlligLfLLJR/Tfw5QF 0xnQpmz4w0Pq4EZn+SOx+38Er8NH8DA19UOOV+Ux6FXsDIUZKsDpcses8pbOAZri3aDX RGeKeuSQFYhjU2NbUzjp+rWnpHbvB/KBlDCpkR6cVvpQqW1HG3KGQ8wtd8k453pKt6cO tBbvOZHhaW/1NVwh1RwfiVMTMx3kI8jw+8s9sVwXyn3JF+cOzZxepYrZctNtTXKab5Ix 9a7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xQc13KDz; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b24-20020a170906151800b00982bd2c070fsi7499715ejd.469.2023.08.08.11.43.57; Tue, 08 Aug 2023 11:44:24 -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=@ti.com header.s=ti-com-17Q1 header.b=xQc13KDz; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbjHHQWi (ORCPT + 99 others); Tue, 8 Aug 2023 12:22:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232507AbjHHQUb (ORCPT ); Tue, 8 Aug 2023 12:20:31 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 557BB93D7; Tue, 8 Aug 2023 08:49:05 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 378Dn4Sc092506; Tue, 8 Aug 2023 08:49:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691502544; bh=/diXiEy5Rar3GP8DL1v0Kz97W27qEYMY8d8jEN9wuNI=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=xQc13KDzs4rY/5Yh0KhwxXxbTGu21K+p5MPQfIpXeULdCoaHjZ3C7H+tWKqs+R0a/ mPYU2n776xTrRr9yuKjigGyTYSX2EeQK6t5eKP/GEMnTRBnX7fDvB3OHKaI15O1I7h kAGsMc6e+6/GT6gmAtQpO08ULv0a/IqbxsVx8T3Y= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 378Dn4Jp003971 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Aug 2023 08:49:04 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 8 Aug 2023 08:49:04 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 8 Aug 2023 08:49:03 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 378Dn31e046024; Tue, 8 Aug 2023 08:49:03 -0500 Date: Tue, 8 Aug 2023 08:49:03 -0500 From: Nishanth Menon To: Dhruva Gole CC: Tero Kristo , Santosh Shilimkar , , , , , "Kevin Hilman" , Vignesh R , Georgi Vlaev Subject: Re: [PATCH V7 2/4] firmware: ti_sci: Add support for querying the firmware caps Message-ID: <20230808134903.vqrq7wxsgg5id4dj@crewmate> References: <20230804115037.754994-1-d-gole@ti.com> <20230804115037.754994-3-d-gole@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230804115037.754994-3-d-gole@ti.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 17:20-20230804, Dhruva Gole wrote: > From: Georgi Vlaev > [...] > + /* > + * fw_caps 1st bit is used to check Generic capability. Other than > + * that the 1:4 bits are used for various LPM capabilities. > + * The API is buggy on SYSFW 9.00 and below, on some devices. > + * Hence, to avoid any sort of bugs arising due to garbage values > + * Let's allow the fw_caps to be set to whatever the firmware > + * says only on devices listed under has_lpm. These devices should > + * have lpm features tested and implemented in the firmware > + * and only then should they be added to has_lpm struct. > + * Otherwise, set the value to 1 that is the default. > + */ > + if (fw_caps && soc_device_match(has_lpm)) > + *fw_caps = resp->fw_caps; > + else > + *fw_caps = resp->fw_caps & MSG_FLAG_CAPS_GENERIC; Fix your firmware please. drop the has_lpm stuff.. that is what caps is for. As part of ti_sci_setup_ops you get info where you can check ABI version where this is valid and which is not, ti_sci_msg_cmd_query_fw_caps can be populated based on that check. That is the reason info is passed to setup_ops and why we have ABI IDs in the first place. [...] -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D