From patchwork Sat Mar 7 02:50:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 45513 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7FE41214A0 for ; Sat, 7 Mar 2015 02:50:50 +0000 (UTC) Received: by lams18 with SMTP id s18sf460794lam.2 for ; Fri, 06 Mar 2015 18:50:49 -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=z+pf7R9h0t4yHfqILUhTC2WhtnVB2WNDxkuhzmB1ak8=; b=EtNX9Pjw8UXZRgaxGOw9YtQmBpSeRG53icc+kI1DNf4oFu2FE8TWHclaF+fh6gFgBW XFxz5BddyEN9LFaY4sUQERFjH03BNGZLl17LCR4Z1CpORappkMKXkFoJbmt7uHFg0xdx 1PrFUjY2OiK4qxe33+BY9RnYl/NrPsmtv4ZfIbwWRyqHrZl1pMNJ59LC3rPEajD16dkq a1cj3WqEpxRunS4JdgZfLBTHBYAHys9QDA5c8HOh1nnpK1f+rvSx8Nai1yDQ+kUnnNG4 2j9lxNd0afDTAhbZU5csLpLNwig8XShmkmA5UST3VOS5oVasMeuPnHYzZBxbs2DFQJiI WR3Q== X-Gm-Message-State: ALoCoQmyJ1X4KnIS4nXCTrDYEqizAquD63+/7DAtgMlHTp6UJBQKKDIX0nbdH7EAi6DqfRiPrrU0 X-Received: by 10.180.8.67 with SMTP id p3mr5893431wia.7.1425696649421; Fri, 06 Mar 2015 18:50:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.9 with SMTP id js9ls140530lab.69.gmail; Fri, 06 Mar 2015 18:50:49 -0800 (PST) X-Received: by 10.152.29.68 with SMTP id i4mr15495242lah.5.1425696649021; Fri, 06 Mar 2015 18:50:49 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id n15si8520713lbl.106.2015.03.06.18.50.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2015 18:50:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbjb6 with SMTP id b6so26041368lbj.9 for ; Fri, 06 Mar 2015 18:50:48 -0800 (PST) X-Received: by 10.112.162.232 with SMTP id yd8mr15384137lbb.41.1425696648935; Fri, 06 Mar 2015 18:50:48 -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.35.133 with SMTP id h5csp256525lbj; Fri, 6 Mar 2015 18:50:48 -0800 (PST) X-Received: by 10.70.137.99 with SMTP id qh3mr31150822pdb.39.1425696636216; Fri, 06 Mar 2015 18:50:36 -0800 (PST) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com. [209.85.220.48]) by mx.google.com with ESMTPS id z12si17363384pas.241.2015.03.06.18.50.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2015 18:50:36 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.48 as permitted sender) client-ip=209.85.220.48; Received: by padfa1 with SMTP id fa1so50110450pad.3 for ; Fri, 06 Mar 2015 18:50:35 -0800 (PST) X-Received: by 10.66.161.161 with SMTP id xt1mr30835055pab.35.1425696635345; Fri, 06 Mar 2015 18:50:35 -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 a2sm8381456pbu.27.2015.03.06.18.50.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Mar 2015 18:50:34 -0800 (PST) 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 11/12] sparc: Convert to using clocksource_register_hz() Date: Fri, 6 Mar 2015 18:50:02 -0800 Message-Id: <1425696603-16878-12-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425696603-16878-1-git-send-email-john.stultz@linaro.org> References: <1425696603-16878-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.175 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" 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