public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [RESEND PATCH] soc: ti: ti_sci_pm_domains: Populate name for genpd
@ 2017-07-28 16:33 Dave Gerlach
  2017-07-28 16:35 ` Dave Gerlach
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Gerlach @ 2017-07-28 16:33 UTC (permalink / raw)
  To: linux-arm-kernel

Commit b6a1d093f96b ("PM / Domains: Extend generic power domain
debugfs") now creates a debugfs directory for each genpd based on the
name of the genpd. Currently no name is given to the genpd created by
ti_sci_pm_domains driver so because of this we see a NULL pointer
dereferences when it is accessed on boot when the debugfs entry creation
is attempted.

Give the genpd a name before registering it to avoid this.

Fixes: 52835d59fc6c ("soc: ti: Add ti_sci_pm_domains driver")
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---

 drivers/soc/ti/ti_sci_pm_domains.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/soc/ti/ti_sci_pm_domains.c b/drivers/soc/ti/ti_sci_pm_domains.c
index b0b283810e72..de31b9389e2e 100644
--- a/drivers/soc/ti/ti_sci_pm_domains.c
+++ b/drivers/soc/ti/ti_sci_pm_domains.c
@@ -176,6 +176,8 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
 
 	ti_sci_pd->dev = dev;
 
+	ti_sci_pd->pd.name = "ti_sci_pd";
+
 	ti_sci_pd->pd.attach_dev = ti_sci_pd_attach_dev;
 	ti_sci_pd->pd.detach_dev = ti_sci_pd_detach_dev;
 
-- 
2.13.0

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

* [RESEND PATCH] soc: ti: ti_sci_pm_domains: Populate name for genpd
  2017-07-28 16:33 [RESEND PATCH] soc: ti: ti_sci_pm_domains: Populate name for genpd Dave Gerlach
@ 2017-07-28 16:35 ` Dave Gerlach
  2017-07-28 16:53   ` santosh.shilimkar at oracle.com
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Gerlach @ 2017-07-28 16:35 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,
On 07/28/2017 11:33 AM, Dave Gerlach wrote:
> Commit b6a1d093f96b ("PM / Domains: Extend generic power domain
> debugfs") now creates a debugfs directory for each genpd based on the
> name of the genpd. Currently no name is given to the genpd created by
> ti_sci_pm_domains driver so because of this we see a NULL pointer
> dereferences when it is accessed on boot when the debugfs entry creation
> is attempted.
> 
> Give the genpd a name before registering it to avoid this.
> 
> Fixes: 52835d59fc6c ("soc: ti: Add ti_sci_pm_domains driver")
> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
> ---

Sorry for the noise, last patch had wrong email for Santosh and this one
corrects it. keystone-k2g-evm is crashing on linux-next at boot due to patch
mentioned in the change log, this patch fixes the ti_sci_pm_domains driver to
avoid this. I will also soon send a patch to address what I think is an issue in
the pm domain framework itself to avoid this crash from ever happening.

Regards,
Dave

> 
>  drivers/soc/ti/ti_sci_pm_domains.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/soc/ti/ti_sci_pm_domains.c b/drivers/soc/ti/ti_sci_pm_domains.c
> index b0b283810e72..de31b9389e2e 100644
> --- a/drivers/soc/ti/ti_sci_pm_domains.c
> +++ b/drivers/soc/ti/ti_sci_pm_domains.c
> @@ -176,6 +176,8 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
>  
>  	ti_sci_pd->dev = dev;
>  
> +	ti_sci_pd->pd.name = "ti_sci_pd";
> +
>  	ti_sci_pd->pd.attach_dev = ti_sci_pd_attach_dev;
>  	ti_sci_pd->pd.detach_dev = ti_sci_pd_detach_dev;
>  
> 

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

* [RESEND PATCH] soc: ti: ti_sci_pm_domains: Populate name for genpd
  2017-07-28 16:35 ` Dave Gerlach
@ 2017-07-28 16:53   ` santosh.shilimkar at oracle.com
  0 siblings, 0 replies; 3+ messages in thread
From: santosh.shilimkar at oracle.com @ 2017-07-28 16:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 7/28/17 9:35 AM, Dave Gerlach wrote:
> Hi,
> On 07/28/2017 11:33 AM, Dave Gerlach wrote:
>> Commit b6a1d093f96b ("PM / Domains: Extend generic power domain
>> debugfs") now creates a debugfs directory for each genpd based on the
>> name of the genpd. Currently no name is given to the genpd created by
>> ti_sci_pm_domains driver so because of this we see a NULL pointer
>> dereferences when it is accessed on boot when the debugfs entry creation
>> is attempted.
>>
>> Give the genpd a name before registering it to avoid this.
>>
>> Fixes: 52835d59fc6c ("soc: ti: Add ti_sci_pm_domains driver")
>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>> ---
> 
> Sorry for the noise, last patch had wrong email for Santosh and this one
> corrects it. keystone-k2g-evm is crashing on linux-next at boot due to patch
> mentioned in the change log, this patch fixes the ti_sci_pm_domains driver to
> avoid this. I will also soon send a patch to address what I think is an issue in
> the pm domain framework itself to avoid this crash from ever happening.
> 
Applied. Should show up in next soon !!

Regards,
Santosh

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

end of thread, other threads:[~2017-07-28 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-28 16:33 [RESEND PATCH] soc: ti: ti_sci_pm_domains: Populate name for genpd Dave Gerlach
2017-07-28 16:35 ` Dave Gerlach
2017-07-28 16:53   ` santosh.shilimkar at oracle.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox