1. 12 3月, 2020 1 次提交
    • H
      x86: Select HARDIRQS_SW_RESEND on x86 · 17e5888e
      Hans de Goede 提交于
      Modern x86 laptops are starting to use GPIO pins as interrupts more
      and more, e.g. touchpads and touchscreens have almost all moved away
      from PS/2 and USB to using I2C with a GPIO pin as interrupt.
      Modern x86 laptops also have almost all moved to using s2idle instead
      of using the system S3 ACPI power state to suspend.
      
      The Intel and AMD pinctrl drivers do not define irq_retrigger handlers
      for the irqchips they register, this is causing edge triggered interrupts
      which happen while suspended using s2idle to get lost.
      
      One specific example of this is the lid switch on some devices, lid
      switches used to be handled by the embedded-controller, but now the
      lid open/closed sensor is sometimes directly connected to a GPIO pin.
      On most devices the ACPI code for this looks like this:
      
      Method (_E00, ...) {
      	Notify (LID0, 0x80) // Status Change
      }
      
      Where _E00 is an ACPI event handler for changes on both edges of the GPIO
      connected to the lid sensor, this event handler is then combined with an
      _LID method which directly reads the pin. When the device is resumed by
      opening the lid, the GPIO interrupt will wake the system, but because the
      pinctrl irqchip doesn't have an irq_retrigger handler, the Notify will not
      happen. This is not a problem in the case the _LID method directly reads
      the GPIO, because the drivers/acpi/button.c code will call _LID on resume
      anyways.
      
      But some devices have an event handler for the GPIO connected to the
      lid sensor which looks like this:
      
      Method (_E00, ...) {
      	if (LID_GPIO == One)
      		LIDS = One
      	else
      		LIDS = Zero
      	Notify (LID0, 0x80) // Status Change
      }
      
      And the _LID method returns the cached LIDS value, since on open we
      do not re-run the edge-interrupt handler when we re-enable IRQS on resume
      (because of the missing irq_retrigger handler), _LID now will keep
      reporting closed, as LIDS was never changed to reflect the open status,
      this causes userspace to re-resume the laptop again shortly after opening
      the lid.
      
      The Intel GPIO controllers do not allow implementing irq_retrigger without
      emulating it in software, at which point we are better of just using the
      generic HARDIRQS_SW_RESEND mechanism rather then re-implementing software
      emulation for this separately in aprox. 14 different pinctrl drivers.
      
      Select HARDIRQS_SW_RESEND to solve the problem of edge-triggered GPIO
      interrupts not being re-triggered on resume when they were triggered during
      suspend (s2idle) and/or when they were the cause of the wakeup.
      
      This requires
      
       008f1d60 ("x86/apic/vector: Force interupt handler invocation to irq context")
       c16816ac ("genirq: Add protection against unsafe usage of generic_handle_irq()")
      
      to protect the APIC based interrupts from being wreckaged by a software
      resend.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/20200123210242.53367-1-hdegoede@redhat.com
      17e5888e
  2. 04 2月, 2020 2 次提交
  3. 25 1月, 2020 1 次提交
  4. 24 1月, 2020 1 次提交
    • D
      x86/mpx: remove build infrastructure · 4ba68d00
      Dave Hansen 提交于
      From: Dave Hansen <dave.hansen@linux.intel.com>
      
      MPX is being removed from the kernel due to a lack of support
      in the toolchain going forward (gcc).
      
      Remove the Kconfig option and the Makefile line.  This makes
      arch/x86/mm/mpx.c and anything under an #ifdef for
      X86_INTEL_MPX dead code.
      
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: x86@kernel.org
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com>
      4ba68d00
  5. 20 1月, 2020 1 次提交
  6. 14 1月, 2020 1 次提交
    • D
      x86/vdso: Add time napespace page · 550a77a7
      Dmitry Safonov 提交于
      To support time namespaces in the VDSO with a minimal impact on regular non
      time namespace affected tasks, the namespace handling needs to be hidden in
      a slow path.
      
      The most obvious place is vdso_seq_begin(). If a task belongs to a time
      namespace then the VVAR page which contains the system wide VDSO data is
      replaced with a namespace specific page which has the same layout as the
      VVAR page. That page has vdso_data->seq set to 1 to enforce the slow path
      and vdso_data->clock_mode set to VCLOCK_TIMENS to enforce the time
      namespace handling path.
      
      The extra check in the case that vdso_data->seq is odd, e.g. a concurrent
      update of the VDSO data is in progress, is not really affecting regular
      tasks which are not part of a time namespace as the task is spin waiting
      for the update to finish and vdso_data->seq to become even again.
      
      If a time namespace task hits that code path, it invokes the corresponding
      time getter function which retrieves the real VVAR page, reads host time
      and then adds the offset for the requested clock which is stored in the
      special VVAR page.
      
      Allocate the time namespace page among VVAR pages and place vdso_data on
      it.  Provide __arch_get_timens_vdso_data() helper for VDSO code to get the
      code-relative position of VVARs on that special page.
      Co-developed-by: NAndrei Vagin <avagin@openvz.org>
      Signed-off-by: NAndrei Vagin <avagin@openvz.org>
      Signed-off-by: NDmitry Safonov <dima@arista.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/20191112012724.250792-23-dima@arista.com
      
      550a77a7
  7. 25 12月, 2019 1 次提交
  8. 18 12月, 2019 1 次提交
  9. 13 12月, 2019 1 次提交
  10. 12 12月, 2019 1 次提交
  11. 11 12月, 2019 1 次提交
  12. 10 12月, 2019 1 次提交
  13. 02 12月, 2019 1 次提交
  14. 25 11月, 2019 1 次提交
  15. 17 11月, 2019 1 次提交
    • A
      int128: move __uint128_t compiler test to Kconfig · c12d3362
      Ard Biesheuvel 提交于
      In order to use 128-bit integer arithmetic in C code, the architecture
      needs to have declared support for it by setting ARCH_SUPPORTS_INT128,
      and it requires a version of the toolchain that supports this at build
      time. This is why all existing tests for ARCH_SUPPORTS_INT128 also test
      whether __SIZEOF_INT128__ is defined, since this is only the case for
      compilers that can support 128-bit integers.
      
      Let's fold this additional test into the Kconfig declaration of
      ARCH_SUPPORTS_INT128 so that we can also use the symbol in Makefiles,
      e.g., to decide whether a certain object needs to be included in the
      first place.
      
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c12d3362
  16. 16 11月, 2019 3 次提交
  17. 15 11月, 2019 1 次提交
  18. 13 11月, 2019 1 次提交
  19. 11 11月, 2019 1 次提交
    • N
      x86/PCI: sta2x11: use default DMA address translation · e380a039
      Nicolas Saenz Julienne 提交于
      The devices found behind this PCIe chip have unusual DMA mapping
      constraints as there is an AMBA interconnect placed in between them and
      the different PCI endpoints. The offset between physical memory
      addresses and AMBA's view is provided by reading a PCI config register,
      which is saved and used whenever DMA mapping is needed.
      
      It turns out that this DMA setup can be represented by properly setting
      'dma_pfn_offset', 'dma_bus_mask' and 'dma_mask' during the PCI device
      enable fixup. And ultimately allows us to get rid of this device's
      custom DMA functions.
      
      Aside from the code deletion and DMA setup, sta2x11_pdev_to_mapping() is
      moved to avoid warnings whenever CONFIG_PM is not enabled.
      Signed-off-by: NNicolas Saenz Julienne <nsaenzjulienne@suse.de>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      e380a039
  20. 07 11月, 2019 1 次提交
  21. 28 10月, 2019 1 次提交
  22. 18 10月, 2019 1 次提交
  23. 03 10月, 2019 1 次提交
  24. 16 9月, 2019 1 次提交
  25. 22 8月, 2019 1 次提交
  26. 20 8月, 2019 1 次提交
  27. 12 8月, 2019 1 次提交
  28. 09 8月, 2019 1 次提交
  29. 30 7月, 2019 1 次提交
  30. 17 7月, 2019 2 次提交
  31. 15 7月, 2019 2 次提交
  32. 13 7月, 2019 2 次提交
  33. 04 7月, 2019 1 次提交
  34. 28 6月, 2019 1 次提交