[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2019-07-24 Thread Brad Figg
** Tags added: cscc

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2018-11-07 Thread Bug Watch Updater
Launchpad has imported 40 comments from the remote bug at
https://bugzilla.kernel.org/show_bug.cgi?id=189291.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.


On 2016-11-29T01:47:43+00:00 sntmail wrote:

Created attachment 246061
cpuinfo

My laptop is very slow at current kernels. The frequency stucks at 800 MHz.
Latest kernel which is ok is 4.1.x (4.2 has a backlight problem).

acpi=noirq solves the problem but adds other problems...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/12


On 2016-11-29T01:48:12+00:00 sntmail wrote:

Created attachment 246071
lspci

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/13


On 2016-11-29T01:48:52+00:00 sntmail wrote:

Created attachment 246081
dmesg for 4.1.6 kernel

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/14


On 2016-11-29T01:49:46+00:00 sntmail wrote:

Created attachment 246091
dmesg for 4.8.10 kernel

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/15


On 2016-11-29T01:50:37+00:00 sntmail wrote:

Created attachment 246101
dmesg for 4.8.10 kernel with acpi=noirq

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/16


On 2016-12-05T23:30:12+00:00 lenb wrote:

acpi=noirq puts the system into PIC mode, while ACPI is able to put it
in IOAPIC mode.  Unclear why this has any effect on the problem at hand.
Do you get the same result with simply "noapic"?

In both cases, powernow_k8 seems to load and print the same messages.

In the working and non-working cases, what do you see with

grep . /sys/devices/system/cpu/cpu0/cpufreq/*

What is the latest working kernel, and what is the first failing kernel?
Can you git-bisect to what commit caused this to break?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/18


On 2016-12-08T23:45:00+00:00 sntmail wrote:

acpi=noapic doesn't help this.

I think the regression was made in 4.2.x or 4.3.x (4.2.x kernels have a
backlight issue on my laptop, so I use 4.1.x)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/26


On 2016-12-08T23:47:36+00:00 sntmail wrote:

Created attachment 247171
grep . /sys/devices/system/cpu/cpu0/cpufreq/* for 4.1.6 (ok)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/27


On 2016-12-08T23:48:31+00:00 sntmail wrote:

Created attachment 247181
grep . /sys/devices/system/cpu/cpu0/cpufreq/* for 4.8.12 (bug)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/28


On 2016-12-09T00:13:08+00:00 sntmail wrote:

btw, seems the same bug was described here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/29


On 2017-01-09T07:45:06+00:00 rui.zhang wrote:

(In reply to cthx from comment #6)
> acpi=noapic doesn't help this.
> 
> I think the regression was made in 4.2.x or 4.3.x (4.2.x kernels have a
> backlight issue on my laptop, so I use 4.1.x)

what do you mean by backlight issue?
If the platform is still alive, please run git-bisect to find out which commit 
introduces the problem.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/comments/31


On 2017-01-11T02:47:23+00:00 rui.zhang wrote:

this is only one functional change in powernow-k8 driver since 4.1
commit 38c52e6343f0e28abc7daf15cbbcd7e450667202
Author: Bartosz Golaszewski 
Date:   Tue May 26 15:11:31 2015 +0200

powernow-k8: Replace cpu_core_mask() with topology_core_cpumask()

The former duplicates the functionality of the latter but is
neither documented nor arch-independent.

Signed-off-by: Bartosz Golaszewski 
Acked-by: Viresh Kumar 
Acked-by: Rafael J. Wysocki 
Cc: Benoit Cousson 
Cc: Catalin Marinas 
Cc: Fenghua Yu 
Cc: Guenter Roeck 
Cc: Jean Delvare 
Cc: Jonathan Corbet 

[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2018-04-02 Thread Vladimir Marko
Upstream:
Linux 4.14: BAD
Linux 4.16: GOOD

I did not bisect to find out which CL fixed the bug.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2018-02-09 Thread WSmart
Thanks for all the work everyone put into developing this, Vladimir in
particular.   The acpi=noirq work around is working here.   I wanted to
add, along with the scaling and the reboot fail issues, I also was not
able to run ubiquity.  The installer would crash giving me
freedesktop.org errors.   I installed xfce4-power-manger to the live
environment and was able to use ubiquity and install the system from
there, booting to the 800mhz scaling limit.

Thanks all.  
With alcohol you get all the confidence and none of the competence.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2017-01-18 Thread Joseph Salisbury
** Also affects: linux via
   http://bugzilla.kernel.org/show_bug.cgi?id=189291
   Importance: Unknown
   Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2017-01-14 Thread Vladimir Marko
I didn't try to send the patches upstream. I was hoping that someone who
already knows how to do that would pick it up.

I just searched the kernel bug database for this issue and found
https://bugzilla.kernel.org/show_bug.cgi?id=189291 . In comment #9, cthx
posted a link to this bug on 9 Dec, i.e. after I have already posted the
bisect results and patches. I guess people don't bother following links,
I'll have to post there directly.

** Bug watch added: Linux Kernel Bug Tracker #189291
   http://bugzilla.kernel.org/show_bug.cgi?id=189291

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2017-01-13 Thread Joseph Salisbury
Thank you for providing a patch, and making Ubuntu better.

Can you provide some information on the status of the patch with regards
to getting it merged upstream? Has it been sent upstream, what sort of
feedback has it received, is it getting applied to a subsystem
maintainer's tree, etc?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-19 Thread Vladimir Marko
Sorry, I missed the request in comment #17 to add the tag kernel-bug-
exists-upstream. Done now.

** Tags added: kernel-bug-exists-upstream

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-08 Thread Vladimir Marko
** Changed in: linux (Ubuntu)
   Status: Incomplete => Confirmed

** Changed in: linux-lts-xenial (Ubuntu)
   Status: Incomplete => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-08 Thread Vladimir Marko
Both patches apply cleanly to the 4.9-rc8 but I cannot build the kernel
with the configuration /boot/config-4.9.0-040900rc8-generic on my laptop
without upgrading the compiler:

Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not
supported by compiler

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-08 Thread Vladimir Marko
Installed
linux-headers-4.9.0-040900rc8_4.9.0-040900rc8.201612051443_all.deb
linux-headers-4.9.0-040900rc8-generic_4.9.0-040900rc8.201612051443_amd64.deb
linux-image-4.9.0-040900rc8-generic_4.9.0-040900rc8.201612051443_amd64.deb
Laptop boots, bug still present:

$ uname -r
4.9.0-040900rc8-generic
$ cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*_temp
105000
15900
15900
15900
15900
15900
$ cpufreq-info | grep -E 'policy|steps'
  available frequency steps: 1.60 GHz, 800 MHz
  current policy: frequency should be within 800 MHz and 800 MHz.
  available frequency steps: 1.60 GHz, 800 MHz
  current policy: frequency should be within 800 MHz and 800 MHz.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-08 Thread Joseph Salisbury
Would it be possible for you to test the latest upstream kernel? Refer
to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest
v4.9 kernel[0].

If this bug is fixed in the mainline kernel, please add the following
tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag:
'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as
"Confirmed".


Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc8

** Tags added: kernel-da-key

** Package changed: linux-lts-wily (Ubuntu) => linux (Ubuntu)

** Changed in: linux (Ubuntu)
   Importance: Undecided => Medium

** Changed in: linux-lts-xenial (Ubuntu)
   Importance: Undecided => Medium

** Changed in: linux (Ubuntu)
   Status: Confirmed => Incomplete

** Changed in: linux-lts-xenial (Ubuntu)
   Status: Confirmed => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-07 Thread Ubuntu Foundations Team Bug Bot
** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-07 Thread Vladimir Marko
This patches also apply cleanly to current master in
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
with 1 line offset.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-07 Thread Vladimir Marko
Attaching the "alternative" patch.

** Patch added: "alternative.patch"
   
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+attachment/4788864/+files/alternative.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-07 Thread Vladimir Marko
Looks like pasting the patches directly to the editor wasn't a good
idea. It messed up the whitespace. Attaching the "revert" patch.

** Patch added: "revert.patch"
   
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+attachment/4788863/+files/revert.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-12-07 Thread Vladimir Marko
The revert of the offending commit does not apply cleanly to the
Ubuntu-4.4.0-47.68 kernel. The closest we can get to a revert is this
patch:

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 64f233a..aec995c 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2523,7 +2523,6 @@ void __init setup_ioapic_dest(void)
const struct cpumask *mask;
struct irq_desc *desc;
struct irq_data *idata;
-   struct irq_chip *chip;
 
if (skip_ioapic_setup == 1)
return;
@@ -2538,7 +2537,6 @@ void __init setup_ioapic_dest(void)
continue;
 
desc = irq_to_desc(irq);
-   raw_spin_lock_irq(>lock);
idata = irq_desc_get_irq_data(desc);
 
/*
@@ -2549,11 +2547,7 @@ void __init setup_ioapic_dest(void)
else
mask = apic->target_cpus();
 
-   chip = irq_data_get_irq_chip(idata);
-   /* Might be lapic_chip for irq 0 */
-   if (chip->irq_set_affinity)
-   chip->irq_set_affinity(idata, mask, false);
-   raw_spin_unlock_irq(>lock);
+   irq_set_affinity(irq, mask);
}
 }
 #endif

