From patchwork Fri May 23 10:31:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30725 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A3CA82066E for ; Fri, 23 May 2014 10:39:35 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id pa12sf17182548veb.11 for ; Fri, 23 May 2014 03:39:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=kX/DM1slOI5anycZMs7MMuKfQ/LDL51RZHziUiavy+E=; b=ZcV8I1j9Qga9jCSsBRunm/I156w7KfqR9WoAoopEvxj0dxc/kDRVo0I2jxgn7nzZ3B ZbqErPR26HN+tuck3ci6F9wmzWOWc0Qhy4sdF5m5T2n5ud4KcDqlzo9Hm4IagPHHcKYD cPAbrO09g+1/PQwB909wr+fclfUURj4a4rKS9gOtsBTc7WAv1py2D3YZhnRFdDQkDbyM 6ql+3a3biFvyTIYlO05a8MjxwBs6xCewvLDSQdc7Ig7HEornquu4GqyFl6kfimSXrz1l KwbyC5PPXGE99iN0KkpRbKKHC/6a+FDa0w98h1uQ5MlXJ/BCAh01XRoN6jbtE9VRsm2K 16EQ== X-Gm-Message-State: ALoCoQlplkjna8QE/Z3gySWl7K/ZqB8ga47yQ15TYIL+3eOpa4bfB7tjV7qn7cQ+FCNp38rZ0foO X-Received: by 10.58.227.10 with SMTP id rw10mr1251100vec.39.1400841575275; Fri, 23 May 2014 03:39:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.195 with SMTP id f61ls1637200qgf.59.gmail; Fri, 23 May 2014 03:39:35 -0700 (PDT) X-Received: by 10.220.167.2 with SMTP id o2mr3483806vcy.8.1400841575157; Fri, 23 May 2014 03:39:35 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id j10si1372200vdf.97.2014.05.23.03.39.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:39:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so5967458veb.39 for ; Fri, 23 May 2014 03:39:35 -0700 (PDT) X-Received: by 10.58.123.71 with SMTP id ly7mr3343803veb.11.1400841575045; Fri, 23 May 2014 03:39:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp20255vcb; Fri, 23 May 2014 03:39:34 -0700 (PDT) X-Received: by 10.66.197.135 with SMTP id iu7mr4483595pac.149.1400841574206; Fri, 23 May 2014 03:39:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xu2si3271682pbb.129.2014.05.23.03.39.33 for ; Fri, 23 May 2014 03:39:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753468AbaEWKja (ORCPT + 27 others); Fri, 23 May 2014 06:39:30 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:56695 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753021AbaEWKcm (ORCPT ); Fri, 23 May 2014 06:32:42 -0400 Received: by mail-wg0-f52.google.com with SMTP id l18so4577080wgh.11 for ; Fri, 23 May 2014 03:32:41 -0700 (PDT) X-Received: by 10.180.86.74 with SMTP id n10mr2310402wiz.55.1400841161778; Fri, 23 May 2014 03:32:41 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-404-187.w82-125.abo.wanadoo.fr. [82.125.3.187]) by mx.google.com with ESMTPSA id s9sm2200908wix.13.2014.05.23.03.32.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:32:40 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 53/71] clocksource: arm_global_timer: Only check for unusable timer on A9 Date: Fri, 23 May 2014 12:31:33 +0200 Message-Id: <1400841111-6683-53-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> References: <537F214C.8000700@linaro.org> <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Matthew Leach The check for a usable global timer in the probe code does not enquire which CPU we are currently running on. This can cause the driver to incorrectly assume we have an unusable global timer if we are running on a CPU other than A9. Before checking the CPU revision, ensure we are running on an A9 CPU. Acked-by: Will Deacon Signed-off-by: Matthew Leach Signed-off-by: Daniel Lezcano --- drivers/clocksource/arm_global_timer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c index 0fc31d0..60e5a170 100644 --- a/drivers/clocksource/arm_global_timer.c +++ b/drivers/clocksource/arm_global_timer.c @@ -246,11 +246,12 @@ static void __init global_timer_of_register(struct device_node *np) int err = 0; /* - * In r2p0 the comparators for each processor with the global timer + * In A9 r2p0 the comparators for each processor with the global timer * fire when the timer value is greater than or equal to. In previous * revisions the comparators fired when the timer value was equal to. */ - if ((read_cpuid_id() & 0xf0000f) < 0x200000) { + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9 + && (read_cpuid_id() & 0xf0000f) < 0x200000) { pr_warn("global-timer: non support for this cpu version.\n"); return; }