From patchwork Thu Jul 16 11:26:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51159 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B90F122A28 for ; Thu, 16 Jul 2015 11:28:41 +0000 (UTC) Received: by lbbvz8 with SMTP id vz8sf17661445lbb.2 for ; Thu, 16 Jul 2015 04:28:40 -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:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=2hP5n87wwzOyjjPxzBHekgQ3SKmT1hINk8DecIM5Ac4=; b=GHrEZIRviibMf4c0pZeHy06MrSlMsY9hndUylEzIPyZa7ks4iMdMQSVfYqGNFR9L5U pNwPBdGwl1nQTR5gexnV0kx+xJuoUVnizBAqmx/Q8EoR4XC9S4dMLRC5DrkVxOtElas8 nTx/kFazj4aTbe8mneuk6U8pKZoMuR3L86Pw08optJQCngXYTtykNiy9raC3t77oT5xg NNgQ2WPSpq0jmjm2EhttuSdIFOmkTSv8cio5bpq34EKua5kfqDXCccpA2UD6htH5phNO SNlfRoqXxFaOcenF4kD9Tw4bHgSOoXAbgAkljWP1D/nNbzeueWU9HKz7d34gWQb/4PIi nluA== X-Gm-Message-State: ALoCoQnzbYiHRUxnCKaD8rjhnS/WCFAl7330BypbPmeUqwvvuQ1oSxXFZYq+uCt+u+Kx5Rn94GVo X-Received: by 10.152.2.196 with SMTP id 4mr4641886law.10.1437046120746; Thu, 16 Jul 2015 04:28:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.195 with SMTP id ao3ls22949lac.53.gmail; Thu, 16 Jul 2015 04:28:40 -0700 (PDT) X-Received: by 10.112.123.179 with SMTP id mb19mr9092313lbb.55.1437046120429; Thu, 16 Jul 2015 04:28:40 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id ao2si6692721lac.69.2015.07.16.04.28.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jul 2015 04:28:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbyj8 with SMTP id yj8so41812342lbb.0 for ; Thu, 16 Jul 2015 04:28:40 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr9074723lbb.35.1437046120036; Thu, 16 Jul 2015 04:28:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp191752lbb; Thu, 16 Jul 2015 04:28:39 -0700 (PDT) X-Received: by 10.68.88.33 with SMTP id bd1mr17987508pbb.124.1437046118340; Thu, 16 Jul 2015 04:28:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id en10si12587454pac.97.2015.07.16.04.28.37; Thu, 16 Jul 2015 04:28:38 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755203AbbGPL2a (ORCPT + 27 others); Thu, 16 Jul 2015 07:28:30 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:33397 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754182AbbGPL21 (ORCPT ); Thu, 16 Jul 2015 07:28:27 -0400 Received: by pdbqm3 with SMTP id qm3so43015791pdb.0 for ; Thu, 16 Jul 2015 04:28:26 -0700 (PDT) X-Received: by 10.70.23.196 with SMTP id o4mr17891002pdf.164.1437046106428; Thu, 16 Jul 2015 04:28:26 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id r4sm7719782pap.8.2015.07.16.04.28.24 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 16 Jul 2015 04:28:25 -0700 (PDT) From: Viresh Kumar To: Thomas Gleixner , Daniel Lezcano Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Anton Blanchard , Christoph Lameter , Cyril Bur , Michael Turquette , Neelesh Gupta , Tejun Heo Subject: [PATCH 13/23] powerpc/time: Migrate to new 'set-state' interface Date: Thu, 16 Jul 2015 16:56:25 +0530 Message-Id: <4eb5253c39b903f1c314825cb80d8f3bec141682.1437044517.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@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.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Migrate powerpc driver to the new 'set-state' interface provided by clockevents core, the earlier 'set-mode' interface is marked obsolete now. This also enables us to implement callbacks for new states of clockevent devices, for example: ONESHOT_STOPPED. We weren't doing anything in ->set_mode(ONSHOT) and so set_state_oneshot() isn't implemented. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Viresh Kumar --- arch/powerpc/kernel/time.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 43922509a483..1be1092c7204 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -99,16 +99,17 @@ static struct clocksource clocksource_timebase = { static int decrementer_set_next_event(unsigned long evt, struct clock_event_device *dev); -static void decrementer_set_mode(enum clock_event_mode mode, - struct clock_event_device *dev); +static int decrementer_shutdown(struct clock_event_device *evt); struct clock_event_device decrementer_clockevent = { - .name = "decrementer", - .rating = 200, - .irq = 0, - .set_next_event = decrementer_set_next_event, - .set_mode = decrementer_set_mode, - .features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP, + .name = "decrementer", + .rating = 200, + .irq = 0, + .set_next_event = decrementer_set_next_event, + .set_state_shutdown = decrementer_shutdown, + .tick_resume = decrementer_shutdown, + .features = CLOCK_EVT_FEAT_ONESHOT | + CLOCK_EVT_FEAT_C3STOP, }; EXPORT_SYMBOL(decrementer_clockevent); @@ -862,11 +863,10 @@ static int decrementer_set_next_event(unsigned long evt, return 0; } -static void decrementer_set_mode(enum clock_event_mode mode, - struct clock_event_device *dev) +static int decrementer_shutdown(struct clock_event_device *dev) { - if (mode != CLOCK_EVT_MODE_ONESHOT) - decrementer_set_next_event(DECREMENTER_MAX, dev); + decrementer_set_next_event(DECREMENTER_MAX, dev); + return 0; } /* Interrupt handler for the timer broadcast IPI */