forked from luck/tmp_suning_uos_patched
dma/debug: Simplify stracktrace retrieval
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: iommu@lists.linux-foundation.org Cc: Robin Murphy <robin.murphy@arm.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Alexander Potapenko <glider@google.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: linux-mm@kvack.org Cc: David Rientjes <rientjes@google.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: kasan-dev@googlegroups.com Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: Johannes Thumshirn <jthumshirn@suse.de> Cc: David Sterba <dsterba@suse.com> Cc: Chris Mason <clm@fb.com> Cc: Josef Bacik <josef@toxicpanda.com> Cc: linux-btrfs@vger.kernel.org Cc: dm-devel@redhat.com Cc: Mike Snitzer <snitzer@redhat.com> Cc: Alasdair Kergon <agk@redhat.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: intel-gfx@lists.freedesktop.org Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Tom Zanussi <tom.zanussi@linux.intel.com> Cc: Miroslav Benes <mbenes@suse.cz> Cc: linux-arch@vger.kernel.org Link: https://lkml.kernel.org/r/20190425094802.248658135@linutronix.de
This commit is contained in:
parent
30191250c2
commit
746017ed8d
|
@ -89,8 +89,8 @@ struct dma_debug_entry {
|
|||
int sg_mapped_ents;
|
||||
enum map_err_types map_err_type;
|
||||
#ifdef CONFIG_STACKTRACE
|
||||
struct stack_trace stacktrace;
|
||||
unsigned long st_entries[DMA_DEBUG_STACKTRACE_ENTRIES];
|
||||
unsigned int stack_len;
|
||||
unsigned long stack_entries[DMA_DEBUG_STACKTRACE_ENTRIES];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -174,7 +174,7 @@ static inline void dump_entry_trace(struct dma_debug_entry *entry)
|
|||
#ifdef CONFIG_STACKTRACE
|
||||
if (entry) {
|
||||
pr_warning("Mapped at:\n");
|
||||
print_stack_trace(&entry->stacktrace, 0);
|
||||
stack_trace_print(entry->stack_entries, entry->stack_len, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -704,12 +704,10 @@ static struct dma_debug_entry *dma_entry_alloc(void)
|
|||
spin_unlock_irqrestore(&free_entries_lock, flags);
|
||||
|
||||
#ifdef CONFIG_STACKTRACE
|
||||
entry->stacktrace.max_entries = DMA_DEBUG_STACKTRACE_ENTRIES;
|
||||
entry->stacktrace.entries = entry->st_entries;
|
||||
entry->stacktrace.skip = 1;
|
||||
save_stack_trace(&entry->stacktrace);
|
||||
entry->stack_len = stack_trace_save(entry->stack_entries,
|
||||
ARRAY_SIZE(entry->stack_entries),
|
||||
1);
|
||||
#endif
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user