diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-09-28 17:36:17 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2012-09-28 17:58:22 -0400 |
commit | 015a830d44695adff8b52d2703608cec4a1041ba (patch) | |
tree | f29d00c11a82f3e29096a2631a3a3a27eaddfc1f | |
parent | 0bd1189e239c76eb3a50e458548fbe7e4a5dfff1 (diff) |
time/jiffies: bring back unconditional LATCH definition
Patch a7ea3bbf5d "time/jiffies: Allow CLOCK_TICK_RATE to be undefined"
breaks the compilation of targets that rely on the LATCH definition,
because of recursive header file inclusion not defining CLOCK_TICK_RATE
before it is checked here.
This fixes the problem by moving LATCH back to where it was, but it
seems that there are still cases where SHIFTED_HZ is defined incorrectly
because of the same problem. Need to investigate further.
Without this patch, building h7201_defconfig results in:
arch/arm/mach-h720x/common.c: In function 'h720x_gettimeoffset':
arch/arm/mach-h720x/common.c:50:73: error: 'LATCH' undeclared (first use in this function)
arch/arm/mach-h720x/common.c:50:73: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/mach-h720x/common.c:51:1: warning: control reaches end of non-void function [-Wreturn-type]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r-- | include/linux/jiffies.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 82680541576d..44e389d8e8fd 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -51,9 +51,10 @@ | |||
51 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ | 51 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ |
52 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) | 52 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) |
53 | 53 | ||
54 | #ifdef CLOCK_TICK_RATE | ||
55 | /* LATCH is used in the interval timer and ftape setup. */ | 54 | /* LATCH is used in the interval timer and ftape setup. */ |
56 | # define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | 55 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
56 | |||
57 | #ifdef CLOCK_TICK_RATE | ||
57 | 58 | ||
58 | /* | 59 | /* |
59 | * HZ is the requested value. However the CLOCK_TICK_RATE may not allow | 60 | * HZ is the requested value. However the CLOCK_TICK_RATE may not allow |