I tried this and it works. Another option is this smaller patch:

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 64f233a..f185a1e 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2523,7 +2523,6 @@ void __init setup_ioapic_dest(void)
const struct cpumask *mask;
struct irq_desc *desc;
struct irq_data *idata;
-   struct irq_chip *chip;
 
if (skip_ioapic_setup == 1)
return;
@@ -2549,10 +2548,7 @@ void __init setup_ioapic_dest(void)
else
mask = apic->target_cpus();
 
-   chip = irq_data_get_irq_chip(idata);
-   /* Might be lapic_chip for irq 0 */
-   if (chip->irq_set_affinity)
-   chip->irq_set_affinity(idata, mask, false);
+   irq_set_affinity_locked(idata, mask, false);
raw_spin_unlock_irq(>lock);
}
 }

which essentially keeps the raw_spin_lock_irq()/raw_spin_unlock_irq()
rather than raw_spin_lock_irqsave()/raw_spin_unlock_irqrestore() used by
__irq_set_affinity() in kernel/irq/manage.c .

I tested both patches on top of Ubuntu-4.4.0-47.68 and they work.
They also apply cleanly to Ubuntu-4.2.0-42.49 but I didn't actually check that 
it builds/works.

I tried manually inlining the irq_set_affinity_locked() (which required
further inlining of some helper functions and providing a declaration of
irq_do_set_affinity()) and it still worked. However, forcing the "if
(irq_can_move_pcntxt())" path that immediately performs
"chip->irq_set_affinity(idata, mask, false)" exposes the bug.

