armhf: cpufreq doesn't autoload by default

Bug #1457781 reported by Paolo Pisati
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Paolo Pisati
Utopic
Fix Released
Undecided
Unassigned
Vivid
Fix Released
Undecided
Unassigned

Bug Description

SRU Justification:

    Impact: upon boot, frequency scaling is not working.

    Fix: Apply the patches, recompile and reboot.

    Testcase: Try booting a beaglebone with and without a patched kernel.

With this series applied there should be:

ubuntu@beaglebone:~$ ls -la /sys/devices/system/cpu/cpu0/cpufreq/
total 0
drwxr-xr-x 3 root root 0 May 22 07:03 .
drwxr-xr-x 5 root root 0 May 22 07:03 ..
-r--r--r-- 1 root root 4096 May 22 07:03 affected_cpus
-r-------- 1 root root 4096 May 22 07:03 cpuinfo_cur_freq
-r--r--r-- 1 root root 4096 May 22 07:03 cpuinfo_max_freq
-r--r--r-- 1 root root 4096 May 22 07:03 cpuinfo_min_freq
-r--r--r-- 1 root root 4096 May 22 07:03 cpuinfo_transition_latency
-r--r--r-- 1 root root 4096 May 22 07:03 related_cpus
-r--r--r-- 1 root root 4096 May 22 07:03 scaling_available_frequencies
-r--r--r-- 1 root root 4096 May 22 07:03 scaling_available_governors
-r--r--r-- 1 root root 4096 May 22 07:03 scaling_cur_freq
-r--r--r-- 1 root root 4096 May 22 07:03 scaling_driver
-rw-r--r-- 1 root root 4096 May 22 04:43 scaling_governor
-rw-r--r-- 1 root root 4096 May 22 07:03 scaling_max_freq
-rw-r--r-- 1 root root 4096 May 22 07:03 scaling_min_freq
-rw-r--r-- 1 root root 4096 May 22 07:03 scaling_setspeed
drwxr-xr-x 2 root root 0 May 22 07:03 stats
ubuntu@beaglebone:~$

With an unpatched kernel, until the cpufreq module is loaded, that directory doesn't exist.

...

While cpufreq support on armhf is available for a while, if support is compiled as a kernel module, the corresponding module doesn't autoload by default, and thus frequency scaling is not active upon boot until a user manually load it (or until /etc/modules is modified to forcibly load it).

While in Trusty cpufreq was built-in on armhf, starting with Utopic we made support available as a kernel module, making people think that cpufreq was either broken or missing in their new kernels.

To fix it, revert back that decision and make cpufreq compiled-in again on armhf - it affects Utopic and Vivid kernels.

CVE References

Revision history for this message
Paolo Pisati (p-pisati) wrote :

This patch is for Utopic.

Revision history for this message
Paolo Pisati (p-pisati) wrote :

This patch is for Vivid.

tags: added: patch
Paolo Pisati (p-pisati)
description: updated
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1457781

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Paolo Pisati (p-pisati)
Changed in linux (Ubuntu):
assignee: nobody → Paolo Pisati (p-pisati)
Brad Figg (brad-figg)
Changed in linux (Ubuntu Utopic):
status: New → Fix Committed
Changed in linux (Ubuntu Vivid):
status: New → Fix Committed
Andy Whitcroft (apw)
Changed in linux (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.0 KiB)

This bug was fixed in the package linux - 3.19.0-20.20

---------------
linux (3.19.0-20.20) vivid; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1459957
  * Revert "SAUCE: Call i915_bpo specific functions from the hda driver"
    - LP: #1457369

