1. 14 Mar, 2016 13 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-tools' · 0d571b62
      Rafael J. Wysocki authored
      * pm-tools:
        tools/power turbostat: bugfix: TDP MSRs print bits fixing
        tools/power turbostat: correct output for MSR_NHM_SNB_PKG_CST_CFG_CTL dump
        tools/power turbostat: call __cpuid() instead of __get_cpuid()
        tools/power turbostat: indicate SMX and SGX support
        tools/power turbostat: detect and work around syscall jitter
        tools/power turbostat: show GFX%rc6
        tools/power turbostat: show GFXMHz
        tools/power turbostat: show IRQs per CPU
        tools/power turbostat: make fewer systems calls
        tools/power turbostat: fix compiler warnings
        tools/power turbostat: add --out option for saving output in a file
        tools/power turbostat: re-name "%Busy" field to "Busy%"
        tools/power turbostat: Intel Xeon x200: fix turbo-ratio decoding
        tools/power turbostat: Intel Xeon x200: fix erroneous bclk value
        tools/power turbostat: allow sub-sec intervals
        tools/power turbostat: Decode MSR_MISC_PWR_MGMT
        tools/power turbostat: decode HWP registers
        x86 msr-index: Simplify syntax for HWP fields
        tools/power turbostat: CPUID(0x16) leaf shows base, max, and bus frequency
        tools/power turbostat: decode more CPUID fields
      0d571b62
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpuidle', 'pm-sleep' and 'pm-domains' · 93dffd03
      Rafael J. Wysocki authored
      * pm-cpuidle:
        cpuidle: menu: help gcc generate slightly better code
        cpuidle: menu: avoid expensive square root computation
      
      * pm-sleep:
        PM / suspend: replacing printk
        PM/freezer: y2038, use boottime to compare tstamps
        PM / sleep: declare __tracedata symbols as char[] rather than char
      
      * pm-domains:
        PM / Domains: Fix potential NULL pointer dereference
        PM / Domains: Fix removal of a subdomain
        PM / Domains: Propagate start and restore errors during runtime resume
        PM / Domains: Join state name and index in debugfs output
        PM / Domains: Restore alignment of slaves in debugfs output
        PM / Domains: remove old power on/off latencies
        ARM: imx6: pm: declare pm domain latency on power_state struct
        PM / Domains: Support for multiple states
      93dffd03
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · 4ed39004
      Rafael J. Wysocki authored
      * pm-cpufreq: (94 commits)
        intel_pstate: Do not skip samples partially
        intel_pstate: Remove freq calculation from intel_pstate_calc_busy()
        intel_pstate: Move intel_pstate_calc_busy() into get_target_pstate_use_performance()
        intel_pstate: Optimize calculation for max/min_perf_adj
        intel_pstate: Remove extra conversions in pid calculation
        cpufreq: Move scheduler-related code to the sched directory
        Revert "cpufreq: postfix policy directory with the first CPU in related_cpus"
        cpufreq: Reduce cpufreq_update_util() overhead a bit
        cpufreq: Select IRQ_WORK if CPU_FREQ_GOV_COMMON is set
        cpufreq: Remove 'policy->governor_enabled'
        cpufreq: Rename __cpufreq_governor() to cpufreq_governor()
        cpufreq: Relocate handle_update() to kill its declaration
        cpufreq: governor: Drop unnecessary checks from show() and store()
        cpufreq: governor: Fix race in dbs_update_util_handler()
        cpufreq: governor: Make gov_set_update_util() static
        cpufreq: governor: Narrow down the dbs_data_mutex coverage
        cpufreq: governor: Make dbs_data_mutex static
        cpufreq: governor: Relocate definitions of tuners structures
        cpufreq: governor: Move per-CPU data to the common code
        cpufreq: governor: Make governor private data per-policy
        ...
      4ed39004
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-opp' · b5d5fad9
      Rafael J. Wysocki authored
      * pm-opp:
        PM / OPP: Rename structures for clarity
        PM / OPP: Fix incorrect comments
        PM / OPP: Initialize regulator pointer to an error value
        PM / OPP: Initialize u_volt_min/max to a valid value
        PM / OPP: Fix NULL pointer dereference crash when disabling OPPs
        PM / OPP: Add dev_pm_opp_set_rate()
        PM / OPP: Manage device clk
        PM / OPP: Parse clock-latency and voltage-tolerance for v1 bindings
        PM / OPP: Introduce dev_pm_opp_get_max_transition_latency()
        PM / OPP: Introduce dev_pm_opp_get_max_volt_latency()
        PM / OPP: Disable OPPs that aren't supported by the regulator
        PM / OPP: get/put regulators from OPP core
      b5d5fad9
    • Rafael J. Wysocki's avatar
      Merge branch 'powercap' · 07cc77e0
      Rafael J. Wysocki authored
      * powercap:
        powercap/rapl: track lead cpu per package
        powercap/rapl: add package reference per domain
        powercap/rapl: reduce ipi calls
        cpumask: export cpumask_any_but
      07cc77e0
    • Rafael J. Wysocki's avatar
      Merge branch 'device-properties' · e1fb19cb
      Rafael J. Wysocki authored
      * device-properties:
        device property: fix for a case of use-after-free
      e1fb19cb
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-ec', 'acpi-fan', 'acpi-video' and 'acpi-misc' · bdeabccd
      Rafael J. Wysocki authored
      * acpi-ec:
        ACPI / EC: Deny write access unless requested by module param
      
      * acpi-fan:
        ACPI / fan: Make struct dev_pm_ops const
      
      * acpi-video:
        ACPI / video: remove unused device_decode array
      
      * acpi-misc:
        ACPI / util: remove redundant check if element is NULL
        ACPI: Add acpi_force_32bit_fadt_addr option to force 32 bit FADT addresses
        drivers/acpi: make pmic/intel_pmic_crc.c explicitly non-modular
        drivers/acpi: make apei/ghes.c more explicitly non-modular
        drivers/acpi: make bgrt driver explicitly non-modular
      bdeabccd
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-pci', 'acpi-soc' and 'pnp' · 02fd4e76
      Rafael J. Wysocki authored
      * acpi-pci:
        x86/ACPI/PCI: Recognize that Interrupt Line 255 means "not connected"
      
      * acpi-soc:
        i2c: designware: Add device HID for future AMD I2C controller
      
      * pnp:
        PNP / ACPI: add ACPI_RESOURCE_TYPE_SERIAL_BUS as a valid type
      02fd4e76
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-processor' and 'acpi-cppc' · 6a8ccb1d
      Rafael J. Wysocki authored
      * acpi-processor:
        ACPI / sleep: move acpi_processor_sleep to sleep.c
        ACPI / processor : add support for ACPI0010 processor container
        ACPI / processor_idle: replace PREFIX with pr_fmt
      
      * acpi-cppc:
        ACPI / CPPC: use MRTT/MPAR to decide if/when a req can be sent
        ACPI / CPPC: replace writeX/readX to PCC with relaxed version
        mailbox: pcc: optimized pcc_send_data
        ACPI / CPPC: optimized cpc_read and cpc_write
        ACPI / CPPC: Optimize PCC Read Write operations
      6a8ccb1d
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-scan', 'acpi-osl' and 'acpi-apei' · caf5aa19
      Rafael J. Wysocki authored
      * acpi-scan:
        ACPI / scan: AMBA bus probing support
        ACPI: introduce a function to find the first physical device
      
      * acpi-osl:
        ACPI / OSL: Add support to install tables via initrd
        ACPI / OSL: Clean up initrd table override code
      
      * acpi-apei:
        ACPI / APEI: ERST: Fixed leaked resources in erst_init
        ACPI / APEI: Fix leaked resources
      caf5aa19
    • Rafael J. Wysocki's avatar
      Merge branch 'acpica' · 255a60fc
      Rafael J. Wysocki authored
      * acpica:
        ACPICA / Interpreter: Fix a regression triggered because of wrong Linux ECDT support
        ACPICA: Utilities: Update trace mechinism for acquire_object
        ACPICA: Namespace: Rename acpi_gbl_reg_methods_enabled to acpi_gbl_namespace_initialized
        ACPICA: Namespace: Ensure \_SB._INI executed before any _REG
        ACPICA: ACPICA: Tune _REG evaluations order in the initialization steps
        ACPICA: Tables: make default region accessible during the table load
        ACPICA: ACPI 6.0/iASL: Add support for the External AML opcode
        ACPICA: Remove unnecessary arguments to ACPI_INFO
        ACPICA: debugger: dbconvert: free pld_info on error return path
        ACPICA: iASL: Update to use internal acpi_ut_strtoul64 function
        ACPICA: iASL: Fix some typos with the name strtoul64
        ACPICA: Remove incorrect "static" from a global structure
        ACPICA: aclocal: Put parens around some definitions.
      255a60fc
    • Linus Torvalds's avatar
      Linux 4.5 · b562e44f
      Linus Torvalds authored
      b562e44f
    • Rafael J. Wysocki's avatar
      Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux into pm-tools · 3fdb7464
      Rafael J. Wysocki authored
      Pull turbostat updates for 4.6 from Len Brown.
      
      * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        tools/power turbostat: bugfix: TDP MSRs print bits fixing
        tools/power turbostat: correct output for MSR_NHM_SNB_PKG_CST_CFG_CTL dump
        tools/power turbostat: call __cpuid() instead of __get_cpuid()
        tools/power turbostat: indicate SMX and SGX support
        tools/power turbostat: detect and work around syscall jitter
        tools/power turbostat: show GFX%rc6
        tools/power turbostat: show GFXMHz
        tools/power turbostat: show IRQs per CPU
        tools/power turbostat: make fewer systems calls
        tools/power turbostat: fix compiler warnings
        tools/power turbostat: add --out option for saving output in a file
        tools/power turbostat: re-name "%Busy" field to "Busy%"
        tools/power turbostat: Intel Xeon x200: fix turbo-ratio decoding
        tools/power turbostat: Intel Xeon x200: fix erroneous bclk value
        tools/power turbostat: allow sub-sec intervals
        tools/power turbostat: Decode MSR_MISC_PWR_MGMT
        tools/power turbostat: decode HWP registers
        x86 msr-index: Simplify syntax for HWP fields
        tools/power turbostat: CPUID(0x16) leaf shows base, max, and bus frequency
        tools/power turbostat: decode more CPUID fields
      3fdb7464
  2. 13 Mar, 2016 23 commits
  3. 12 Mar, 2016 4 commits
    • Ming Lei's avatar
      block: don't optimize for non-cloned bio in bio_get_last_bvec() · 90d0f0f1
      Ming Lei authored
      For !BIO_CLONED bio, we can use .bi_vcnt safely, but it
      doesn't mean we can just simply return .bi_io_vec[.bi_vcnt - 1]
      because the start postion may have been moved in the middle of
      the bvec, such as splitting in the middle of bvec.
      
      Fixes: 7bcd79ac(block: bio: introduce helpers to get the 1st and last bvec)
      Cc: stable@vger.kernel.org
      Reported-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      90d0f0f1
    • Matt Fleming's avatar
      x86/efi: Fix boot crash by always mapping boot service regions into new EFI page tables · 452308de
      Matt Fleming authored
      Some machines have EFI regions in page zero (physical address
      0x00000000) and historically that region has been added to the e820
      map via trim_bios_range(), and ultimately mapped into the kernel page
      tables. It was not mapped via efi_map_regions() as one would expect.
      
      Alexis reports that with the new separate EFI page tables some boot
      services regions, such as page zero, are not mapped. This triggers an
      oops during the SetVirtualAddressMap() runtime call.
      
      For the EFI boot services quirk on x86 we need to memblock_reserve()
      boot services regions until after SetVirtualAddressMap(). Doing that
      while respecting the ownership of regions that may have already been
      reserved by the kernel was the motivation behind this commit:
      
        7d68dc3f ("x86, efi: Do not reserve boot services regions within reserved areas")
      
      That patch was merged at a time when the EFI runtime virtual mappings
      were inserted into the kernel page tables as described above, and the
      trick of setting ->numpages (and hence the region size) to zero to
      track regions that should not be freed in efi_free_boot_services()
      meant that we never mapped those regions in efi_map_regions(). Instead
      we were relying solely on the existing kernel mappings.
      
      Now that we have separate page tables we need to make sure the EFI
      boot services regions are mapped correctly, even if someone else has
      already called memblock_reserve(). Instead of stashing a tag in
      ->numpages, set the EFI_MEMORY_RUNTIME bit of ->attribute. Since it
      generally makes no sense to mark a boot services region as required at
      runtime, it's pretty much guaranteed the firmware will not have
      already set this bit.
      
      For the record, the specific circumstances under which Alexis
      triggered this bug was that an EFI runtime driver on his machine was
      responding to the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event during
      SetVirtualAddressMap().
      
      The event handler for this driver looks like this,
      
        sub rsp,0x28
        lea rdx,[rip+0x2445] # 0xaa948720
        mov ecx,0x4
        call func_aa9447c0  ; call to ConvertPointer(4, & 0xaa948720)
        mov r11,QWORD PTR [rip+0x2434] # 0xaa948720
        xor eax,eax
        mov BYTE PTR [r11+0x1],0x1
        add rsp,0x28
        ret
      
      Which is pretty typical code for an EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
      handler. The "mov r11, QWORD PTR [rip+0x2424]" was the faulting
      instruction because ConvertPointer() was being called to convert the
      address 0x0000000000000000, which when converted is left unchanged and
      remains 0x0000000000000000.
      
      The output of the oops trace gave the impression of a standard NULL
      pointer dereference bug, but because we're accessing physical
      addresses during ConvertPointer(), it wasn't. EFI boot services code
      is stored at that address on Alexis' machine.
      Reported-by: default avatarAlexis Murzeau <amurzeau@gmail.com>
      Signed-off-by: default avatarMatt Fleming <matt@codeblueprint.co.uk>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Raphael Hertzog <hertzog@debian.org>
      Cc: Roger Shimizu <rogershimizu@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/1457695163-29632-2-git-send-email-matt@codeblueprint.co.uk
      Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815125Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      452308de
    • Borislav Petkov's avatar
      x86/fpu: Fix eager-FPU handling on legacy FPU machines · 6e686709
      Borislav Petkov authored
      i486 derived cores like Intel Quark support only the very old,
      legacy x87 FPU (FSAVE/FRSTOR, CPUID bit FXSR is not set), and
      our FPU code wasn't handling the saving and restoring there
      properly in the 'eagerfpu' case.
      
      So after we made eagerfpu the default for all CPU types:
      
        58122bf1 x86/fpu: Default eagerfpu=on on all CPUs
      
      these old FPU designs broke. First, Andy Shevchenko reported a splat:
      
        WARNING: CPU: 0 PID: 823 at arch/x86/include/asm/fpu/internal.h:163 fpu__clear+0x8c/0x160
      
      which was us trying to execute FXRSTOR on those machines even though
      they don't support it.
      
      After taking care of that, Bryan O'Donoghue reported that a simple FPU
      test still failed because we weren't initializing the FPU state properly
      on those machines.
      
      Take care of all that.
      Reported-and-tested-by: default avatarBryan O'Donoghue <pure.logic@nexus-software.ie>
      Reported-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yu-cheng <yu-cheng.yu@intel.com>
      Link: http://lkml.kernel.org/r/20160311113206.GD4312@pd.tnicSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      6e686709
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20160311' of git://git.infradead.org/linux-mtd · 03c668a9
      Linus Torvalds authored
      Pull MTD fixes from Brian Norris:
       "Late MTD fix for v4.5:
      
         - A simple error code handling fix for the NAND ECC test; this was a
           regression in v4.5-rc1
      
         - A MAINTAINERS update, which might as well go in ASAP"
      
      * tag 'for-linus-20160311' of git://git.infradead.org/linux-mtd:
        MAINTAINERS: add a maintainer for the NAND subsystem
        mtd: nand: tests: fix regression introduced in mtd_nandectest
      03c668a9