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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 80D01CD4857 for ; Wed, 4 Sep 2024 16:45:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fYmgsQF084rXunGJY2hJpwefzGQHuFdzlIyU7uhvLxU=; b=MS8axmGrgCvhqs74oIxk4gzQCR cYKBvhNV2dSiyliFdDju197esWz5HCahljJPFeZVJfKmcJdWPYh54QgX0TcQ92J8G/BjtZY/lc8Qk DqTeqtDsyUcQknMnq9Yg845iZS5A0cPYYgPkZ06tUnDv4d4KgxG5MjIfAEbmiKebT1RpkF1mEnRvE c86BjdkkfoApatCZZf3pwf1Q2hvX7DGF1y57XweE2c8N3L7WbCGafuHwKsvSNERO/hZpNn7N3vhIU GAAtI58i7ChJz3Qidd3XlB8XQ3yr0nqdsrCv8/Qs8o+EOcGb/e83msuesIAHNbbDO7WTtbTsPiPaa KV7L9K0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slt8h-00000005Jp4-0Hkx; Wed, 04 Sep 2024 16:45:51 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slrxk-000000050yD-3AQg for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 15:30:30 +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 33701FEC; Wed, 4 Sep 2024 08:30:54 -0700 (PDT) Received: from pluto (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A41B73F73F; Wed, 4 Sep 2024 08:30:26 -0700 (PDT) Date: Wed, 4 Sep 2024 16:30:24 +0100 From: Cristian Marussi To: Sibi Sankar Cc: sudeep.holla@arm.com, cristian.marussi@arm.com, linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, johan@kernel.org, konradybcio@kernel.org Subject: Re: [PATCH V2 2/2] firmware: arm_scmi: Skip adding bad duplicates Message-ID: References: <20240904031324.2901114-1-quic_sibis@quicinc.com> <20240904031324.2901114-3-quic_sibis@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_083028_862789_8B876546 X-CRM114-Status: GOOD ( 15.40 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 04, 2024 at 04:21:49PM +0100, Cristian Marussi wrote: > On Wed, Sep 04, 2024 at 08:43:24AM +0530, Sibi Sankar wrote: > > Ensure that the bad duplicates reported by the platform firmware doesn't > > get added to the opp-tables. > > > > Hi Sibi, > > so if the idea is to make the code more robust when FW sends BAD > duplicates, you necessarily need to properly drop opps in opp_count too. > > One other option would be to just loop with xa_for_each BUT opp_count is > used in a number of places...so first of all let's try drop count properly. > > Can you try this patch down below, instead of your patch. > If it solves, I will send a patch (after testing it a bit more :D) Hold on... I sent you a diff that does not apply probably on your tree due to some uncomitted local work of mine...my bad...let me resend. Thanks, Cristian