From: "Rafał Bilski" <rafalbilski@interia.pl>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Wander Winkelhorst <w.winkelhorst@gmail.com>,
David Johnson <dj@david-web.co.uk>,
linux-kernel@vger.kernel.org, cpufreq@lists.linux.org.uk
Subject: Re: cpufreq longhaul locks up
Date: Sat, 05 May 2007 19:48:48 +0200 [thread overview]
Message-ID: <463CC380.3060603@interia.pl> (raw)
In-Reply-To: <5699f8f00705050144s5c00a455s8f7dba9258d83986@mail.gmail.com>
I found one line which wasn't were it should be. Probably this will not
fix Your problem with powersave governor, but it is a bit related.
Looks like Longhaul isn't skipping frequency transtition when it is asked
to set f which is already set. Now after first transition it will not
try to set same frequency again. Second part contains some magic
because I don't have CN400 datasheet. It is NDA protected :-( Should
print You one byte in hex and will try to set one register. I don't
know if anything will change but it is worth testing.
Fingers crossed
Rafa³
---
arch/i386/kernel/cpu/cpufreq/longhaul.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index 2b030d6..5548e5b 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -88,6 +88,7 @@ static int clock_ratio[32];
static int eblcr_table[32];
static int longhaul_version;
static struct cpufreq_frequency_table *longhaul_table;
+static unsigned int old_ratio = -1;
#ifdef CONFIG_CPU_FREQ_DEBUG
static char speedbuffer[8];
@@ -252,7 +253,6 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
{
int speed, mult;
struct cpufreq_freqs freqs;
- static unsigned int old_ratio=-1;
unsigned long flags;
unsigned int pic1_mask, pic2_mask;
@@ -603,7 +603,12 @@ static int enable_arbiter_disable(void)
/* Find CN400 V-Link host bridge */
if (dev == NULL)
dev = pci_find_device(PCI_VENDOR_ID_VIA, 0x7259, NULL);
-
+ if (dev != NULL) {
+ pci_read_config_byte(dev, 0x47, &pci_cmd);
+ printk(KERN_INFO PFX "%#02x\n", pci_cmd);
+ pci_cmd |= 0xf;
+ pci_write_config_byte(dev, 0x47, pci_cmd);
+ }
}
if (dev != NULL) {
/* Enable access to port 0x22 */
--
----------------------------------------------------------------------
Po meczu.....kurde...:)
>>> http://link.interia.pl/f1a72
WARNING: multiple messages have this Message-ID (diff)
From: "Rafał Bilski" <rafalbilski@interia.pl>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Wander Winkelhorst <w.winkelhorst@gmail.com>,
David Johnson <dj@david-web.co.uk>,
linux-kernel@vger.kernel.org, cpufreq@lists.linux.org.uk
Subject: Re: cpufreq longhaul locks up
Date: Sat, 05 May 2007 19:48:48 +0200 [thread overview]
Message-ID: <463CC380.3060603@interia.pl> (raw)
In-Reply-To: <5699f8f00705050144s5c00a455s8f7dba9258d83986@mail.gmail.com>
I found one line which wasn't were it should be. Probably this will not
fix Your problem with powersave governor, but it is a bit related.
Looks like Longhaul isn't skipping frequency transtition when it is asked
to set f which is already set. Now after first transition it will not
try to set same frequency again. Second part contains some magic
because I don't have CN400 datasheet. It is NDA protected :-( Should
print You one byte in hex and will try to set one register. I don't
know if anything will change but it is worth testing.
Fingers crossed
Rafał
---
arch/i386/kernel/cpu/cpufreq/longhaul.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index 2b030d6..5548e5b 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -88,6 +88,7 @@ static int clock_ratio[32];
static int eblcr_table[32];
static int longhaul_version;
static struct cpufreq_frequency_table *longhaul_table;
+static unsigned int old_ratio = -1;
#ifdef CONFIG_CPU_FREQ_DEBUG
static char speedbuffer[8];
@@ -252,7 +253,6 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
{
int speed, mult;
struct cpufreq_freqs freqs;
- static unsigned int old_ratio=-1;
unsigned long flags;
unsigned int pic1_mask, pic2_mask;
@@ -603,7 +603,12 @@ static int enable_arbiter_disable(void)
/* Find CN400 V-Link host bridge */
if (dev == NULL)
dev = pci_find_device(PCI_VENDOR_ID_VIA, 0x7259, NULL);
-
+ if (dev != NULL) {
+ pci_read_config_byte(dev, 0x47, &pci_cmd);
+ printk(KERN_INFO PFX "%#02x\n", pci_cmd);
+ pci_cmd |= 0xf;
+ pci_write_config_byte(dev, 0x47, pci_cmd);
+ }
}
if (dev != NULL) {
/* Enable access to port 0x22 */
--
----------------------------------------------------------------------
Po meczu.....kurde...:)
>>> http://link.interia.pl/f1a72
next prev parent reply other threads:[~2007-05-05 17:48 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-04 10:16 cpufreq longhaul locks up Jan Engelhardt
2007-05-04 11:36 ` Wander Winkelhorst
2007-05-04 11:51 ` Jan Engelhardt
2007-05-04 11:51 ` Jan Engelhardt
2007-05-04 17:08 ` Rafał Bilski
2007-05-04 17:08 ` Rafał Bilski
2007-05-04 17:42 ` Chuck Ebbert
2007-05-04 17:42 ` Chuck Ebbert
2007-05-04 18:40 ` Rafał Bilski
2007-05-04 18:08 ` Wander Winkelhorst
2007-05-04 19:00 ` Rafał Bilski
2007-05-04 19:00 ` Rafał Bilski
2007-05-04 18:48 ` Jan Engelhardt
2007-05-04 18:48 ` Jan Engelhardt
2007-05-04 20:11 ` Rafał Bilski
2007-05-04 20:11 ` Rafał Bilski
2007-05-04 21:03 ` Jan Engelhardt
2007-05-04 21:03 ` Jan Engelhardt
2007-05-04 20:37 ` john stultz
2007-05-04 21:02 ` Jan Engelhardt
2007-05-04 22:49 ` john stultz
2007-05-04 23:32 ` Jan Engelhardt
2007-05-05 4:03 ` Rafał Bilski
2007-05-05 8:00 ` Jan Engelhardt
2007-05-05 8:00 ` Jan Engelhardt
2007-05-05 13:58 ` Rafał Bilski
2007-05-05 13:58 ` Rafał Bilski
2007-05-05 18:13 ` Jan Engelhardt
2007-05-05 18:13 ` Jan Engelhardt
2007-05-04 22:20 ` David Johnson
2007-05-04 22:20 ` David Johnson
2007-05-04 23:37 ` Jan Engelhardt
2007-05-04 23:37 ` Jan Engelhardt
2007-05-05 5:40 ` Rafał Bilski
2007-05-05 5:40 ` Rafał Bilski
2007-05-05 8:44 ` Wander Winkelhorst
2007-05-05 14:02 ` Rafał Bilski
2007-05-05 14:02 ` Rafał Bilski
2007-05-05 17:48 ` Rafał Bilski [this message]
2007-05-05 17:48 ` Rafał Bilski
2007-05-05 18:42 ` Jan Engelhardt
2007-05-05 18:42 ` Jan Engelhardt
2007-05-05 19:58 ` Rafał Bilski
2007-05-05 19:58 ` Rafał Bilski
2007-05-05 20:30 ` Jan Engelhardt
2007-05-05 20:30 ` Jan Engelhardt
2007-05-05 20:50 ` Jan Engelhardt
2007-05-05 20:50 ` Jan Engelhardt
2007-05-05 21:32 ` Rafał Bilski
2007-05-06 7:53 ` Jan Engelhardt
2007-05-06 7:53 ` Jan Engelhardt
2007-05-06 5:12 ` Rafał Bilski
2007-05-06 5:12 ` Rafał Bilski
2007-05-06 8:03 ` Jan Engelhardt
2007-05-06 8:03 ` Jan Engelhardt
2007-05-06 9:23 ` Rafał Bilski
2007-05-06 9:23 ` Rafał Bilski
2007-05-06 9:32 ` Jan Engelhardt
2007-05-06 10:25 ` Rafał Bilski
2007-05-06 10:25 ` Rafał Bilski
2007-05-06 11:33 ` Jan Engelhardt
2007-05-06 12:20 ` Rafał Bilski
2007-05-05 9:37 ` Jan Engelhardt
2007-05-05 9:37 ` Jan Engelhardt
2007-05-05 14:10 ` Rafał Bilski
2007-05-05 14:10 ` Rafał Bilski
2007-05-05 17:38 ` Jan Engelhardt
2007-05-05 17:38 ` Jan Engelhardt
2007-05-05 18:04 ` Rafał Bilski
2007-05-05 18:04 ` Rafał Bilski
2007-05-05 18:23 ` Jan Engelhardt
2007-05-05 18:23 ` Jan Engelhardt
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=463CC380.3060603@interia.pl \
--to=rafalbilski@interia.pl \
--cc=cpufreq@lists.linux.org.uk \
--cc=dj@david-web.co.uk \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=w.winkelhorst@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.