1. 11 Dec, 2018 3 commits
    • Robin Murphy's avatar
      dma-debug: Dynamically expand the dma_debug_entry pool · 2b9d9ac0
      Robin Murphy authored
      Certain drivers such as large multi-queue network adapters can use pools
      of mapped DMA buffers larger than the default dma_debug_entry pool of
      65536 entries, with the result that merely probing such a device can
      cause DMA debug to disable itself during boot unless explicitly given an
      appropriate "dma_debug_entries=..." option.
      
      Developers trying to debug some other driver on such a system may not be
      immediately aware of this, and at worst it can hide bugs if they fail to
      realise that dma-debug has already disabled itself unexpectedly by the
      time their code of interest gets to run. Even once they do realise, it
      can be a bit of a pain to emprirically determine a suitable number of
      preallocated entries to configure, short of massively over-allocating.
      
      There's really no need for such a static limit, though, since we can
      quite easily expand the pool at runtime in those rare cases that the
      preallocated entries are insufficient, which is arguably the least
      surprising and most useful behaviour. To that end, refactor the
      prealloc_memory() logic a little bit to generalise it for runtime
      reallocations as well.
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Tested-by: default avatarQian Cai <cai@lca.pw>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      2b9d9ac0
    • Robin Murphy's avatar
      dma-debug: Use pr_fmt() · f737b095
      Robin Murphy authored
      Use pr_fmt() to generate the "DMA-API: " prefix consistently. This
      results in it being added to a couple of pr_*() messages which were
      missing it before, and for the err_printk() calls moves it to the actual
      start of the message instead of somewhere in the middle.
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Tested-by: default avatarQian Cai <cai@lca.pw>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      f737b095
    • Robin Murphy's avatar
      dma-debug: Expose nr_total_entries in debugfs · 9f191555
      Robin Murphy authored
      Expose nr_total_entries in debugfs, so that {num,min}_free_entries
      become even more meaningful to users interested in current/maximum
      utilisation. This becomes even more relevant once nr_total_entries
      may change at runtime beyond just the existing AMD GART debug code.
      Suggested-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Tested-by: default avatarQian Cai <cai@lca.pw>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      9f191555
  2. 06 Dec, 2018 24 commits
  3. 05 Dec, 2018 1 commit
  4. 01 Dec, 2018 9 commits
  5. 27 Nov, 2018 2 commits
  6. 26 Nov, 2018 1 commit