]> git.baikalelectronics.ru Git - kernel.git/commit
coresight: etb10: Print size of buffer we fail to allocate
authorMark Brown <broonie@kernel.org>
Fri, 10 Apr 2015 15:25:36 +0000 (09:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 May 2015 19:56:15 +0000 (12:56 -0700)
commit6df23863cebffdc99319bf2f41d90aeebab1ec72
tree82b6d5ea06aee74e002ed6f8acf96f0d0a487a7b
parent487f8369a912c26a52c8d6d80522bda1571046b7
coresight: etb10: Print size of buffer we fail to allocate

When we initialise the ETB driver we attempt to allocate a buffer suitable
for storing the data buffered in the hardware based on sizing information
reported by the hardware. Unfortunately if the hardware is not properly
configured (for example if power domains are not set up correctly) then we
may read back a nonsensically large value and therefore the allocation will
be too big to succeed. Print an error message showing the amount of memory
we tried to allocate if the buffer allocation fails to help users diagnose
such problems.

Normally it is bad practice to print an error message on memory allocation
failures since there are verbose core messages reported for this but in
this case where the allocation size might be incorrect it is a useful hint.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etb10.c