All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] arm: remove unused code in delay.S
@ 2009-09-18 16:46 Steve Chen
  2009-09-18 18:39 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-09-18 19:09 ` Uwe Kleine-König
  0 siblings, 2 replies; 13+ messages in thread
From: Steve Chen @ 2009-09-18 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

Document #if 0 code block in delay.S and make it selectable for compile.

Signed-off-by: Steve Chen <schen@mvista.com>

---
 arch/arm/Kconfig     |   31 +++++++++++++++++++++++++++++++
 arch/arm/lib/delay.S |    2 +-
 2 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index aef63c8..f44cb70 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -813,6 +813,37 @@ config ARM_ERRATA_460075
 	  ACTLR register. Note that setting specific bits in the ACTLR
register
 	  may not be available in non-secure mode.
 
+config OLD_CPU_DELAY
+	depends on CPU_32v3 || CPU_32v4 || CPU_32v4T
+	bool "Different delay() code for some older CPUs"
+	def_bool n
+	help
+	  Enable this if observing longer than expected delays.  This code
+	  improves delay accuracy for some CPUs.  However, it can also cause
+	  delay duration to be too short for others which leads to stability
+	  issues.
+
+	  In other words, do not enable unless you can guarantee that the
+	  processor (or ALL of the processors if building a generic kernel)
+	  delays for at least the time requested after enabling.
+
+	  ARM610 and ARM710 are known to benefit from enabling this option.
+	  It should not be enabled for StrongARMs, because it is known
+	  to produce too short delays on those.
+
+	  Lastly, below are 2 lists.  The first list contains the processors
+	  that would benefit from enabling this flag, and the second list
+	  contains processor that are known to have issues.  Please note that
+	  both lists are by no means complete.  Entries are expected to be
+	  added and refined.  If you like to update the list, please send a
+	  patch to Linux ARM mailing list.
+
+	  CPUs should enable this flag
+		ARM610
+		ARM710
+
+	  CPUs should disable this flag
+		StrongARM
 endmenu
 
 source "arch/arm/common/Kconfig"
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S
index 8d6a876..67e679b 100644
--- a/arch/arm/lib/delay.S
+++ b/arch/arm/lib/delay.S
@@ -42,7 +42,7 @@ ENTRY(__const_udelay)				@ 0 <= r0 <= 0x7fffff06
 @ Delay routine
 ENTRY(__delay)
 		subs	r0, r0, #1
-#if 0
+#ifdef CONFIG_OLD_CPU_DELAY
 		movls	pc, lr
 		subs	r0, r0, #1
 		movls	pc, lr

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

* [PATCH v3] arm: remove unused code in delay.S
  2009-09-18 16:46 [PATCH v3] arm: remove unused code in delay.S Steve Chen
@ 2009-09-18 18:39 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-09-18 19:09 ` Uwe Kleine-König
  1 sibling, 0 replies; 13+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-09-18 18:39 UTC (permalink / raw)
  To: linux-arm-kernel

On 11:46 Fri 18 Sep     , Steve Chen wrote:
> Document #if 0 code block in delay.S and make it selectable for compile.
> 
> Signed-off-by: Steve Chen <schen@mvista.com>
> 
> ---
>  arch/arm/Kconfig     |   31 +++++++++++++++++++++++++++++++
>  arch/arm/lib/delay.S |    2 +-
>  2 files changed, 32 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index aef63c8..f44cb70 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -813,6 +813,37 @@ config ARM_ERRATA_460075
>  	  ACTLR register. Note that setting specific bits in the ACTLR
> register
>  	  may not be available in non-secure mode.
>  
> +config OLD_CPU_DELAY
> +	depends on CPU_32v3 || CPU_32v4 || CPU_32v4T
> +	bool "Different delay() code for some older CPUs"
> +	def_bool n
IIRC it will be no by default

Best Regards,
J.

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

* [PATCH v3] arm: remove unused code in delay.S
  2009-09-18 16:46 [PATCH v3] arm: remove unused code in delay.S Steve Chen
  2009-09-18 18:39 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-09-18 19:09 ` Uwe Kleine-König
  2009-09-18 20:25   ` Steve Chen
  1 sibling, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2009-09-18 19:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Steve,