This confirms what I expected after reading
https://lkml.org/lkml/2012/3/26/392 . Basically, when the hardware says
that you cannot do something right away, you really cannot. And the
offending commit just ignores this.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-11-29 Thread Vladimir Marko
3b806e2b94cad37a8809df7c86f7cfdcd3baa719 is the first bad commit
commit 3b806e2b94cad37a8809df7c86f7cfdcd3baa719
Author: Thomas Gleixner 
Date:   Mon Sep 14 12:00:55 2015 +0200

x86/ioapic: Force affinity setting in setup_ioapic_dest()

BugLink: http://bugs.launchpad.net/bugs/1509886

commit 4857c91f0d195f05908fff296ba1ec5fca87066c upstream.

The recent ioapic cleanups changed the affinity setting in
setup_ioapic_dest() from a direct write to the hardware to the delayed
affinity setup via irq_set_affinity().

That results in a warning from chained_irq_exit():
WARNING: CPU: 0 PID: 5 at kernel/irq/migration.c:32 irq_move_masked_irq
[] irq_move_masked_irq+0xb8/0xc0
[] ioapic_ack_level+0x111/0x130
[] intel_gpio_irq_handler+0x148/0x1c0

The reason is that irq_set_affinity() does not write directly to the
hardware. It marks the affinity setting as pending and executes it
from the next interrupt. The chained handler infrastructure does not
take the irq descriptor lock for performance reasons because such a
chained interrupt is not visible to any interfaces. So the delayed
affinity setting triggers the warning in irq_move_masked_irq().

Restore the old behaviour by calling the set_affinity function of the
ioapic chip in setup_ioapic_dest(). This is safe as none of the
interrupts can be on the fly at this point.

Fixes: aa5cb97f14a2 'x86/irq: Remove x86_io_apic_ops.set_affinity and 
related interfaces'
Reported-and-tested-by: Mika Westerberg 
Signed-off-by: Thomas Gleixner 
Cc: Jiang Liu 
Cc: jarkko.nik...@linux.intel.com
Signed-off-by: Greg Kroah-Hartman 

Signed-off-by: Tim Gardner 
Signed-off-by: Brad Figg 

:04 04 0233ddd54b0d7f34ceb513fe09e8df462ab8b777
e811435d773d53cdb9c2a26e68586f0dc2e41bf8 M  arch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-11-24 Thread Vladimir Marko
The workaround makes networking very unstable (both WiFi and wired).

4.2.0-18 is OK.
4.2.0-19 is BROKEN.

No suspicious configuration changes:

$ diff /boot/config-4.2.0-18-generic /boot/config-4.2.0-19-generic 
3c3
< # Linux/x86_64 4.2.0-18-generic Kernel Configuration
---
> # Linux/x86_64 4.2.0-19-generic Kernel Configuration
69c69
< CONFIG_VERSION_SIGNATURE="Ubuntu 4.2.0-18.22~14.04.1-generic 4.2.3"
---
> CONFIG_VERSION_SIGNATURE="Ubuntu 4.2.0-19.23~14.04.1-generic 4.2.6"
5334c5334,5335
< # CONFIG_SND_PCM_OSS is not set
---
> CONFIG_SND_PCM_OSS=m
> CONFIG_SND_PCM_OSS_PLUGINS=y
7530c7531,7532
< # CONFIG_AUFS_EXPORT is not set
---
> CONFIG_AUFS_EXPORT=y
> CONFIG_AUFS_INO_T_64=y

