diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2014-11-17 09:14:32 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-24 18:58:08 +0000 |
commit | 9e8987acf051e48fc0e228b6f38c47a75352c58b (patch) | |
tree | 5717c3a7539baa4e4810a62f43970d0077f40b7f /Documentation/devicetree | |
parent | 617100c2711691e07728d3201fbcfa845a7c36d5 (diff) |
spi: spi-mxs: Fix mapping from vmalloc-ed buffer to scatter list
We can only use page_address on memory that has been mapped using kmap,
when the buffer passed to the SPI has been allocated by vmalloc the page
has not necessarily been mapped through kmap. This means sometimes
page_address will return NULL causing the pointer we pass to sg_init_one
to be invalid. Currently, this issue doesn't show up on the MXS
architecture as the defconfig defines CONFIG_HIGHMEM=n which means all
pages are mapped. For the sake of robustness though it is best to
correct the issue.
As we only call page_address so that we can pass a virtual address to
sg_init_one which will eventually call virt_to_page on it, fix this
by calling sg_set_page directly rather then relying on the sg_init_one
helper.
Note this patch is only build tested as I don't have an MXS system to
test on.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree')
0 files changed, 0 insertions, 0 deletions