linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] interconnect: Support Samsung Exynos use-case
       [not found] <CGME20200116144241eucas1p226c1d7fc2fad5bd1b9fb6d0fb1b22bff@eucas1p2.samsung.com>
@ 2020-01-16 14:41 ` Artur Świgoń
       [not found]   ` <CGME20200116144241eucas1p18dcf099873015e955d71d90712bbe9e0@eucas1p1.samsung.com>
                     ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Artur Świgoń @ 2020-01-16 14:41 UTC (permalink / raw)
  To: linux-pm, linux-kernel, linux-samsung-soc
  Cc: Artur Świgoń,
	georgi.djakov, cw00.choi, b.zolnierkie, m.szyprowski, krzk

Previously posted as a part of a larger RFC: [1].

The Exynos SoC family relies on the devfreq driver for frequency
scaling. However, a way to programmatically enforce QoS contraints
(i.e., minimum frequency) is desired. A solution which uses the
interconnect framework to ensure QoS is currently being developed[1].

The exynos-bus hierarchy is composed of multiple buses which are probed
separately. Sometimes the DMC is even handled by a different driver.
Since the exynos-bus driver is generic and supports multiple differing
bus hierarchies, IDs for nodes (i.e. buses) are assigned dynamically. Due
to the unspecified relative probing order, every bus registers its own
interconnect provider.

Rationale for each patch in this series:
* Patch 01 (exporting of_icc_get_from_provider()) makes it easy to
  retrieve the parent node from the DT (cf. patch 05 in [1]).
