From patchwork Fri Jan 23 00:09:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 43554 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D0F8C218DB for ; Fri, 23 Jan 2015 00:10:09 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf2606843lbj.0 for ; Thu, 22 Jan 2015 16:10:08 -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=Cm+ES1aTz/BlX7jJCrY7iQPS5WpQSpTr9gfG6nvhdPAwUHgZ1zzt0SKZXDPzeYwIw0 AM/vX9JAcSv4Se90EUSKos/VHGoGQ5Qqo4X+HyleUzE1/9cwoxenebX0m22nYJ61wFCE scs3paJCLUlM5EyJedjlYauq+K+QIZq0tXnaGrI08ItNXnrilsnTbbineifTxLoo+u9o 2OrIicqGwwIf44PL8M7R07KDbykK6IunYwSzYPovLEpg3amm6XBUPTnqlpZzBDOula2j hBpI6gDYBhoh6u0OzRcDkafYPl+wJ45shsRESjORdELUDsJLA+dQNL/TbyMUMNtNBQi8 szZg== X-Gm-Message-State: ALoCoQlvVjYyjgTRapKs7mZldkcsy0MN2jV1qgwaHa6mSt1v3vK8lRWPP2+9yHfCIIizVbTjlFoY X-Received: by 10.152.43.50 with SMTP id t18mr583222lal.3.1421971808747; Thu, 22 Jan 2015 16:10:08 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.69 with SMTP id i5ls64557lah.23.gmail; Thu, 22 Jan 2015 16:10:08 -0800 (PST) X-Received: by 10.152.207.72 with SMTP id lu8mr4580695lac.54.1421971808537; Thu, 22 Jan 2015 16:10:08 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id xo9si20554857lac.57.2015.01.22.16.10.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 16:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id ge10so4626375lab.10 for ; Thu, 22 Jan 2015 16:10:08 -0800 (PST) X-Received: by 10.112.52.229 with SMTP id w5mr4543033lbo.52.1421971808403; Thu, 22 Jan 2015 16:10:08 -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 c8csp64004lbb; Thu, 22 Jan 2015 16:10:07 -0800 (PST) X-Received: by 10.69.31.33 with SMTP id kj1mr6486943pbd.43.1421971787100; Thu, 22 Jan 2015 16:09:47 -0800 (PST) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com. [209.85.192.177]) by mx.google.com with ESMTPS id nl8si13719463pbc.250.2015.01.22.16.09.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 16:09:47 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.192.177 as permitted sender) client-ip=209.85.192.177; Received: by mail-pd0-f177.google.com with SMTP id y13so4774103pdi.8 for ; Thu, 22 Jan 2015 16:09:46 -0800 (PST) X-Received: by 10.70.38.110 with SMTP id f14mr6563177pdk.17.1421971786162; Thu, 22 Jan 2015 16:09:46 -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 am14sm10405657pac.35.2015.01.22.16.09.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jan 2015 16:09: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 11/12] sparc: Convert to using clocksource_register_hz() Date: Thu, 22 Jan 2015 16:09:26 -0800 Message-Id: <1421971767-17707-12-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421971767-17707-1-git-send-email-john.stultz@linaro.org> References: <1421971767-17707-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.51 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 Acked-by: David S. Miller --- 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