devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] PM/OPP: Support to match OPP based on both frequency and level
@ 2025-08-18  8:22 Krishna Chaitanya Chundru
  2025-08-18  8:22 ` [PATCH v2 1/3] " Krishna Chaitanya Chundru
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Krishna Chaitanya Chundru @ 2025-08-18  8:22 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree,
	Krishna Chaitanya Chundru

The existing OPP table in the device tree for PCIe is shared across
different link configurations such as data rates 8GT/s x2 and 16GT/s x1.
These configurations often operate at the same frequency, allowing them
to reuse the same OPP entries. However, 8GT/s and 16 GT/s may have
different characteristics beyond frequency—such as RPMh votes in QCOM
case, which cannot be represented accurately when sharing a single OPP.

In such cases, frequency alone is not sufficient to uniquely identify
an OPP. To support these scenarios, introduce a new API
dev_pm_opp_find_freq_level_exact() that allows OPP lookup using both
frequency and performance level.

Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
Changes in v2:
- Use opp-level to indentify data rate and use both frequency and level
  to identify the OPP. (Viresh)
- Link to v1: https://lore.kernel.org/r/20250717-opp_pcie-v1-0-dde6f452571b@oss.qualcomm.com

---
Krishna Chaitanya Chundru (3):
      PM/OPP: Support to match OPP based on both frequency and level.
      arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates
      PCI: qcom: Use frequency and level based OPP lookup

 arch/arm64/boot/dts/qcom/sm8450.dtsi   |  41 ++++++++++---
 drivers/opp/core.c                     | 103 +++++++++++++++++++++++++++++++++
 drivers/opp/opp.h                      |  13 +++++
 drivers/pci/controller/dwc/pcie-qcom.c |   3 +-
 include/linux/pm_opp.h                 |  13 +++++
 5 files changed, 163 insertions(+), 10 deletions(-)
---
base-commit: c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9
change-id: 20250717-opp_pcie-793160b2b113

Best regards,
-- 
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 1/3] PM/OPP: Support to match OPP based on both frequency and level.
  2025-08-18  8:22 [PATCH v2 0/3] PM/OPP: Support to match OPP based on both frequency and level Krishna Chaitanya Chundru
@ 2025-08-18  8:22 ` Krishna Chaitanya Chundru
  2025-08-18  8:55   ` Viresh Kumar
                     ` (2 more replies)
  2025-08-18  8:22 ` [PATCH v2 2/3] arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates Krishna Chaitanya Chundru
  2025-08-18  8:22 ` [PATCH v2 3/3] PCI: qcom: Use frequency and level based OPP lookup Krishna Chaitanya Chundru
  2 siblings, 3 replies; 12+ messages in thread
From: Krishna Chaitanya Chundru @ 2025-08-18  8:22 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree,
	Krishna Chaitanya Chundru

Some clients, such as PCIe, may operate at the same clock frequency
across different data rates by varying link width. In such cases,
frequency alone is not sufficient to uniquely identify an OPP.
To support these scenarios, introduce a new API
dev_pm_opp_find_freq_level_exact() that allows OPP lookup using
both frequency and performance level.

Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
 drivers/opp/core.c     | 103 +++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/opp/opp.h      |  13 +++++++
 include/linux/pm_opp.h |  13 +++++++
 3 files changed, 129 insertions(+)

diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index edbd60501cf00dfd1957f7d19b228d1c61bbbdcc..4aeb394dcd73a1ca70899a887f8a8c4282ec6d57 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -461,6 +461,14 @@ int dev_pm_opp_get_opp_count(struct device *dev)
 EXPORT_SYMBOL_GPL(dev_pm_opp_get_opp_count);
 
 /* Helpers to read keys */
