1. 14 Feb, 2017 2 commits
    • Dan Williams's avatar
      acpi, nfit: fix acpi_nfit_flush_probe() crash · 46cf1520
      Dan Williams authored
      commit e471486c upstream.
      
      We queue an on-stack work item to 'nfit_wq' and wait for it to complete
      as part of a 'flush_probe' request. However, if the user cancels the
      wait we need to make sure the item is flushed from the queue otherwise
      we are leaving an out-of-scope stack address on the work list.
      
       BUG: unable to handle kernel paging request at ffffbcb3c72f7cd0
       IP: [<ffffffffa9413a7b>] __list_add+0x1b/0xb0
       [..]
       RIP: 0010:[<ffffffffa9413a7b>]  [<ffffffffa9413a7b>] __list_add+0x1b/0xb0
       RSP: 0018:ffffbcb3c7ba7c00  EFLAGS: 00010046
       [..]
       Call Trace:
        [<ffffffffa90bb11a>] insert_work+0x3a/0xc0
        [<ffffffffa927fdda>] ? seq_open+0x5a/0xa0
        [<ffffffffa90bb30a>] __queue_work+0x16a/0x460
        [<ffffffffa90bbb08>] queue_work_on+0x38/0x40
        [<ffffffffc0cf2685>] acpi_nfit_flush_probe+0x95/0xc0 [nfit]
        [<ffffffffc0cf25d0>] ? nfit_visible+0x40/0x40 [nfit]
        [<ffffffffa9571495>] wait_probe_show+0x25/0x60
        [<ffffffffa9546b30>] dev_attr_show+0x20/0x50
      
      Fixes: 7ae0fa43 ("nfit, libnvdimm: async region scrub workqueue")
      Reviewed-by: default avatarVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      46cf1520
    • Srinivas Pandruvada's avatar
      cpufreq: intel_pstate: Disable energy efficiency optimization · a6b1dc61
      Srinivas Pandruvada authored
      commit 6e978b22 upstream.
      
      Some Kabylake desktop processors may not reach max turbo when running in
      HWP mode, even if running under sustained 100% utilization.
      
      This occurs when the HWP.EPP (Energy Performance Preference) is set to
      "balance_power" (0x80) -- the default on most systems.
      
      It occurs because the platform BIOS may erroneously enable an
      energy-efficiency setting -- MSR_IA32_POWER_CTL BIT-EE, which is not
      recommended to be enabled on this SKU.
      
      On the failing systems, this BIOS issue was not discovered when the
      desktop motherboard was tested with Windows, because the BIOS also
      neglects to provide the ACPI/CPPC table, that Windows requires to enable
      HWP, and so Windows runs in legacy P-state mode, where this setting has
      no effect.
      
      Linux' intel_pstate driver does not require ACPI/CPPC to enable HWP, and
      so it runs in HWP mode, exposing this incorrect BIOS configuration.
      
      There are several ways to address this problem.
      
      First, Linux can also run in legacy P-state mode on this system.
      As intel_pstate is how Linux enables HWP, booting with
      "intel_pstate=disable"
      will run in acpi-cpufreq/ondemand legacy p-state mode.
      
      Or second, the "performance" governor can be used with intel_pstate,
      which will modify HWP.EPP to 0.
      
      Or third, starting in 4.10, the
      /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
      attribute in can be updated from "balance_power" to "performance".
      
      Or fourth, apply this patch, which fixes the erroneous setting of
      MSR_IA32_POWER_CTL BIT_EE on this model, allowing the default
      configuration to function as designed.
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Reviewed-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a6b1dc61
  2. 09 Feb, 2017 38 commits