From patchwork Sat Jan 10 00:34:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 42936 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2ED1226CF1 for ; Sat, 10 Jan 2015 00:35:03 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id c13sf9643049eek.2 for ; Fri, 09 Jan 2015 16:35:02 -0800 (PST) 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=EitBkAo9CGtDfXC9leLbRW4gFxefTqlFYCB87AhX+uM=; b=b6zsw4xqczBLcV2gStBxL7qdTNgikMjGxOILisGHnM7tpVLggnmBJ4qW6n83/DPEKf v/Z1p6AyvT/ipBIPOkl0S4d7FvI9Qq+cah73bj17m6VDxncFv0N+IPl8Bab+sWKqIIrJ wEnqiS0OYyyT7Cza7hLSNOhv8abgID2oXo+U6Zkn9WeWWuRhcpBk8ReZYWYXwsNIN2GX O6W08GM8YAVjW2Q1tIiA2fD+UVHN4RWzECYobUtlog8MOSIPlytVQBMdfY/DmtHxsxl8 CarZbw4v9IXypENtiblY29lyk6WUwzMzymM4XoiVaA/wcTFrtPB5CQQcCXP8bRqihHsn ztYQ== X-Gm-Message-State: ALoCoQl0h2INm2g7iAuYJ+y2kSjf/CrGewsAfbuU5/jKkHHjPRbowDi0BCkZoVJq6oLzwN5FRk80 X-Received: by 10.152.10.233 with SMTP id l9mr2354242lab.0.1420850102425; Fri, 09 Jan 2015 16:35:02 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.37 with SMTP id ll5ls532384lac.53.gmail; Fri, 09 Jan 2015 16:35:02 -0800 (PST) X-Received: by 10.152.36.1 with SMTP id m1mr24321217laj.95.1420850102290; Fri, 09 Jan 2015 16:35:02 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id v3si14681298lae.26.2015.01.09.16.35.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Jan 2015 16:35:02 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id u14so10648427lbd.9 for ; Fri, 09 Jan 2015 16:35:02 -0800 (PST) X-Received: by 10.152.197.5 with SMTP id iq5mr24404422lac.6.1420850102106; Fri, 09 Jan 2015 16:35:02 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.9.200 with SMTP id c8csp484847lbb; Fri, 9 Jan 2015 16:35:01 -0800 (PST) X-Received: by 10.66.253.197 with SMTP id ac5mr27149539pad.152.1420850086677; Fri, 09 Jan 2015 16:34:46 -0800 (PST) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com. [209.85.192.173]) by mx.google.com with ESMTPS id rv7si15327375pbc.125.2015.01.09.16.34.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Jan 2015 16:34:46 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.192.173 as permitted sender) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id ft15so20248652pdb.4 for ; Fri, 09 Jan 2015 16:34:45 -0800 (PST) X-Received: by 10.70.140.229 with SMTP id rj5mr27446031pdb.60.1420850085778; Fri, 09 Jan 2015 16:34:45 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id hc10sm8046439pbd.78.2015.01.09.16.34.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Jan 2015 16:34:45 -0800 (PST) From: John Stultz To: Linux Kernel Mailing List Cc: John Stultz , Dave Jones , Linus Torvalds , Thomas Gleixner , Richard Cochran , Prarit Bhargava , Stephen Boyd , Ingo Molnar , Peter Zijlstra , "David S. Miller" Subject: [PATCH 09/10] sparc: Convert to using clocksource_register_hz() Date: Fri, 9 Jan 2015 16:34:27 -0800 Message-Id: <1420850068-27828-10-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1420850068-27828-1-git-send-email-john.stultz@linaro.org> References: <1420850068-27828-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@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.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , While cleaning up some clocksource code, I noticed the time_32 impelementation uses the hz2mult helper, but doesn't use the clocksource_register_hz() method. I don't believe the sparc clocksource is a default clocksource, so we shouldn't need to self-define the mult/shift pair. So convert the time_32.c implementation to use clocksource_register_hz(). Untested. Cc: Dave Jones Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "David S. Miller" Signed-off-by: John Stultz --- arch/sparc/kernel/time_32.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index a31c0c8..18147a5 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c @@ -181,17 +181,13 @@ static struct clocksource timer_cs = { .rating = 100, .read = timer_cs_read, .mask = CLOCKSOURCE_MASK(64), - .shift = 2, .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; static __init int setup_timer_cs(void) { timer_cs_enabled = 1; - timer_cs.mult = clocksource_hz2mult(sparc_config.clock_rate, - timer_cs.shift); - - return __clocksource_register(&timer_cs); + return clocksource_register_hz(&timer_cs, sparc_config.clock_rate); } #ifdef CONFIG_SMP