+static unsigned long _read_opp_key(struct dev_pm_opp *opp, int index, struct dev_pm_opp_key *key)
+{
+	key->freq = opp->rates[index];
+	key->level = opp->level;
+
+	return true;
+}
+
 static unsigned long _read_freq(struct dev_pm_opp *opp, int index)
 {
 	return opp->rates[index];
@@ -488,6 +496,21 @@ static bool _compare_exact(struct dev_pm_opp **opp, struct dev_pm_opp *temp_opp,
 	return false;
 }
 
+static bool _compare_opp_key_exact(struct dev_pm_opp **opp, struct dev_pm_opp *temp_opp,
+				   struct dev_pm_opp_key opp_key, struct dev_pm_opp_key key)
+{
+	bool freq_match = (opp_key.freq == 0 || key.freq == 0 || opp_key.freq == key.freq);
+	bool level_match = (opp_key.level == OPP_LEVEL_UNSET ||
+			    key.level == OPP_LEVEL_UNSET || opp_key.level == key.level);
+
+	if (freq_match && level_match) {
+		*opp = temp_opp;
+		return true;
+	}
+
+	return false;
+}
+
 static bool _compare_ceil(struct dev_pm_opp **opp, struct dev_pm_opp *temp_opp,
 			  unsigned long opp_key, unsigned long key)
 {
@@ -541,6 +564,40 @@ static struct dev_pm_opp *_opp_table_find_key(struct opp_table *opp_table,
 	return opp;
 }
 
+static struct dev_pm_opp *_opp_table_find_opp_key(struct opp_table *opp_table,
+		struct dev_pm_opp_key *key, int index, bool available,
+		unsigned long (*read)(struct dev_pm_opp *opp, int index,
+				      struct dev_pm_opp_key *key),
+		bool (*compare)(struct dev_pm_opp **opp, struct dev_pm_opp *temp_opp,
+				struct dev_pm_opp_key opp_key, struct dev_pm_opp_key key),
+		bool (*assert)(struct opp_table *opp_table, unsigned int index))
+{
+	struct dev_pm_opp *temp_opp, *opp = ERR_PTR(-ERANGE);
+	struct dev_pm_opp_key temp_key;
+
+	/* Assert that the requirement is met */
+	if (assert && !assert(opp_table, index))
+		return ERR_PTR(-EINVAL);
+
+	guard(mutex)(&opp_table->lock);
+
+	list_for_each_entry(temp_opp, &opp_table->opp_list, node) {
+		if (temp_opp->available == available) {
+			read(temp_opp, index, &temp_key);
+			if (compare(&opp, temp_opp, temp_key, *key))
+				break;
+		}
+	}
+
+	/* Increment the reference count of OPP */
+	if (!IS_ERR(opp)) {
+		*key = temp_key;
+		dev_pm_opp_get(opp);
+	}
+
+	return opp;
+}
+
 static struct dev_pm_opp *
 _find_key(struct device *dev, unsigned long *key, int index, bool available,
 	  unsigned long (*read)(struct dev_pm_opp *opp, int index),
@@ -632,6 +689,52 @@ struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
 }
 EXPORT_SYMBOL_GPL(dev_pm_opp_find_freq_exact);
 
+/**
+ * dev_pm_opp_find_freq_level_exact() - Search for an exact frequency and level
+ * @dev:                Device for which the OPP is being searched
+ * @freq:               Frequency to match (in Hz)
+ * @level:              Performance level to match
+ * @available:          true/false - match for available OPP
+ *
+ * Return: Searches for an exact match of frequency and performance level in the
+ * OPP table and returns pointer to the  matching opp if found, else returns ERR_PTR
+ * in case of error and should  be handled using IS_ERR. Error return values can be:
+ * EINVAL:      for bad pointer
+ * ERANGE:      no match found for search
+ * ENODEV:      if device not found in list of registered devices
+ *
+ * Note: available is a modifier for the search. if available=true, then the
+ * match is for exact matching frequency and is available in the stored OPP
+ * table. if false, the match is for exact frequency which is not available.
+ *
+ * This provides a mechanism to enable an opp which is not available currently
+ * or the opposite as well.
+ *
+ * The callers are required to call dev_pm_opp_put() for the returned OPP after
+ * use.
+ */
+struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
+						    unsigned long freq,
+						    unsigned int level,
+						    bool available)
+{
+	struct opp_table *opp_table __free(put_opp_table);
+	struct dev_pm_opp_key key;
+
+	opp_table = _find_opp_table(dev);
+	if (IS_ERR(opp_table)) {
+		dev_err(dev, "%s: OPP table not found (%ld)\n", __func__,
+			PTR_ERR(opp_table));
+		return ERR_CAST(opp_table);
+	}
+
+	key.freq = freq;
+	key.level = level;
+	return _opp_table_find_opp_key(opp_table, &key, 0, available, _read_opp_key,
+				       _compare_opp_key_exact, assert_single_clk);
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_find_freq_level_exact);
+
 /**
  * dev_pm_opp_find_freq_exact_indexed() - Search for an exact freq for the
  *					 clock corresponding to the index
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h
index 9eba63e01a9e7650cf2e49515b70ba73f72210fc..60bb0042e30f73a8e31c1688e0cb3842cdea09d5 100644
--- a/drivers/opp/opp.h
+++ b/drivers/opp/opp.h
@@ -249,6 +249,19 @@ struct opp_table {
 #endif
 };
 
+/**
+ * struct dev_pm_opp_key - Key used to identify OPP entries
+ * @freq:       Frequency in Hz
+ * @level:      Performance level associated with the frequency
+ *
+ * This is internal structure, used to help in mapping frequency
+ * and performance level combinations to specific OPP entries.
+ */
+struct dev_pm_opp_key {
+	unsigned long freq;
+	unsigned int level;
+};
+
 /* Routines internal to opp core */
 bool _opp_remove_all_static(struct opp_table *opp_table);
 int _get_opp_count(struct opp_table *opp_table);
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index cf477beae4bbede88223566df5f43d85adc5a816..a93f2670da6c2f10aa7ac5ea020fc3ef14fef113 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -131,6 +131,11 @@ struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
 					      unsigned long freq,
 					      bool available);
 
+struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
+						    unsigned long freq,
+						    unsigned int level,
+						    bool available);
+
 struct dev_pm_opp *
 dev_pm_opp_find_freq_exact_indexed(struct device *dev, unsigned long freq,
 				   u32 index, bool available);
@@ -289,6 +294,14 @@ static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
 	return ERR_PTR(-EOPNOTSUPP);
 }
 
+struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
+						    unsigned long freq,
+						    unsigned int level,
+						    bool available)
+{
+	return ERR_PTR(-EOPNOTSUPP);
+}
+
 static inline struct dev_pm_opp *
 dev_pm_opp_find_freq_exact_indexed(struct device *dev, unsigned long freq,
 				   u32 index, bool available)

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 2/3] arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates
  2025-08-18  8:22 [PATCH v2 0/3] PM/OPP: Support to match OPP based on both frequency and level Krishna Chaitanya Chundru
  2025-08-18  8:22 ` [PATCH v2 1/3] " Krishna Chaitanya Chundru
@ 2025-08-18  8:22 ` Krishna Chaitanya Chundru
  2025-08-18  9:02   ` Viresh Kumar
  2025-08-18  8:22 ` [PATCH v2 3/3] PCI: qcom: Use frequency and level based OPP lookup Krishna Chaitanya Chundru
  2 siblings, 1 reply; 12+ messages in thread
From: Krishna Chaitanya Chundru @ 2025-08-18  8:22 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree,
	Krishna Chaitanya Chundru

Add opp-level to indicate PCIe data rates and also define OPP enteries
for each link width and data rate.

Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 41 +++++++++++++++++++++++++++++-------
 1 file changed, 33 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 33574ad706b915136546c7f92c7cd0b8a0d62b7e..d7f8706ca4949e253a4102474c92b393a345262f 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -2052,6 +2052,7 @@ opp-2500000 {
 					opp-hz = /bits/ 64 <2500000>;
 					required-opps = <&rpmhpd_opp_low_svs>;
 					opp-peak-kBps = <250000 1>;
+					opp-level = <1>;
 				};
 
 				/* GEN 2 x1 */
@@ -2059,6 +2060,7 @@ opp-5000000 {
 					opp-hz = /bits/ 64 <5000000>;
 					required-opps = <&rpmhpd_opp_low_svs>;
 					opp-peak-kBps = <500000 1>;
+					opp-level = <2>;
 				};
 
 				/* GEN 3 x1 */
@@ -2066,6 +2068,7 @@ opp-8000000 {
 					opp-hz = /bits/ 64 <8000000>;
 					required-opps = <&rpmhpd_opp_nom>;
 					opp-peak-kBps = <984500 1>;
+					opp-level = <3>;
 				};
 			};
 
