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: 11863 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A368D23E42 for ; Fri, 28 Sep 2012 21:36:32 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4D2E4A1828E for ; Fri, 28 Sep 2012 21:36:32 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so8011632iej.11 for ; Fri, 28 Sep 2012 14:36:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=Lpvjd3xdrWztVwAoFQKnaD5vJAhaxkXJABurdJhNARU=; b=I0qgEOF1IHSn7utT93dwxW+GMougbZB9/QAmE301h/aioEJfJDGWAnlsoqV2sWc9Qz M8f8VOkLVFoFni1CuNEp9/5uq7dEsMK/QIovA25ktX735fImxtbutjZnekVGGDge1STr O5/ggbGz3acqtLEiRN7JG3MTyd7d9KSdStQq6AtKfLgf2JtJAUVVEteiL3Xb5rFNuJ9G 6Am6wqO84NAJ6Yasn8sf0oiqdWFueE0EhLCfpWMe07VfmBsts43c4so06Kp3qrseV9cG WK3rldHN8tIWf+3hVwW8ZEd0+XDzUX/cKwHf9BpEI4nK4O6q923vvrOcm0HdlmCR/PZ+ vJRw== Received: by 10.50.160.165 with SMTP id xl5mr71330igb.0.1348868191880; Fri, 28 Sep 2012 14:36:31 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp495000igc; Fri, 28 Sep 2012 14:36:31 -0700 (PDT) Received: by 10.180.8.41 with SMTP id o9mr135994wia.3.1348868190672; Fri, 28 Sep 2012 14:36:30 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.186]) by mx.google.com with ESMTPS id gw9si1287229wib.36.2012.09.28.14.36.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Sep 2012 14:36:30 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.186 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.186; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.186 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de 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 Cc: linux-kernel@vger.kernel.org, arm@kernel.org, Arnd Bergmann , Catalin Marinas , Richard Cochran , Prarit Bhargava , Andrew Morton , John Stultz , Ingo Molnar 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-Gm-Message-State: ALoCoQn+Rs+8S4sSEhS1fCLsJWWExjih9x4gHonHNuy22CbOjVwHm6IoCWQIeXyuDju27CiASYHx 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