Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752900AbbG3T2j (ORCPT ); Thu, 30 Jul 2015 15:28:39 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47280 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752817AbbG3T2h (ORCPT ); Thu, 30 Jul 2015 15:28:37 -0400 Date: Thu, 30 Jul 2015 12:28:15 -0700 From: tip-bot for Viresh Kumar Message-ID: Cc: linux-kernel@vger.kernel.org, luto@amacapital.net, mingo@kernel.org, viresh.kumar@linaro.org, kuleshovmail@gmail.com, tglx@linutronix.de, hpa@zytor.com, rusty@rustcorp.com.au, JBeulich@suse.com, dvlasenk@redhat.com, brgerst@gmail.com Reply-To: hpa@zytor.com, rusty@rustcorp.com.au, tglx@linutronix.de, viresh.kumar@linaro.org, kuleshovmail@gmail.com, mingo@kernel.org, luto@amacapital.net, linux-kernel@vger.kernel.org, brgerst@gmail.com, dvlasenk@redhat.com, JBeulich@suse.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] x86/lguest/timer: Migrate to new set-state interface Git-Commit-ID: c2e13cc2cea64385043fa9afaaf91a74ec438467 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3052 Lines: 81 Commit-ID: c2e13cc2cea64385043fa9afaaf91a74ec438467 Gitweb: http://git.kernel.org/tip/c2e13cc2cea64385043fa9afaaf91a74ec438467 Author: Viresh Kumar AuthorDate: Thu, 16 Jul 2015 16:28:46 +0530 Committer: Thomas Gleixner CommitDate: Thu, 30 Jul 2015 21:25:38 +0200 x86/lguest/timer: Migrate to new set-state interface Migrate lguest 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 while switching modes other than in shutdown mode and so those are not implemented. Signed-off-by: Viresh Kumar Acked-and-tested-by: Rusty Russell Cc: linaro-kernel@lists.linaro.org Cc: Alexander Kuleshov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Jan Beulich Cc: Andy Lutomirski Cc: lguest@lists.ozlabs.org (open list:LGUEST) Link: http://lkml.kernel.org/r/b96f1c308f4523255c5394a4e6e13f2b67685402.1437042675.git.viresh.kumar@linaro.org Signed-off-by: Thomas Gleixner --- arch/x86/lguest/boot.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index f2dc08c..433e5a7 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@ -985,23 +985,11 @@ static int lguest_clockevent_set_next_event(unsigned long delta, return 0; } -static void lguest_clockevent_set_mode(enum clock_event_mode mode, - struct clock_event_device *evt) -{ - switch (mode) { - case CLOCK_EVT_MODE_UNUSED: - case CLOCK_EVT_MODE_SHUTDOWN: - /* A 0 argument shuts the clock down. */ - hcall(LHCALL_SET_CLOCKEVENT, 0, 0, 0, 0); - break; - case CLOCK_EVT_MODE_ONESHOT: - /* This is what we expect. */ - break; - case CLOCK_EVT_MODE_PERIODIC: - BUG(); - case CLOCK_EVT_MODE_RESUME: - break; - } +static int lguest_clockevent_shutdown(struct clock_event_device *evt) +{ + /* A 0 argument shuts the clock down. */ + hcall(LHCALL_SET_CLOCKEVENT, 0, 0, 0, 0); + return 0; } /* This describes our primitive timer chip. */ @@ -1009,7 +997,7 @@ static struct clock_event_device lguest_clockevent = { .name = "lguest", .features = CLOCK_EVT_FEAT_ONESHOT, .set_next_event = lguest_clockevent_set_next_event, - .set_mode = lguest_clockevent_set_mode, + .set_state_shutdown = lguest_clockevent_shutdown, .rating = INT_MAX, .mult = 1, .shift = 0, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/