linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: rcar: set up I/O base before requesting IRQ
@ 2013-05-29  8:48 Ulrich Hecht
  2013-05-31  5:48 ` Simon Horman
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ulrich Hecht @ 2013-05-29  8:48 UTC (permalink / raw)
  To: linux-sh

It is used by the interrupt handler. Fixes crash when booting via kexec
on APE6 board.

Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/thermal/rcar_thermal.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 8d7edd4..7641dcc 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -395,13 +395,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
 			return -ENODEV;
 		}
 
-		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
-				       dev_name(dev), common);
-		if (ret) {
-			dev_err(dev, "irq request failed\n ");
-			return ret;
-		}
-
 		/*
 		 * rcar_has_irq_support() will be enabled
 		 */
@@ -409,6 +402,13 @@ static int rcar_thermal_probe(struct platform_device *pdev)
 		if (IS_ERR(common->base))
 			return PTR_ERR(common->base);
 
+		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
+				       dev_name(dev), common);
+		if (ret) {
+			dev_err(dev, "irq request failed\n ");
+			return ret;
+		}
+
 		/* enable temperature comparation */
 		rcar_thermal_common_write(common, ENR, 0x00030303);
 
-- 
1.7.10.4


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

* Re: [PATCH] thermal: rcar: set up I/O base before requesting IRQ
  2013-05-29  8:48 [PATCH] thermal: rcar: set up I/O base before requesting IRQ Ulrich Hecht
@ 2013-05-31  5:48 ` Simon Horman
  2013-05-31  7:04 ` Ulrich Hecht
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2013-05-31  5:48 UTC (permalink / raw)
  To: linux-sh

On Wed, May 29, 2013 at 10:48:56AM +0200, Ulrich Hecht wrote:
> It is used by the interrupt handler. Fixes crash when booting via kexec
> on APE6 board.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Hi Ulrich,

could you clarify the target of this fix?
Is it for next and thus v3.11 or is it applicable to v3.10.
In the case of the latter is it also applicable to earlier
kernel versions and thus relevant to -stable.

Thanks

> ---
>  drivers/thermal/rcar_thermal.c |   14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index 8d7edd4..7641dcc 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -395,13 +395,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
>  			return -ENODEV;
>  		}
>  
> -		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
> -				       dev_name(dev), common);
> -		if (ret) {
> -			dev_err(dev, "irq request failed\n ");
> -			return ret;
> -		}
> -
>  		/*
>  		 * rcar_has_irq_support() will be enabled
>  		 */
> @@ -409,6 +402,13 @@ static int rcar_thermal_probe(struct platform_device *pdev)
>  		if (IS_ERR(common->base))
>  			return PTR_ERR(common->base);
>  
> +		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
> +				       dev_name(dev), common);
> +		if (ret) {
> +			dev_err(dev, "irq request failed\n ");
> +			return ret;
> +		}
> +
>  		/* enable temperature comparation */
>  		rcar_thermal_common_write(common, ENR, 0x00030303);
>  
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH] thermal: rcar: set up I/O base before requesting IRQ
  2013-05-29  8:48 [PATCH] thermal: rcar: set up I/O base before requesting IRQ Ulrich Hecht
  2013-05-31  5:48 ` Simon Horman
@ 2013-05-31  7:04 ` Ulrich Hecht
  2013-06-04  2:09 ` Simon Horman
  2013-06-04  2:10 ` Simon Horman
  3 siblings, 0 replies; 7+ messages in thread
From: Ulrich Hecht @ 2013-05-31  7:04 UTC (permalink / raw)
  To: linux-sh

On Fri, May 31, 2013 at 7:48 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, May 29, 2013 at 10:48:56AM +0200, Ulrich Hecht wrote:
>> It is used by the interrupt handler. Fixes crash when booting via kexec
>> on APE6 board.
>
> could you clarify the target of this fix?
> Is it for next and thus v3.11 or is it applicable to v3.10.
> In the case of the latter is it also applicable to earlier
> kernel versions and thus relevant to -stable.

The bug has been introduced by commit e0a5172 (thermal: rcar: add
interrupt support), between v3.8-rc2 and v3.9-rc1.

CU
Uli

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

* [PATCH] thermal: rcar: set up I/O base before requesting IRQ
  2013-05-29  8:48 [PATCH] thermal: rcar: set up I/O base before requesting IRQ Ulrich Hecht
  2013-05-31  5:48 ` Simon Horman
  2013-05-31  7:04 ` Ulrich Hecht
@ 2013-06-04  2:09 ` Simon Horman
  2013-06-04 12:53   ` Eduardo Valentin
  2013-06-04  2:10 ` Simon Horman
  3 siblings, 1 reply; 7+ messages in thread
