1. 21 12月, 2017 1 次提交
  2. 14 12月, 2017 1 次提交
    • M
      regmap: Disable debugfs when locking is disabled · 72465736
      Mark Brown 提交于
      The recently added support for disabling the regmap internal locking left
      debugfs enabled for devices with the locking disabled. This is a problem
      since debugfs allows userspace to do things like initiate reads from the
      hardware which will use the scratch buffers protected by the regmap locking
      so could cause data corruption.
      
      For safety address this by just disabling debugfs for these devices. That
      is overly conservative since some of the debugfs files just read internal
      data structures but it's much simpler to implmement and less likely to
      lead to problems with tooling that works with debugfs.
      Reported-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      72465736
  3. 09 8月, 2016 1 次提交
  4. 06 1月, 2016 1 次提交
  5. 01 10月, 2015 3 次提交
  6. 19 9月, 2015 3 次提交
  7. 07 8月, 2015 1 次提交
    • A
      regmap: debugfs: Fix misuse of IS_ENABLED · 1635e888
      Axel Lin 提交于
      IS_ENABLED should only be used for CONFIG_* symbols.
      
      I have done a small test:
        #define REGMAP_ALLOW_WRITE_DEBUGFS
        IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.
      
        #define REGMAP_ALLOW_WRITE_DEBUGFS 0
        IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.
      
        #define REGMAP_ALLOW_WRITE_DEBUGFS 1
        IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 1.
      
        #define REGMAP_ALLOW_WRITE_DEBUGFS 2
        IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.
      
      So fix the misuse of IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) and switch to
      use #if defined(REGMAP_ALLOW_WRITE_DEBUGFS) instead.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1635e888
  8. 21 7月, 2015 1 次提交
  9. 30 9月, 2014 1 次提交
  10. 28 9月, 2014 1 次提交
  11. 08 9月, 2014 1 次提交
  12. 26 8月, 2014 1 次提交
    • L
      regmap: Fix regcache debugfs initialization · 5e0cbe78
      Lars-Peter Clausen 提交于
      Commit 6cfec04b ("regmap: Separate regmap dev initialization") moved the
      regmap debugfs initialization after regcache initialization. This means
      that the regmap debugfs directory is not created yet when the cache
      initialization runs and so any debugfs files registered by the regcache are
      created in the debugfs root directory rather than the debugfs directory of
      the regmap instance. Fix this by adding a separate callback for the
      regcache debugfs initialization which will be called after the parent
      debugfs entry has been created.
      
      Fixes: 6cfec04b (regmap: Separate regmap dev initialization)
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Cc: stable@vger.kernel.org
      5e0cbe78
  13. 03 2月, 2014 1 次提交
  14. 24 10月, 2013 1 次提交
  15. 29 8月, 2013 1 次提交
    • L
      regmap: debugfs: Fix continued read from registers file · 26ee4741
      Lars-Peter Clausen 提交于
      The regmap_debugfs_get_dump_start() function maps from a file offset to the
      register that can be found at that position in the file. This is done using a
      look-up table. Commit d6814a7d ("regmap: debugfs: Suppress cache for partial
      register files") added a check to bypass the look-up table for partial register
      files, since the offsets in that table are only correct for the full register
      file. The check incorrectly uses the file offset instead of the register base
      address and returns it. This will cause the file offset to be interpreted as a
      register address which will result in a incorrect output from the registers file
      for all reads except at position 0.
      
      The issue can easily be reproduced by doing small reads the registers file, e.g.
      `dd if=registers bs=10 count=5`.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Cc: stable@vger.kernel.org
      26ee4741
  16. 27 7月, 2013 1 次提交
  17. 19 6月, 2013 1 次提交
  18. 14 5月, 2013 1 次提交
  19. 12 5月, 2013 2 次提交
  20. 04 3月, 2013 2 次提交
  21. 11 2月, 2013 3 次提交
  22. 08 2月, 2013 1 次提交
  23. 27 1月, 2013 1 次提交
    • R
      regmap: regmap: avoid spurious warning in regmap_read_debugfs · a3471469
      Russell King 提交于
      Gcc warns about the case where regmap_read_debugfs tries to walk an
      empty map->debugfs_off_cache list, which would results in uninitialized
      variable getting returned, if we hadn't checked the same condition
      just before that.
      
      After an originally suggested inferior patch from Arnd Bergmann,
      this is the solution that Russell King came up with, sidestepping
      the problem by merging the error case for an empty list with the
      normal path.
      
      Without this patch, building mxs_defconfig results in:
      
      drivers/base/regmap/regmap-debugfs.c: In function 'regmap_read_debugfs':
      drivers/base/regmap/regmap-debugfs.c:147:9: : warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
      Reported-by: NVincent Stehle <v-stehle@ti.com>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      a3471469
  24. 21 1月, 2013 1 次提交
  25. 16 1月, 2013 1 次提交
  26. 09 1月, 2013 5 次提交
  27. 11 12月, 2012 2 次提交