From: "David Singleton" <daviado@gmail.com>
To: "Greg KH" <greg@kroah.com>
Cc: linux-pm@lists.osdl.org, "kernel list" <linux-kernel@vger.kernel.org>
Subject: Re: OpPoint summary
Date: Thu, 14 Sep 2006 10:03:02 -0700 [thread overview]
Message-ID: <b324b5ad0609141003tdd222e6ye0f67d6ad5e7f9e0@mail.gmail.com> (raw)
In-Reply-To: <20060914055529.GA18031@kroah.com>
> Care to resend your patches in the proper format, through email so that
> we can see them, and possibly get some testing in -mm if they look sane?
Greg,
here's the patch that leverages the cpufreq notifier lists for
driver PRE and POST
change functions. I'm also rebasing to 2.6.18-rc7 and making changes Pavel
suggested about just having suspend states in /sys/power/state and moving
the operating point control file down under
/sys/power/operating_states directory.
Signed-Off-by: David Singleton <dsingleton@mvista.com>
drivers/cpufreq/cpufreq.c | 36 ++++++++++++++++++++++++++++++++++++
include/linux/cpufreq.h | 2 ++
2 files changed, 38 insertions(+)
Index: linux-2.6.17/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-2.6.17.orig/drivers/cpufreq/cpufreq.c
+++ linux-2.6.17/drivers/cpufreq/cpufreq.c
@@ -226,6 +226,35 @@ static void adjust_jiffies(unsigned long
static inline void adjust_jiffies(unsigned long val, struct
cpufreq_freqs *ci) { return; }
#endif
+int cpufreq_prepare_transition(struct oppoint *cur, struct oppoint *new)
+{
+ struct cpufreq_freqs freqs;
+
+ freqs.old = cur->frequency;
+ freqs.new = new->frequency;
+ freqs.cpu = 0;
+ freqs.flags = new->flags;
+ blocking_notifier_call_chain(&cpufreq_transition_notifier_list,
+ CPUFREQ_PRECHANGE, &freqs);
+ adjust_jiffies(CPUFREQ_PRECHANGE, &freqs);
+ return 0;
+}
+EXPORT_SYMBOL(cpufreq_prepare_transition);
+
+int cpufreq_finish_transition(struct oppoint *cur, struct oppoint *new)
+{
+ struct cpufreq_freqs freqs;
+
+ freqs.old = cur->frequency;
+ freqs.new = new->frequency;
+ freqs.cpu = 0;
+ freqs.flags = new->flags;
+ adjust_jiffies(CPUFREQ_POSTCHANGE, &freqs);
+ blocking_notifier_call_chain(&cpufreq_transition_notifier_list,
+ CPUFREQ_POSTCHANGE, &freqs);
+ return 0;
+}
+EXPORT_SYMBOL(cpufreq_finish_transition);
/**
* cpufreq_notify_transition - call notifier chain and adjust_jiffies
@@ -920,6 +949,12 @@ static void cpufreq_out_of_sync(unsigned
}
+#ifdef CONFIG_PM
+unsigned int cpufreq_quick_get(unsigned int cpu)
+{
+ return (current_state->frequency);
+}
+#else
/**
* cpufreq_quick_get - get the CPU frequency (in kHz) frpm policy->cur
* @cpu: CPU number
@@ -941,6 +976,7 @@ unsigned int cpufreq_quick_get(unsigned
return (ret);
}
+#endif
EXPORT_SYMBOL(cpufreq_quick_get);
Index: linux-2.6.17/include/linux/cpufreq.h
===================================================================
--- linux-2.6.17.orig/include/linux/cpufreq.h
+++ linux-2.6.17/include/linux/cpufreq.h
@@ -268,6 +268,8 @@ static inline unsigned int cpufreq_quick
return 0;
}
#endif
+int cpufreq_prepare_transition(struct oppoint *cur, struct oppoint *new);
+int cpufreq_finish_transition(struct oppoint *cur, struct oppoint *new);
/*********************************************************************
>
> thanks,
>
> greg k-h
>
next prev parent reply other threads:[~2006-09-14 17:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <450516E8.9010403@gmail.com>
[not found] ` <20060911082025.GD1898@elf.ucw.cz>
[not found] ` <b0623b9bb79afacc77cddc6e39c96b62@nomadgs.com>
[not found] ` <20060911195546.GB11901@elf.ucw.cz>
[not found] ` <4505CCDA.8020501@gmail.com>
[not found] ` <20060911210026.GG11901@elf.ucw.cz>
[not found] ` <4505DDA6.8080603@gmail.com>
2006-09-11 22:56 ` cpufreq terminally broken [was Re: community PM requirements/issues and PowerOP] Pavel Machek
2006-09-12 0:17 ` Mark Gross
2006-09-12 3:37 ` Greg KH
2006-09-13 23:50 ` [linux-pm] " David Singleton
2006-09-14 5:30 ` Vitaly Wool
2006-09-14 5:55 ` OpPoint summary Greg KH
2006-09-14 7:35 ` [linux-pm] " Vitaly Wool
2006-09-14 16:55 ` David Singleton
2006-09-14 17:03 ` David Singleton [this message]
2006-09-14 17:07 ` David Singleton
2006-09-14 17:25 ` Auke Kok
2006-09-14 18:15 ` [linux-pm] " Vitaly Wool
2006-09-14 18:17 ` David Singleton
2006-09-17 17:48 ` Pavel Machek
2006-09-18 14:33 ` [linux-pm] " Richard A. Griffiths
2006-09-18 16:13 ` Matthew Locke
2006-09-14 17:11 ` David Singleton
2006-09-17 5:07 ` David Singleton
2006-09-17 12:56 ` Pavel Machek
2006-09-17 12:58 ` Pavel Machek
2006-09-17 22:43 ` [linux-pm] " Matthew Locke
2006-09-12 8:33 ` cpufreq terminally broken [was Re: community PM requirements/issues and PowerOP] Pavel Machek
2006-09-12 9:10 ` [linux-pm] " Vitaly Wool
2006-09-12 9:16 ` Pavel Machek
2006-09-12 9:23 ` Vitaly Wool
2006-09-14 15:04 ` Mark Gross
2006-09-14 14:58 ` Mark Gross
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=b324b5ad0609141003tdd222e6ye0f67d6ad5e7f9e0@mail.gmail.com \
--to=daviado@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.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
all inboxes | Powered by JetHome®