From: Simon Horman @ 2013-06-04  2:09 UTC (permalink / raw)
  To: Zhang Rui, linux-pm
  Cc: linux-sh, Kuninori Morimoto, Magnus Damm, Ulrich Hecht,
	Simon Horman

From: Ulrich Hecht <ulrich.hecht@gmail.com>

It is used by the interrupt handler. Fixes crash when booting via kexec
on APE6 board.

This problem was introduced by e0a5172e9eec7f0d3c476e013c51dab62f3fc666
("thermal: rcar: add interrupt support") which was introduced in v3.8-rc3.

Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[horms+renesas@verge.net.au: enhanced changelog to include commit
  that cuases the problem ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 drivers/thermal/rcar_thermal.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Hi Zhang,

could you consider this fix for v3.10?

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 8d7edd4..7641dcc 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -395,13 +395,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
 			return -ENODEV;
 		}
 
-		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
-				       dev_name(dev), common);
-		if (ret) {
-			dev_err(dev, "irq request failed\n ");
-			return ret;
-		}
-
 		/*
 		 * rcar_has_irq_support() will be enabled
 		 */
@@ -409,6 +402,13 @@ static int rcar_thermal_probe(struct platform_device *pdev)
 		if (IS_ERR(common->base))
 			return PTR_ERR(common->base);
 
+		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
+				       dev_name(dev), common);
+		if (ret) {
+			dev_err(dev, "irq request failed\n ");
+			return ret;
+		}
+
 		/* enable temperature comparation */
 		rcar_thermal_common_write(common, ENR, 0x00030303);
 
-- 
1.8.2.1


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

* Re: [PATCH] thermal: rcar: set up I/O base before requesting IRQ
  2013-05-29  8:48 [PATCH] thermal: rcar: set up I/O base before requesting IRQ Ulrich Hecht
                   ` (2 preceding siblings ...)
  2013-06-04  2:09 ` Simon Horman
@ 2013-06-04  2:10 ` Simon Horman
  3 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2013-06-04  2:10 UTC (permalink / raw)
  To: linux-sh

On Fri, May 31, 2013 at 09:04:02AM +0200, Ulrich Hecht wrote:
> On Fri, May 31, 2013 at 7:48 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Wed, May 29, 2013 at 10:48:56AM +0200, Ulrich Hecht wrote:
> >> It is used by the interrupt handler. Fixes crash when booting via kexec
> >> on APE6 board.
> >
> > could you clarify the target of this fix?
> > Is it for next and thus v3.11 or is it applicable to v3.10.
> > In the case of the latter is it also applicable to earlier
> > kernel versions and thus relevant to -stable.
> 
> The bug has been introduced by commit e0a5172 (thermal: rcar: add
> interrupt support), between v3.8-rc2 and v3.9-rc1.

Thanks and sorry for the delay, I have been travelling.

I have reposed this patch with an updated changelog, including
the information above, with the hope that Zhang Rui will
pick up the change for v3.10.

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

* Re: [PATCH] thermal: rcar: set up I/O base before requesting IRQ
  2013-06-04  2:09 ` Simon Horman
@ 2013-06-04 12:53   ` Eduardo Valentin
  2013-06-13  2:56     ` Zhang Rui
  0 siblings, 1 reply; 7+ messages in thread
From: Eduardo Valentin @ 2013-06-04 12:53 UTC (permalink / raw)
  To: Simon Horman
  Cc: Zhang Rui, linux-pm, linux-sh, Kuninori Morimoto, Magnus Damm,
	Ulrich Hecht, eduardo.valentin

[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]

Simon, Ulrich,

On 03-06-2013 22:09, Simon Horman wrote:
> From: Ulrich Hecht <ulrich.hecht@gmail.com>
> 
> It is used by the interrupt handler. Fixes crash when booting via kexec
> on APE6 board.
> 
> This problem was introduced by e0a5172e9eec7f0d3c476e013c51dab62f3fc666
> ("thermal: rcar: add interrupt support") which was introduced in v3.8-rc3.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> [horms+renesas@verge.net.au: enhanced changelog to include commit
>   that cuases the problem ]
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>

> ---
>  drivers/thermal/rcar_thermal.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> Hi Zhang,
> 
> could you consider this fix for v3.10?
> 
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index 8d7edd4..7641dcc 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -395,13 +395,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
>  			return -ENODEV;
>  		}
>  
> -		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
> -				       dev_name(dev), common);
> -		if (ret) {
> -			dev_err(dev, "irq request failed\n ");
> -			return ret;
> -		}
> -


Should this IRQ be disabled while this driver gets initialized? Reset
state is enabled?

>  		/*
>  		 * rcar_has_irq_support() will be enabled
>  		 */
> @@ -409,6 +402,13 @@ static int rcar_thermal_probe(struct platform_device *pdev)
>  		if (IS_ERR(common->base))
>  			return PTR_ERR(common->base);
>  
> +		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
> +				       dev_name(dev), common);
> +		if (ret) {
> +			dev_err(dev, "irq request failed\n ");
> +			return ret;
> +		}
> +
>  		/* enable temperature comparation */
>  		rcar_thermal_common_write(common, ENR, 0x00030303);
>  
> 


-- 
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]

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

* Re: [PATCH] thermal: rcar: set up I/O base before requesting IRQ
  2013-06-04 12:53   ` Eduardo Valentin
@ 2013-06-13  2:56     ` Zhang Rui
  0 siblings, 0 replies; 7+ messages in thread
From: Zhang Rui @ 2013-06-13  2:56 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Simon Horman, linux-pm, linux-sh, Kuninori Morimoto, Magnus Damm,
	Ulrich Hecht

On Tue, 2013-06-04 at 08:53 -0400, Eduardo Valentin wrote:
> Simon, Ulrich,
> 
> On 03-06-2013 22:09, Simon Horman wrote:
> > From: Ulrich Hecht <ulrich.hecht@gmail.com>
> > 
> > It is used by the interrupt handler. Fixes crash when booting via kexec
> > on APE6 board.
> > 
> > This problem was introduced by e0a5172e9eec7f0d3c476e013c51dab62f3fc666
> > ("thermal: rcar: add interrupt support") which was introduced in v3.8-rc3.
> > 
> > Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
> > Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > [horms+renesas@verge.net.au: enhanced changelog to include commit
> >   that cuases the problem ]
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
> 
> > ---
> >  drivers/thermal/rcar_thermal.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> > 
> > Hi Zhang,
> > 
> > could you consider this fix for v3.10?
> > 
> > diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> > index 8d7edd4..7641dcc 100644
> > --- a/drivers/thermal/rcar_thermal.c
> > +++ b/drivers/thermal/rcar_thermal.c
> > @@ -395,13 +395,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> >  			return -ENODEV;
> >  		}
> >  
> > -		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
> > -				       dev_name(dev), common);
> > -		if (ret) {
> > -			dev_err(dev, "irq request failed\n ");
> > -			return ret;
> > -		}
> > -
> 
> 
> Should this IRQ be disabled while this driver gets initialized? Reset
> state is enabled?
> 
the same question here.

even with this patch, I'm not sure what the irq handler can do as the
common->head for priv list is empty at this time.

thanks,
rui

> >  		/*
> >  		 * rcar_has_irq_support() will be enabled
> >  		 */
> > @@ -409,6 +402,13 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> >  		if (IS_ERR(common->base))
> >  			return PTR_ERR(common->base);
> >  
> > +		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
> > +				       dev_name(dev), common);
> > +		if (ret) {
> > +			dev_err(dev, "irq request failed\n ");
> > +			return ret;
> > +		}
> > +
> >  		/* enable temperature comparation */
> >  		rcar_thermal_common_write(common, ENR, 0x00030303);
> >  
> > 
> 
> 



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

end of thread, other threads:[~2013-06-13  2:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-29  8:48 [PATCH] thermal: rcar: set up I/O base before requesting IRQ Ulrich Hecht
2013-05-31  5:48 ` Simon Horman
2013-05-31  7:04 ` Ulrich Hecht
2013-06-04  2:09 ` Simon Horman
2013-06-04 12:53   ` Eduardo Valentin
2013-06-13  2:56     ` Zhang Rui
2013-06-04  2:10 ` Simon Horman

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