1. 29 8月, 2014 1 次提交
  2. 26 8月, 2014 5 次提交
  3. 10 8月, 2014 1 次提交
  4. 08 8月, 2014 2 次提交
    • J
      x86, irq, PCI: Keep IRQ assignment for PCI devices during suspend/hibernation · 3eec5952
      Jiang Liu 提交于
      Now IOAPIC driver dynamically allocates IRQ numbers for IOAPIC pins.
      We need to keep IRQ assignment for PCI devices during suspend/hibernation,
      otherwise it may cause failure of suspend/hibernation due to:
      1) Device driver calls pci_enable_device() to allocate an IRQ number
         and register interrupt handler on the returned IRQ.
      2) Device driver's suspend callback calls pci_disable_device() and
         release assigned IRQ in turn.
      3) Device driver's resume callback calls pci_enable_device() to
         allocate IRQ number again. A different IRQ number may be assigned
         by IOAPIC driver this time.
      4) Now the hardware delivers interrupt to the new IRQ but interrupt
         handler is still registered against the old IRQ, so it breaks
         suspend/hibernation.
      
      To fix this issue, we keep IRQ assignment during suspend/hibernation.
      Flag pci_dev.dev.power.is_prepared is used to detect that
      pci_disable_device() is called during suspend/hibernation.
      Reported-and-Tested-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Len Brown <lenb@kernel.org>
      Link: http://lkml.kernel.org/r/1407478071-29399-1-git-send-email-jiang.liu@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      3eec5952
    • T
      ACPI / hotplug: Check scan handlers in acpi_scan_hot_remove() · dee15926
      Tang Chen 提交于
      When ACPI_HOTPLUG_MEMORY is not configured, memory_device_handler.attach
      is not set.  In acpi_scan_attach_handler(), the acpi_device->handler will
      not be initialized.
      
      In acpi_scan_hot_remove(), it doesn't check if acpi_device->handler is NULL.
      If we do memory hot-remove without ACPI_HOTPLUG_MEMORY configured, the kernel
      will panic.
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
       IP: [<ffffffff813e318f>] acpi_device_hotplug+0x1d7/0x4c4
       PGD 0
       Oops: 0000 [#1] SMP
       Modules linked in: sd_mod(E) sr_mod(E) cdrom(E) crc_t10dif(E) crct10dif_common(E) ata_piix(E) libata(E)
       CPU: 0 PID: 41 Comm: kworker/u2:1 Tainted: G            E 3.16.0-rc7--3.16-rc7-tangchen+ #20
       Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014
       Workqueue: kacpi_hotplug acpi_hotplug_work_fn
       task: ffff8800182436c0 ti: ffff880018254000 task.ti: ffff880018254000
       RIP: 0010:[<ffffffff813e318f>]  [<ffffffff813e318f>] acpi_device_hotplug+0x1d7/0x4c4
       RSP: 0000:ffff880018257da8  EFLAGS: 00000246
       RAX: 0000000000000000 RBX: ffff88001cd8d800 RCX: 0000000000000000
       RDX: 0000000000000000 RSI: ffff88001e40e6f8 RDI: 0000000000000246
       RBP: ffff880018257df0 R08: 0000000000000096 R09: 00000000000011a0
       R10: 63735f6970636120 R11: 725f746f685f6e61 R12: 0000000000000003
       R13: ffff88001cc1c400 R14: ffff88001e062028 R15: 0000000000000040
       FS:  0000000000000000(0000) GS:ffff88001e400000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
       CR2: 0000000000000088 CR3: 000000001a9a2000 CR4: 00000000000006f0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 0000000000000000 DR7: 0000000000000000
       Stack:
        00000000523cab58 ffff88001cd8d9f8 ffff88001852d480 00000000523cab58
        ffff88001852d480 ffff880018221e40 ffff88001cc1c400 ffff88001cce2d00
        0000000000000040 ffff880018257e08 ffffffff813dc31d ffff88001852d480
       Call Trace:
        [<ffffffff813dc31d>] acpi_hotplug_work_fn+0x1e/0x29
        [<ffffffff8108eefb>] process_one_work+0x17b/0x460
        [<ffffffff8108f69d>] worker_thread+0x11d/0x5b0
        [<ffffffff8108f580>] ? rescuer_thread+0x3a0/0x3a0
        [<ffffffff81096811>] kthread+0xe1/0x100
        [<ffffffff81096730>] ? kthread_create_on_node+0x1a0/0x1a0
        [<ffffffff816cc6bc>] ret_from_fork+0x7c/0xb0
        [<ffffffff81096730>] ? kthread_create_on_node+0x1a0/0x1a0
      
      This patch fixes this problem by checking if acpi_device->handler is NULL
      in acpi_scan_hot_remove().
      
      Fixes: d22ddcbc (ACPI / hotplug: Add demand_offline hotplug profile flag)
      Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com>
      Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
      [rjw: Subject]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dee15926
  5. 07 8月, 2014 1 次提交
  6. 01 8月, 2014 2 次提交
  7. 31 7月, 2014 10 次提交
  8. 30 7月, 2014 3 次提交
  9. 24 7月, 2014 4 次提交
  10. 23 7月, 2014 8 次提交
    • L
      ACPI: Add support to force header inclusion rules for <acpi/acpi.h>. · 417b4a73
      Lv Zheng 提交于
      As there is only CONFIG_ACPI=n processing in the <linux/acpi.h>, it is not
      safe to include <acpi/acpi.h> directly for source out of Linux ACPI
      subsystems.
      
      This patch adds error messaging to warn developers of such wrong
      inclusions.
      
      In order not to be bisected and reverted as a wrong commit, warning
      messages are carefully split into a seperate patch other than the wrong
      inclusion cleanups.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      417b4a73
    • R
      ACPI / PM: Use ACPI_COMPANION() instead of ACPI_HANDLE() · 17653a3e
      Rafael J. Wysocki 提交于
      The ACPI_HANDLE() macro evaluates ACPI_COMPANION() internally to
      return the handle of the device's ACPI companion, so it is much
      more straightforward and efficient to use ACPI_COMPANION()
      directly to obtain the device's ACPI companion object instead of
      using ACPI_HANDLE() and acpi_bus_get_device() on the returned
      handle for the same thing.
      
      Do that in three places in the ACPI device PM code.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      17653a3e
    • R
      ACPI / PM: Always enable wakeup GPEs when enabling device wakeup · f35cec25
      Rafael J. Wysocki 提交于
      Wakeup GPEs are currently only enabled when setting up devices for
      remote wakeup at run time.  During system-wide transitions they are
      enabled by ACPICA at the very last stage of suspend (before asking
      the BIOS to take over).  Of course, that only works for system
      sleep states supported by ACPI, so in particular it doesn't work
      for the "freeze" sleep state.
      
      For this reason, modify the ACPI core device PM code to enable wakeup
      GPEs for devices when setting them up for wakeup regardless of whether
      that is remote wakeup at runtime or system wakeup.  That allows the
      same device wakeup setup routine to be used for both runtime PM and
      system-wide PM and makes it possible to reduce code size quite a bit.
      
      This make ACPI-based PCI Wake-on-LAN work with the "freeze" sleep
      state on my venerable Toshiba Portege R500 and should help other
      systems too.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f35cec25
    • R
      ACPI / PM: Revork the handling of ACPI device wakeup notifications · c072530f
      Rafael J. Wysocki 提交于
      Since ACPI wakeup GPEs are going to be enabled during system suspend
      as well as for runtime wakeup by a subsequent patch and the same
      notify handlers will be used in both cases, rework the ACPI device
      wakeup notification framework so that the part specific to physical
      devices is always run asynchronously from the PM workqueue.  This
      prevents runtime resume callbacks for those devices from being
      run during system suspend and resume which may not be appropriate,
      among other things.
      
      Also make ACPI device wakeup notification handling a bit more robust
      agaist subsequent removal of ACPI device objects, whould that ever
      happen, and create a wakeup source object for each ACPI device
      configured for wakeup so that wakeup notifications for those
      devices can wake up the system from the "freeze" sleep state.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c072530f
    • R
      ACPI / button: Do not propagate wakeup-from-suspend events · e71eeb2a
      Rafael J. Wysocki 提交于
      During system suspend mark ACPI buttons (other than the lid) as
      "suspended" and if in that state, report wakeup events on button
      events, but do not propagate those events up the stack.
      
      This prevents systems from being turned off after a button-triggered
      wakeup from the "freeze" sleep state.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=77611
      Tested-on: Acer Aspire S5, Toshiba Portege R500
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e71eeb2a
    • T
      acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI context. · 594c7255
      Tomasz Nowicki 提交于
      GHES currently maps two pages with atomic_ioremap.  From now
      on, NMI is architectural depended so there is no need to allocate
      an NMI page for platforms without NMI support.
      
      To make it possible to not use a second page, swap the existing
      page order so that the IRQ context page is first, and the optional
      NMI context page is second.  Then, use HAVE_ACPI_APEI_NMI to decide
      how many pages are to be allocated.
      Signed-off-by: NTomasz Nowicki <tomasz.nowicki@linaro.org>
      Acked-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      594c7255
    • T
      acpi, apei, ghes: Make NMI error notification to be GHES architecture extension. · 44a69f61
      Tomasz Nowicki 提交于
      Currently APEI depends on x86 architecture. It is because of NMI hardware
      error notification of GHES which is currently supported by x86 only.
      However, many other APEI features can be still used perfectly by other
      architectures.
      
      This commit adds two symbols:
      1. HAVE_ACPI_APEI for those archs which support APEI.
      2. HAVE_ACPI_APEI_NMI which is used for NMI code isolation in ghes.c
         file. NMI related data and functions are grouped so they can be wrapped
         inside one #ifdef section. Appropriate function stubs are provided for
         !NMI case.
      
      Note there is no functional changes for x86 due to hard selected
      HAVE_ACPI_APEI and HAVE_ACPI_APEI_NMI symbols.
      Signed-off-by: NTomasz Nowicki <tomasz.nowicki@linaro.org>
      Acked-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      44a69f61
    • T
      apei, mce: Factor out APEI architecture specific MCE calls. · 9dae3d0d
      Tomasz Nowicki 提交于
      This commit abstracts MCE calls and provides weak corresponding default
      implementation for those architectures which do not need arch specific
      actions. Each platform willing to do additional architectural actions
      should provides desired function definition. It allows us to avoid wrap
      code into #ifdef in generic code and prevent new platform from introducing
      dummy stub function too.
      
      Initially, there are two APEI arch-specific calls:
      - arch_apei_enable_cmcff()
      - arch_apei_report_mem_error()
      Both interact with MCE driver for X86 architecture.
      Signed-off-by: NTomasz Nowicki <tomasz.nowicki@linaro.org>
      Acked-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      9dae3d0d
  11. 21 7月, 2014 3 次提交