1. 08 Feb, 2018 3 commits
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-tables', 'acpi-bus' and 'acpi-processor' · 3c9c75de
      Rafael J. Wysocki authored
      * acpi-tables:
        ACPI: SPCR: Make SPCR available to x86
        ACPI / tables: Add IORT to injectable table list
      
      * acpi-bus:
        ACPI / bus: Parse tables as term_list for Dell XPS 9570 and Precision M5530
        ACPI / scan: Use acpi_bus_get_status() to initialize ACPI_TYPE_DEVICE devs
        ACPI / bus: Do not call _STA on battery devices with unmet dependencies
        PCI: acpiphp_ibm: prepare for acpi_get_object_info() no longer returning status
        ACPI: export acpi_bus_get_status_handle()
      
      * acpi-processor:
        ACPI / processor: Set default C1 idle state description
        ACPI: processor_perflib: Do not send _PPC change notification if not ready
      3c9c75de
    • Rafael J. Wysocki's avatar
      Merge branch 'acpica' · b1738e3e
      Rafael J. Wysocki authored
      * acpica:
        ACPICA: Update version to 20180105
        ACPICA: All acpica: Update copyrights to 2018
        ACPICA: Add a missing pair of parentheses
        ACPICA: Prefer ACPI_TO_POINTER() over ACPI_ADD_PTR()
        ACPICA: Avoid NULL pointer arithmetic
        ACPICA: Linux: add support for X32 ABI compilation
      b1738e3e
    • Greg Kroah-Hartman's avatar
      ACPI: sbshc: remove raw pointer from printk() message · 43cdd1b7
      Greg Kroah-Hartman authored
      There's no need to be printing a raw kernel pointer to the kernel log at
      every boot.  So just remove it, and change the whole message to use the
      correct dev_info() call at the same time.
      Reported-by: default avatarWang Qize <wang_qize@venustech.com.cn>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      43cdd1b7
  2. 07 Feb, 2018 2 commits
  3. 06 Feb, 2018 3 commits
  4. 04 Feb, 2018 10 commits
    • Yazen Ghannam's avatar
      ACPI / processor: Set default C1 idle state description · 248e8841
      Yazen Ghannam authored
      The ACPI idle driver will default to ACPI_CSTATE_HALT for C1 if a _CST
      object for C1 is not defined. However, the description will not be set,
      so users will see "<null>" when reading the description from sysfs.
      
      Set the C1 state description when defaulting to ACPI_CSTATE_HALT.
      Signed-off-by: default avatarYazen Ghannam <yazen.ghannam@amd.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      248e8841
    • Chen Yu's avatar
      ACPI: processor_perflib: Do not send _PPC change notification if not ready · ba1edb9a
      Chen Yu authored
      The following warning was triggered after resumed from S3 -
      if all the nonboot CPUs were put offline before suspend:
      
      [ 1840.329515] unchecked MSR access error: RDMSR from 0x771 at rIP: 0xffffffff86061e3a (native_read_msr+0xa/0x30)
      [ 1840.329516] Call Trace:
      [ 1840.329521]  __rdmsr_on_cpu+0x33/0x50
      [ 1840.329525]  generic_exec_single+0x81/0xb0
      [ 1840.329527]  smp_call_function_single+0xd2/0x100
      [ 1840.329530]  ? acpi_ds_result_pop+0xdd/0xf2
      [ 1840.329532]  ? acpi_ds_create_operand+0x215/0x23c
      [ 1840.329534]  rdmsrl_on_cpu+0x57/0x80
      [ 1840.329536]  ? cpumask_next+0x1b/0x20
      [ 1840.329538]  ? rdmsrl_on_cpu+0x57/0x80
      [ 1840.329541]  intel_pstate_update_perf_limits+0xf3/0x220
      [ 1840.329544]  ? notifier_call_chain+0x4a/0x70
      [ 1840.329546]  intel_pstate_set_policy+0x4e/0x150
      [ 1840.329548]  cpufreq_set_policy+0xcd/0x2f0
      [ 1840.329550]  cpufreq_update_policy+0xb2/0x130
      [ 1840.329552]  ? cpufreq_update_policy+0x130/0x130
      [ 1840.329556]  acpi_processor_ppc_has_changed+0x65/0x80
      [ 1840.329558]  acpi_processor_notify+0x80/0x100
      [ 1840.329561]  acpi_ev_notify_dispatch+0x44/0x5c
      [ 1840.329563]  acpi_os_execute_deferred+0x14/0x20
      [ 1840.329565]  process_one_work+0x193/0x3c0
      [ 1840.329567]  worker_thread+0x35/0x3b0
      [ 1840.329569]  kthread+0x125/0x140
      [ 1840.329571]  ? process_one_work+0x3c0/0x3c0
      [ 1840.329572]  ? kthread_park+0x60/0x60
      [ 1840.329575]  ? do_syscall_64+0x67/0x180
      [ 1840.329577]  ret_from_fork+0x25/0x30
      [ 1840.329585] unchecked MSR access error: WRMSR to 0x774 (tried to write 0x0000000000000000) at rIP: 0xffffffff86061f78 (native_write_msr+0x8/0x30)
      [ 1840.329586] Call Trace:
      [ 1840.329587]  __wrmsr_on_cpu+0x37/0x40
      [ 1840.329589]  generic_exec_single+0x81/0xb0
      [ 1840.329592]  smp_call_function_single+0xd2/0x100
      [ 1840.329594]  ? acpi_ds_create_operand+0x215/0x23c
      [ 1840.329595]  ? cpumask_next+0x1b/0x20
      [ 1840.329597]  wrmsrl_on_cpu+0x57/0x70
      [ 1840.329598]  ? rdmsrl_on_cpu+0x57/0x80
      [ 1840.329599]  ? wrmsrl_on_cpu+0x57/0x70
      [ 1840.329602]  intel_pstate_hwp_set+0xd3/0x150
      [ 1840.329604]  intel_pstate_set_policy+0x119/0x150
      [ 1840.329606]  cpufreq_set_policy+0xcd/0x2f0
      [ 1840.329607]  cpufreq_update_policy+0xb2/0x130
      [ 1840.329610]  ? cpufreq_update_policy+0x130/0x130
      [ 1840.329613]  acpi_processor_ppc_has_changed+0x65/0x80
      [ 1840.329615]  acpi_processor_notify+0x80/0x100
      [ 1840.329617]  acpi_ev_notify_dispatch+0x44/0x5c
      [ 1840.329619]  acpi_os_execute_deferred+0x14/0x20
      [ 1840.329620]  process_one_work+0x193/0x3c0
      [ 1840.329622]  worker_thread+0x35/0x3b0
      [ 1840.329624]  kthread+0x125/0x140
      [ 1840.329625]  ? process_one_work+0x3c0/0x3c0
      [ 1840.329626]  ? kthread_park+0x60/0x60
      [ 1840.329628]  ? do_syscall_64+0x67/0x180
      [ 1840.329631]  ret_from_fork+0x25/0x30
      
      This is because if there's only one online CPU, the MSR_PM_ENABLE
      (package wide)can not be enabled after resumed, due to
      intel_pstate_hwp_enable() will only be invoked on AP's online
      process after resumed - if there's no AP online, the HWP remains
      disabled after resumed (BIOS has disabled it in S3). Then if
      there comes a _PPC change notification which touches HWP register
      during this stage, the warning is triggered.
      
      Since we don't call acpi_processor_register_performance() when
      HWP is enabled, the pr->performance will be NULL. When this is
      NULL we don't need to do _PPC change notification.
      Reported-by: default avatarDoug Smythies <dsmythies@telus.net>
      Suggested-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarYu Chen <yu.c.chen@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ba1edb9a
    • Hans de Goede's avatar
      ACPI / scan: Use acpi_bus_get_status() to initialize ACPI_TYPE_DEVICE devs · 63347db0
      Hans de Goede authored
      The acpi_get_bus_status wrapper for acpi_bus_get_status_handle has some
      code to handle certain device quirks, in some cases we also need this
      quirk handling for the initial _STA call.
      
      Specifically on some devices calling _STA before all _DEP dependencies
      are met results in errors like these:
      
      [    0.123579] ACPI Error: No handler for Region [ECRM] (00000000ba9edc4c)
                     [GenericSerialBus] (20170831/evregion-166)
      [    0.123601] ACPI Error: Region GenericSerialBus (ID=9) has no handler
                     (20170831/exfldio-299)
      [    0.123618] ACPI Error: Method parse/execution failed
                     \_SB.I2C1.BAT1._STA, AE_NOT_EXIST (20170831/psparse-550)
      
      acpi_get_bus_status already has code to avoid this, so by using it we
      also silence these errors from the initial _STA call.
      
      Note that in order for the acpi_get_bus_status handling for this to work,
      we initialize dep_unmet to 1 until acpi_device_dep_initialize gets called,
      this means that battery devices will be instantiated with an initial
      status of 0. This is not a problem, acpi_bus_attach will get called soon
      after the instantiation anyways and it will update the status as first
      point of order.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      63347db0
    • Hans de Goede's avatar
      ACPI / bus: Do not call _STA on battery devices with unmet dependencies · 54ddce70
      Hans de Goede authored
      The battery code uses acpi_device->dep_unmet to check for unmet deps and
      if there are unmet deps it does not bind to the device to avoid errors
      about missing OpRegions when calling ACPI methods on the device.
      
      The missing OpRegions when there are unmet deps problem also applies to
      the _STA method of some battery devices and calling it too early results
      in errors like these:
      
      [    0.123579] ACPI Error: No handler for Region [ECRM] (00000000ba9edc4c)
                     [GenericSerialBus] (20170831/evregion-166)
      [    0.123601] ACPI Error: Region GenericSerialBus (ID=9) has no handler
                     (20170831/exfldio-299)
      [    0.123618] ACPI Error: Method parse/execution failed
                     \_SB.I2C1.BAT1._STA, AE_NOT_EXIST (20170831/psparse-550)
      
      This commit fixes these errors happening when acpi_get_bus_status gets
      called by checking dep_unmet for battery devices and reporting a status
      of 0 until all dependencies are met.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      54ddce70
    • Hans de Goede's avatar
      PCI: acpiphp_ibm: prepare for acpi_get_object_info() no longer returning status · b0fd6772
      Hans de Goede authored
      acpi_get_object_info() is intended for early probe usage and as such should
      not call any methods which may rely on OpRegions, but it used to also call
      _STA to get the status, which on some systems does rely on OpRegions, this
      behavior and the acpi_device_info.current_status member are being removed.
      
      This commit prepares the acpiphp_ibm code for this by having it get the
      status itself using acpi_bus_get_status_handle(). Note no error handling is
      necessary on any errors acpi_bus_get_status_handle() leaves the value of
      the passed in current_status at its 0 initialization value.
      Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b0fd6772
    • Hans de Goede's avatar
      ACPI: export acpi_bus_get_status_handle() · 5a98231f
      Hans de Goede authored
      Some modular drivers need this, export it.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5a98231f
    • Jung-uk Kim's avatar
    • Jung-uk Kim's avatar
      ACPICA: Prefer ACPI_TO_POINTER() over ACPI_ADD_PTR() · 9cf02a0a
      Jung-uk Kim authored
      This is more easy to read.
      Signed-off-by: default avatarJung-uk Kim <jkim@free_BSD.org>
      Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9cf02a0a
    • Jung-uk Kim's avatar
      ACPICA: Avoid NULL pointer arithmetic · 761f0b82
      Jung-uk Kim authored
      We should not assume NULL is defined as "(void *)0" because NULL is
      an implementation-defined macro.  Especially, Clang 6 complains about
      it, i.e., "arithmetic on a null pointer treated as a cast from integer
      to pointer is a GNU extension".
      Signed-off-by: default avatarJung-uk Kim <jkim@free_BSD.org>
      Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      761f0b82
    • Anuj Mittal's avatar
      ACPICA: Linux: add support for X32 ABI compilation · 0eedae8e
      Anuj Mittal authored
      X32 follows ILP32 model. Check for ILP32 as well when checking for
      x86_64 to ensure the defines are correct for X32 ABI.
      Signed-off-by: default avatarAnuj Mittal <anuj.mittal@intel.com>
      Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0eedae8e
  5. 29 Jan, 2018 4 commits
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1a9a126b
      Linus Torvalds authored
      Pull ACPI updates from Rafael Wysocki:
       "The majority of this is an update of the ACPICA kernel code to
        upstream revision 20171215 with a cosmetic change and a maintainers
        information update on top of it.
      
        The rest is mostly some minor fixes and cleanups in the ACPI drivers
        and cleanups to initialization on x86.
      
        Specifics:
      
         - Update the ACPICA kernel code to upstream revision 20171215 including:
            * Support for ACPI 6.0A changes in the NFIT table (Bob Moore)
            * Local 64-bit divide in string conversions (Bob Moore)
            * Fix for a regression in acpi_evaluate_object_type() (Bob Moore)
            * Fixes for memory leaks during package object resolution (Bob
              Moore)
            * Deployment of safe version of strncpy() (Bob Moore)
            * Debug and messaging updates (Bob Moore)
            * Support for PDTT, SDEV, TPM2 tables in iASL and tools (Bob
              Moore)
            * Null pointer dereference avoidance in Op and cleanups (Colin Ian
              King)
            * Fix for memory leak from building prefixed pathname (Erik
              Schmauss)
            * Coding style fixes, disassembler and compiler updates (Hanjun
              Guo, Erik Schmauss)
            * Additional PPTT flags from ACPI 6.2 (Jeremy Linton)
            * Fix for an off-by-one error in acpi_get_timer_duration()
              (Jung-uk Kim)
            * Infinite loop detection timeout and utilities cleanups (Lv
              Zheng)
            * Windows 10 version 1607 and 1703 OSI strings (Mario
              Limonciello)
      
         - Update ACPICA information in MAINTAINERS to reflect the current
           status of ACPICA maintenance and rename a local variable in one
           function to match the corresponding upstream code (Rafael Wysocki)
      
         - Clean up ACPI-related initialization on x86 (Andy Shevchenko)
      
         - Add support for Intel Merrifield to the ACPI GPIO code (Andy
           Shevchenko)
      
         - Clean up ACPI PMIC drivers (Andy Shevchenko, Arvind Yadav)
      
         - Fix the ACPI Generic Event Device (GED) driver to free IRQs on
           shutdown and clean up the PCI IRQ Link driver (Sinan Kaya)
      
         - Make the GHES code call into the AER driver on all errors and clean
           up the ACPI APEI code (Colin Ian King, Tyler Baicar)
      
         - Make the IA64 ACPI NUMA code parse all SRAT entries (Ganapatrao
           Kulkarni)
      
         - Add a lid switch blacklist to the ACPI button driver and make it
           print extra debug messages on lid events (Hans de Goede)
      
         - Add quirks for Asus GL502VSK and UX305LA to the ACPI battery driver
           and clean it up somewhat (Bjørn Mork, Kai-Heng Feng)
      
         - Add device link for CHT SD card dependency on I2C to the ACPI LPSS
           (Intel SoCs) driver and make it avoid creating platform device
           objects for devices without MMIO resources (Adrian Hunter, Hans de
           Goede)
      
         - Fix the ACPI GPE mask kernel command line parameter handling
           (Prarit Bhargava)
      
         - Fix the handling of (incorrectly exposed) backlight interfaces
           without LCD (Hans de Goede)
      
         - Fix the usage of debugfs_create_*() in the ACPI EC driver (Geert
           Uytterhoeven)"
      
      * tag 'acpi-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (62 commits)
        ACPI/PCI: pci_link: reduce verbosity when IRQ is enabled
        ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources
        ACPI / PMIC: Convert to use builtin_platform_driver() macro
        ACPI / x86: boot: Propagate error code in acpi_gsi_to_irq()
        ACPICA: Update version to 20171215
        ACPICA: trivial style fix, no functional change
        ACPICA: Fix a couple memory leaks during package object resolution
        ACPICA: Recognize the Windows 10 version 1607 and 1703 OSI strings
        ACPICA: DT compiler: prevent error if optional field at the end of table is not present
        ACPICA: Rename a global variable, no functional change
        ACPICA: Create and deploy safe version of strncpy
        ACPICA: Cleanup the global variables and update comments
        ACPICA: Debugger: fix slight indentation issue
        ACPICA: Fix a regression in the acpi_evaluate_object_type() interface
        ACPICA: Update for a few debug output statements
        ACPICA: Debug output, no functional change
        ACPI: EC: Fix debugfs_create_*() usage
        ACPI / video: Default lcd_only to true on Win8-ready and newer machines
        ACPI / x86: boot: Don't setup SCI on HW-reduced platforms
        ACPI / x86: boot: Use INVALID_ACPI_IRQ instead of 0 for acpi_sci_override_gsi
        ...
      1a9a126b
    • Linus Torvalds's avatar
      Merge tag 'pm-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 7f3fdd40
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "This includes some infrastructure changes in the PM core, mostly
        related to integration between runtime PM and system-wide suspend and
        hibernation, plus some driver changes depending on them and fixes for
        issues in that area which have become quite apparent recently.
      
        Also included are changes making more x86-based systems use the Low
        Power Sleep S0 _DSM interface by default, which turned out to be
        necessary to handle power button wakeups from suspend-to-idle on
        Surface Pro3.
      
        On the cpufreq front we have fixes and cleanups in the core, some new
        hardware support, driver updates and the removal of some unused code
        from the CPU cooling thermal driver.
      
        Apart from this, the Operating Performance Points (OPP) framework is
        prepared to be used with power domains in the future and there is a
        usual bunch of assorted fixes and cleanups.
      
        Specifics:
      
         - Define a PM driver flag allowing drivers to request that their
           devices be left in suspend after system-wide transitions to the
           working state if possible and add support for it to the PCI bus
           type and the ACPI PM domain (Rafael Wysocki).
      
         - Make the PM core carry out optimizations for devices with driver PM
           flags set in some cases and make a few drivers set those flags
           (Rafael Wysocki).
      
         - Fix and clean up wrapper routines allowing runtime PM device
           callbacks to be re-used for system-wide PM, change the generic
           power domains (genpd) framework to stop using those routines
           incorrectly and fix up a driver depending on that behavior of genpd
           (Rafael Wysocki, Ulf Hansson, Geert Uytterhoeven).
      
         - Fix and clean up the PM core's device wakeup framework and
           re-factor system-wide PM core code related to device wakeup
           (Rafael Wysocki, Ulf Hansson, Brian Norris).
      
         - Make more x86-based systems use the Low Power Sleep S0 _DSM
           interface by default (to fix power button wakeup from
           suspend-to-idle on Surface Pro3) and add a kernel command line
           switch to tell it to ignore the system sleep blacklist in the ACPI
           core (Rafael Wysocki).
      
         - Fix a race condition related to cpufreq governor module removal and
           clean up the governor management code in the cpufreq core (Rafael
           Wysocki).
      
         - Drop the unused generic code related to the handling of the static
           power energy usage model in the CPU cooling thermal driver along
           with the corresponding documentation (Viresh Kumar).
      
         - Add mt2712 support to the Mediatek cpufreq driver (Andrew-sh
           Cheng).
      
         - Add a new operating point to the imx6ul and imx6q cpufreq drivers
           and switch the latter to using clk_bulk_get() (Anson Huang, Dong
           Aisheng).
      
         - Add support for multiple regulators to the TI cpufreq driver along
           with a new DT binding related to that and clean up that driver
           somewhat (Dave Gerlach).
      
         - Fix a powernv cpufreq driver regression leading to incorrect CPU
           frequency reporting, fix that driver to deal with non-continguous
           P-states correctly and clean it up (Gautham Shenoy, Shilpasri
           Bhat).
      
         - Add support for frequency scaling on Armada 37xx SoCs through the
           generic DT cpufreq driver (Gregory CLEMENT).
      
         - Fix error code paths in the mvebu cpufreq driver (Gregory CLEMENT).
      
         - Fix a transition delay setting regression in the longhaul cpufreq
           driver (Viresh Kumar).
      
         - Add Skylake X (server) support to the intel_pstate cpufreq driver
           and clean up that driver somewhat (Srinivas Pandruvada).
      
         - Clean up the cpufreq statistics collection code (Viresh Kumar).
      
         - Drop cluster terminology and dependency on physical_package_id from
           the PSCI driver and drop dependency on arm_big_little from the SCPI
           cpufreq driver (Sudeep Holla).
      
         - Add support for system-wide suspend and resume to the RAPL power
           capping driver and drop a redundant semicolon from it (Zhen Han,
           Luis de Bethencourt).
      
         - Make SPI domain validation (in the SCSI SPI transport driver) and
           system-wide suspend mutually exclusive as they rely on the same
           underlying mechanism and cannot be carried out at the same time
           (Bart Van Assche).
      
         - Fix the computation of the amount of memory to preallocate in the
           hibernation core and clean up one function in there (Rainer Fiebig,
           Kyungsik Lee).
      
         - Prepare the Operating Performance Points (OPP) framework for being
           used with power domains and clean up one function in it (Viresh
           Kumar, Wei Yongjun).
      
         - Clean up the generic sysfs interface for device PM (Andy
           Shevchenko).
      
         - Fix several minor issues in power management frameworks and clean
           them up a bit (Arvind Yadav, Bjorn Andersson, Geert Uytterhoeven,
           Gustavo Silva, Julia Lawall, Luis de Bethencourt, Paul Gortmaker,
           Sergey Senozhatsky, gaurav jindal).
      
         - Make it easier to disable PM via Kconfig (Mark Brown).
      
         - Clean up the cpupower and intel_pstate_tracer utilities (Doug
           Smythies, Laura Abbott)"
      
      * tag 'pm-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (89 commits)
        PCI / PM: Remove spurious semicolon
        cpufreq: scpi: remove arm_big_little dependency
        drivers: psci: remove cluster terminology and dependency on physical_package_id
        powercap: intel_rapl: Fix trailing semicolon
        dmaengine: rcar-dmac: Make DMAC reinit during system resume explicit
        PM / runtime: Allow no callbacks in pm_runtime_force_suspend|resume()
        PM / hibernate: Drop unused parameter of enough_swap
        PM / runtime: Check ignore_children in pm_runtime_need_not_resume()
        PM / runtime: Rework pm_runtime_force_suspend/resume()
        PM / genpd: Stop/start devices without pm_runtime_force_suspend/resume()
        cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin
        cpufreq: intel_pstate: Add Skylake servers support
        cpufreq: intel_pstate: Replace bxt_funcs with core_funcs
        platform/x86: surfacepro3: Support for wakeup from suspend-to-idle
        ACPI / PM: Use Low Power S0 Idle on more systems
        PM / wakeup: Print warn if device gets enabled as wakeup source during sleep
        PM / domains: Don't skip driver's ->suspend|resume_noirq() callbacks
        PM / core: Propagate wakeup_path status flag in __device_suspend_late()
        PM / core: Re-structure code for clearing the direct_complete flag
        powercap: add suspend and resume mechanism for SOC power limit
        ...
      7f3fdd40
    • Linus Torvalds's avatar
      Merge tag 'sound-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 1c1f395b
      Linus Torvalds authored
      Pull sound updates from Takashi Iwai:
       "The major changes in the core API side in this cycle are the still
        on-going ASoC componentization works. Other than that, only few small
        changes such as 20bit PCM format support are found.
      
        Meanwhile the rest majority of changes are for ASoC drivers:
      
         - Large cleanups of some of the TI CODEC drivers
      
         - Continued work on Intel ASoC stuff for new quirks, ACPI GPIO
           handling, Kconfigs and lots of cleanups
      
         - Refactoring of the Freescale SSI driver, as preliminary work for
           the upcoming changes
      
         - Work on ST DFSDM driver, including the required IIO patches
      
         - New drivers for Allwinner A83T, Maxim MAX89373, SocioNext UiniPhier
           EVEA Tempo Semiconductor TSCS42xx and TI PCM816x, TAS5722 and
           TAS6424 devices
      
         - Removal of dead codes for SN95031 and board drivers
      
        Last but not least, a few HD-audio and USB-audio quirks are included
        as usual, too"
      
      * tag 'sound-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (303 commits)
        ALSA: hda - Reduce the suspend time consumption for ALC256
        ASoC: use seq_file to dump the contents of dai_list,platform_list and codec_list
        ASoC: soc-core: add missing EXPORT_SYMBOL_GPL() for snd_soc_rtdcom_lookup
        IIO: ADC: stm32-dfsdm: remove unused variable again
        ASoC: bcm2835: fix hw_params error when device is in prepared state
        ASoC: mxs-sgtl5000: Do not print error on probe deferral
        ASoC: sgtl5000: Do not print error on probe deferral
        ASoC: Intel: remove select on non-existing SND_SOC_INTEL_COMMON
        ALSA: usb-audio: Support changing input on Sound Blaster E1
        ASoC: Intel: remove second duplicated assignment to pointer 'res'
        ALSA: hda/realtek - update ALC215 depop optimize
        ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289
        ALSA: pcm: Fix trailing semicolon
        ASoC: add Component level .read/.write
        ASoC: cx20442: fix regression by adding back .read/.write
        ASoC: uda1380: fix regression by adding back .read/.write
        ASoC: tlv320dac33: fix regression by adding back .read/.write
        ALSA: hda - Use IS_REACHABLE() for dependency on input
        IIO: ADC: stm32-dfsdm: fix static check warning
        IIO: ADC: stm32-dfsdm: code optimization
        ...
      1c1f395b
    • Linus Torvalds's avatar
      Merge tag 'init_task-20180117' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 49f9c355
      Linus Torvalds authored
      Pull init_task initializer cleanups from David Howells:
       "It doesn't seem useful to have the init_task in a header file rather
        than in a normal source file. We could consolidate init_task handling
        instead and expand out various macros.
      
        Here's a series of patches that consolidate init_task handling:
      
         (1) Make THREAD_SIZE available to vmlinux.lds for cris, hexagon and
             openrisc.
      
         (2) Alter the INIT_TASK_DATA linker script macro to set
             init_thread_union and init_stack rather than defining these in C.
      
             Insert init_task and init_thread_into into the init_stack area in
             the linker script as appropriate to the configuration, with
             different section markers so that they end up correctly ordered.
      
             We can then get merge ia64's init_task.c into the main one.
      
             We then have a bunch of single-use INIT_*() macros that seem only
             to be macros because they used to be used per-arch. We can then
             expand these in place of the user and get rid of a few lines and
             a lot of backslashes.
      
         (3) Expand INIT_TASK() in place.
      
         (4) Expand in place various small INIT_*() macros that are defined
             conditionally. Expand them and surround them by #if[n]def/#endif
             in the .c file as it takes fewer lines.
      
         (5) Expand INIT_SIGNALS() and INIT_SIGHAND() in place.
      
         (6) Expand INIT_STRUCT_PID in place.
      
        These macros can then be discarded"
      
      * tag 'init_task-20180117' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        Expand INIT_STRUCT_PID and remove
        Expand the INIT_SIGNALS and INIT_SIGHAND macros and remove
        Expand various INIT_* macros and remove
        Expand INIT_TASK() in init/init_task.c and remove
        Construct init thread stack in the linker script rather than by union
        openrisc: Make THREAD_SIZE available to vmlinux.lds
        hexagon: Make THREAD_SIZE available to vmlinux.lds
        cris: Make THREAD_SIZE available to vmlinux.lds
      49f9c355
  6. 28 Jan, 2018 8 commits
  7. 27 Jan, 2018 2 commits
    • Thomas Gleixner's avatar
      hrtimer: Reset hrtimer cpu base proper on CPU hotplug · d5421ea4
      Thomas Gleixner authored
      The hrtimer interrupt code contains a hang detection and mitigation
      mechanism, which prevents that a long delayed hrtimer interrupt causes a
      continous retriggering of interrupts which prevent the system from making
      progress. If a hang is detected then the timer hardware is programmed with
      a certain delay into the future and a flag is set in the hrtimer cpu base
      which prevents newly enqueued timers from reprogramming the timer hardware
      prior to the chosen delay. The subsequent hrtimer interrupt after the delay
      clears the flag and resumes normal operation.
      
      If such a hang happens in the last hrtimer interrupt before a CPU is
      unplugged then the hang_detected flag is set and stays that way when the
      CPU is plugged in again. At that point the timer hardware is not armed and
      it cannot be armed because the hang_detected flag is still active, so
      nothing clears that flag. As a consequence the CPU does not receive hrtimer
      interrupts and no timers expire on that CPU which results in RCU stalls and
      other malfunctions.
      
      Clear the flag along with some other less critical members of the hrtimer
      cpu base to ensure starting from a clean state when a CPU is plugged in.
      
      Thanks to Paul, Sebastian and Anna-Maria for their help to get down to the
      root cause of that hard to reproduce heisenbug. Once understood it's
      trivial and certainly justifies a brown paperbag.
      
      Fixes: 41d2e494 ("hrtimer: Tune hrtimer_interrupt hang logic")
      Reported-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sebastian Sewior <bigeasy@linutronix.de>
      Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801261447590.2067@nanos
      d5421ea4
    • H. Peter Anvin's avatar
      x86: Mark hpa as a "Designated Reviewer" for the time being · 8a95b74d
      H. Peter Anvin authored
      Due to some unfortunate events, I have not been directly involved in
      the x86 kernel patch flow for a while now.  I have also not been able
      to ramp back up by now like I had hoped to, and after reviewing what I
      will need to work on both internally at Intel and elsewhere in the near
      term, it is clear that I am not going to be able to ramp back up until
      late 2018 at the very earliest.
      
      It is not acceptable to not recognize that this load is currently
      taken by Ingo and Thomas without my direct participation, so I mark
      myself as R: (designated reviewer) rather than M: (maintainer) until
      further notice.  This is in fact recognizing the de facto situation
      for the past few years.
      
      I have obviously no intention of going away, and I will do everything
      within my power to improve Linux on x86 and x86 for Linux.  This,
      however, puts credit where it is due and reflects a change of focus.
      
      This patch also removes stale entries for portions of the x86
      architecture which have not been maintained separately from arch/x86
      for a long time.  If there is a reason to re-introduce them then that
      can happen later.
      Signed-off-by: default avatarH. Peter Anvin <h.peter.anvin@intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Bruce Schlobohm <bruce.schlobohm@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20180125195934.5253-1-hpa@zytor.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8a95b74d
  8. 26 Jan, 2018 8 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-4.15-maintainers' of... · c4e0ca7f
      Linus Torvalds authored
      Merge tag 'riscv-for-linus-4.15-maintainers' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux
      
      Pull RISC-V update from Palmer Dabbelt:
       "RISC-V: We have a new mailing list and git repo!
      
        Sorry to send something essentially as late as possible (Friday after
        an rc9), but we managed to get a mailing list for the RISC-V Linux
        port. We've been using patches@groups.riscv.org for a while, but that
        list has some problems (it's Google Groups and it's shared over all
        RISC-V software projects). The new infaread.org list is much better.
        We just got it on Wednesday but I used it a bit on Thursday to shake
        out all the configuration problems and it appears to be in working
        order.
      
        When I updated the mailing list I noticed that the MAINTAINERS file
        was pointing to our github repo, but now that we have a kernel.org
        repo I'd like to point to that instead so I changed that as well.
        We'll be centralizing all RISC-V Linux related development here as
        that seems to be the saner way to go about it.
      
        I can understand if it's too late to get this into 4.15, but given
        that it's not a code change I was hoping it'd still be OK. It would be
        nice to have the new mailing list and git repo in the release tarballs
        so when people start to find bugs they'll get to the right place"
      
      * tag 'riscv-for-linus-4.15-maintainers' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
        Update the RISC-V MAINTAINERS file
      c4e0ca7f
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ba804bb4
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) The per-network-namespace loopback device, and thus its namespace,
          can have its teardown deferred for a long time if a kernel created
          TCP socket closes and the namespace is exiting meanwhile. The kernel
          keeps trying to finish the close sequence until it times out (which
          takes quite some time).
      
          Fix this by forcing the socket closed in this situation, from Dan
          Streetman.
      
       2) Fix regression where we're trying to invoke the update_pmtu method
          on route types (in this case metadata tunnel routes) that don't
          implement the dst_ops method. Fix from Nicolas Dichtel.
      
       3) Fix long standing memory corruption issues in r8169 driver by
          performing the chip statistics DMA programming more correctly. From
          Francois Romieu.
      
       4) Handle local broadcast sends over VRF routes properly, from David
          Ahern.
      
       5) Don't refire the DCCP CCID2 timer endlessly, otherwise the socket
          can never be released. From Alexey Kodanev.
      
       6) Set poll flags properly in VSOCK protocol layer, from Stefan
          Hajnoczi.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        VSOCK: set POLLOUT | POLLWRNORM for TCP_CLOSING
        dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state
        net: vrf: Add support for sends to local broadcast address
        r8169: fix memory corruption on retrieval of hardware statistics.
        net: don't call update_pmtu unconditionally
        net: tcp: close sock if net namespace is exiting
      ba804bb4
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.15-rc10-2' of git://people.freedesktop.org/~airlied/linux · db218549
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "A fairly urgent nouveau regression fix for broken irqs across
        suspend/resume came in. This was broken before but a patch in 4.15 has
        made it much more obviously broken and now s/r fails a lot more often.
      
        The fix removes freeing the irq across s/r which never should have
        been done anyways.
      
        Also two vc4 fixes for a NULL deference and some misrendering /
        flickering on screen"
      
      * tag 'drm-fixes-for-v4.15-rc10-2' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau: Move irq setup/teardown to pci ctor/dtor
        drm/vc4: Fix NULL pointer dereference in vc4_save_hang_state()
        drm/vc4: Flush the caches before the bin jobs, as well.
      db218549
    • Stefan Hajnoczi's avatar
      VSOCK: set POLLOUT | POLLWRNORM for TCP_CLOSING · ba3169fc
      Stefan Hajnoczi authored
      select(2) with wfds but no rfds must return when the socket is shut down
      by the peer.  This way userspace notices socket activity and gets -EPIPE
      from the next write(2).
      
      Currently select(2) does not return for virtio-vsock when a SEND+RCV
      shutdown packet is received.  This is because vsock_poll() only sets
      POLLOUT | POLLWRNORM for TCP_CLOSE, not the TCP_CLOSING state that the
      socket is in when the shutdown is received.
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba3169fc
    • Alexey Kodanev's avatar
      dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state · dd5684ec
      Alexey Kodanev authored
      ccid2_hc_tx_rto_expire() timer callback always restarts the timer
      again and can run indefinitely (unless it is stopped outside), and after
      commit 120e9dab ("dccp: defer ccid_hc_tx_delete() at dismantle time"),
      which moved ccid_hc_tx_delete() (also includes sk_stop_timer()) from
      dccp_destroy_sock() to sk_destruct(), this started to happen quite often.
      The timer prevents releasing the socket, as a result, sk_destruct() won't
      be called.
      
      Found with LTP/dccp_ipsec tests running on the bonding device,
      which later couldn't be unloaded after the tests were completed:
      
        unregister_netdevice: waiting for bond0 to become free. Usage count = 148
      
      Fixes: 2a91aa39 ("[DCCP] CCID2: Initial CCID2 (TCP-Like) implementation")
      Signed-off-by: default avatarAlexey Kodanev <alexey.kodanev@oracle.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dd5684ec
    • Palmer Dabbelt's avatar
      Update the RISC-V MAINTAINERS file · 6572cc2b
      Palmer Dabbelt authored
      Now that we're upstream in Linux we've been able to make some
      infrastructure changes so our port works a bit more like other ports.
      Specifically:
      
      * We now have a mailing list specific to the RISC-V Linux port, hosted
        at lists.infreadead.org.
      * We now have a kernel.org git tree where work on our port is
        coordinated.
      
      This patch changes the RISC-V maintainers entry to reflect these new
      bits of infrastructure.
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      6572cc2b
    • Andy Lutomirski's avatar
      x86/mm/64: Tighten up vmalloc_fault() sanity checks on 5-level kernels · 36b3a772
      Andy Lutomirski authored
      On a 5-level kernel, if a non-init mm has a top-level entry, it needs to
      match init_mm's, but the vmalloc_fault() code skipped over the BUG_ON()
      that would have checked it.
      
      While we're at it, get rid of the rather confusing 4-level folded "pgd"
      logic.
      
      Cleans-up: b50858ce ("x86/mm/vmalloc: Add 5-level paging support")
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Neil Berrington <neil.berrington@datacore.com>
      Link: https://lkml.kernel.org/r/2ae598f8c279b0a29baf75df207e6f2fdddc0a1b.1516914529.git.luto@kernel.org
      36b3a772
    • Andy Lutomirski's avatar
      x86/mm/64: Fix vmapped stack syncing on very-large-memory 4-level systems · 5beda7d5
      Andy Lutomirski authored
      Neil Berrington reported a double-fault on a VM with 768GB of RAM that uses
      large amounts of vmalloc space with PTI enabled.
      
      The cause is that load_new_mm_cr3() was never fixed to take the 5-level pgd
      folding code into account, so, on a 4-level kernel, the pgd synchronization
      logic compiles away to exactly nothing.
      
      Interestingly, the problem doesn't trigger with nopti.  I assume this is
      because the kernel is mapped with global pages if we boot with nopti.  The
      sequence of operations when we create a new task is that we first load its
      mm while still running on the old stack (which crashes if the old stack is
      unmapped in the new mm unless the TLB saves us), then we call
      prepare_switch_to(), and then we switch to the new stack.
      prepare_switch_to() pokes the new stack directly, which will populate the
      mapping through vmalloc_fault().  I assume that we're getting lucky on
      non-PTI systems -- the old stack's TLB entry stays alive long enough to
      make it all the way through prepare_switch_to() and switch_to() so that we
      make it to a valid stack.
      
      Fixes: b50858ce ("x86/mm/vmalloc: Add 5-level paging support")
      Reported-and-tested-by: default avatarNeil Berrington <neil.berrington@datacore.com>
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Cc: stable@vger.kernel.org
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Link: https://lkml.kernel.org/r/346541c56caed61abbe693d7d2742b4a380c5001.1516914529.git.luto@kernel.org
      5beda7d5