public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Timo Juhani Lindfors <timo.lindfors@iki.fi>
To: systemtap@sourceware.org
Cc: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Subject: [PATCH] PR15789/gettimeofday: do not bail out if cpufreq_register_notifier fails
Date: Tue, 30 Jul 2013 08:10:00 -0000	[thread overview]
Message-ID: <1375171839-15996-1-git-send-email-timo.lindfors@iki.fi> (raw)

Linux commit d5aaffa9dd531c978c6f3fea06a2972653bd7fc8 (cpufreq: handle
cpufreq being disabled for all exported function.) causes
cpufreq_register_notifier to fail if cpufreq gets disabled at
runtime. This patch simply ignores the failure of
cpufreq_register_notifier so that gettimeofday can continue to work.
Once cpufreq is disabled it can not be enabled at runtime so this
should be safe.
---
 runtime/time.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/runtime/time.c b/runtime/time.c
index 34df72a..a01d922 100644
--- a/runtime/time.c
+++ b/runtime/time.c
@@ -253,10 +253,8 @@ _stp_init_time(void)
 
 #ifdef CONFIG_CPU_FREQ
     if (!ret && !__stp_constant_freq()) {
-        ret = cpufreq_register_notifier(&__stp_time_notifier,
-                CPUFREQ_TRANSITION_NOTIFIER);
-
-        if (!ret) {
+        if (!cpufreq_register_notifier(&__stp_time_notifier,
+                                       CPUFREQ_TRANSITION_NOTIFIER)) {
             for_each_online_cpu(cpu) {
                 unsigned long flags;
                 int freq_khz = cpufreq_get(cpu);
-- 
1.7.2.5

             reply	other threads:[~2013-07-30  8:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30  8:10 Timo Juhani Lindfors [this message]
2013-08-02 18:09 ` David Smith
2013-08-16 11:56   ` Timo Juhani Lindfors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375171839-15996-1-git-send-email-timo.lindfors@iki.fi \
    --to=timo.lindfors@iki.fi \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).