1. 14 Jan, 2015 4 commits
  2. 13 Jan, 2015 12 commits
  3. 12 Jan, 2015 12 commits
    • Juergen Gross's avatar
      xen: check for zero sized area when invalidating memory · 9a17ad7f
      Juergen Gross authored
      With the introduction of the linear mapped p2m list setting memory
      areas to "invalid" had to be delayed. When doing the invalidation
      make sure no zero sized areas are processed.
      Signed-off-by: default avatarJuegren Gross <jgross@suse.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      9a17ad7f
    • Juergen Gross's avatar
      xen: use correct type for physical addresses · e86f9496
      Juergen Gross authored
      When converting a pfn to a physical address be sure to use 64 bit
      wide types or convert the physical address to a pfn if possible.
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Tested-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      e86f9496
    • Juergen Gross's avatar
      xen: correct race in alloc_p2m_pmd() · f241b0b8
      Juergen Gross authored
      When allocating a new pmd for the linear mapped p2m list a check is
      done for not introducing another pmd when this just happened on
      another cpu. In this case the old pte pointer was returned which
      points to the p2m_missing or p2m_identity page. The correct value
      would be the pointer to the found new page.
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      f241b0b8
    • Juergen Gross's avatar
      xen: correct error for building p2m list on 32 bits · 82c92ed1
      Juergen Gross authored
      In xen_rebuild_p2m_list() for large areas of invalid or identity
      mapped memory the pmd entries on 32 bit systems are initialized
      wrong. Correct this error.
      Suggested-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      82c92ed1
    • Adrian Hunter's avatar
      mmc: sdhci-pci: Add support for Intel SPT · 1f7f2652
      Adrian Hunter authored
      Add PCI IDs for SPT eMMC, SDIO and SD card.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      1f7f2652
    • Adrian Hunter's avatar
      mmc: sdhci-acpi: Add ACPI HID INT344D · d0ed8e6b
      Adrian Hunter authored
      Add ACPI HID INT344D for an Intel SDIO host controller.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      d0ed8e6b
    • Krzysztof Kozlowski's avatar
      mmc: sdhci: Fix sleep in atomic after inserting SD card · 2836766a
      Krzysztof Kozlowski authored
      Sleep in atomic context happened on Trats2 board after inserting or
      removing SD card because mmc_gpio_get_cd() was called under spin lock.
      
      Fix this by moving card detection earlier, before acquiring spin lock.
      The mmc_gpio_get_cd() call does not have to be protected by spin lock
      because it does not access any sdhci internal data.
      The sdhci_do_get_cd() call access host flags (SDHCI_DEVICE_DEAD). After
      moving it out side of spin lock it could theoretically race with driver
      removal but still there is no actual protection against manual card
      eject.
      
      Dmesg after inserting SD card:
      [   41.663414] BUG: sleeping function called from invalid context at drivers/gpio/gpiolib.c:1511
      [   41.670469] in_atomic(): 1, irqs_disabled(): 128, pid: 30, name: kworker/u8:1
      [   41.677580] INFO: lockdep is turned off.
      [   41.681486] irq event stamp: 61972
      [   41.684872] hardirqs last  enabled at (61971): [<c0490ee0>] _raw_spin_unlock_irq+0x24/0x5c
      [   41.693118] hardirqs last disabled at (61972): [<c04907ac>] _raw_spin_lock_irq+0x18/0x54
      [   41.701190] softirqs last  enabled at (61648): [<c0026fd4>] __do_softirq+0x234/0x2c8
      [   41.708914] softirqs last disabled at (61631): [<c00273a0>] irq_exit+0xd0/0x114
      [   41.716206] Preemption disabled at:[<  (null)>]   (null)
      [   41.721500]
      [   41.722985] CPU: 3 PID: 30 Comm: kworker/u8:1 Tainted: G        W      3.18.0-rc5-next-20141121 #883
      [   41.732111] Workqueue: kmmcd mmc_rescan
      [   41.735945] [<c0014d2c>] (unwind_backtrace) from [<c0011c80>] (show_stack+0x10/0x14)
      [   41.743661] [<c0011c80>] (show_stack) from [<c0489d14>] (dump_stack+0x70/0xbc)
      [   41.750867] [<c0489d14>] (dump_stack) from [<c0228b74>] (gpiod_get_raw_value_cansleep+0x18/0x30)
      [   41.759628] [<c0228b74>] (gpiod_get_raw_value_cansleep) from [<c03646e8>] (mmc_gpio_get_cd+0x38/0x58)
      [   41.768821] [<c03646e8>] (mmc_gpio_get_cd) from [<c036d378>] (sdhci_request+0x50/0x1a4)
      [   41.776808] [<c036d378>] (sdhci_request) from [<c0357934>] (mmc_start_request+0x138/0x268)
      [   41.785051] [<c0357934>] (mmc_start_request) from [<c0357cc8>] (mmc_wait_for_req+0x58/0x1a0)
      [   41.793469] [<c0357cc8>] (mmc_wait_for_req) from [<c0357e68>] (mmc_wait_for_cmd+0x58/0x78)
      [   41.801714] [<c0357e68>] (mmc_wait_for_cmd) from [<c0361c00>] (mmc_io_rw_direct_host+0x98/0x124)
      [   41.810480] [<c0361c00>] (mmc_io_rw_direct_host) from [<c03620f8>] (sdio_reset+0x2c/0x64)
      [   41.818641] [<c03620f8>] (sdio_reset) from [<c035a3d8>] (mmc_rescan+0x254/0x2e4)
      [   41.826028] [<c035a3d8>] (mmc_rescan) from [<c003a0e0>] (process_one_work+0x180/0x3f4)
      [   41.833920] [<c003a0e0>] (process_one_work) from [<c003a3bc>] (worker_thread+0x34/0x4b0)
      [   41.841991] [<c003a3bc>] (worker_thread) from [<c003fed8>] (kthread+0xe4/0x104)
      [   41.849285] [<c003fed8>] (kthread) from [<c000f268>] (ret_from_fork+0x14/0x2c)
      [   42.038276] mmc0: new high speed SDHC card at address 1234
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Fixes: 94144a46 ("mmc: sdhci: add get_cd() implementation")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      2836766a
    • Thomas Petazzoni's avatar
      mmc: sdhci-pxav3: do the mbus window configuration after enabling clocks · aa8165f9
      Thomas Petazzoni authored
      In commit 5491ce3f ("mmc: sdhci-pxav3: add support for the Armada
      38x SDHCI controller"), the sdhci-pxav3 driver was extended to include
      support for the SDHCI controller found in the Armada 38x
      processor. This mainly involved adding some MBus window related
      configuration.
      
      However, this configuration is currently done too early in ->probe():
      it is done before clocks are enabled, while this configuration
      involves touching the registers of the controller, which will hang the
      SoC if the clock is disabled. It wasn't noticed until now because the
      bootloader typically leaves gatable clocks enabled, but in situations
      where we have a deferred probe (due to a CD GPIO that cannot be taken,
      for example), then the probe will be re-tried later, after a clock
      disable has been done in the exit path of the failed probe attempt of
      the device. This second probe() will hang the system due to the clock
      being disabled.
      
      This can for example be produced on Armada 385 GP, which has a CD GPIO
      connected to an I2C PCA9555. If the driver for the PCA9555 is not
      compiled into the kernel, then we will have the following sequence of
      events:
      
        1. The SDHCI probes
        2. It does the MBus configuration (which works, because the clock is
           left enabled by the bootloader)
        3. It enables the clock
        4. It tries to get the CD GPIO, which fails due to the driver being
           missing, so -EPROBE_DEFER is returned.
        5. Before returning -EPROBE_DEFER, the driver cleans up what was
           done, which includes disabling the clock.
        6. Later on, the SDHCI probe is tried again.
        7. It does the MBus configuration, which hangs because the clock is
           no longer enabled.
      
      This commit does the obvious fix of doing the MBus configuration after
      the clock has been enabled by the driver.
      
      Fixes: 5491ce3f ("mmc: sdhci-pxav3: add support for the Armada 38x SDHCI controller")
      Cc: <stable@vger.kernel.org> # v3.15+
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      aa8165f9
    • Adrian Hunter's avatar
      mmc: sdhci: Disable re-tuning for HS400 · b5540ce1
      Adrian Hunter authored
      Re-tuning for HS400 mode must be done in HS200
      mode. Currently there is no support for that.
      That needs to be reflected in the code.
      Specifically, if tuning is executed in HS400 mode
      then return an error, and do not start the
      tuning timer if HS200 tuning is being done prior
      to switching to HS400.
      
      Note that periodic re-tuning is not expected
      to be needed for HS400 but re-tuning is still
      needed after the host controller has lost power.
      In the case of suspend/resume that is not necessary
      because the card is fully re-initialised. That
      just leaves runtime suspend/resume with no support
      for HS400 re-tuning.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      b5540ce1
    • Adrian Hunter's avatar
      mmc: sdhci: Simplify use of tuning timer · 38e40bf5
      Adrian Hunter authored
      The tuning timer is always used if the tuning mode
      is 1 and there is a tuning count, irrespective of
      whether this is the first call, or any subsequent
      call. Consequently the logic to start the timer
      can be simplified.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      38e40bf5
    • Adrian Hunter's avatar
      mmc: sdhci: Add out_unlock to sdhci_execute_tuning · d519c863
      Adrian Hunter authored
      A 'goto' can be used to save duplicating unlocking
      and returning.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      d519c863
    • Adrian Hunter's avatar
      mmc: sdhci: Tuning should not change max_blk_count · ac00531d
      Adrian Hunter authored
      Re-tuning requires that the maximum data length
      is limited to 4MiB. The code currently changes
      max_blk_count in an attempt to achieve that.
      This is wrong because max_blk_count is a different
      limit, but it is also un-necessary because
      max_req_size is 512KiB anyway. Consequently, the
      changes to max_blk_count are removed and the
      comment for max_req_size adjusted accordingly.
      The comment is also tweaked to show that the 512KiB
      limit is a SDMA limit not an ADMA limit.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      ac00531d
  4. 11 Jan, 2015 9 commits
  5. 10 Jan, 2015 3 commits