You need to sign in or sign up before continuing.
  1. 02 3月, 2017 2 次提交
  2. 01 3月, 2017 1 次提交
    • D
      nfit, libnvdimm: fix interleave set cookie calculation · 86ef58a4
      Dan Williams 提交于
      The interleave-set cookie is a sum that sanity checks the composition of
      an interleave set has not changed from when the namespace was initially
      created.  The checksum is calculated by sorting the DIMMs by their
      location in the interleave-set. The comparison for the sort must be
      64-bit wide, not byte-by-byte as performed by memcmp() in the broken
      case.
      
      Fix the implementation to accept correct cookie values in addition to
      the Linux "memcmp" order cookies, but only allow correct cookies to be
      generated going forward. It does mean that namespaces created by
      third-party-tooling, or created by newer kernels with this fix, will not
      validate on older kernels. However, there are a couple mitigating
      conditions:
      
          1/ platforms with namespace-label capable NVDIMMs are not widely
             available.
      
          2/ interleave-sets with a single-dimm are by definition not affected
             (nothing to sort). This covers the QEMU-KVM NVDIMM emulation case.
      
      The cookie stored in the namespace label will be fixed by any write the
      namespace label, the most straightforward way to achieve this is to
      write to the "alt_name" attribute of a namespace in sysfs.
      
      Cc: <stable@vger.kernel.org>
      Fixes: eaf96153 ("libnvdimm, nfit: add interleave-set state-tracking infrastructure")
      Reported-by: NNicholas Moulin <nicholas.w.moulin@linux.intel.com>
      Tested-by: NNicholas Moulin <nicholas.w.moulin@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      86ef58a4
  3. 28 2月, 2017 4 次提交
  4. 16 2月, 2017 1 次提交
  5. 10 2月, 2017 2 次提交
  6. 09 2月, 2017 3 次提交
  7. 07 2月, 2017 4 次提交
  8. 04 2月, 2017 2 次提交
    • V
      ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START · fa29ae5f
      Viresh Kumar 提交于
      acpi_processor_ppc_notifier() can live without using CPUFREQ_START
      (which is gonna be removed soon), as it is only used while setting
      ignore_ppc to 0. This can be done with the help of "ignore_ppc < 0"
      check alone. The notifier function anyway ignores all events except
      CPUFREQ_ADJUST and dropping CPUFREQ_START wouldn't harm at all.
      
      Once CPUFREQ_START event is removed from the cpufreq core,
      acpi_processor_ppc_notifier() will get called only for CPUFREQ_NOTIFY or
      CPUFREQ_ADJUST event. Drop the return statement from the first if block
      to make sure we don't ignore any such events.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fa29ae5f
    • D
      acpi, nfit: fix acpi_nfit_flush_probe() crash · e471486c
      Dan Williams 提交于
      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")
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e471486c
  9. 03 2月, 2017 2 次提交
  10. 01 2月, 2017 5 次提交
    • D
      efi/x86: Move the EFI BGRT init code to early init code · 7b0a9114
      Dave Young 提交于
      Before invoking the arch specific handler, efi_mem_reserve() reserves
      the given memory region through memblock.
      
      efi_bgrt_init() will call efi_mem_reserve() after mm_init(), at which
      time memblock is dead and should not be used anymore.
      
      The EFI BGRT code depends on ACPI initialization to get the BGRT ACPI
      table, so move parsing of the BGRT table to ACPI early boot code to
      ensure that efi_mem_reserve() in EFI BGRT code still use memblock safely.
      Tested-by: NBhupesh Sharma <bhsharma@redhat.com>
      Signed-off-by: NDave Young <dyoung@redhat.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-acpi@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/1485868902-20401-9-git-send-email-ard.biesheuvel@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      7b0a9114
    • Z
      ACPI: save NVS memory for Lenovo G50-45 · cbc00c13
      Zhang Rui 提交于
      In commit 821d6f03 (ACPI / sleep: Do not save NVS for new machines to
      accelerate S3), to optimize S3 suspend/resume speed, code is introduced
      to ignore NVS memory saving during S3 for all the platforms later than
      2012.
      
      But, Lenovo G50-45, a platform released in 2015, still needs NVS memory
      saving during S3. A quirk is introduced for this platform.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=189431Tested-by: NPrzemek <soprwa@gmail.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      [ rjw: Drop unnecessary code ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cbc00c13
    • C
      ACPI, APEI, EINJ: fix malformed newline escape · d2226784
      Colin Ian King 提交于
      The pr_warn message has a malformed newline escape, add in the
      missing \
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Reviewed-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d2226784
    • L
      ACPI / button: Remove lid_init_state=method mode · ecb10b69
      Lv Zheng 提交于
      The mode is buggy, and lid_init__state=open is more useful than this
      mode, so this patch makes it deprecated.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ecb10b69
    • L
      ACPI / button: Change default behavior to lid_init_state=open · 77e9a4aa
      Lv Zheng 提交于
      More and more platforms need the button.lid_init_state=open quirk. This
      patch sets it the default behavior.
      
      If a platform doesn't send lid open event or lid open event is lost due to
      the underlying system problems, then we can compare various combinations:
      1. systemd/acpid is used to suspend system or not, systemd has a special
         logic forcing open event after resuming;
      2. _LID returns a cached value or not.
      
      The result is as follows:
      
       1. lid_init_state=method
         1. cached
            1. resumed by lid:
               (x) event=close
               (x) systemd=suspends again
               (x) acpid=suspends again
               (x) state=close
            2. resumed by other:
               (o) event=close
               (x) systemd=suspends again
               (x) acpid=suspends again
               (o) state=close
         2. non-cached
            1. resumed by lid:
               (o) event=open
               (o) systemd=resumes
               (o) acpid=resumes
               (o) state=open
            2. resumed by other:
               (o) event=close
               (x) systemd=suspends again
               (x) acpid=suspends again
               (o) state=close
       2. lid_init_state=open
         1. cached
            1. resumed by lid:
               (o) event=open
               (o) systemd=resumes
               (o) acpid=resumes
               (x) state=close
            2. resumed by other:
               (x) event=open
               (o) systemd=resumes
               (o) acpid=resumes
               (o) state=close
         2. non-cached
            1. resumed by lid:
               (o) event=open
               (o) systemd=resumes
               (o) acpid=resumes
               (o) state=open
            2. resumed by other:
               (x) event=open
               (o) systemd=resumes
               (o) acpid=resumes
               (o) state=close
       3. lid_init_state=ignore
         1. cached
            1. resumed by lid:
               (o) event=none
               (x) systemd=suspends again
               (o) acpid=resumes
               (x) state=close
            2. resumed by other:
               (o) event=none
               (x) systemd=suspends again
               (o) acpid=resumes
               (o) state=close
         2. non-cached
            1. resumed by lid:
               (o) event=none
               (x) systemd=suspends again
               (o) acpid=resumes
               (o) state=open
            2. resumed by other:
               (o) event=none
               (x) systemd=suspends again
               (o) acpid=resumes
               (o) state=close
      
      As a conclusion:
       1. With systemd changed, lid_init_state=ignore has only one problem and the
          problem comes from an underlying issue, not userspace and kernel lid
          handling.
       2. Without systemd changed, lid_init_state=open can be the default
          behavior as the pass ratio is not much worse than lid_init_state=ignore.
       3. lid_init_state=method is buggy, we can have a separate patch to make it
          deprectated.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=187271Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      77e9a4aa
  11. 30 1月, 2017 2 次提交
  12. 27 1月, 2017 1 次提交
  13. 25 1月, 2017 1 次提交
    • H
      Revert "ACPI / video: Add force_native quirk for HP Pavilion dv6" · fd25ea29
      Hans de Goede 提交于
      Revert commit 6276e53f (ACPI / video: Add force_native quirk for
      HP Pavilion dv6).
      
      In the commit message for the quirk this revert removes I wrote:
      
      "Note that there are quite a few HP Pavilion dv6 variants, some
      woth ATI and some with NVIDIA hybrid gfx, both seem to need this
      quirk to have working backlight control. There are also some versions
      with only Intel integrated gfx, these may not need this quirk, but it
      should not hurt there."
      
      Unfortunately that seems wrong, I've already received 2 reports of
      this commit causing regressions on some dv6 variants (at least one
      of which actually has a nvidia GPU). So it seems that HP has made a
      mess here by using the same model-name both in marketing and in the
      DMI data for many different variants. Some of which need
      acpi_backlight=native for functional backlight control (as the
      quirk this commit reverts was doing), where as others are broken by
      it. So lets get back to the old sitation so as to avoid regressing
      on models which used to work without any kernel cmdline arguments
      before.
      
      Fixes: 6276e53f (ACPI / video: Add force_native quirk for HP Pavilion dv6)
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fd25ea29
  14. 24 1月, 2017 1 次提交
  15. 20 1月, 2017 2 次提交
    • L
      ACPICA: Tables: Fix hidden logic related to acpi_tb_install_standard_table() · 7a37052a
      Lv Zheng 提交于
      There is a hidden logic for acpi_tb_install_standard_table() as it can be
      invoked from the boot stage and during runtime.
      
       1. When it is invoked from the OS boot stage, the ACPICA mutex may not have
          been initialized yet and so acpi_ut_acquire_mutex()/acpi_ut_release_mutex()
          are not invoked in these code paths:
      
         acpi_initialize_tables
           acpi_tb_parse_root_table
             acpi_tb_install_standard_table (4 invocations)
         acpi_install_table
             acpi_tb_install_standard_table
      
       2. When it is invoked during the runtime, ACPICA mutex is used as
          appropriate:
      
         acpi_ex_load_op
           acpi_tb_install_and_load_table
             acpi_tb_install_standard_table
         acpi_load_table
           acpi_tb_install_and_load_table
             acpi_tb_install_standard_table
      
      The mutex is now used in acpi_tb_install_and_load_table(), while it actually
      should be in acpi_tb_install_standard_table().
      
      This introduces another problem in acpi_tb_install_standard_table() where
      acpi_gbl_table_handler is invoked from and the lock contexts are thus not
      consistent for the table handlers. This triggers a regression when
      acpi_get_table()/acpi_put_table() start to hold table mutex during runtime.
      
      The regression is noticed by LKP as new errors reported by ACPICA mutex
      debugging facility.
      
      [    2.043693] ACPI Error: Mutex [ACPI_MTX_Tables] already acquired by this thread [497483776] (20160930/utmutex-254)
      [    2.054084] ACPI Error: Mutex [0x2] is not acquired, cannot release (20160930/utmutex-326)
      
      And it triggers a deadlock:
      
      [  247.066214] INFO: task swapper/0:1 blocked for more than 120 seconds.
      ...
      [  247.091271] Call Trace:
      ...
      [  247.121523]  down_timeout+0x47/0x50
      [  247.125065]  acpi_os_wait_semaphore+0x47/0x62
      [  247.129475]  acpi_ut_acquire_mutex+0x43/0x81
      [  247.133798]  acpi_get_table+0x2d/0x84
      [  247.137513]  acpi_table_attr_init+0xcd/0x100
      [  247.146590]  acpi_sysfs_table_handler+0x5d/0xb8
      [  247.151174]  acpi_bus_table_handler+0x23/0x2a
      [  247.155583]  acpi_tb_install_standard_table+0xe0/0x213
      [  247.164489]  acpi_tb_install_and_load_table+0x3a/0x82
      [  247.169592]  acpi_ex_load_op+0x194/0x201
      ...
      [  247.200108]  acpi_ns_evaluate+0x1bb/0x247
      [  247.204170]  acpi_evaluate_object+0x178/0x274
      [  247.213249]  acpi_processor_set_pdc+0x154/0x17b
      ...
      The table mutex is held in acpi_tb_install_and_load_table() and is re-visited by
      acpi_get_table().
      
      Noticing that the early mutex requirement actually belongs to the OSL layer
      and has already been handled in acpi_os_wait_semaphore()/acpi_os_signal_semaphore(),
      the regression canbe fixed by removing this hidden logic from the ACPICA core
      to the OS-specific code.
      
      Fixes: 174cc718 ("ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel")
      Reported-and-tested-by: NTomi Sarvela <tomi.p.sarvela@intel.com>
      Reported-by: NYe Xiaolong <xiaolong.ye@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7a37052a
    • R
      Revert "PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0 flag" · e326ce01
      Rafael J. Wysocki 提交于
      Revert commit 08b98d32 (PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0
      flag) as it caused system suspend (in the default configuration) to fail
      on Dell XPS13 (9360) with the Kaby Lake processor.
      
      Fixes: 08b98d32 (PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0 flag)
      Reported-by: NPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e326ce01
  16. 13 1月, 2017 1 次提交
  17. 05 1月, 2017 4 次提交
  18. 03 1月, 2017 2 次提交