From: Olga Kitaina <okitain@elvees.com>
To: linux-kernel@vger.kernel.org
Subject: using ioremap() memory in dma_map_sg()
Date: Mon, 19 Nov 2018 19:02:22 +0300 [thread overview]
Message-ID: <1de01d9e-7cf4-5803-be65-e24a6c5e30c6@elvees.com> (raw)
Hi.
As part of our driver, we want to have some device memory to be
available to other devices via the DMA-BUF subsystem. The device memory
is managed by genpool, and mapped from the sram driver via ioremap_wc().
We initially used sg_set_buf() with the virtual address returned from
gen_pool_dma_alloc(), but it seems like the wrong thing to do, since the
virt_addr_valid() check fails. Attempting to use vmalloc_to_page()
results in a failure down the line, such as:
Unable to handle kernel paging request at virtual address ba405000
Backtrace:
(dma_cache_maint_page) from (__dma_page_dev_to_cpu+0x88/0x108)
(__dma_page_dev_to_cpu) from (arm_dma_map_page+0x5c/0x60)
(arm_dma_unmap_page) from (arm_dma_map_sg+0x64/0x8c)
(arm_dma_unmap_sg) from(foo_dmabuf_map+0x60/0x8c [foo])
Is there an appropriate way to put an ioremapped buffer into an SG table?
Thanks,
Olga.
next reply other threads:[~2018-11-19 16:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 16:02 Olga Kitaina [this message]
2018-11-22 11:28 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1de01d9e-7cf4-5803-be65-e24a6c5e30c6@elvees.com \
--to=okitain@elvees.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®