* [PATCH] ARM: fix regression in IXP4xx clocksource
@ 2011-07-06 21:02 Krzysztof Halasa
2011-07-06 21:14 ` Russell King - ARM Linux
2011-07-12 8:05 ` Richard Cochran
0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Halasa @ 2011-07-06 21:02 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-arm-kernel, lkml
From: Richard Cochran <richardcochran@gmail.com>
Commit 234b6ceddb4fc2a4bc5b9a7670f070f6e69e0868
clocksource: convert ARM 32-bit up counting clocksources
broke the build for ixp4xx and made big endian operation impossible.
This commit restores the original behaviour.
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 74ed81a..0777257 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -419,14 +419,20 @@ static void notrace ixp4xx_update_sched_clock(void)
/*
* clocksource
*/
+
+static cycle_t ixp4xx_clocksource_read(struct clocksource *c)
+{
+ return *IXP4XX_OSTS;
+}
+
unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
EXPORT_SYMBOL(ixp4xx_timer_freq);
static void __init ixp4xx_clocksource_init(void)
{
init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq);
- clocksource_mmio_init(&IXP4XX_OSTS, "OSTS", ixp4xx_timer_freq, 200, 32,
- clocksource_mmio_readl_up);
+ clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32,
+ ixp4xx_clocksource_read);
}
/*
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: fix regression in IXP4xx clocksource
2011-07-06 21:02 [PATCH] ARM: fix regression in IXP4xx clocksource Krzysztof Halasa
@ 2011-07-06 21:14 ` Russell King - ARM Linux
2011-07-07 7:06 ` Krzysztof Halasa
2011-07-12 8:05 ` Richard Cochran
1 sibling, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-07-06 21:14 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: Linus Torvalds, lkml, linux-arm-kernel
Did you see Thomas' reply to your last patch? Would you mind responding
to that please, before asking Linus to merge this?
On Wed, Jul 06, 2011 at 11:02:17PM +0200, Krzysztof Halasa wrote:
> From: Richard Cochran <richardcochran@gmail.com>
>
> Commit 234b6ceddb4fc2a4bc5b9a7670f070f6e69e0868
>
> clocksource: convert ARM 32-bit up counting clocksources
>
> broke the build for ixp4xx and made big endian operation impossible.
> This commit restores the original behaviour.
>
> Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
> Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
>
> diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
> index 74ed81a..0777257 100644
> --- a/arch/arm/mach-ixp4xx/common.c
> +++ b/arch/arm/mach-ixp4xx/common.c
> @@ -419,14 +419,20 @@ static void notrace ixp4xx_update_sched_clock(void)
> /*
> * clocksource
> */
> +
> +static cycle_t ixp4xx_clocksource_read(struct clocksource *c)
> +{
> + return *IXP4XX_OSTS;
> +}
> +
> unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
> EXPORT_SYMBOL(ixp4xx_timer_freq);
> static void __init ixp4xx_clocksource_init(void)
> {
> init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq);
>
> - clocksource_mmio_init(&IXP4XX_OSTS, "OSTS", ixp4xx_timer_freq, 200, 32,
> - clocksource_mmio_readl_up);
> + clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32,
> + ixp4xx_clocksource_read);
> }
>
> /*
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: fix regression in IXP4xx clocksource
2011-07-06 21:14 ` Russell King - ARM Linux
@ 2011-07-07 7:06 ` Krzysztof Halasa
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Halasa @ 2011-07-07 7:06 UTC (permalink / raw)
To: Russell King - ARM Linux; +Cc: Linus Torvalds, lkml, linux-arm-kernel
Russell King - ARM Linux <linux@arm.linux.org.uk> writes:
> Did you see Thomas' reply to your last patch? Would you mind responding
> to that please, before asking Linus to merge this?
I like the BE (or endian-neutral value-preserving) accessor idea.
Nevertheless Linux on IXP4xx doesn't even build at this time and I think
fixing this before 3.0 is well worth it.
I assume changing the common ARM code to use new accessors will happen
post-3.0.
(BTW that was Richard Cochran's patch)
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: fix regression in IXP4xx clocksource
2011-07-06 21:02 [PATCH] ARM: fix regression in IXP4xx clocksource Krzysztof Halasa
2011-07-06 21:14 ` Russell King - ARM Linux
@ 2011-07-12 8:05 ` Richard Cochran
2011-07-12 8:32 ` Russell King - ARM Linux
1 sibling, 1 reply; 5+ messages in thread
From: Richard Cochran @ 2011-07-12 8:05 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: Linus Torvalds, lkml, linux-arm-kernel
On Wed, Jul 06, 2011 at 11:02:17PM +0200, Krzysztof Halasa wrote:
> From: Richard Cochran <richardcochran@gmail.com>
>
> Commit 234b6ceddb4fc2a4bc5b9a7670f070f6e69e0868
>
> clocksource: convert ARM 32-bit up counting clocksources
>
> broke the build for ixp4xx and made big endian operation impossible.
> This commit restores the original behaviour.
I know I nag, but can we *please* have this patch in 3.0?
Big endian IXP really, really does not work without it.
Thanks,
Richard
>
> Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
> Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
>
> diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
> index 74ed81a..0777257 100644
> --- a/arch/arm/mach-ixp4xx/common.c
> +++ b/arch/arm/mach-ixp4xx/common.c
> @@ -419,14 +419,20 @@ static void notrace ixp4xx_update_sched_clock(void)
> /*
> * clocksource
> */
> +
> +static cycle_t ixp4xx_clocksource_read(struct clocksource *c)
> +{
> + return *IXP4XX_OSTS;
> +}
> +
> unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
> EXPORT_SYMBOL(ixp4xx_timer_freq);
> static void __init ixp4xx_clocksource_init(void)
> {
> init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq);
>
> - clocksource_mmio_init(&IXP4XX_OSTS, "OSTS", ixp4xx_timer_freq, 200, 32,
> - clocksource_mmio_readl_up);
> + clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32,
> + ixp4xx_clocksource_read);
> }
>
> /*
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: fix regression in IXP4xx clocksource
2011-07-12 8:05 ` Richard Cochran
@ 2011-07-12 8:32 ` Russell King - ARM Linux
0 siblings, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-07-12 8:32 UTC (permalink / raw)
To: Richard Cochran; +Cc: Krzysztof Halasa, Linus Torvalds, lkml, linux-arm-kernel
On Tue, Jul 12, 2011 at 10:05:13AM +0200, Richard Cochran wrote:
> On Wed, Jul 06, 2011 at 11:02:17PM +0200, Krzysztof Halasa wrote:
> > From: Richard Cochran <richardcochran@gmail.com>
> >
> > Commit 234b6ceddb4fc2a4bc5b9a7670f070f6e69e0868
> >
> > clocksource: convert ARM 32-bit up counting clocksources
> >
> > broke the build for ixp4xx and made big endian operation impossible.
> > This commit restores the original behaviour.
>
> I know I nag, but can we *please* have this patch in 3.0?
> Big endian IXP really, really does not work without it.
Thomas Glexnier said:
> Thinking more about it we should add BE accessor functions to the mmio
> clocksource as this might be useful for other architectures as well.
It seems that I can't rely on others, so I'm going to have to fit
this into my busy schedule at some point.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-12 8:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-06 21:02 [PATCH] ARM: fix regression in IXP4xx clocksource Krzysztof Halasa
2011-07-06 21:14 ` Russell King - ARM Linux
2011-07-07 7:06 ` Krzysztof Halasa
2011-07-12 8:05 ` Richard Cochran
2011-07-12 8:32 ` Russell King - ARM Linux
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).