1. 24 2月, 2019 1 次提交
  2. 23 2月, 2019 6 次提交
    • H
      i2c: designware: Do not allow i2c_dw_xfer() calls while suspended · 27515415
      Hans de Goede 提交于
      On most Intel Bay- and Cherry-Trail systems the PMIC is connected over I2C
      and the PMIC is accessed through various means by the _PS0 and _PS3 ACPI
      methods (power on / off methods) of various devices.
      
      This leads to suspend/resume ordering problems where a device may be
      resumed and get its _PS0 method executed before the I2C controller is
      resumed. On Cherry Trail this leads to errors like these:
      
           i2c_designware 808622C1:06: controller timed out
           ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion]
           ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR
           video LNXVIDEO:00: Failed to change power state to D0
      
      But on Bay Trail this caused I2C reads to seem to succeed, but they end
      up returning wrong data, which ends up getting written back by the typical
      read-modify-write cycle done to turn on various power-resources.
      
      Debugging the problems caused by this silent data corruption is quite
      nasty. This commit adds a check which disallows i2c_dw_xfer() calls to
      happen until the controller's resume method has completed.
      
      Which turns the silent data corruption into getting these errors in
      dmesg instead:
      
          i2c_designware 80860F41:04: Error i2c_dw_xfer call while suspended
          ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion]
          ACPI Error: Method parse/execution failed \_SB.PCI0.GFX0._PS0, AE_ERROR
      
      Which is much better.
      
      Note the above errors are an example of issues which this patch will
      help to debug, the actual fix requires fixing the suspend order and
      this has been fixed by a different commit.
      
      Note the setting / clearing of the suspended flag in the suspend / resume
      methods is NOT protected by i2c_lock_bus(). This is intentional as these
      methods get called from i2c_dw_xfer() (through pm_runtime_get/put) a nd
      i2c_dw_xfer() is called with the i2c_bus_lock held, so otherwise we would
      deadlock. This means that there is a theoretical race between a non runtime
      suspend and the suspended check in i2c_dw_xfer(), this is not a problem
      since normally we should not hit the race and this check is primarily a
      debugging tool so hitting the check if there are suspend/resume ordering
      problems does not need to be 100% reliable.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      27515415
    • J
      i2c: tegra: Only display error messages if DMA setup fails · 89328b1b
      Jonathan Hunter 提交于
      Commit 86c92b99 ("i2c: tegra: Add DMA support") added DMA support
      to the Tegra I2C driver for Tegra devices that support the APB DMA
      controller. One side-effect of this change is that even for Tegra
      devices that do not have an APB DMA controller and hence, cannot
      support DMA tranfers for I2C transactions, the following error messages
      are still displayed ...
      
       ERR KERN tegra-i2c 31c0000.i2c: cannot use DMA: -19
       ERR KERN tegra-i2c 31c0000.i2c: falling back to PIO
      
      There is no point displaying the above messages for devices that do not
      have an APB DMA controller and so fix this by returning from the
      tegra_i2c_init_dma() function if 'has_apb_dma' is not true.
      
      Furthermore, if CONFIG_TEGRA20_APB_DMA is not set, then rather than
      printing an error message, print an debug message as for whatever reason
      this could be intentional.
      
      Fixes: 86c92b99 ("i2c: tegra: Add DMA support")
      Signed-off-by: NJonathan Hunter <jonathanh@nvidia.com>
      Reviewed-by: NDmitry Osipenko <digetx@gmail.com>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      89328b1b
    • W
      i2c: gpio: fault-injector: add 'inject_panic' injector · bb6bdd51
      Wolfram Sang 提交于
      Add a fault injector simulating a Kernel panic happening after starting
      a transfer. Read the docs for its usage.
      Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      bb6bdd51
    • W
      i2c: gpio: fault-injector: add 'lose_arbitration' injector · 63e57b6f
      Wolfram Sang 提交于
      Add a fault injector simulating 'arbitration lost' from multi-master
      setups. Read the docs for its usage.
      
      A helper function for future fault injectors using SCL interrupts is
      created to achieve this.
      Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      63e57b6f
    • S
      i2c: tegra: remove multi-master support · 6b9932bc
      Sowjanya Komatineni 提交于
      Multi-master support is defeatured on Tegra210 and Tegra186 due to
      known bugs.
      
      This patch removes multi-master support for Tegra210 and Tegra186
      I2C HW feature.
      Acked-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NSowjanya Komatineni <skomatineni@nvidia.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      6b9932bc
    • S
      i2c: tegra: remove master fifo support on tegra186 · 9ffc125c
      Sowjanya Komatineni 提交于
      Tegra186 does not have master FIFO  control register and instead
      uses FIFO control register like prior Tegra chipset.
      
      This patch fixes this and prevents crashing during boot when
      accessing FIFO control registers.
      Acked-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NSowjanya Komatineni <skomatineni@nvidia.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      9ffc125c
  3. 16 2月, 2019 1 次提交
  4. 15 2月, 2019 19 次提交
  5. 14 2月, 2019 4 次提交
  6. 11 2月, 2019 6 次提交
  7. 10 2月, 2019 3 次提交
    • J
      x86/mm: Make set_pmd_at() paravirt aware · 20e55bc1
      Juergen Gross 提交于
      set_pmd_at() calls native_set_pmd() unconditionally on x86. This was
      fine as long as only huge page entries were written via set_pmd_at(),
      as Xen pv guests don't support those.
      
      Commit 2c91bd4a ("mm: speed up mremap by 20x on large regions")
      introduced a usage of set_pmd_at() possible on pv guests, leading to
      failures like:
      
      BUG: unable to handle kernel paging request at ffff888023e26778
      #PF error: [PROT] [WRITE]
      RIP: e030:move_page_tables+0x7c1/0xae0
      move_vma.isra.3+0xd1/0x2d0
      __se_sys_mremap+0x3c6/0x5b0
       do_syscall_64+0x49/0x100
      entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Make set_pmd_at() paravirt aware by just letting it use set_pmd().
      
      Fixes: 2c91bd4a ("mm: speed up mremap by 20x on large regions")
      Reported-by: NSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: xen-devel@lists.xenproject.org
      Cc: boris.ostrovsky@oracle.com
      Cc: sstabellini@kernel.org
      Cc: hpa@zytor.com
      Cc: bp@alien8.de
      Cc: torvalds@linux-foundation.org
      Link: https://lkml.kernel.org/r/20190210074056.11842-1-jgross@suse.com
      20e55bc1
    • L
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · df3865f8
      Linus Torvalds 提交于
      Pull i2c fixes from Wolfram Sang:
       "One PM related driver bugfix and a MAINTAINERS update"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        MAINTAINERS: Update the ocores i2c bus driver maintainer, etc
        i2c: omap: Use noirq system sleep pm ops to idle device for suspend
      df3865f8
    • L
      Merge tag 'mips_fixes_5.0_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · e8b50608
      Linus Torvalds 提交于
      Pull MIPS fixes from Paul Burton:
       "A batch of MIPS fixes for 5.0, nothing too scary.
      
         - A workaround for a Loongson 3 CPU bug is the biggest change, but
           still fairly straightforward. It adds extra memory barriers (sync
           instructions) around atomics to avoid a CPU bug that can break
           atomicity.
      
         - Loongson64 also sees a fix for powering off some systems which
           would incorrectly reboot rather than waiting for the power down
           sequence to complete.
      
         - We have DT fixes for the Ingenic JZ4740 SoC & the JZ4780-based Ci20
           board, and a DT warning fix for the Nexsys4/MIPSfpga board.
      
         - The Cavium Octeon platform sees a further fix to the behaviour of
           the pcie_disable command line argument that was introduced in v3.3.
      
         - The VDSO, introduced in v4.4, sees build fixes for configurations
           of GCC that were built using the --with-fp-32= flag to specify a
           default 32-bit floating point ABI.
      
         - get_frame_info() sees a fix for configurations with
           CONFIG_KALLSYMS=n, for which it previously always returned an
           error.
      
         - If the MIPS Coherence Manager (CM) reports an error then we'll now
           clear that error correctly so that the GCR_ERROR_CAUSE register
           will be updated with information about any future errors"
      
      * tag 'mips_fixes_5.0_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        mips: cm: reprime error cause
        mips: loongson64: remove unreachable(), fix loongson_poweroff().
        MIPS: Remove function size check in get_frame_info()
        MIPS: Use lower case for addresses in nexys4ddr.dts
        MIPS: Loongson: Introduce and use loongson_llsc_mb()
        MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds
        MIPS: VDSO: Use same -m%-float cflag as the kernel proper
        MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled
        DTS: CI20: Fix bugs in ci20's device tree.
        MIPS: DTS: jz4740: Correct interrupt number of DMA core
      e8b50608