From patchwork Thu Mar 12 04:16:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 45723 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1D6B3214BF for ; Thu, 12 Mar 2015 04:17:15 +0000 (UTC) Received: by wesp10 with SMTP id p10sf9698762wes.3 for ; Wed, 11 Mar 2015 21:17:14 -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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=HgSR28ds1DlLW6L2tG1+KBmMLxm3FQNSoHOrjIhlwyg=; b=WpMoRvi+rYu0yRR4vaFZwKrZxUMU7o6L9r2XhjLAme0R/TZKzf/GEU2HJFoaRCWY/f 8VeS64W64DiGA2BwrMCydA8l+f692Ztq9i52GrPFoN31lVmrY4crjOaauWeZ2tC7iATx T6Hhdlck2HCZu/H81NEuLFnQubsinLsfifaqRp58/6fV8kusazv1AJf99K7DJI2p2uXt ci3qpa/ba0ySbhHbtmdIHqTvSMFbr+7sssWxINijRxbyMTPU3fNY49a0ikOAdbLHqCv3 g3ZcTI+yUwu3nBeH56egpIG/9dmvBiObNLFpeHOHhCPXcpsUxLZ/i3z1jkUBjSfu3KoS pscQ== X-Gm-Message-State: ALoCoQne15Jr0mJftg6j0UbMDasR/9rf+ooKMXPmrguc1D1PnGF3nQakIO1eIBwf4KQRGNc2gXvX X-Received: by 10.180.109.34 with SMTP id hp2mr4722801wib.4.1426133834380; Wed, 11 Mar 2015 21:17:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.132 with SMTP id rk4ls242043lac.50.gmail; Wed, 11 Mar 2015 21:17:13 -0700 (PDT) X-Received: by 10.152.27.232 with SMTP id w8mr32649623lag.51.1426133833843; Wed, 11 Mar 2015 21:17:13 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id tz9si3534211lbb.156.2015.03.11.21.17.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 21:17:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by labge10 with SMTP id ge10so12757468lab.10 for ; Wed, 11 Mar 2015 21:17:13 -0700 (PDT) X-Received: by 10.112.162.232 with SMTP id yd8mr36734735lbb.41.1426133833761; Wed, 11 Mar 2015 21:17:13 -0700 (PDT) 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.35.133 with SMTP id h5csp3173323lbj; Wed, 11 Mar 2015 21:17:13 -0700 (PDT) X-Received: by 10.70.123.1 with SMTP id lw1mr86857347pdb.26.1426133817263; Wed, 11 Mar 2015 21:16:57 -0700 (PDT) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com. [209.85.220.54]) by mx.google.com with ESMTPS id q3si2230131pdq.55.2015.03.11.21.16.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 21:16:57 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.54 as permitted sender) client-ip=209.85.220.54; Received: by paceu11 with SMTP id eu11so17124800pac.1 for ; Wed, 11 Mar 2015 21:16:56 -0700 (PDT) X-Received: by 10.66.62.137 with SMTP id y9mr85820704par.87.1426133816199; Wed, 11 Mar 2015 21:16:56 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id x1sm3070268pdp.1.2015.03.11.21.16.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Mar 2015 21:16:55 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Dave Jones , Linus Torvalds , Thomas Gleixner , Richard Cochran , Prarit Bhargava , Stephen Boyd , Ingo Molnar , Peter Zijlstra , "David S. Miller" Subject: [PATCH 10/12] sparc: Convert to using clocksource_register_hz() Date: Wed, 11 Mar 2015 21:16:38 -0700 Message-Id: <1426133800-29329-11-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426133800-29329-1-git-send-email-john.stultz@linaro.org> References: <1426133800-29329-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.215.42 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 implementation uses the clocksource_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" Acked-by: 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