dma-direct: improve addressability error reporting
authorChristoph Hellwig <hch@lst.de>
Mon, 3 Dec 2018 06:43:05 +0000 (07:43 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 13 Dec 2018 20:06:15 +0000 (21:06 +0100)
commit58dfd4ac022037c6a562e92fc6d2a778819b2162
tree1512b1fca977f2d2e9daacb690150a3c4e339f80
parent68c608345cc569bcfa1c1b2add4c00c343ecf933
dma-direct: improve addressability error reporting

Only report report a DMA addressability report once to avoid spewing the
kernel log with repeated message.  Also provide a stack trace to make it
easy to find the actual caller that caused the problem.

Last but not least move the actual check into the fast path and only
leave the error reporting in a helper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Tony Luck <tony.luck@intel.com>
kernel/dma/direct.c