@@ -2210,45 +2213,67 @@ pcie1_opp_table: opp-table {
 				compatible = "operating-points-v2";
 
 				/* GEN 1 x1 */
-				opp-2500000 {
+				opp-2500000-1 {
 					opp-hz = /bits/ 64 <2500000>;
 					required-opps = <&rpmhpd_opp_low_svs>;
 					opp-peak-kBps = <250000 1>;
+					opp-level = <1>;
 				};
 
-				/* GEN 1 x2 and GEN 2 x1 */
-				opp-5000000 {
+				/* GEN 1 x2 */
+				opp-5000000-1 {
+					opp-hz = /bits/ 64 <5000000>;
+					required-opps = <&rpmhpd_opp_low_svs>;
+					opp-peak-kBps = <500000 1>;
+					opp-level = <1>;
+				};
+
+				/* GEN 2 x1 */
+				opp-5000000-2 {
 					opp-hz = /bits/ 64 <5000000>;
 					required-opps = <&rpmhpd_opp_low_svs>;
 					opp-peak-kBps = <500000 1>;
+					opp-level = <2>;
 				};
 
 				/* GEN 2 x2 */
-				opp-10000000 {
+				opp-10000000-2 {
 					opp-hz = /bits/ 64 <10000000>;
 					required-opps = <&rpmhpd_opp_low_svs>;
 					opp-peak-kBps = <1000000 1>;
+					opp-level = <2>;
 				};
 
 				/* GEN 3 x1 */
-				opp-8000000 {
+				opp-8000000-3 {
 					opp-hz = /bits/ 64 <8000000>;
 					required-opps = <&rpmhpd_opp_nom>;
 					opp-peak-kBps = <984500 1>;
+					opp-level = <3>;
+				};
+
+				/* GEN 3 x2 */
+				opp-16000000-3 {
+					opp-hz = /bits/ 64 <16000000>;
+					required-opps = <&rpmhpd_opp_nom>;
+					opp-peak-kBps = <1969000 1>;
+					opp-level = <3>;
 				};
 
-				/* GEN 3 x2 and GEN 4 x1 */
-				opp-16000000 {
+				/* GEN 4 x1 */
+				opp-16000000-4 {
 					opp-hz = /bits/ 64 <16000000>;
 					required-opps = <&rpmhpd_opp_nom>;
 					opp-peak-kBps = <1969000 1>;
+					opp-level = <4>;
 				};
 
 				/* GEN 4 x2 */
-				opp-32000000 {
+				opp-32000000-4 {
 					opp-hz = /bits/ 64 <32000000>;
 					required-opps = <&rpmhpd_opp_nom>;
 					opp-peak-kBps = <3938000 1>;
+					opp-level = <4>;
 				};
 			};
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 3/3] PCI: qcom: Use frequency and level based OPP lookup
  2025-08-18  8:22 [PATCH v2 0/3] PM/OPP: Support to match OPP based on both frequency and level Krishna Chaitanya Chundru
  2025-08-18  8:22 ` [PATCH v2 1/3] " Krishna Chaitanya Chundru
  2025-08-18  8:22 ` [PATCH v2 2/3] arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates Krishna Chaitanya Chundru
@ 2025-08-18  8:22 ` Krishna Chaitanya Chundru
  2 siblings, 0 replies; 12+ messages in thread
From: Krishna Chaitanya Chundru @ 2025-08-18  8:22 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree,
	Krishna Chaitanya Chundru

PCIe supports multiple data rates that may operate at the same clock
frequency by varying the link width. In such cases, frequency alone
is insufficient to identify the correct OPP. Use the newly introduced
dev_pm_opp_find_freq_level_exact() API to match both frequency and
level when selecting an OPP, here level indicates PCIe data rate.

Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
 drivers/pci/controller/dwc/pcie-qcom.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 294babe1816e4d0c2b2343fe22d89af72afcd6cd..698209b5c13d99c639b09ca05bcd05767a2b9be1 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1582,8 +1582,7 @@ static void qcom_pcie_icc_opp_update(struct qcom_pcie *pcie)
 			return;
 
 		freq_kbps = freq_mbps * KILO;
-		opp = dev_pm_opp_find_freq_exact(pci->dev, freq_kbps * width,
-						 true);
+		opp = dev_pm_opp_find_freq_level_exact(pci->dev, freq_kbps * width, speed, true);
 		if (!IS_ERR(opp)) {
 			ret = dev_pm_opp_set_opp(pci->dev, opp);
 			if (ret)

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] PM/OPP: Support to match OPP based on both frequency and level.
  2025-08-18  8:22 ` [PATCH v2 1/3] " Krishna Chaitanya Chundru
@ 2025-08-18  8:55   ` Viresh Kumar
  2025-08-18  8:57     ` Viresh Kumar
  2025-08-18  9:04     ` Krishna Chaitanya Chundru
  2025-08-18 23:46   ` kernel test robot
  2025-08-18 23:46   ` kernel test robot
  2 siblings, 2 replies; 12+ messages in thread
From: Viresh Kumar @ 2025-08-18  8:55 UTC (permalink / raw)
  To: Krishna Chaitanya Chundru
  Cc: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley,
	linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree

On 18-08-25, 13:52, Krishna Chaitanya Chundru wrote:
> +static bool _compare_opp_key_exact(struct dev_pm_opp **opp, struct dev_pm_opp *temp_opp,
> +				   struct dev_pm_opp_key opp_key, struct dev_pm_opp_key key)
> +{
> +	bool freq_match = (opp_key.freq == 0 || key.freq == 0 || opp_key.freq == key.freq);

Why !opp_key.freq is okay ? If the user has provided a freq value,
then it must match. Isn't it ?

> +	bool level_match = (opp_key.level == OPP_LEVEL_UNSET ||
> +			    key.level == OPP_LEVEL_UNSET || opp_key.level == key.level);

We should compare bw too I guess in the same routine.

> +	if (freq_match && level_match) {
> +		*opp = temp_opp;
> +		return true;
> +	}
> +
> +	return false;
> +}
> +/**
> + * dev_pm_opp_find_freq_level_exact() - Search for an exact frequency and level

Instead dev_pm_opp_find_key_exact() and let the user pass the key
struct itself.

> +struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
> +						    unsigned long freq,
> +						    unsigned int level,
> +						    bool available)
> +{
> +	struct opp_table *opp_table __free(put_opp_table);

The constructor here must be real, i.e. initialize opp_table here
itself. This is well documented in cleanup.h. Yes there are examples
like this in the OPP core which are required to be fixed too.

-- 
viresh

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] PM/OPP: Support to match OPP based on both frequency and level.
  2025-08-18  8:55   ` Viresh Kumar
@ 2025-08-18  8:57     ` Viresh Kumar
  2025-08-18  9:04     ` Krishna Chaitanya Chundru
  1 sibling, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2025-08-18  8:57 UTC (permalink / raw)
  To: Krishna Chaitanya Chundru
  Cc: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley,
	linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree

On 18-08-25, 14:25, Viresh Kumar wrote:

Also subject should be: "OPP: Add support to find OPP for a set of
keys" or something on those lines (I was more looking for the OPP:
prefix).

-- 
viresh

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/3] arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates
  2025-08-18  8:22 ` [PATCH v2 2/3] arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates Krishna Chaitanya Chundru
@ 2025-08-18  9:02   ` Viresh Kumar
  2025-08-18  9:07     ` Krishna Chaitanya Chundru
  0 siblings, 1 reply; 12+ messages in thread
From: Viresh Kumar @ 2025-08-18  9:02 UTC (permalink / raw)
  To: Krishna Chaitanya Chundru
  Cc: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley,
	linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree

On 18-08-25, 13:52, Krishna Chaitanya Chundru wrote:
> @@ -2210,45 +2213,67 @@ pcie1_opp_table: opp-table {
>  				compatible = "operating-points-v2";
>  
>  				/* GEN 1 x1 */
> -				opp-2500000 {
> +				opp-2500000-1 {

Why mention -1 here when there is only one entry with this freq value
?

>  					opp-hz = /bits/ 64 <2500000>;
>  					required-opps = <&rpmhpd_opp_low_svs>;
>  					opp-peak-kBps = <250000 1>;
> +					opp-level = <1>;
>  				};
>  
> -				/* GEN 1 x2 and GEN 2 x1 */
> -				opp-5000000 {
> +				/* GEN 1 x2 */
> +				opp-5000000-1 {
> +					opp-hz = /bits/ 64 <5000000>;
> +					required-opps = <&rpmhpd_opp_low_svs>;
> +					opp-peak-kBps = <500000 1>;
> +					opp-level = <1>;
> +				};
> +
> +				/* GEN 2 x1 */
> +				opp-5000000-2 {
>  					opp-hz = /bits/ 64 <5000000>;
>  					required-opps = <&rpmhpd_opp_low_svs>;
>  					opp-peak-kBps = <500000 1>;
> +					opp-level = <2>;
>  				};

This looks okay.

>  
>  				/* GEN 2 x2 */
> -				opp-10000000 {
> +				opp-10000000-2 {

Why -2 here ?

>  					opp-hz = /bits/ 64 <10000000>;
>  					required-opps = <&rpmhpd_opp_low_svs>;
>  					opp-peak-kBps = <1000000 1>;
> +					opp-level = <2>;
>  				};
>  
>  				/* GEN 3 x1 */
> -				opp-8000000 {
> +				opp-8000000-3 {

same.

>  					opp-hz = /bits/ 64 <8000000>;
>  					required-opps = <&rpmhpd_opp_nom>;
>  					opp-peak-kBps = <984500 1>;
> +					opp-level = <3>;
> +				};
> +
> +				/* GEN 3 x2 */
> +				opp-16000000-3 {

Shouldn't this be opp-16000000-1 only ? This is the first occurrence
16000000.

> +					opp-hz = /bits/ 64 <16000000>;
> +					required-opps = <&rpmhpd_opp_nom>;
> +					opp-peak-kBps = <1969000 1>;
> +					opp-level = <3>;
>  				};
>  
> -				/* GEN 3 x2 and GEN 4 x1 */
> -				opp-16000000 {
> +				/* GEN 4 x1 */
> +				opp-16000000-4 {

opp-16000000-2 ?

-- 
viresh

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] PM/OPP: Support to match OPP based on both frequency and level.
  2025-08-18  8:55   ` Viresh Kumar
  2025-08-18  8:57     ` Viresh Kumar
@ 2025-08-18  9:04     ` Krishna Chaitanya Chundru
  1 sibling, 0 replies; 12+ messages in thread
From: Krishna Chaitanya Chundru @ 2025-08-18  9:04 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley,
	linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree



On 8/18/2025 2:25 PM, Viresh Kumar wrote:
> On 18-08-25, 13:52, Krishna Chaitanya Chundru wrote:
>> +static bool _compare_opp_key_exact(struct dev_pm_opp **opp, struct dev_pm_opp *temp_opp,
>> +				   struct dev_pm_opp_key opp_key, struct dev_pm_opp_key key)
>> +{
>> +	bool freq_match = (opp_key.freq == 0 || key.freq == 0 || opp_key.freq == key.freq);
> 
> Why !opp_key.freq is okay ? If the user has provided a freq value,
> then it must match. Isn't it ?
> 
ok I will fix this in next patch.
>> +	bool level_match = (opp_key.level == OPP_LEVEL_UNSET ||
>> +			    key.level == OPP_LEVEL_UNSET || opp_key.level == key.level);
> 
> We should compare bw too I guess in the same routine.
ok I will add bw similar to level,
> 
>> +	if (freq_match && level_match) {
>> +		*opp = temp_opp;
>> +		return true;
>> +	}
>> +
>> +	return false;
>> +}
>> +/**
>> + * dev_pm_opp_find_freq_level_exact() - Search for an exact frequency and level
> 
> Instead dev_pm_opp_find_key_exact() and let the user pass the key
> struct itself.
> 
ack
>> +struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
>> +						    unsigned long freq,
>> +						    unsigned int level,
>> +						    bool available)
>> +{
>> +	struct opp_table *opp_table __free(put_opp_table);
> 
> The constructor here must be real, i.e. initialize opp_table here
> itself. This is well documented in cleanup.h. Yes there are examples
> like this in the OPP core which are required to be fixed too.
ack.

- Krishna Chaitanya.
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/3] arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates
  2025-08-18  9:02   ` Viresh Kumar
@ 2025-08-18  9:07     ` Krishna Chaitanya Chundru
  2025-08-18  9:13       ` Viresh Kumar
  0 siblings, 1 reply; 12+ messages in thread
From: Krishna Chaitanya Chundru @ 2025-08-18  9:07 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley,
	linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree



On 8/18/2025 2:32 PM, Viresh Kumar wrote:
> On 18-08-25, 13:52, Krishna Chaitanya Chundru wrote:
>> @@ -2210,45 +2213,67 @@ pcie1_opp_table: opp-table {
>>   				compatible = "operating-points-v2";
>>   
>>   				/* GEN 1 x1 */
>> -				opp-2500000 {
>> +				opp-2500000-1 {
> 
> Why mention -1 here when there is only one entry with this freq value
> ?
> 
>>   					opp-hz = /bits/ 64 <2500000>;
>>   					required-opps = <&rpmhpd_opp_low_svs>;
>>   					opp-peak-kBps = <250000 1>;
>> +					opp-level = <1>;
>>   				};
>>   
>> -				/* GEN 1 x2 and GEN 2 x1 */
>> -				opp-5000000 {
>> +				/* GEN 1 x2 */
>> +				opp-5000000-1 {
>> +					opp-hz = /bits/ 64 <5000000>;
>> +					required-opps = <&rpmhpd_opp_low_svs>;
>> +					opp-peak-kBps = <500000 1>;
>> +					opp-level = <1>;
>> +				};
>> +
>> +				/* GEN 2 x1 */
>> +				opp-5000000-2 {
>>   					opp-hz = /bits/ 64 <5000000>;
>>   					required-opps = <&rpmhpd_opp_low_svs>;
>>   					opp-peak-kBps = <500000 1>;
>> +					opp-level = <2>;
>>   				};
> 
> This looks okay.
> 
>>   
>>   				/* GEN 2 x2 */
>> -				opp-10000000 {
>> +				opp-10000000-2 {
> 
> Why -2 here ?
> 
>>   					opp-hz = /bits/ 64 <10000000>;
>>   					required-opps = <&rpmhpd_opp_low_svs>;
>>   					opp-peak-kBps = <1000000 1>;
>> +					opp-level = <2>;
>>   				};
>>   
>>   				/* GEN 3 x1 */
>> -				opp-8000000 {
>> +				opp-8000000-3 {
> 
> same.
> 
>>   					opp-hz = /bits/ 64 <8000000>;
>>   					required-opps = <&rpmhpd_opp_nom>;
>>   					opp-peak-kBps = <984500 1>;
>> +					opp-level = <3>;
>> +				};
>> +
>> +				/* GEN 3 x2 */
>> +				opp-16000000-3 {
> 
> Shouldn't this be opp-16000000-1 only ? This is the first occurrence
> 16000000.
> 
>> +					opp-hz = /bits/ 64 <16000000>;
>> +					required-opps = <&rpmhpd_opp_nom>;
>> +					opp-peak-kBps = <1969000 1>;
>> +					opp-level = <3>;
>>   				};
>>   
>> -				/* GEN 3 x2 and GEN 4 x1 */
>> -				opp-16000000 {
>> +				/* GEN 4 x1 */
>> +				opp-16000000-4 {
> 
> opp-16000000-2 ?
I tried to add the level as prefix as that will indicate the PCIe date
rate also instead of 1, 2 to make more aligned with the PCIe 
representations. I will update this in the commit text in my next
series.

- Krishna Chaitanya.
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/3] arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates
  2025-08-18  9:07     ` Krishna Chaitanya Chundru
@ 2025-08-18  9:13       ` Viresh Kumar
  0 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2025-08-18  9:13 UTC (permalink / raw)
  To: Krishna Chaitanya Chundru
  Cc: Viresh Kumar, Nishanth Menon, Stephen Boyd, Rafael J. Wysocki,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley,
	linux-pm, linux-kernel, linux-pci, linux-arm-msm, devicetree

On 18-08-25, 14:37, Krishna Chaitanya Chundru wrote:
> I tried to add the level as prefix as that will indicate the PCIe date
> rate also instead of 1, 2 to make more aligned with the PCIe
> representations. I will update this in the commit text in my next
> series.

Okay, I will let the DT maintainers confirm if that is okay or not.

-- 
viresh

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] PM/OPP: Support to match OPP based on both frequency and level.
  2025-08-18  8:22 ` [PATCH v2 1/3] " Krishna Chaitanya Chundru
  2025-08-18  8:55   ` Viresh Kumar
@ 2025-08-18 23:46   ` kernel test robot
  2025-08-18 23:46   ` kernel test robot
  2 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2025-08-18 23:46 UTC (permalink / raw)
  To: Krishna Chaitanya Chundru, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Rafael J. Wysocki, Manivannan Sadhasivam,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Bjorn Helgaas, Bjorn Andersson, Konrad Dybcio,
	Krzysztof Kozlowski, Conor Dooley
  Cc: oe-kbuild-all, linux-pm, linux-kernel, linux-pci, linux-arm-msm,
	devicetree, Krishna Chaitanya Chundru

Hi Krishna,

kernel test robot noticed the following build errors:

[auto build test ERROR on c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9]

url:    https://github.com/intel-lab-lkp/linux/commits/Krishna-Chaitanya-Chundru/PM-OPP-Support-to-match-OPP-based-on-both-frequency-and-level/20250818-162759
base:   c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9
patch link:    https://lore.kernel.org/r/20250818-opp_pcie-v2-1-071524d98967%40oss.qualcomm.com
patch subject: [PATCH v2 1/3] PM/OPP: Support to match OPP based on both frequency and level.
config: parisc-allnoconfig (https://download.01.org/0day-ci/archive/20250819/202508190712.5L4VOrmr-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250819/202508190712.5L4VOrmr-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508190712.5L4VOrmr-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/cpufreq.h:18,
                    from include/trace/events/power.h:8,
                    from kernel/cpu.c:42:
>> include/linux/pm_opp.h:297:20: warning: no previous prototype for 'dev_pm_opp_find_freq_level_exact' [-Wmissing-prototypes]
     297 | struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   hppa-linux-ld: kernel/sched/core.o: in function `dev_pm_opp_find_freq_level_exact':
>> (.text+0xba4): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here
   hppa-linux-ld: kernel/sched/fair.o: in function `dev_pm_opp_find_freq_level_exact':
   (.text+0x50ac): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here
   hppa-linux-ld: kernel/sched/build_policy.o: in function `dev_pm_opp_find_freq_level_exact':
   (.text+0x4d44): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here
   hppa-linux-ld: kernel/sched/build_utility.o: in function `dev_pm_opp_find_freq_level_exact':
   (.text+0x2b44): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here
   hppa-linux-ld: kernel/power/qos.o: in function `dev_pm_opp_find_freq_level_exact':
   (.text+0x188): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here
   hppa-linux-ld: kernel/time/tick-common.o: in function `dev_pm_opp_find_freq_level_exact':
   (.text+0x164): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here
   hppa-linux-ld: fs/proc/cpuinfo.o: in function `dev_pm_opp_find_freq_level_exact':
   (.text+0x24): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here
   hppa-linux-ld: drivers/base/core.o: in function `dev_pm_opp_find_freq_level_exact':
   (.text+0x5348): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here
   hppa-linux-ld: drivers/base/syscore.o: in function `dev_pm_opp_find_freq_level_exact':
   (.text+0xb8): multiple definition of `dev_pm_opp_find_freq_level_exact'; kernel/cpu.o:(.text+0x6a0): first defined here

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] PM/OPP: Support to match OPP based on both frequency and level.
  2025-08-18  8:22 ` [PATCH v2 1/3] " Krishna Chaitanya Chundru
  2025-08-18  8:55   ` Viresh Kumar
  2025-08-18 23:46   ` kernel test robot
@ 2025-08-18 23:46   ` kernel test robot
  2 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2025-08-18 23:46 UTC (permalink / raw)
  To: Krishna Chaitanya Chundru, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Rafael J. Wysocki, Manivannan Sadhasivam,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Bjorn Helgaas, Bjorn Andersson, Konrad Dybcio,
	Krzysztof Kozlowski, Conor Dooley
  Cc: llvm, oe-kbuild-all, linux-pm, linux-kernel, linux-pci,
	linux-arm-msm, devicetree, Krishna Chaitanya Chundru

Hi Krishna,

kernel test robot noticed the following build warnings:

[auto build test WARNING on c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9]

url:    https://github.com/intel-lab-lkp/linux/commits/Krishna-Chaitanya-Chundru/PM-OPP-Support-to-match-OPP-based-on-both-frequency-and-level/20250818-162759
base:   c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9
patch link:    https://lore.kernel.org/r/20250818-opp_pcie-v2-1-071524d98967%40oss.qualcomm.com
patch subject: [PATCH v2 1/3] PM/OPP: Support to match OPP based on both frequency and level.
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20250819/202508190743.lszMYiro-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250819/202508190743.lszMYiro-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508190743.lszMYiro-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/core.c:89:
   In file included from kernel/sched/sched.h:31:
   In file included from include/linux/cpufreq.h:18:
>> include/linux/pm_opp.h:297:20: warning: no previous prototype for function 'dev_pm_opp_find_freq_level_exact' [-Wmissing-prototypes]
     297 | struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
         |                    ^
   include/linux/pm_opp.h:297:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     297 | struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
         | ^
         | static 
   kernel/sched/core.c:2445:20: warning: unused function 'rq_has_pinned_tasks' [-Wunused-function]
    2445 | static inline bool rq_has_pinned_tasks(struct rq *rq)
         |                    ^~~~~~~~~~~~~~~~~~~
   kernel/sched/core.c:5795:20: warning: unused function 'sched_tick_stop' [-Wunused-function]
    5795 | static inline void sched_tick_stop(int cpu) { }
         |                    ^~~~~~~~~~~~~~~
   kernel/sched/core.c:6514:20: warning: unused function 'sched_core_cpu_deactivate' [-Wunused-function]
    6514 | static inline void sched_core_cpu_deactivate(unsigned int cpu) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/core.c:6515:20: warning: unused function 'sched_core_cpu_dying' [-Wunused-function]
    6515 | static inline void sched_core_cpu_dying(unsigned int cpu) {}
         |                    ^~~~~~~~~~~~~~~~~~~~
   kernel/sched/core.c:8305:20: warning: unused function 'balance_hotplug_wait' [-Wunused-function]
    8305 | static inline void balance_hotplug_wait(void)
         |                    ^~~~~~~~~~~~~~~~~~~~
   6 warnings generated.
--
   In file included from kernel/sched/fair.c:57:
   In file included from kernel/sched/sched.h:31:
   In file included from include/linux/cpufreq.h:18:
>> include/linux/pm_opp.h:297:20: warning: no previous prototype for function 'dev_pm_opp_find_freq_level_exact' [-Wmissing-prototypes]
     297 | struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
         |                    ^
   include/linux/pm_opp.h:297:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     297 | struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
         | ^
         | static 
   kernel/sched/fair.c:482:20: warning: unused function 'list_del_leaf_cfs_rq' [-Wunused-function]
     482 | static inline void list_del_leaf_cfs_rq(struct cfs_rq *cfs_rq)
         |                    ^~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:503:19: warning: unused function 'tg_is_idle' [-Wunused-function]
     503 | static inline int tg_is_idle(struct task_group *tg)
         |                   ^~~~~~~~~~
   kernel/sched/fair.c:3997:20: warning: unused function 'load_avg_is_decayed' [-Wunused-function]
    3997 | static inline bool load_avg_is_decayed(struct sched_avg *sa)
         |                    ^~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:6640:20: warning: unused function 'sync_throttle' [-Wunused-function]
    6640 | static inline void sync_throttle(struct task_group *tg, int cpu) {}
         |                    ^~~~~~~~~~~~~
   kernel/sched/fair.c:6664:37: warning: unused function 'tg_cfs_bandwidth' [-Wunused-function]
    6664 | static inline struct cfs_bandwidth *tg_cfs_bandwidth(struct task_group *tg)
         |                                     ^~~~~~~~~~~~~~~~
   kernel/sched/fair.c:6668:20: warning: unused function 'destroy_cfs_bandwidth' [-Wunused-function]
    6668 | static inline void destroy_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:9991:20: warning: unused function 'check_misfit_status' [-Wunused-function]
     9991 | static inline bool check_misfit_status(struct rq *rq)
          |                    ^~~~~~~~~~~~~~~~~~~
   8 warnings generated.
--
   In file included from kernel/sched/build_policy.c:41:
   In file included from kernel/sched/sched.h:31:
   In file included from include/linux/cpufreq.h:18:
>> include/linux/pm_opp.h:297:20: warning: no previous prototype for function 'dev_pm_opp_find_freq_level_exact' [-Wmissing-prototypes]
     297 | struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
         |                    ^
   include/linux/pm_opp.h:297:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     297 | struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
         | ^
         | static 
   1 warning generated.


vim +/dev_pm_opp_find_freq_level_exact +297 include/linux/pm_opp.h

   296	
 > 297	struct dev_pm_opp *dev_pm_opp_find_freq_level_exact(struct device *dev,
   298							    unsigned long freq,
   299							    unsigned int level,
   300							    bool available)
   301	{
   302		return ERR_PTR(-EOPNOTSUPP);
   303	}
   304	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-08-18 23:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18  8:22 [PATCH v2 0/3] PM/OPP: Support to match OPP based on both frequency and level Krishna Chaitanya Chundru
2025-08-18  8:22 ` [PATCH v2 1/3] " Krishna Chaitanya Chundru
2025-08-18  8:55   ` Viresh Kumar
2025-08-18  8:57     ` Viresh Kumar
2025-08-18  9:04     ` Krishna Chaitanya Chundru
2025-08-18 23:46   ` kernel test robot
2025-08-18 23:46   ` kernel test robot
2025-08-18  8:22 ` [PATCH v2 2/3] arm64: dts: qcom: sm8450: Add opp-level to indicate PCIe data rates Krishna Chaitanya Chundru
2025-08-18  9:02   ` Viresh Kumar
2025-08-18  9:07     ` Krishna Chaitanya Chundru
2025-08-18  9:13       ` Viresh Kumar
2025-08-18  8:22 ` [PATCH v2 3/3] PCI: qcom: Use frequency and level based OPP lookup Krishna Chaitanya Chundru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).