On Fri, Sep 18, 2009 at 11:46:58AM -0500, Steve Chen wrote:
> Document #if 0 code block in delay.S and make it selectable for compile.
> 
> Signed-off-by: Steve Chen <schen@mvista.com>
> 
> ---
>  arch/arm/Kconfig     |   31 +++++++++++++++++++++++++++++++
>  arch/arm/lib/delay.S |    2 +-
>  2 files changed, 32 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index aef63c8..f44cb70 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -813,6 +813,37 @@ config ARM_ERRATA_460075
>  	  ACTLR register. Note that setting specific bits in the ACTLR
> register
>  	  may not be available in non-secure mode.
>  
> +config OLD_CPU_DELAY
> +	depends on CPU_32v3 || CPU_32v4 || CPU_32v4T
> +	bool "Different delay() code for some older CPUs"
> +	def_bool n
as already noted, n is the default (that would better be expressed using
"default n" btw).

> +	help
> +	  Enable this if observing longer than expected delays.  This code
> +	  improves delay accuracy for some CPUs.  However, it can also cause
> +	  delay duration to be too short for others which leads to stability
> +	  issues.
> +
> +	  In other words, do not enable unless you can guarantee that the
> +	  processor (or ALL of the processors if building a generic kernel)
> +	  delays for at least the time requested after enabling.
> +
> +	  ARM610 and ARM710 are known to benefit from enabling this option.
> +	  It should not be enabled for StrongARMs, because it is known
> +	  to produce too short delays on those.
> +
> +	  Lastly, below are 2 lists.  The first list contains the processors
> +	  that would benefit from enabling this flag, and the second list
> +	  contains processor that are known to have issues.  Please note that
> +	  both lists are by no means complete.  Entries are expected to be
> +	  added and refined.  If you like to update the list, please send a
> +	  patch to Linux ARM mailing list.
I'd delete the last three sentences.

> +	  CPUs should enable this flag
> +		ARM610
> +		ARM710
> +
> +	  CPUs should disable this flag
> +		StrongARM
everything armv5+ ?

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-K?nig            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

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

* [PATCH v3] arm: remove unused code in delay.S
  2009-09-18 19:09 ` Uwe Kleine-König
@ 2009-09-18 20:25   ` Steve Chen
  2009-09-18 20:53     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 13+ messages in thread
From: Steve Chen @ 2009-09-18 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 2009-09-18 at 21:09 +0200, Uwe Kleine-K?nig wrote:
> Hello Steve,
> 
> On Fri, Sep 18, 2009 at 11:46:58AM -0500, Steve Chen wrote:
> > Document #if 0 code block in delay.S and make it selectable for compile.
> > 
> > Signed-off-by: Steve Chen <schen@mvista.com>
> > 
> > ---
> >  arch/arm/Kconfig     |   31 +++++++++++++++++++++++++++++++
> >  arch/arm/lib/delay.S |    2 +-
> >  2 files changed, 32 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index aef63c8..f44cb70 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -813,6 +813,37 @@ config ARM_ERRATA_460075
> >  	  ACTLR register. Note that setting specific bits in the ACTLR
> > register
> >  	  may not be available in non-secure mode.
> >  
> > +config OLD_CPU_DELAY
> > +	depends on CPU_32v3 || CPU_32v4 || CPU_32v4T
> > +	bool "Different delay() code for some older CPUs"
> > +	def_bool n
> as already noted, n is the default (that would better be expressed using
> "default n" btw).

Jean-Christope/Uwe, I'll change it to "default n".

> 
> > +	help
> > +	  Enable this if observing longer than expected delays.  This code
> > +	  improves delay accuracy for some CPUs.  However, it can also cause
> > +	  delay duration to be too short for others which leads to stability
> > +	  issues.
> > +
> > +	  In other words, do not enable unless you can guarantee that the
> > +	  processor (or ALL of the processors if building a generic kernel)
> > +	  delays for at least the time requested after enabling.
> > +
> > +	  ARM610 and ARM710 are known to benefit from enabling this option.
> > +	  It should not be enabled for StrongARMs, because it is known
> > +	  to produce too short delays on those.
> > +
> > +	  Lastly, below are 2 lists.  The first list contains the processors
> > +	  that would benefit from enabling this flag, and the second list
> > +	  contains processor that are known to have issues.  Please note that
> > +	  both lists are by no means complete.  Entries are expected to be
> > +	  added and refined.  If you like to update the list, please send a
> > +	  patch to Linux ARM mailing list.
> I'd delete the last three sentences.

