1. 12 Apr, 2016 5 commits
    • Arnd Bergmann's avatar
      mmc: sh_mmcif: rework dma channel handling · c045105c
      Arnd Bergmann authored
      commit 27cbd7e8 upstream.
      
      When compiling the sh_mmcif driver for ARM64, we currently
      get a harmless build warning:
      
      ../drivers/mmc/host/sh_mmcif.c: In function 'sh_mmcif_request_dma_one':
      ../drivers/mmc/host/sh_mmcif.c:417:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
          (void *)pdata->slave_id_tx :
          ^
      ../drivers/mmc/host/sh_mmcif.c:418:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
          (void *)pdata->slave_id_rx;
      
      This could be worked around by adding another cast to uintptr_t, but
      I decided to simplify the code a little more to avoid that. This
      splits out the platform data using code into a separate function
      and builds that only for CONFIG_SUPERH. This part still has a typecast
      but does not need a second one. The SH platform code could be further
      modified to pass a pointer directly as we do on other architectures
      when we have a filter function.
      
      The normal case is simplified further and now just calls
      dma_request_slave_channel() directly without going through the
      compat handling.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c045105c
    • Arnd Bergmann's avatar
      ASoC: samsung: pass DMA channels as pointers · e08f9a7c
      Arnd Bergmann authored
      commit b9a1a743 upstream.
      
      ARM64 allmodconfig produces a bunch of warnings when building the
      samsung ASoC code:
      
      sound/soc/samsung/dmaengine.c: In function 'samsung_asoc_init_dma_data':
      sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         playback_data->filter_data = (void *)playback->channel;
      sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         capture_data->filter_data = (void *)capture->channel;
      
      We could easily shut up the warning by adding an intermediate cast,
      but there is a bigger underlying problem: The use of IORESOURCE_DMA
      to pass data from platform code to device drivers is dubious to start
      with, as what we really want is a pointer that can be passed into
      a filter function.
      
      Note that on s3c64xx, the pl08x DMA data is already a pointer, but
      gets cast to resource_size_t so we can pass it as a resource, and it
      then gets converted back to a pointer. In contrast, the data we pass
      for s3c24xx is an index into a device specific table, and we artificially
      convert that into a pointer for the filter function.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e08f9a7c
    • Thierry Reding's avatar
      regulator: core: Fix nested locking of supplies · b1999fa6
      Thierry Reding authored
      commit 70a7fb80 upstream.
      
      Commit fa731ac7 ("regulator: core: avoid unused variable warning")
      introduced a subtle change in how supplies are locked. Where previously
      code was always locking the regulator of the current iteration, the new
      implementation only locks the regulator if it has a supply. For any
      given power tree that means that the root will never get locked.
      
      On the other hand the regulator_unlock_supply() will still release all
      the locks, which in turn causes the lock debugging code to warn about a
      mutex being unlocked which wasn't locked.
      
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Fixes: Fixes: fa731ac7 ("regulator: core: avoid unused variable warning")
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b1999fa6
    • Arnd Bergmann's avatar
      regulator: core: avoid unused variable warning · 4c8fe4f5
      Arnd Bergmann authored
      commit fa731ac7 upstream.
      
      The second argument of the mutex_lock_nested() helper is only
      evaluated if CONFIG_DEBUG_LOCK_ALLOC is set. Otherwise we
      get this build warning for the new regulator_lock_supply
      function:
      
      drivers/regulator/core.c: In function 'regulator_lock_supply':
      drivers/regulator/core.c:142:6: warning: unused variable 'i' [-Wunused-variable]
      
      To avoid the warning, this restructures the code to make it
      both simpler and to move the 'i++' outside of the mutex_lock_nested
      call, where it is now always used and the variable is not
      flagged as unused.
      
      We had some discussion about changing mutex_lock_nested to an
      inline function, which would make the code do the right thing here,
      but in the end decided against it, in order to guarantee that
      mutex_lock_nested() does not introduced overhead without
      CONFIG_DEBUG_LOCK_ALLOC.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 9f01cd4a ("regulator: core: introduce function to lock regulators and its supplies")
      Link: http://permalink.gmane.org/gmane.linux.kernel/2068900Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4c8fe4f5
    • Christian Borntraeger's avatar
      s390/cpumf: Fix lpp detection · 84cf91ad
      Christian Borntraeger authored
      commit 7a76aa95 upstream.
      
      we have to check bit 40 of the facility list before issuing LPP
      and not bit 48. Otherwise a guest running on a system with
      "The decimal-floating-point zoned-conversion facility" and without
      the "The set-program-parameters facility" might crash on an lpp
      instruction.
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Fixes: e22cf8ca ("s390/cpumf: rework program parameter setting to detect guest samples")
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      84cf91ad
  2. 16 Mar, 2016 35 commits