linux (3.19.0-19.19) vivid; urgency=low

  [ Brad Figg ]

  * Release Tracking Bug
    - LP: #1458964

  [ Duc Dang ]

  * SAUCE: (no-up) [PCIE] APM X-Gene: Remove debug messages in MSI
    interrupt handler path.
    - LP: #1451593

  [ Luis Henriques ]

  * [Config] updateconfigs for 3.19.7 stable update

  [ Paolo Pisati ]

  * [Config] armhf: CPUFREQ_DT=y
    - LP: #1457781
  * annotations: enforce CPUFREQ_DT
    - LP: #1457781

  [ Tanmay Inamdar ]

  * SAUCE: (no-up) Add MSI/MSI-X driver for APM PCI bus
    - LP: #1451593

  [ Timo Aaltonen ]

  * SAUCE: i915_bpo: Rebase to v4.1-rc4.
    - LP: #1456123
  * SAUCE: i915_bpo: Revert dma-buf: cleanup dma_buf_export() to make it
    easily extensible
    - LP: #1456123

  [ Tuan Phan ]

  * SAUCE: (no-up) pci-xgene-msi: fixed deadlock in irq_set_affinity
    - LP: #1451593

  [ Upstream Kernel Changes ]

  * Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
    - LP: #1454699
  * cpufreq: powernv: Report cpu frequency throttling
    - LP: #1452547
  * x86: kvm: Revert "remove sched notifier for cross-cpu migrations"
    - LP: #1450584
  * x86: vdso: fix pvclock races with task migration
    - LP: #1450584
  * ip_forward: Drop frames with attached skb->sk
    - LP: #1454699
  * net: add skb_checksum_complete_unset
    - LP: #1454699
  * ppp: call skb_checksum_complete_unset in ppp_receive_frame
    - LP: #1454699
  * tcp: fix possible deadlock in tcp_send_fin()
    - LP: #1454699
  * tcp: avoid looping in tcp_send_fin()
    - LP: #1454699
  * net: do not deplete pfmemalloc reserve
    - LP: #1454699
  * net: fix crash in build_skb()
    - LP: #1454699
  * pxa168: fix double deallocation of managed resources
    - LP: #1454699
  * net/mlx4_en: Prevent setting invalid RSS hash function
    - LP: #1454699
  * md: fix md io stats accounting broken
    - LP: #1454699
  * x86/asm/decoder: Fix and enforce max instruction size in the insn
    decoder
    - LP: #1454699
  * sched/idle/x86: Restore mwait_idle() to fix boot hangs, to improve
    power savings and to improve performance
    - LP: #1454699
  * sched/idle/x86: Optimize unnecessary mwait_idle() resched IPIs
    - LP: #1454699
  * perf/x86/intel: Fix Core2,Atom,NHM,WSM cycles:pp events
    - LP: #1454699
  * KVM: x86: Fix MSR_IA32_BNDCFGS in msrs_to_save
    - LP: #1454699
  * Btrfs: fix log tree corruption when fs mounted with -o discard
    - LP: #1454699
  * btrfs: don't accept bare namespace as a valid xattr
    - LP: #1454699
  * Btrfs: fix inode eviction infinite loop after cloning into it
    - LP: #1454699
  * Btrfs: fix inode eviction infinite loop after extent_same ioctl
    - LP: #1454699
  * usb: gadget: printer: enqueue printer's response for setup request
    - LP: #1454699
  * KVM: s390: fix handling of write errors in the tpi handler
    - LP: #1454699
  * KVM: s390: reinjection of irqs can fail in the tpi handler
    - LP: #1454699
  * KVM:...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-utopic' to 'verification-done-utopic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-utopic
Revision history for this message
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-vivid' to 'verification-done-vivid'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-vivid
Paolo Pisati (p-pisati)
tags: added: verification-done-utopic
removed: verification-needed-utopic
Paolo Pisati (p-pisati)
tags: added: verification-done-vivid
removed: verification-needed-vivid
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.0 KiB)

This bug was fixed in the package linux - 3.19.0-20.20

---------------
linux (3.19.0-20.20) vivid; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1459957
  * Revert "SAUCE: Call i915_bpo specific functions from the hda driver"
    - LP: #1457369

linux (3.19.0-19.19) vivid; urgency=low

  [ Brad Figg ]

  * Release Tracking Bug
    - LP: #1458964

  [ Duc Dang ]

  * SAUCE: (no-up) [PCIE] APM X-Gene: Remove debug messages in MSI
    interrupt handler path.
    - LP: #1451593

  [ Luis Henriques ]

  * [Config] updateconfigs for 3.19.7 stable update

  [ Paolo Pisati ]

  * [Config] armhf: CPUFREQ_DT=y
    - LP: #1457781
  * annotations: enforce CPUFREQ_DT
    - LP: #1457781

  [ Tanmay Inamdar ]

  * SAUCE: (no-up) Add MSI/MSI-X driver for APM PCI bus
    - LP: #1451593

  [ Timo Aaltonen ]

  * SAUCE: i915_bpo: Rebase to v4.1-rc4.
    - LP: #1456123
  * SAUCE: i915_bpo: Revert dma-buf: cleanup dma_buf_export() to make it
    easily extensible
    - LP: #1456123

  [ Tuan Phan ]

  * SAUCE: (no-up) pci-xgene-msi: fixed deadlock in irq_set_affinity
    - LP: #1451593

  [ Upstream Kernel Changes ]

  * Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
    - LP: #1454699
  * cpufreq: powernv: Report cpu frequency throttling
    - LP: #1452547
  * x86: kvm: Revert "remove sched notifier for cross-cpu migrations"
    - LP: #1450584
  * x86: vdso: fix pvclock races with task migration
    - LP: #1450584
  * ip_forward: Drop frames with attached skb->sk
    - LP: #1454699
  * net: add skb_checksum_complete_unset
    - LP: #1454699
  * ppp: call skb_checksum_complete_unset in ppp_receive_frame
    - LP: #1454699
  * tcp: fix possible deadlock in tcp_send_fin()
    - LP: #1454699
  * tcp: avoid looping in tcp_send_fin()
    - LP: #1454699
  * net: do not deplete pfmemalloc reserve
    - LP: #1454699
  * net: fix crash in build_skb()
    - LP: #1454699
  * pxa168: fix double deallocation of managed resources
    - LP: #1454699
  * net/mlx4_en: Prevent setting invalid RSS hash function
    - LP: #1454699
  * md: fix md io stats accounting broken
    - LP: #1454699
  * x86/asm/decoder: Fix and enforce max instruction size in the insn
    decoder
    - LP: #1454699
  * sched/idle/x86: Restore mwait_idle() to fix boot hangs, to improve
    power savings and to improve performance
    - LP: #1454699
  * sched/idle/x86: Optimize unnecessary mwait_idle() resched IPIs
    - LP: #1454699
  * perf/x86/intel: Fix Core2,Atom,NHM,WSM cycles:pp events
    - LP: #1454699
  * KVM: x86: Fix MSR_IA32_BNDCFGS in msrs_to_save
    - LP: #1454699
  * Btrfs: fix log tree corruption when fs mounted with -o discard
    - LP: #1454699
  * btrfs: don't accept bare namespace as a valid xattr
    - LP: #1454699
  * Btrfs: fix inode eviction infinite loop after cloning into it
    - LP: #1454699
  * Btrfs: fix inode eviction infinite loop after extent_same ioctl
    - LP: #1454699
  * usb: gadget: printer: enqueue printer's response for setup request
    - LP: #1454699
  * KVM: s390: fix handling of write errors in the tpi handler
    - LP: #1454699
  * KVM: s390: reinjection of irqs can fail in the tpi handler
    - LP: #1454699
  * KVM:...

