From patchwork Fri Sep 28 21:36:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1526451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 4CEBF3FE80 for ; Fri, 28 Sep 2012 21:40:19 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1THiGF-0002MS-2d; Fri, 28 Sep 2012 21:38:15 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1THiEZ-0001ln-Iw for linux-arm-kernel@lists.infradead.org; Fri, 28 Sep 2012 21:36:34 +0000 Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LvhpU-1TWENn1KqS-017tfb; Fri, 28 Sep 2012 23:36:23 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 12/12] time/jiffies: bring back unconditional LATCH definition Date: Fri, 28 Sep 2012 23:36:17 +0200 Message-Id: <1348868177-21205-13-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1348868177-21205-1-git-send-email-arnd@arndb.de> References: <1348868177-21205-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:z+i04FELI9ViJEc3dVE+85Eaap8xKYmZ7c0UyQiQlQe 3IUIHtAQpokjXP29K+2hUmdwr/2U+8ZgSw6zJjxdTIb/teUJV1 Vnbdvs0aWtVdOofOkieLzd1lOf4SFEQ1NUJqH4mCTKRc8bvMfp sscYT07jV8sZGUDcdYFTmNeLrkzSUvPtb7qTXN9C8VTPW9IcUF httd3ph7Pdj4cw7N+Je98jc4uGnVzqBmGNhiSqBVsNW0vRJtPL 7rCQKS8Dsa8nY9nYkZa7d/eWZFSCfaeGl81hkreseXkPK1auEo 1agm7IYzOInwm1O4Gk339AMf03dBo2AfhZEIAU/eAkS8hkhDEP mIDBpcAQOjuldX7NJYIGjtgT92CKFvMsR1u8eCQyQC3DAzzMj5 x6BfReiEThdtQ== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.186 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Prarit Bhargava , Arnd Bergmann , Catalin Marinas , Richard Cochran , linux-kernel@vger.kernel.org, arm@kernel.org, John Stultz , Andrew Morton , Ingo Molnar X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Cc: Catalin Marinas Cc: Richard Cochran Cc: Prarit Bhargava Cc: Andrew Morton Cc: John Stultz Cc: Ingo Molnar --- include/linux/jiffies.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 05e3c2c7..d229ada 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -51,9 +51,10 @@ #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) -#ifdef CLOCK_TICK_RATE /* LATCH is used in the interval timer and ftape setup. */ -# define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ +#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ + +#ifdef CLOCK_TICK_RATE /* * HZ is the requested value. However the CLOCK_TICK_RATE may not allow