From patchwork Thu Dec 10 17:21:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 58232 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp631514lbb; Thu, 10 Dec 2015 09:21:50 -0800 (PST) X-Received: by 10.98.13.211 with SMTP id 80mr8481862pfn.112.1449768110641; Thu, 10 Dec 2015 09:21:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si21455799pfq.13.2015.12.10.09.21.50; Thu, 10 Dec 2015 09:21:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753568AbbLJRVs (ORCPT + 28 others); Thu, 10 Dec 2015 12:21:48 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:34807 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421AbbLJRVq (ORCPT ); Thu, 10 Dec 2015 12:21:46 -0500 Received: by lffu14 with SMTP id u14so61750563lff.1 for ; Thu, 10 Dec 2015 09:21:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=SFJbSv5XUtDDiiRSsu08VGqzJQNN6YoqugnEkUCboow=; b=IbSG2WZMEV821+lbBNulKznx7VRv6YvbI+ZPoNpx1X2OHfKx/8TZ5YLjtdnOlw4Ujy yVYHpUaNrBkkvXZgwJNYIDh2mBia+CYL3LwtqEhLgCz4j3GZjnqdJyP4eN8KoxM7PWND Bf570iO2Zvh2BSJjwlgA+5jhhNraeE7o/Vxz7leMlR/Co8x7fbgC0VldY9A0bQd8quYH +0MU82/uePJTD5pMHYTT+RJoWSwtxv2aKjZ1saXudzznBTajMr/rDkhHoYULGAPOKVFL GKyYV8zvk2G3NsqODf9ghIXo/EqK7XtBvwVCKNBIqle9T7Tn7wdz/ZGoVXzwXHJYR9nm yAmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SFJbSv5XUtDDiiRSsu08VGqzJQNN6YoqugnEkUCboow=; b=FOJzbXhy3bIXfbeyaQJQmx3ynyBsLCBNg1bHU76hnEJj55GWfkF0TN1ob//oSB2ERY UYh67ZfPd2DFfgw6g45FNtIyhaVtL2otBp+FwtgN97U8G8idSfrPcaboFBPj0VAsHfPl 69EMV7WW9dGCXlRjQCGFitSajsqqPYRR2uQt1ShfBFxlywnaITpgkzL9qzwqoc5J/h/D Y0dZG4LCbnHWfJ+rvlu+WulPzmF1Q2o5yph+obR+MIEYxx9oEKKDVXE/LKdISiKPEhl2 lWidLFLljs+5BwdNHlag1ap1sqbpzhaZVXFzb56GewppSjErKxhGYgYxdaxzhSyD8RxK /whg== X-Gm-Message-State: ALoCoQnlDxEAtFTyE9X9UN9f2W7Is92EyzSQiuKg48fSm7dj7yI9+Wm7qJOmMQunu53rg5K7W265YVOfsbS98GqLRq8RqmaRGg== X-Received: by 10.25.23.159 with SMTP id 31mr4809575lfx.44.1449768105095; Thu, 10 Dec 2015 09:21:45 -0800 (PST) Received: from localhost.localdomain.localdomain (c-297471d5.01-192-6c756e10.cust.bredbandsbolaget.se. [213.113.116.41]) by smtp.gmail.com with ESMTPSA id of8sm2469248lbb.7.2015.12.10.09.21.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Dec 2015 09:21:44 -0800 (PST) From: Linus Walleij To: Daniel Lezcano , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Alexander Sverdlin , Linus Walleij Subject: [PATCH] clocksource: mmio: remove artificial 32bit limitation Date: Thu, 10 Dec 2015 18:21:41 +0100 Message-Id: <1449768101-6879-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The EP93xx is registering a clocksource of 40 bits with clocksource_mmio_init() but this is not working because of this artificial limitation. It works fine to lift the uppe limit to 64 bits, and since cycle_t is u64, it should intuitively have been like that from the beginning. Fixes: 000bc17817bf "ARM: ep93xx: switch to GENERIC_CLOCKEVENTS" Reported-by: Alexander Sverdlin Signed-off-by: Linus Walleij --- drivers/clocksource/mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c index 1593ade2a815..c4f7d7a9b689 100644 --- a/drivers/clocksource/mmio.c +++ b/drivers/clocksource/mmio.c @@ -55,7 +55,7 @@ int __init clocksource_mmio_init(void __iomem *base, const char *name, { struct clocksource_mmio *cs; - if (bits > 32 || bits < 16) + if (bits > 64 || bits < 16) return -EINVAL; cs = kzalloc(sizeof(struct clocksource_mmio), GFP_KERNEL);