Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1135160rwd; Tue, 13 Jun 2023 05:29:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4lpgwBtk9fSuFgEdE6Q4Lzg7nHsFq4ENge6nZJfvs+DMvhxdClkOl5XB61yBEpLkcQInwi X-Received: by 2002:a05:6402:455:b0:510:ddad:fae6 with SMTP id p21-20020a056402045500b00510ddadfae6mr7385050edw.3.1686659387153; Tue, 13 Jun 2023 05:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686659387; cv=none; d=google.com; s=arc-20160816; b=KSFZAXahPQHc0UdV/0C206G3qCmAnpamoxYtehNlN55GK2vm6EgG9x4TjVyFlbgE9k fcoTdfsBy0EX8H1xSUqPomglbCtdssCPmF7I5zg+ZoZHBbXOCdUMfg7XQuomaw/PziEf 6wpaCF/D1+Ez3T+00vqqoKmJ8KiAq6akdpf94CAVN27/OyZjjkyQ1NwIEm2vdDTq7eCu qQDCcFm9S4WbnFpyYdg80X/f9LxNUb4CGtbbO2B+x5M1fNe1q+eoEPVAr/Q4y3w81v/0 HeKxyDRakpX/pA8qWw8F9I3CnQH8asmdBv48p2UXfsVSnj4AozE+fyWAKSPHdp1WeX5l HAbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=6CMlQba2o43/QiP5kbF00C5SMM+pc3bqKwMdZ4o71Wg=; b=Rzfi57V8+MTnU1qYtOAGGpkS2pzQIP4RJxggdODdsdEuOQiLJNs7eaJiRKIrAs8Ln5 ERYyDQn4LrqrYX1hmHqTSxB49PiTjuEB29KLz3rAl57uOiK6cPHfDjjHvuQUl1Yu+9Ae FBAHvjEErubS5RHe5wvSaGaOwLNcGdWkNGRMaribl9lOZCkFjtGDqn3+nsOWIMXNT2Ag yy6/N2PiR1Ye16OaAgdAF6KfrSbNZy3bskYkLPWYbeP5mTrOiWnEBcosPCAEo5SIuI3Q Y0ooJ3fQ4VVUDbo0OCmJs5AoXDlP12KvGVe18npqPJx/7WiXAu1B6pA92tGAfshnsYBa yfZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jM2BdMoN; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m5-20020a056402050500b00514a5fb3d6fsi6850956edv.653.2023.06.13.05.29.21; Tue, 13 Jun 2023 05:29:47 -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=@linaro.org header.s=google header.b=jM2BdMoN; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239418AbjFMMNH (ORCPT + 99 others); Tue, 13 Jun 2023 08:13:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239515AbjFMMNF (ORCPT ); Tue, 13 Jun 2023 08:13:05 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F151B4 for ; Tue, 13 Jun 2023 05:13:01 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4f6195d2b3fso6772614e87.1 for ; Tue, 13 Jun 2023 05:13:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686658380; x=1689250380; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6CMlQba2o43/QiP5kbF00C5SMM+pc3bqKwMdZ4o71Wg=; b=jM2BdMoNCbF74BgGgRDVYE6LKUcsY3HAYxwagM7IqNQFDHyA50WMO364I8ZuLvp9v2 qGs2ogbEf4zfjDoEPz0k4SbACIKnBKeIiIbl2KvH80pi+vzd5qOkPP5s4xlkhj+omVsY Fda5TdW3CDeMJ1S+ETpk01VHjri3rDZvXPmReSFUWb3CKvBXoQ7CHvP0ADadNSMQvNXq GHb7DJ5uGPve8Yb61BMTRIQgCsLJzAsT7XypLTm7vQOIfHTMUGXr8V4TRJHEUupLOi5z Sy7JgxGVPqzsucyCgYlz42JPFMkpeynHYwsNMvKT/PqSPAfou+yAxlxlLZKOFub+XpaR 1eAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686658380; x=1689250380; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6CMlQba2o43/QiP5kbF00C5SMM+pc3bqKwMdZ4o71Wg=; b=ix0QZBc7n4xIRiahtJmL2W2t8t7yxmMyyyDQAzJ9SNM+OZTgTXva9ZiOWzGB1TsPZV 55c0C5qyNmJk437eZ7a4CaZOACCc76Oqgk/IYgk+Dz7zZp2fBfIORIoIputF+0os9aE4 +FOKnCOAehLZ0fpq5W8drVPXCmdsRvuxjXEugUJNUVMEYOrF9pF/TQ2ckzP3pVd9DdHw OSnCf0qoUx/aisIq5BdUmnJwvyDzxLc5NoQdYCF0VV6pvqNo3wjPkeeR2DDPpSkzWPFl X064Ak5+m1au9vXv4Vwxd8RmVEcr/hS22ryaZepACQjgLwXkcYZgXn09ftR/1qi2bxEG 8/tA== X-Gm-Message-State: AC+VfDxkuivFH2yqhShWAGt1IzXuUV6KkqGzw56LmB/wGhL/0RSYlKF0 UTZi7usCJ7sAYtP9yh/9pn7xWw== X-Received: by 2002:ac2:5b83:0:b0:4f7:5a42:6af with SMTP id o3-20020ac25b83000000b004f75a4206afmr1024268lfn.37.1686658379752; Tue, 13 Jun 2023 05:12:59 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id w28-20020ac2599c000000b004f61a57797fsm1759751lfn.60.2023.06.13.05.12.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jun 2023 05:12:59 -0700 (PDT) Message-ID: Date: Tue, 13 Jun 2023 14:12:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v3 07/23] interconnect: qcom: icc-rpm: Allow negative QoS offset Content-Language: en-US To: Stephan Gerhold Cc: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Georgi Djakov , Leo Yan , Evan Green , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org References: <20230526-topic-smd_icc-v3-0-5fb7d39b874f@linaro.org> <20230526-topic-smd_icc-v3-7-5fb7d39b874f@linaro.org> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 12.06.2023 22:27, Stephan Gerhold wrote: > On Mon, Jun 12, 2023 at 08:24:24PM +0200, Konrad Dybcio wrote: >> In some very very very very unfortunate cases, the correct offset of >> the QoS registers will be.. negative. One such case is MSM8998, where >> The DDR BWMON occupies what-would-be-the-BIMC-base which we usually >> take into account with the register calculation, making the actual >> BIMC node start at what-would-be-the-BIMC-base+0x300. >> >> In order to keep the calculation code sane, the simplest - however >> ugly it may be - solution is to allow the offset to be negative. >> >> Signed-off-by: Konrad Dybcio > > I'm a bit confused why this patch is part of this series. It doesn't > seem to be directly related. > > Can you send it as part of the series that adds the MSM8998 interconnect > driver? Ack Konrad > > Thanks, > Stephan > >> --- >> drivers/interconnect/qcom/icc-rpm.h | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h >> index d2c04c400cad..ba840a436cc0 100644 >> --- a/drivers/interconnect/qcom/icc-rpm.h >> +++ b/drivers/interconnect/qcom/icc-rpm.h >> @@ -29,10 +29,10 @@ enum qcom_icc_type { >> * @num_intf_clks: the total number of intf_clks clk_bulk_data entries >> * @type: the ICC provider type >> * @regmap: regmap for QoS registers read/write access >> - * @qos_offset: offset to QoS registers >> * @bus_clk_rate: bus clock rate in Hz >> * @bus_clks: the clk_bulk_data table of bus clocks >> * @intf_clks: a clk_bulk_data array of interface clocks >> + * @qos_offset: offset to QoS registers >> * @keep_alive: whether to always keep a minimum vote on the bus clocks >> * @is_on: whether the bus is powered on >> */ >> @@ -42,7 +42,7 @@ struct qcom_icc_provider { >> int num_intf_clks; >> enum qcom_icc_type type; >> struct regmap *regmap; >> - unsigned int qos_offset; >> + int qos_offset; >> u64 bus_clk_rate[NUM_BUS_CLKS]; >> struct clk_bulk_data bus_clks[NUM_BUS_CLKS]; >> struct clk_bulk_data *intf_clks; >> @@ -108,7 +108,7 @@ struct qcom_icc_desc { >> bool no_clk_scaling; >> enum qcom_icc_type type; >> const struct regmap_config *regmap_cfg; >> - unsigned int qos_offset; >> + int qos_offset; >> }; >> >> /* Valid for all bus types */ >> >> -- >> 2.41.0 >>