* Patch 02 (allowing #interconnect-cells = <0>) allows to remove dummy
  node IDs from the DT.
* Patch 03 (allowing inter-provider node pairs) is necessary to make
  such multi-provider hierarchy work. A new approach implemented in v3
  ensures not to break any existing drivers.

---
Changes since v3 (to patches in this series):
* Improve commit messages.

---
Artur Świgoń
Samsung R&D Institute Poland
Samsung Electronics

---
References:
[1] https://patchwork.kernel.org/patch/11305287/

Artur Świgoń (3):
  interconnect: Export of_icc_get_from_provider()
  interconnect: Relax requirement in of_icc_get_from_provider()
  interconnect: Allow inter-provider pairs to be configured

 drivers/interconnect/core.c           | 16 ++++++++--------
 include/linux/interconnect-provider.h |  8 ++++++++
 2 files changed, 16 insertions(+), 8 deletions(-)

-- 
2.17.1


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

* [PATCH v4 1/3] interconnect: Export of_icc_get_from_provider()
       [not found]   ` <CGME20200116144241eucas1p18dcf099873015e955d71d90712bbe9e0@eucas1p1.samsung.com>
@ 2020-01-16 14:42     ` Artur Świgoń
  2020-01-23  9:21       ` Georgi Djakov
  0 siblings, 1 reply; 10+ messages in thread
From: Artur Świgoń @ 2020-01-16 14:42 UTC (permalink / raw)
  To: linux-pm, linux-kernel, linux-samsung-soc
  Cc: Artur Świgoń,
	georgi.djakov, cw00.choi, b.zolnierkie, m.szyprowski, krzk

This patch makes the above function public (for use in exynos-bus devfreq
driver).

Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/interconnect/core.c           | 3 ++-
 include/linux/interconnect-provider.h | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index f277e467156f..0be1764d3528 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -330,7 +330,7 @@ EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
  * Returns a valid pointer to struct icc_node on success or ERR_PTR()
  * on failure.
  */
-static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
+struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
 {
 	struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
 	struct icc_provider *provider;
@@ -349,6 +349,7 @@ static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
 
 	return node;
 }
+EXPORT_SYMBOL_GPL(of_icc_get_from_provider);
 
 /**
  * of_icc_get() - get a path handle from a DT node based on name
diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
index 0c494534b4d3..cc965b8fab53 100644
--- a/include/linux/interconnect-provider.h
+++ b/include/linux/interconnect-provider.h
@@ -103,6 +103,7 @@ void icc_node_del(struct icc_node *node);
 int icc_nodes_remove(struct icc_provider *provider);
 int icc_provider_add(struct icc_provider *provider);
 int icc_provider_del(struct icc_provider *provider);
+struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
 
 #else
 
@@ -154,6 +155,11 @@ static inline int icc_provider_del(struct icc_provider *provider)
 	return -ENOTSUPP;
 }
 
+struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
+{
+	return ERR_PTR(-ENOTSUPP);
+}
+
 #endif /* CONFIG_INTERCONNECT */
 
 #endif /* __LINUX_INTERCONNECT_PROVIDER_H */
-- 
2.17.1


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

* [PATCH v4 2/3] interconnect: Relax requirement in of_icc_get_from_provider()
       [not found]   ` <CGME20200116144242eucas1p2bf8b4df91355974c8c96778f4ec117f7@eucas1p2.samsung.com>
@ 2020-01-16 14:42     ` Artur Świgoń
  2020-01-17  5:24       ` Chanwoo Choi
  0 siblings, 1 reply; 10+ messages in thread
From: Artur Świgoń @ 2020-01-16 14:42 UTC (permalink / raw)
  To: linux-pm, linux-kernel, linux-samsung-soc
  Cc: Artur Świgoń,
	georgi.djakov, cw00.choi, b.zolnierkie, m.szyprowski, krzk

This patch relaxes the condition in of_icc_get_from_provider() so that
it is no longer required to set '#interconnect-cells' to <1> in the DT,
and therefore it is not required to supply dummy node IDs in the
'interconnects' property when node IDs are dynamically generated rather
than hardcoded (statically allocated).

In case of the devfreq driver for exynos-bus, node IDs are dynamically
allocated and '#interconnect-cells' is always zero.

Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/interconnect/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 0be1764d3528..5ea270af5ff4 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -335,7 +335,7 @@ struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
 	struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
 	struct icc_provider *provider;
 
-	if (!spec || spec->args_count != 1)
+	if (!spec)
 		return ERR_PTR(-EINVAL);
 
 	mutex_lock(&icc_lock);
-- 
2.17.1


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

* [PATCH v4 3/3] interconnect: Allow inter-provider pairs to be configured
       [not found]   ` <CGME20200116144242eucas1p1b66d8ca0d111f140c48b80c5064ca4ff@eucas1p1.samsung.com>
@ 2020-01-16 14:42     ` Artur Świgoń
  0 siblings, 0 replies; 10+ messages in thread
From: Artur Świgoń @ 2020-01-16 14:42 UTC (permalink / raw)
  To: linux-pm, linux-kernel, linux-samsung-soc
  Cc: Artur Świgoń,
	georgi.djakov, cw00.choi, b.zolnierkie, m.szyprowski, krzk

This patch adds support for a new boolean 'inter_set' field in struct
icc_provider. Setting it to 'true' enables calling '->set' for
inter-provider node pairs. All existing users of the interconnect
framework allocate this structure with kzalloc, and are therefore
unaffected by this change.

This makes it easier for hierarchies like exynos-bus, where every bus
is probed separately and registers a separate interconnect provider, to
model constraints between buses (or between buses and DMC, handled by
two separate drivers in case of Exynos5422).

Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
---
 drivers/interconnect/core.c           | 11 +++++------
 include/linux/interconnect-provider.h |  2 ++
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 5ea270af5ff4..caa9e35f06a3 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -259,23 +259,22 @@ static int aggregate_requests(struct icc_node *node)
 static int apply_constraints(struct icc_path *path)
 {
 	struct icc_node *next, *prev = NULL;
+	struct icc_provider *p;
 	int ret = -EINVAL;
 	int i;
 
 	for (i = 0; i < path->num_nodes; i++) {
 		next = path->reqs[i].node;
+		p = next->provider;
 
-		/*
-		 * Both endpoints should be valid master-slave pairs of the
-		 * same interconnect provider that will be configured.
-		 */
-		if (!prev || next->provider != prev->provider) {
+		/* both endpoints should be valid master-slave pairs */
+		if (!prev || (p != prev->provider && !p->inter_set)) {
 			prev = next;
 			continue;
 		}
 
 		/* set the constraints */
-		ret = next->provider->set(prev, next);
+		ret = p->set(prev, next);
 		if (ret)
 			goto out;
 
diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
index cc965b8fab53..b6ae0ee686c5 100644
--- a/include/linux/interconnect-provider.h
+++ b/include/linux/interconnect-provider.h
@@ -41,6 +41,7 @@ struct icc_node *of_icc_xlate_onecell(struct of_phandle_args *spec,
  * @xlate: provider-specific callback for mapping nodes from phandle arguments
  * @dev: the device this interconnect provider belongs to
  * @users: count of active users
+ * @inter_set: whether inter-provider pairs will be configured with @set
  * @data: pointer to private data
  */
 struct icc_provider {
@@ -53,6 +54,7 @@ struct icc_provider {
 	struct icc_node* (*xlate)(struct of_phandle_args *spec, void *data);
 	struct device		*dev;
 	int			users;
+	bool			inter_set;
 	void			*data;
 };
 
-- 
2.17.1


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

* Re: [PATCH v4 2/3] interconnect: Relax requirement in of_icc_get_from_provider()
  2020-01-16 14:42     ` [PATCH v4 2/3] interconnect: Relax requirement in of_icc_get_from_provider() Artur Świgoń
@ 2020-01-17  5:24       ` Chanwoo Choi
  0 siblings, 0 replies; 10+ messages in thread
From: Chanwoo Choi @ 2020-01-17  5:24 UTC (permalink / raw)
  To: Artur Świgoń, linux-pm, linux-kernel, linux-samsung-soc
  Cc: georgi.djakov, b.zolnierkie, m.szyprowski, krzk

Hi,

On 1/16/20 11:42 PM, Artur Świgoń wrote:
> This patch relaxes the condition in of_icc_get_from_provider() so that
> it is no longer required to set '#interconnect-cells' to <1> in the DT,
> and therefore it is not required to supply dummy node IDs in the
> 'interconnects' property when node IDs are dynamically generated rather
> than hardcoded (statically allocated).
> 
> In case of the devfreq driver for exynos-bus, node IDs are dynamically
> allocated and '#interconnect-cells' is always zero.
> 
> Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/interconnect/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
> index 0be1764d3528..5ea270af5ff4 100644
> --- a/drivers/interconnect/core.c
> +++ b/drivers/interconnect/core.c
> @@ -335,7 +335,7 @@ struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
>  	struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
>  	struct icc_provider *provider;
>  
> -	if (!spec || spec->args_count != 1)
> +	if (!spec)
>  		return ERR_PTR(-EINVAL);
>  
>  	mutex_lock(&icc_lock);
> 

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH v4 0/3] interconnect: Support Samsung Exynos use-case
  2020-01-16 14:41 ` [PATCH v4 0/3] interconnect: Support Samsung Exynos use-case Artur Świgoń
                     ` (2 preceding siblings ...)
       [not found]   ` <CGME20200116144242eucas1p1b66d8ca0d111f140c48b80c5064ca4ff@eucas1p1.samsung.com>
@ 2020-01-17  5:31   ` Chanwoo Choi
  2020-01-17  6:10     ` Artur Świgoń
  3 siblings, 1 reply; 10+ messages in thread
From: Chanwoo Choi @ 2020-01-17  5:31 UTC (permalink / raw)
  To: Artur Świgoń, linux-pm, linux-kernel, linux-samsung-soc
  Cc: georgi.djakov, b.zolnierkie, m.szyprowski, krzk

Hi Artur,

I'm concerned about that make it the separate series
without use-case like exynos-bus, exynos-drm.
If this series is applied to v5.6, it doesn't make
the problem and the patches for exynos-bus/exynos-drm
will be reviewed and then merged on later kernel version.

But, if not, the interconnect, exynos-bus and exynos-drm
patches should be merged into the same kernel version,
it must require the immutable branch among interconnect,
devfreq and exynos-drm. I think that you need to consider
it between different subsystems.

Regards,
Chanwoo Choi

On 1/16/20 11:41 PM, Artur Świgoń wrote:
> Previously posted as a part of a larger RFC: [1].
> 
> The Exynos SoC family relies on the devfreq driver for frequency
> scaling. However, a way to programmatically enforce QoS contraints
> (i.e., minimum frequency) is desired. A solution which uses the
> interconnect framework to ensure QoS is currently being developed[1].
> 
> The exynos-bus hierarchy is composed of multiple buses which are probed
> separately. Sometimes the DMC is even handled by a different driver.
> Since the exynos-bus driver is generic and supports multiple differing
> bus hierarchies, IDs for nodes (i.e. buses) are assigned dynamically. Due
> to the unspecified relative probing order, every bus registers its own
> interconnect provider.
> 
> Rationale for each patch in this series:
> * Patch 01 (exporting of_icc_get_from_provider()) makes it easy to
>   retrieve the parent node from the DT (cf. patch 05 in [1]).
> * Patch 02 (allowing #interconnect-cells = <0>) allows to remove dummy
>   node IDs from the DT.
> * Patch 03 (allowing inter-provider node pairs) is necessary to make
>   such multi-provider hierarchy work. A new approach implemented in v3
>   ensures not to break any existing drivers.
> 
> ---
> Changes since v3 (to patches in this series):
> * Improve commit messages.
> 
> ---
> Artur Świgoń
> Samsung R&D Institute Poland
> Samsung Electronics
> 
> ---
> References:
> [1] https://patchwork.kernel.org/patch/11305287/
> 
> Artur Świgoń (3):
>   interconnect: Export of_icc_get_from_provider()
>   interconnect: Relax requirement in of_icc_get_from_provider()
>   interconnect: Allow inter-provider pairs to be configured
> 
>  drivers/interconnect/core.c           | 16 ++++++++--------
>  include/linux/interconnect-provider.h |  8 ++++++++
>  2 files changed, 16 insertions(+), 8 deletions(-)
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH v4 0/3] interconnect: Support Samsung Exynos use-case
  2020-01-17  5:31   ` [PATCH v4 0/3] interconnect: Support Samsung Exynos use-case Chanwoo Choi
@ 2020-01-17  6:10     ` Artur Świgoń
  2020-01-17  7:14       ` Chanwoo Choi
  0 siblings, 1 reply; 10+ messages in thread
From: Artur Świgoń @ 2020-01-17  6:10 UTC (permalink / raw)
  To: Chanwoo Choi, linux-pm, linux-kernel, linux-samsung-soc
  Cc: georgi.djakov, b.zolnierkie, m.szyprowski, krzk

Hi Chanwoo,

On Fri, 2020-01-17 at 14:31 +0900, Chanwoo Choi wrote:
> Hi Artur,
> 
> I'm concerned about that make it the separate series
> without use-case like exynos-bus, exynos-drm.
> If this series is applied to v5.6, it doesn't make
> the problem and the patches for exynos-bus/exynos-drm
> will be reviewed and then merged on later kernel version.
> 
> But, if not, the interconnect, exynos-bus and exynos-drm
> patches should be merged into the same kernel version,
> it must require the immutable branch among interconnect,
> devfreq and exynos-drm. I think that you need to consider
> it between different subsystems.

Thanks for the feedback. Due to the fact that the RFC depends
on the proposed changes to the interconnect framework, I need
to ensure that these three patches come first.

If there is any disagreement over any of these three patches,
the rest of the RFC might need to be modified. In such case,
I will update the RFC and send the rest of v4 patches (for
exynos-bus, exynos-mixer, and probably also exynos5-dmc).

> On 1/16/20 11:41 PM, Artur Świgoń wrote:
> > Previously posted as a part of a larger RFC: [1].
> > 
> > The Exynos SoC family relies on the devfreq driver for frequency
> > scaling. However, a way to programmatically enforce QoS contraints
> > (i.e., minimum frequency) is desired. A solution which uses the
> > interconnect framework to ensure QoS is currently being developed[1].
> > 
> > The exynos-bus hierarchy is composed of multiple buses which are probed
> > separately. Sometimes the DMC is even handled by a different driver.
> > Since the exynos-bus driver is generic and supports multiple differing
> > bus hierarchies, IDs for nodes (i.e. buses) are assigned dynamically. Due
> > to the unspecified relative probing order, every bus registers its own
> > interconnect provider.
> > 
> > Rationale for each patch in this series:
> > * Patch 01 (exporting of_icc_get_from_provider()) makes it easy to
> >   retrieve the parent node from the DT (cf. patch 05 in [1]).
> > * Patch 02 (allowing #interconnect-cells = <0>) allows to remove dummy
> >   node IDs from the DT.
> > * Patch 03 (allowing inter-provider node pairs) is necessary to make
> >   such multi-provider hierarchy work. A new approach implemented in v3
> >   ensures not to break any existing drivers.
> > 
> > ---
> > Changes since v3 (to patches in this series):
> > * Improve commit messages.
> > 
> > ---
> > Artur Świgoń
> > Samsung R&D Institute Poland
> > Samsung Electronics
> > 
> > ---
> > References:
> > [1] https://patchwork.kernel.org/patch/11305287/
> > 
> > Artur Świgoń (3):
> >   interconnect: Export of_icc_get_from_provider()
> >   interconnect: Relax requirement in of_icc_get_from_provider()
> >   interconnect: Allow inter-provider pairs to be configured
> > 
> >  drivers/interconnect/core.c           | 16 ++++++++--------
> >  include/linux/interconnect-provider.h |  8 ++++++++
> >  2 files changed, 16 insertions(+), 8 deletions(-)
> > 
> 
> 
-- 
Artur Świgoń
Samsung R&D Institute Poland
Samsung Electronics



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

* Re: [PATCH v4 0/3] interconnect: Support Samsung Exynos use-case
  2020-01-17  6:10     ` Artur Świgoń
@ 2020-01-17  7:14       ` Chanwoo Choi
  0 siblings, 0 replies; 10+ messages in thread
From: Chanwoo Choi @ 2020-01-17  7:14 UTC (permalink / raw)
  To: Artur Świgoń, linux-pm, linux-kernel, linux-samsung-soc
  Cc: georgi.djakov, b.zolnierkie, m.szyprowski, krzk

Hi,

On 1/17/20 3:10 PM, Artur Świgoń wrote:
> Hi Chanwoo,
> 
> On Fri, 2020-01-17 at 14:31 +0900, Chanwoo Choi wrote:
>> Hi Artur,
>>
>> I'm concerned about that make it the separate series
>> without use-case like exynos-bus, exynos-drm.
>> If this series is applied to v5.6, it doesn't make
>> the problem and the patches for exynos-bus/exynos-drm
>> will be reviewed and then merged on later kernel version.
>>
>> But, if not, the interconnect, exynos-bus and exynos-drm
>> patches should be merged into the same kernel version,
>> it must require the immutable branch among interconnect,
>> devfreq and exynos-drm. I think that you need to consider
>> it between different subsystems.
> 
> Thanks for the feedback. Due to the fact that the RFC depends
> on the proposed changes to the interconnect framework, I need
> to ensure that these three patches come first.
> 
> If there is any disagreement over any of these three patches,
> the rest of the RFC might need to be modified. In such case,
> I will update the RFC and send the rest of v4 patches (for
> exynos-bus, exynos-mixer, and probably also exynos5-dmc).

OK. Thanks.

> 
>> On 1/16/20 11:41 PM, Artur Świgoń wrote:
>>> Previously posted as a part of a larger RFC: [1].
>>>
>>> The Exynos SoC family relies on the devfreq driver for frequency
>>> scaling. However, a way to programmatically enforce QoS contraints
>>> (i.e., minimum frequency) is desired. A solution which uses the
>>> interconnect framework to ensure QoS is currently being developed[1].
>>>
>>> The exynos-bus hierarchy is composed of multiple buses which are probed
>>> separately. Sometimes the DMC is even handled by a different driver.
>>> Since the exynos-bus driver is generic and supports multiple differing
>>> bus hierarchies, IDs for nodes (i.e. buses) are assigned dynamically. Due
>>> to the unspecified relative probing order, every bus registers its own
>>> interconnect provider.
>>>
>>> Rationale for each patch in this series:
>>> * Patch 01 (exporting of_icc_get_from_provider()) makes it easy to
>>>   retrieve the parent node from the DT (cf. patch 05 in [1]).
>>> * Patch 02 (allowing #interconnect-cells = <0>) allows to remove dummy
>>>   node IDs from the DT.
>>> * Patch 03 (allowing inter-provider node pairs) is necessary to make
>>>   such multi-provider hierarchy work. A new approach implemented in v3
>>>   ensures not to break any existing drivers.
>>>
>>> ---
>>> Changes since v3 (to patches in this series):
>>> * Improve commit messages.
>>>
>>> ---
>>> Artur Świgoń
>>> Samsung R&D Institute Poland
>>> Samsung Electronics
>>>
>>> ---
>>> References:
>>> [1] https://protect2.fireeye.com/url?k=c69d0cf5-9b4f1bfc-c69c87ba-0cc47a31cdf8-2143c550c0e479bd&u=https://patchwork.kernel.org/patch/11305287/
>>>
>>> Artur Świgoń (3):
>>>   interconnect: Export of_icc_get_from_provider()
>>>   interconnect: Relax requirement in of_icc_get_from_provider()
>>>   interconnect: Allow inter-provider pairs to be configured
>>>
>>>  drivers/interconnect/core.c           | 16 ++++++++--------
>>>  include/linux/interconnect-provider.h |  8 ++++++++
>>>  2 files changed, 16 insertions(+), 8 deletions(-)
>>>
>>
>>


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH v4 1/3] interconnect: Export of_icc_get_from_provider()
  2020-01-16 14:42     ` [PATCH v4 1/3] interconnect: Export of_icc_get_from_provider() Artur Świgoń
@ 2020-01-23  9:21       ` Georgi Djakov
  2020-01-24 11:22         ` Artur Świgoń
  0 siblings, 1 reply; 10+ messages in thread
From: Georgi Djakov @ 2020-01-23  9:21 UTC (permalink / raw)
  To: Artur Świgoń, linux-pm, linux-kernel, linux-samsung-soc
  Cc: cw00.choi, b.zolnierkie, m.szyprowski, krzk

Hi Artur,

On 1/16/20 16:42, Artur Świgoń wrote:
> This patch makes the above function public (for use in exynos-bus devfreq
> driver).
> 
> Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  drivers/interconnect/core.c           | 3 ++-
>  include/linux/interconnect-provider.h | 6 ++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
> index f277e467156f..0be1764d3528 100644
> --- a/drivers/interconnect/core.c
> +++ b/drivers/interconnect/core.c
> @@ -330,7 +330,7 @@ EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
>   * Returns a valid pointer to struct icc_node on success or ERR_PTR()
>   * on failure.
>   */
> -static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
>  {
>  	struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
>  	struct icc_provider *provider;
> @@ -349,6 +349,7 @@ static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
>  
>  	return node;
>  }
> +EXPORT_SYMBOL_GPL(of_icc_get_from_provider);
>  
>  /**
>   * of_icc_get() - get a path handle from a DT node based on name
> diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
> index 0c494534b4d3..cc965b8fab53 100644
> --- a/include/linux/interconnect-provider.h
> +++ b/include/linux/interconnect-provider.h
> @@ -103,6 +103,7 @@ void icc_node_del(struct icc_node *node);
>  int icc_nodes_remove(struct icc_provider *provider);
>  int icc_provider_add(struct icc_provider *provider);
>  int icc_provider_del(struct icc_provider *provider);
> +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
>  
>  #else
>  
> @@ -154,6 +155,11 @@ static inline int icc_provider_del(struct icc_provider *provider)
>  	return -ENOTSUPP;
>  }
>  
> +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)

Please make this static inline, as we may see a warning in some configurations:

In file included from drivers/devfreq/exynos-bus.c:18:
./include/linux/interconnect-provider.h:160:18: warning: no previous prototype
for ‘of_icc_get_from_provider’ [-Wmissing-prototypes]
  160 | struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~

> +{
> +	return ERR_PTR(-ENOTSUPP);
> +}
> +
>  #endif /* CONFIG_INTERCONNECT */
>  
>  #endif /* __LINUX_INTERCONNECT_PROVIDER_H */
> 

Thanks,
Georgi

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

* Re: [PATCH v4 1/3] interconnect: Export of_icc_get_from_provider()
  2020-01-23  9:21       ` Georgi Djakov
@ 2020-01-24 11:22         ` Artur Świgoń
  0 siblings, 0 replies; 10+ messages in thread
From: Artur Świgoń @ 2020-01-24 11:22 UTC (permalink / raw)
  To: Georgi Djakov, linux-pm, linux-kernel, linux-samsung-soc
  Cc: cw00.choi, b.zolnierkie, m.szyprowski, krzk

Hi,

On Thu, 2020-01-23 at 11:21 +0200, Georgi Djakov wrote:
> Hi Artur,
> 
> On 1/16/20 16:42, Artur Świgoń wrote:
> > This patch makes the above function public (for use in exynos-bus devfreq
> > driver).
> > 
> > Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
> > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> > Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
> > ---
> >  drivers/interconnect/core.c           | 3 ++-
> >  include/linux/interconnect-provider.h | 6 ++++++
> >  2 files changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
> > index f277e467156f..0be1764d3528 100644
> > --- a/drivers/interconnect/core.c
> > +++ b/drivers/interconnect/core.c
> > @@ -330,7 +330,7 @@ EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
> >   * Returns a valid pointer to struct icc_node on success or ERR_PTR()
> >   * on failure.
> >   */
> > -static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> > +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> >  {
> >  	struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
> >  	struct icc_provider *provider;
> > @@ -349,6 +349,7 @@ static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> >  
> >  	return node;
> >  }
> > +EXPORT_SYMBOL_GPL(of_icc_get_from_provider);
> >  
> >  /**
> >   * of_icc_get() - get a path handle from a DT node based on name
> > diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
> > index 0c494534b4d3..cc965b8fab53 100644
> > --- a/include/linux/interconnect-provider.h
> > +++ b/include/linux/interconnect-provider.h
> > @@ -103,6 +103,7 @@ void icc_node_del(struct icc_node *node);
> >  int icc_nodes_remove(struct icc_provider *provider);
> >  int icc_provider_add(struct icc_provider *provider);
> >  int icc_provider_del(struct icc_provider *provider);
> > +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
> >  
> >  #else
> >  
> > @@ -154,6 +155,11 @@ static inline int icc_provider_del(struct icc_provider *provider)
> >  	return -ENOTSUPP;
> >  }
> >  
> > +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> 
> Please make this static inline, as we may see a warning in some configurations:

Sure, will fix.

> In file included from drivers/devfreq/exynos-bus.c:18:
> ./include/linux/interconnect-provider.h:160:18: warning: no previous prototype
> for ‘of_icc_get_from_provider’ [-Wmissing-prototypes]
>   160 | struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
>       |                  ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> > +{
> > +	return ERR_PTR(-ENOTSUPP);
> > +}
> > +
> >  #endif /* CONFIG_INTERCONNECT */
> >  
> >  #endif /* __LINUX_INTERCONNECT_PROVIDER_H */
> > 

-- 
Artur Świgoń
Samsung R&D Institute Poland
Samsung Electronics



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

end of thread, other threads:[~2020-01-24 11:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200116144241eucas1p226c1d7fc2fad5bd1b9fb6d0fb1b22bff@eucas1p2.samsung.com>
2020-01-16 14:41 ` [PATCH v4 0/3] interconnect: Support Samsung Exynos use-case Artur Świgoń
     [not found]   ` <CGME20200116144241eucas1p18dcf099873015e955d71d90712bbe9e0@eucas1p1.samsung.com>
2020-01-16 14:42     ` [PATCH v4 1/3] interconnect: Export of_icc_get_from_provider() Artur Świgoń
2020-01-23  9:21       ` Georgi Djakov
2020-01-24 11:22         ` Artur Świgoń
     [not found]   ` <CGME20200116144242eucas1p2bf8b4df91355974c8c96778f4ec117f7@eucas1p2.samsung.com>
2020-01-16 14:42     ` [PATCH v4 2/3] interconnect: Relax requirement in of_icc_get_from_provider() Artur Świgoń
2020-01-17  5:24       ` Chanwoo Choi
     [not found]   ` <CGME20200116144242eucas1p1b66d8ca0d111f140c48b80c5064ca4ff@eucas1p1.samsung.com>
2020-01-16 14:42     ` [PATCH v4 3/3] interconnect: Allow inter-provider pairs to be configured Artur Świgoń
2020-01-17  5:31   ` [PATCH v4 0/3] interconnect: Support Samsung Exynos use-case Chanwoo Choi
2020-01-17  6:10     ` Artur Świgoń
2020-01-17  7:14       ` Chanwoo Choi

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).