I'll get the ubuntu kernel source and try to bisect.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-11-20 Thread Dariusz Nawrocki
Vladimir, your solution works for me too. :)

I have F.07 BIOS already. Setting acpi=noirq enables the possibilities
to scale CPU processor frequency again on newest kernel on my notebook.

However it is workaround not the final solution. It is nice to have well
working kernel out of the box without any quirks. So this is an appeal
for Ubuntu kernel guys to address the problem.

Thanks Vladimir.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-11-19 Thread Vladimir Marko
Upgrading the nx6325 BIOS from F.04 to F.07 did not help, the workaround
is still necessary.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-11-19 Thread Vladimir Marko
Permanently adding kernel parameters to grub config is described at
http://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter
(But it's all or nothing, so you cannot add the parameter only to one of two 
dual-booting Linuxes.)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-11-19 Thread Vladimir Marko
Trying the different kernel parameters suggested at
https://wiki.ubuntu.com/DebuggingACPI I've got these results:

acpi=off: kernel panic (something too do with PCI)
acpi=ht: no change
pci=noacpi: kernel panic (something too do with PCI)
acpi=noirq: WORKS

So this is a bug in ACPI IRQ routing. Recommended workaround is acpi=noirq.
(Now how to configure grub to add that kernel parameter when doing update-grub?)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-11-18 Thread Vladimir Marko
Same on HP Compaq nx6325 with AMD Turion(tm) 64 X2 Mobile Technology
TL-52, including the fan running at full speed. But given the the
thermal trip points, I think the CPU frequency scaling works as
intended.

When idle, with the old kernel I see

$ uname -r
3.13.0-101-generic
$ cat /sys/devices/virtual/thermal/thermal_zone0/temp 
42000
$ cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*_temp 
105000
95000
75000
65000
55000
4

but with the new kernel it is

$ uname -r
4.4.0-47-generic
$ cat /sys/devices/virtual/thermal/thermal_zone0/temp
32000
$ cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*_temp
105000
15900
15900
15900
15900
15900

So it's essentially trying to keep the CPU from overheating.

Additionally, shutting down the laptop does not work, it gets the laptop
to some weird power state where it looks like powered down but it won't
boot after turning back on. Then I have to long-press the power button
to shut down properly. Reboot just gets stuck. If I understand
correctly, this is all related to ACPI, so I guess I should learn how to
debug ACPI issues.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-08-21 Thread Lichtmacher
Same Problem:
on HP6715s after upgrade from 14.04 to 16.04 Xubuntu

Additional the fan is turning at max speed.

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

$ uname -a
Linux HP6715S 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 
x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/cpuinfo 
processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 15
model   : 104
model name  : AMD Turion(tm) 64 X2 Mobile Technology TL-58
stepping: 2
cpu MHz : 800.000
cache size  : 512 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 2
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 
3dnowext 3dnow rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm 
extapic cr8_legacy 3dnowprefetch vmmcall lbrv
bugs: apic_c1e fxsave_leak sysret_ss_attrs
bogomips: 1593.21
TLB size: 1024 4K pages
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps

processor   : 1
vendor_id   : AuthenticAMD
cpu family  : 15
model   : 104
model name  : AMD Turion(tm) 64 X2 Mobile Technology TL-58
stepping: 2
cpu MHz : 800.000
cache size  : 512 KB
physical id : 0
siblings: 2
core id : 1
cpu cores   : 2
apicid  : 1
initial apicid  : 1
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 
3dnowext 3dnow rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm 
extapic cr8_legacy 3dnowprefetch vmmcall lbrv
bugs: apic_c1e fxsave_leak sysret_ss_attrs
bogomips: 1593.21
TLB size: 1024 4K pages
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-08-12 Thread Christian Gronister
Same issue here on a HP Compaq 6715s (TL-59) Ubuntu 16.04 LTS "Xenial Xerus" 
(kernel 4.4.0-34). 14.04 - 14.04.3 was working fine (3.13, 3.16, 3.19 kernels). 
Upgrade to 14.04.4 initially caused the issue so I rolled back to 3.19 few 
months back. 
Now I thought to give a fresh install of 16.04 a try. Did not work, i.e. 
precisely the same issue as in 14.04.4 and as described by Darek in #1598312.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-08-12 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: linux-lts-xenial (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-08-12 Thread Christian Gronister
** Also affects: linux-lts-xenial (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1598312] Re: Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

2016-08-10 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: linux-lts-wily (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1598312

Title:
  Cannot scale AMD Turion CPU frequency. It runs on lowest 800MHz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-lts-wily/+bug/1598312/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs