All of lore.kernel.org
 help / color / mirror / Atom feed
From: cyril@ti.com (Cyril Chemparathy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: avoid undef on ARCH_HAS_READ_CURRENT_TIMER
Date: Tue, 11 Sep 2012 13:28:37 -0400	[thread overview]
Message-ID: <504F74C5.2020805@ti.com> (raw)
In-Reply-To: <20120911172018.GG32234@mudshark.cambridge.arm.com>

On 9/11/2012 1:20 PM, Will Deacon wrote:
> On Tue, Sep 11, 2012 at 05:59:39PM +0100, Cyril Chemparathy wrote:
>> On 9/11/2012 12:25 PM, Will Deacon wrote:
>>> On Tue, Sep 11, 2012 at 05:19:00PM +0100, Cyril Chemparathy wrote:
>>>> With the inclusion of asm-generic/timex.h, the ARM arch timer implementation
>>>> breaks on build.  This is because asm/arch_timer.h now defines
>>>> ARCH_HAS_READ_CURRENT_TIMER, only to have this macro undefined by the
>>>> subsequent inclusion of asm-generic/timex.h.
>>>>
>>>> This patch fixes the problem in asm/timex.h by including asm-generic/timex.h
>>>> early, and by defining get_cycles even earlier.
>>>>
>>>> This patch has been tested against linux-next-20120910, both with and without
>>>> arch timer support.
>>>
>>> Is this still a problem with 7530/1 ("delay: add registration mechanism for
>>> delay timer sources") applied?
>>>
>>> http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7530/1
>>>
>>
>> Excellent.
>>
>> This conflicts with linux-next-20120910, and needs an added include of
>> <asm/delay.h> in timex.h.  With that in place, it works for me.
>
> Like below?
>
> If that's the fix, then I may as well respin 7530/1 given that it hasn't yet
> been merged.
>
> Will
>
> --->8
>
> diff --cc arch/arm/include/asm/timex.h
> index 5e71172,9acc135..0000000
> --- a/arch/arm/include/asm/timex.h
> +++ b/arch/arm/include/asm/timex.h
> @@@ -12,13 -12,9 +12,11 @@@
>    #ifndef _ASMARM_TIMEX_H
>    #define _ASMARM_TIMEX_H
>
> - #include <asm/arch_timer.h>
>    #include <mach/timex.h>
>
> - #ifdef ARCH_HAS_READ_CURRENT_TIMER
>   -typedef unsigned long cycles_t;
>    #define get_cycles()  ({ cycles_t c; read_current_timer(&c) ? 0 : c; })
> - #endif
>
>   +#include <asm-generic/timex.h>
> ++#include <asm/delay.h>
>   +
>    #endif
>

Perfect.

I can re-verify with the respun 7530/1 if you'd like.

-- 
Thanks
- Cyril

  reply	other threads:[~2012-09-11 17:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 16:19 [PATCH] ARM: avoid undef on ARCH_HAS_READ_CURRENT_TIMER Cyril Chemparathy
2012-09-11 16:25 ` Will Deacon
2012-09-11 16:59   ` Cyril Chemparathy
2012-09-11 17:20     ` Will Deacon
2012-09-11 17:28       ` Cyril Chemparathy [this message]
2012-09-11 17:53         ` Will Deacon
2012-09-11 18:31           ` Cyril Chemparathy
2012-09-11 19:28             ` Russell King - ARM Linux
2012-09-11 19:41               ` Cyril Chemparathy
2012-09-11 18:01 ` Russell King - ARM Linux
2012-09-11 18:16   ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=504F74C5.2020805@ti.com \
    --to=cyril@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.