]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: raspberrypi: Fix firmware calls with large buffers
authorJames Hughes <james.hughes@raspberrypi.org>
Fri, 16 Nov 2018 14:39:07 +0000 (14:39 +0000)
committerStefan Wahren <stefan.wahren@i2se.com>
Sun, 18 Nov 2018 11:26:43 +0000 (12:26 +0100)
commitb2c4872e0400b325e0dbf807fb27e211337abbba
treee5ddf73117ed05b65973da735f92abc0e507bb86
parenta302a3caf656d7cd1b09ad3f85a8aab0d17291ff
firmware: raspberrypi: Fix firmware calls with large buffers

Commit e15d3825f6b1 ("firmware: raspberrypi: Remove VLA usage")
moved away from VLA's to a fixed maximum size for mailbox data.
However, some mailbox calls use larger data buffers
than the maximum allowed in that change. This fix therefor
moves from using fixed buffers to kmalloc to ensure all sizes
are catered for.

There is some documentation, which is somewhat out of date,
on the mailbox calls here :
https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface

Fixes: e15d3825f6b1 ("firmware: raspberrypi: Remove VLA usage")
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
drivers/firmware/raspberrypi.c