Changed in linux (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (14.6 KiB)

This bug was fixed in the package linux - 3.16.0-39.53

---------------
linux (3.16.0-39.53) utopic; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1458778

  [ Brad Figg ]

  * hyper-v -- add hid and fb drivers to linux-virtual
    - LP: #1444179

  [ Chris J Arges ]

  * [Config] CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y on ppc64el
    - LP: #1450497

  [ Luis Henriques ]

  * SAUCE: (no-up) trace: fix trace_open_exec() invocation
    - LP: #1453848

  [ Paolo Pisati ]

  * [Config] armhf: GENERIC_CPUFREQ_CPU0=y
    - LP: #1457781

  [ Upstream Kernel Changes ]

  * DT doc: net: cpsw mac-address is optional
    - LP: #1452628
  * net: cpsw: Add missing return value
    - LP: #1452628
  * net: cpsw: header, Add missing include
    - LP: #1452628
  * net: cpsw: Replace pr_err by dev_err
    - LP: #1452628
  * net: cpsw: Add am33xx MACID readout
    - LP: #1452628
  * am33xx: define syscon control module device node
    - LP: #1452628
  * arm: dts: am33xx, Add syscon phandle to cpsw node
    - LP: #1452628
  * x86: kvm: Revert "remove sched notifier for cross-cpu migrations"
    - LP: #1450584
  * x86: vdso: fix pvclock races with task migration
    - LP: #1450584
  * n_tty: Fix read buffer overwrite when no newline
    - LP: #1454202
  * spi: spidev: fix possible arithmetic overflow for multi-transfer
    message
    - LP: #1454202
  * arm64: vdso: fix build error when switching from LE to BE
    - LP: #1454202
  * uas: Do not blacklist ASM1153 disk enclosures
    - LP: #1454202
  * KVM: x86: Fix lost interrupt on irr_pending race
    - LP: #1454202
  * tcp: prevent fetching dst twice in early demux code
    - LP: #1454202
  * ipv6: protect skb->sk accesses from recursive dereference inside the
    stack
    - LP: #1454202
  * tcp: tcp_make_synack() should clear skb->tstamp
    - LP: #1454202
  * usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers
    - LP: #1454202
  * usbnet: Fix tx_bytes statistic running backward in cdc_ncm
    - LP: #1454202
  * bonding: Bonding Overriding Configuration logic restored.
    - LP: #1454202
  * HID: add ALWAYS_POLL quirk for a Logitech 0xc007
    - LP: #1454202
  * PCI/AER: Avoid info leak in __print_tlp_header()
    - LP: #1454202
  * PCI: cpcihp: Add missing curly braces in cpci_configure_slot()
    - LP: #1454202
  * sh_veu: v4l2_dev wasn't set
    - LP: #1454202
  * media: s5p-mfc: fix mmap support for 64bit arch
    - LP: #1454202
  * cpufreq: Schedule work for the first-online CPU on resume
    - LP: #1454202
  * cpuidle: remove state_count field from struct cpuidle_device
    - LP: #1454202
  * cpuidle: ACPI: do not overwrite name and description of C0
    - LP: #1454202
  * ioctx_alloc(): fix vma (and file) leak on failure
    - LP: #1454202
  * drm/i915/vlv: save/restore the power context base reg
    - LP: #1454202
  * drm/i915/chv: Remove Wait for a previous gfx force-off
    - LP: #1454202
  * drm/i915/vlv: remove wait for previous GFX clk disable request
    - LP: #1454202
  * ALSA: hda/realtek - Make more stable to get pin sense for ALC283
    - LP: #1454202
  * ALSA: bebob: fix to processing in big-endian machine for sending cue
    - LP: #1454202
  * be2iscsi: Fix kern...

Changed in linux (Ubuntu Utopic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.