Well, do.  Anything after "Entries are expected to be..." will be
deleted.

> 
> > +	  CPUs should enable this flag
> > +		ARM610
> > +		ARM710
> > +
> > +	  CPUs should disable this flag
> > +		StrongARM
> everything armv5+ ?

If you know for sure, I'll add it.  Since I don't know if that is true,
I like to have some confirmation.  Come to think of it, it may be a good
idea to include the source of the info in the CPU list.  I'll put

	ARM610 (rmk)
	ARM710 (rmk)
etc. in the next revision since the information was extracted from
Russel's comments in this e-mail thread.

> 
> Best regards
> Uwe
> 

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

* [PATCH v3] arm: remove unused code in delay.S
  2009-09-18 20:25   ` Steve Chen
@ 2009-09-18 20:53     ` Jean-Christophe PLAGNIOL-VILLARD
  2009-09-18 21:51       ` Steve Chen
  2009-09-19 12:55       ` [PATCH v4] " Steve Chen
  0 siblings, 2 replies; 13+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-09-18 20:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 15:25 Fri 18 Sep     , Steve Chen wrote:
> On Fri, 2009-09-18 at 21:09 +0200, Uwe Kleine-K?nig wrote:
> > Hello Steve,
> > 
> > On Fri, Sep 18, 2009 at 11:46:58AM -0500, Steve Chen wrote:
> > > Document #if 0 code block in delay.S and make it selectable for compile.
> > > 
> > > Signed-off-by: Steve Chen <schen@mvista.com>
> > > 
> > > ---
> > >  arch/arm/Kconfig     |   31 +++++++++++++++++++++++++++++++
> > >  arch/arm/lib/delay.S |    2 +-
> > >  2 files changed, 32 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > index aef63c8..f44cb70 100644
> > > --- a/arch/arm/Kconfig
> > > +++ b/arch/arm/Kconfig
> > > @@ -813,6 +813,37 @@ config ARM_ERRATA_460075
> > >  	  ACTLR register. Note that setting specific bits in the ACTLR
> > > register
> > >  	  may not be available in non-secure mode.
> > >  
> > > +config OLD_CPU_DELAY
> > > +	depends on CPU_32v3 || CPU_32v4 || CPU_32v4T
> > > +	bool "Different delay() code for some older CPUs"
> > > +	def_bool n
> > as already noted, n is the default (that would better be expressed using
> > "default n" btw).
> 
> Jean-Christope/Uwe, I'll change it to "default n".
simply remove it will be better

Best Regards,
J.
> 
> > 
> > > +	help
> > > +	  Enable this if observing longer than expected delays.  This code
> > > +	  improves delay accuracy for some CPUs.  However, it can also cause
> > > +	  delay duration to be too short for others which leads to stability
> > > +	  issues.
> > > +
> > > +	  In other words, do not enable unless you can guarantee that the
> > > +	  processor (or ALL of the processors if building a generic kernel)
> > > +	  delays for at least the time requested after enabling.
> > > +
> > > +	  ARM610 and ARM710 are known to benefit from enabling this option.
> > > +	  It should not be enabled for StrongARMs, because it is known
> > > +	  to produce too short delays on those.
> > > +
> > > +	  Lastly, below are 2 lists.  The first list contains the processors
simply remove it will be better

Best Regards,
J.> > > +	  that would benefit from enabling this flag, and the second list
> > > +	  contains processor that are known to have issues.  Please note that
> > > +	  both lists are by no means complete.  Entries are expected to be
> > > +	  added and refined.  If you like to update the list, please send a
> > > +	  patch to Linux ARM mailing list.
> > I'd delete the last three sentences.
> 
> Well, do.  Anything after "Entries are expected to be..." will be
> deleted.
> 
> > 
> > > +	  CPUs should enable this flag
> > > +		ARM610
> > > +		ARM710
> > > +
> > > +	  CPUs should disable this flag
> > > +		StrongARM
> > everything armv5+ ?
IIRC StrongARM is armv4
ARM610 & 710 is armv3

Best Regards,
J.

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

* [PATCH v3] arm: remove unused code in delay.S
  2009-09-18 20:53     ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-09-18 21:51       ` Steve Chen
  2009-09-19 12:55       ` [PATCH v4] " Steve Chen
  1 sibling, 0 replies; 13+ messages in thread
From: Steve Chen @ 2009-09-18 21:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 2009-09-18 at 22:53 +0200, Jean-Christophe PLAGNIOL-VILLARD
wrote:
> On 15:25 Fri 18 Sep     , Steve Chen wrote:
> > On Fri, 2009-09-18 at 21:09 +0200, Uwe Kleine-K?nig wrote:
...
> > > > +	def_bool n
> > > as already noted, n is the default (that would better be expressed using
> > > "default n" btw).
> > 
> > Jean-Christope/Uwe, I'll change it to "default n".
> simply remove it will be better

Sure, I can remove it altogether.

...
> > > > +	  ARM610 and ARM710 are known to benefit from enabling this option.
> > > > +	  It should not be enabled for StrongARMs, because it is known
> > > > +	  to produce too short delays on those.
> > > > +
> > > > +	  Lastly, below are 2 lists.  The first list contains the processors
> simply remove it will be better

Remove the entire last paragraph?  I guess the header of the list does
explain everything.  I'll remove it.

...
> > > 
> > > > +	  CPUs should enable this flag
> > > > +		ARM610
> > > > +		ARM710
> > > > +
> > > > +	  CPUs should disable this flag
> > > > +		StrongARM
> > > everything armv5+ ?
> IIRC StrongARM is armv4
> ARM610 & 710 is armv3

If all armv4 are StrongARM, I can just remove it from the "depends"
list.  I'll need some help confirming.  At this point, I'm not sure what
else to change in this list.

Thanks for the inputs.

Steve

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

* [PATCH v4] arm: remove unused code in delay.S
  2009-09-18 20:53     ` Jean-Christophe PLAGNIOL-VILLARD
  2009-09-18 21:51       ` Steve Chen
@ 2009-09-19 12:55       ` Steve Chen
  2009-09-19 13:47         ` Uwe Kleine-König
  2009-09-19 14:04         ` [PATCH v4.1] " Steve Chen
  1 sibling, 2 replies; 13+ messages in thread
From: Steve Chen @ 2009-09-19 12:55 UTC (permalink / raw)
  To: linux-arm-kernel

Document #if 0 code block in delay.S and make it selectable for compile.

Signed-off-by: Steve Chen <schen@mvista.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Reviewed-by: Jamie Lokier <jamie@shareable.org>
Reviewed-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Reviewed-by: Krzysztof Halasa <khc@pm.waw.pl>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Reviewed-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

---

 arch/arm/Kconfig     |   23 +++++++++++++++++++++++
 arch/arm/lib/delay.S |    2 +-
 2 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index aef63c8..9a5a49a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -813,6 +813,29 @@ config ARM_ERRATA_460075
 	  ACTLR register. Note that setting specific bits in the ACTLR
register
 	  may not be available in non-secure mode.
 
+config OLD_CPU_DELAY
+	depends on CPU_32v3 || CPU_32v4 || CPU_32v4T
+	bool "Different delay() code for some older CPUs"
+	help
+	  Enable this if observing longer than expected delays.  This code
+	  improves delay accuracy for some CPUs.  However, it can also cause
+	  delay duration to be too short for others which leads to stability
+	  issues.
+
+	  In other words, do not enable unless you can guarantee that the
+	  processor (or ALL of the processors if building a generic kernel)
+	  delays for at least the time requested after enabling.
+
+	  ARM610 and ARM710 are known to benefit from enabling this option.
+	  It should not be enabled for StrongARMs, because it is known
+	  to produce too short delays on those.
+
+	  CPUs should enable this flag
+		ARM610 (rmk)
+		ARM710 (rmk)
+
+	  CPUs should disable this flag
+		StrongARM (rmk)
 endmenu
 
 source "arch/arm/common/Kconfig"
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S
index 8d6a876..67e679b 100644
--- a/arch/arm/lib/delay.S
+++ b/arch/arm/lib/delay.S
@@ -42,7 +42,7 @@ ENTRY(__const_udelay)				@ 0 <= r0 <= 0x7fffff06
 @ Delay routine
 ENTRY(__delay)
 		subs	r0, r0, #1
-#if 0
+#ifdef CONFIG_OLD_CPU_DELAY
 		movls	pc, lr
 		subs	r0, r0, #1
 		movls	pc, lr

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

* [PATCH v4] arm: remove unused code in delay.S
  2009-09-19 12:55       ` [PATCH v4] " Steve Chen
@ 2009-09-19 13:47         ` Uwe Kleine-König
  2009-09-19 14:09           ` Steve Chen
  2009-09-19 14:04         ` [PATCH v4.1] " Steve Chen
  1 sibling, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2009-09-19 13:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Steve,

On Sat, Sep 19, 2009 at 07:55:29AM -0500, Steve Chen wrote:
> Document #if 0 code block in delay.S and make it selectable for compile.
> 
> Signed-off-by: Steve Chen <schen@mvista.com>
> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
> Reviewed-by: Jamie Lokier <jamie@shareable.org>
> Reviewed-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Reviewed-by: Krzysztof Halasa <khc@pm.waw.pl>
> Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
> Reviewed-by: Pavel Machek <pavel@ucw.cz>
> Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Reviewed-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
I'm very surprised you added these Reviewed-by: tags.

IMO you should not add them without the explicit permission and request
of the corresponding person.  (That means that at least mine should not
be there.)

Moreover Reviewed-by: has a meaning (described in
Documentation/SubmittingPatches).

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-K?nig            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

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

* [PATCH v4.1] arm: remove unused code in delay.S
  2009-09-19 12:55       ` [PATCH v4] " Steve Chen
  2009-09-19 13:47         ` Uwe Kleine-König
@ 2009-09-19 14:04         ` Steve Chen
  2009-09-22 10:47           ` [PATCH v5] " Steve Chen
  1 sibling, 1 reply; 13+ messages in thread
From: Steve Chen @ 2009-09-19 14:04 UTC (permalink / raw)
  To: linux-arm-kernel

Document #if 0 code block in delay.S and make it selectable for compile.

Signed-off-by: Steve Chen <schen@mvista.com>

---

 arch/arm/Kconfig     |   23 +++++++++++++++++++++++
 arch/arm/lib/delay.S |    2 +-
 2 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index aef63c8..9a5a49a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -813,6 +813,29 @@ config ARM_ERRATA_460075
 	  ACTLR register. Note that setting specific bits in the ACTLR
register
 	  may not be available in non-secure mode.
 
+config OLD_CPU_DELAY
+	depends on CPU_32v3 || CPU_32v4 || CPU_32v4T
+	bool "Different delay() code for some older CPUs"
+	help
+	  Enable this if observing longer than expected delays.  This code
+	  improves delay accuracy for some CPUs.  However, it can also cause
+	  delay duration to be too short for others which leads to stability
+	  issues.
+
+	  In other words, do not enable unless you can guarantee that the
+	  processor (or ALL of the processors if building a generic kernel)
+	  delays for at least the time requested after enabling.
+
+	  ARM610 and ARM710 are known to benefit from enabling this option.
+	  It should not be enabled for StrongARMs, because it is known
+	  to produce too short delays on those.
+
+	  CPUs should enable this flag
+		ARM610 (rmk)
+		ARM710 (rmk)
+
+	  CPUs should disable this flag
+		StrongARM (rmk)
 endmenu
 
 source "arch/arm/common/Kconfig"
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S
index 8d6a876..67e679b 100644
--- a/arch/arm/lib/delay.S
+++ b/arch/arm/lib/delay.S
@@ -42,7 +42,7 @@ ENTRY(__const_udelay)				@ 0 <= r0 <= 0x7fffff06
 @ Delay routine
 ENTRY(__delay)
 		subs	r0, r0, #1
-#if 0
+#ifdef CONFIG_OLD_CPU_DELAY
 		movls	pc, lr
 		subs	r0, r0, #1
 		movls	pc, lr

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

* [PATCH v4] arm: remove unused code in delay.S
  2009-09-19 13:47         ` Uwe Kleine-König
@ 2009-09-19 14:09           ` Steve Chen
  2009-09-20  0:16             ` Felipe Contreras
  0 siblings, 1 reply; 13+ messages in thread
From: Steve Chen @ 2009-09-19 14:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 2009-09-19 at 15:47 +0200, Uwe Kleine-K?nig wrote:
> Hello Steve,
> 
> On Sat, Sep 19, 2009 at 07:55:29AM -0500, Steve Chen wrote:
> > Document #if 0 code block in delay.S and make it selectable for compile.
> > 
> > Signed-off-by: Steve Chen <schen@mvista.com>
> > Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
> > Reviewed-by: Jamie Lokier <jamie@shareable.org>
> > Reviewed-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Reviewed-by: Krzysztof Halasa <khc@pm.waw.pl>
> > Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
> > Reviewed-by: Pavel Machek <pavel@ucw.cz>
> > Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> > Reviewed-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> I'm very surprised you added these Reviewed-by: tags.
> 
> IMO you should not add them without the explicit permission and request
> of the corresponding person.  (That means that at least mine should not
> be there.)
> 
> Moreover Reviewed-by: has a meaning (described in
> Documentation/SubmittingPatches).
> 

My only intention was to give credit to all who contributed (at least try).  I already
sent out a patch with all Reviewed-by tags removed.  I can add back in anyone who wish
to be added.

Regards,

Steve

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

* [PATCH v4] arm: remove unused code in delay.S
  2009-09-19 14:09           ` Steve Chen
@ 2009-09-20  0:16             ` Felipe Contreras
  2009-09-20 13:18               ` Steve Chen
  0 siblings, 1 reply; 13+ messages in thread
From: Felipe Contreras @ 2009-09-20  0:16 UTC (permalink / raw)
  To: linux-arm-kernel

2009/9/19 Steve Chen <schen@mvista.com>:
> On Sat, 2009-09-19 at 15:47 +0200, Uwe Kleine-K?nig wrote:
>> Hello Steve,
>>
>> On Sat, Sep 19, 2009 at 07:55:29AM -0500, Steve Chen wrote:
>> > Document #if 0 code block in delay.S and make it selectable for compile.
>> >
>> > Signed-off-by: Steve Chen <schen@mvista.com>
>> > Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
>> > Reviewed-by: Jamie Lokier <jamie@shareable.org>
>> > Reviewed-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>> > Reviewed-by: Krzysztof Halasa <khc@pm.waw.pl>
>> > Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
>> > Reviewed-by: Pavel Machek <pavel@ucw.cz>
>> > Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>> > Reviewed-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
>> I'm very surprised you added these Reviewed-by: tags.
>>
>> IMO you should not add them without the explicit permission and request
>> of the corresponding person. ?(That means that at least mine should not
>> be there.)
>>
>> Moreover Reviewed-by: has a meaning (described in
>> Documentation/SubmittingPatches).
>>
>
> My only intention was to give credit to all who contributed (at least try). ?I already
> sent out a patch with all Reviewed-by tags removed. ?I can add back in anyone who wish
> to be added.

It's better to say:
Comments by Felipe Contreras, Jamie Lokier, Jean-Christophe, etc.

I did not review your patch, I merely provided the original one, and
made some comments.

Cheers.

-- 
Felipe Contreras

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

* [PATCH v4] arm: remove unused code in delay.S
  2009-09-20  0:16             ` Felipe Contreras
@ 2009-09-20 13:18               ` Steve Chen
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Chen @ 2009-09-20 13:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 2009-09-20 at 03:16 +0300, Felipe Contreras wrote:
> 2009/9/19 Steve Chen <schen@mvista.com>:
> > On Sat, 2009-09-19 at 15:47 +0200, Uwe Kleine-K?nig wrote:
> >> Hello Steve,
> >>
> >> On Sat, Sep 19, 2009 at 07:55:29AM -0500, Steve Chen wrote:
> >> > Document #if 0 code block in delay.S and make it selectable for compile.
> >> >
> >> > Signed-off-by: Steve Chen <schen@mvista.com>
> >> > Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
> >> > Reviewed-by: Jamie Lokier <jamie@shareable.org>
> >> > Reviewed-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >> > Reviewed-by: Krzysztof Halasa <khc@pm.waw.pl>
> >> > Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
> >> > Reviewed-by: Pavel Machek <pavel@ucw.cz>
> >> > Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> >> > Reviewed-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> >> I'm very surprised you added these Reviewed-by: tags.
> >>
> >> IMO you should not add them without the explicit permission and request
> >> of the corresponding person.  (That means that at least mine should not
> >> be there.)
> >>
> >> Moreover Reviewed-by: has a meaning (described in
> >> Documentation/SubmittingPatches).
> >>
> >
> > My only intention was to give credit to all who contributed (at least try).  I already
> > sent out a patch with all Reviewed-by tags removed.  I can add back in anyone who wish
> > to be added.
> 
> It's better to say:
> Comments by Felipe Contreras, Jamie Lokier, Jean-Christophe, etc.
> 
> I did not review your patch, I merely provided the original one, and
> made some comments.
> 
If there are no objections by COB Monday (US PST), I'll resend the patch
with the "Comments" line added.

Regards,

Steve

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

* [PATCH v5] arm: remove unused code in delay.S
  2009-09-19 14:04         ` [PATCH v4.1] " Steve Chen
@ 2009-09-22 10:47           ` Steve Chen
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Chen @ 2009-09-22 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

Document #if 0 code block in delay.S and make it selectable for compile.

Comments by 
Felipe Contreras <felipe.contreras@gmail.com>
Jamie Lokier <jamie@shareable.org>
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Krzysztof Halasa <khc@pm.waw.pl>
Marek Vasut <marek.vasut@gmail.com>
Pavel Machek <pavel@ucw.cz>
Sergei Shtylyov <sshtylyov@ru.mvista.com>
Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Signed-off-by: Steve Chen <schen@mvista.com>

---

 arch/arm/Kconfig     |   23 +++++++++++++++++++++++
 arch/arm/lib/delay.S |    2 +-
 2 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index aef63c8..9a5a49a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -813,6 +813,29 @@ config ARM_ERRATA_460075
 	  ACTLR register. Note that setting specific bits in the ACTLR
register
 	  may not be available in non-secure mode.
 
+config OLD_CPU_DELAY
+	depends on CPU_32v3 || CPU_32v4 || CPU_32v4T
+	bool "Different delay() code for some older CPUs"
+	help
+	  Enable this if observing longer than expected delays.  This code
+	  improves delay accuracy for some CPUs.  However, it can also cause
+	  delay duration to be too short for others which leads to stability
+	  issues.
+
+	  In other words, do not enable unless you can guarantee that the
+	  processor (or ALL of the processors if building a generic kernel)
+	  delays for at least the time requested after enabling.
+
+	  ARM610 and ARM710 are known to benefit from enabling this option.
+	  It should not be enabled for StrongARMs, because it is known
+	  to produce too short delays on those.
+
+	  CPUs should enable this flag
+		ARM610 (rmk)
+		ARM710 (rmk)
+
+	  CPUs should disable this flag
+		StrongARM (rmk)
 endmenu
 
 source "arch/arm/common/Kconfig"
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S
index 8d6a876..67e679b 100644
--- a/arch/arm/lib/delay.S
+++ b/arch/arm/lib/delay.S
@@ -42,7 +42,7 @@ ENTRY(__const_udelay)				@ 0 <= r0 <= 0x7fffff06
 @ Delay routine
 ENTRY(__delay)
 		subs	r0, r0, #1
-#if 0
+#ifdef CONFIG_OLD_CPU_DELAY
 		movls	pc, lr
 		subs	r0, r0, #1
 		movls	pc, lr

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

end of thread, other threads:[~2009-09-22 10:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-18 16:46 [PATCH v3] arm: remove unused code in delay.S Steve Chen
2009-09-18 18:39 ` Jean-Christophe PLAGNIOL-VILLARD
2009-09-18 19:09 ` Uwe Kleine-König
2009-09-18 20:25   ` Steve Chen
2009-09-18 20:53     ` Jean-Christophe PLAGNIOL-VILLARD
2009-09-18 21:51       ` Steve Chen
2009-09-19 12:55       ` [PATCH v4] " Steve Chen
2009-09-19 13:47         ` Uwe Kleine-König
2009-09-19 14:09           ` Steve Chen
2009-09-20  0:16             ` Felipe Contreras
2009-09-20 13:18               ` Steve Chen
2009-09-19 14:04         ` [PATCH v4.1] " Steve Chen
2009-09-22 10:47           ` [PATCH v5] " Steve Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.