From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org, linux-mm@kvack.org
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
willy@infradead.org, "Saeed Mahameed" <saeedm@mellanox.com>,
"Jesper Dangaard Brouer" <brouer@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
mgorman@techsingularity.net,
"David S. Miller" <davem@davemloft.net>,
"Tariq Toukan" <tariqt@mellanox.com>
Subject: [net-next PATCH 1/2] mm: add dma_addr_t to struct page
Date: Mon, 11 Feb 2019 17:06:46 +0100 [thread overview]
Message-ID: <154990120685.24530.15350136329514629029.stgit@firesoul> (raw)
In-Reply-To: <154990116432.24530.10541030990995303432.stgit@firesoul>
The page_pool API is using page->private to store DMA addresses.
As pointed out by David Miller we can't use that on 32-bit architectures
with 64-bit DMA
This patch adds a new dma_addr_t struct to allow storing DMA addresses
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
include/linux/mm_types.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 2c471a2c43fa..3060700752cc 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -95,6 +95,14 @@ struct page {
*/
unsigned long private;
};
+ struct { /* page_pool used by netstack */
+ /**
+ * @dma_addr: Page_pool need to store DMA-addr, and
+ * cannot use @private, as DMA-mappings can be 64-bit
+ * even on 32-bit Architectures.
+ */
+ dma_addr_t dma_addr; /* Shares area with @lru */
+ };
struct { /* slab, slob and slub */
union {
struct list_head slab_list; /* uses lru */
next prev parent reply other threads:[~2019-02-11 16:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 16:06 [net-next PATCH 0/2] Fix page_pool API and dma address storage Jesper Dangaard Brouer
2019-02-11 16:06 ` Jesper Dangaard Brouer [this message]
2019-02-11 16:55 ` [net-next PATCH 1/2] mm: add dma_addr_t to struct page Matthew Wilcox
2019-02-12 10:06 ` Jesper Dangaard Brouer
2019-02-11 20:16 ` Andrew Morton
2019-02-12 8:28 ` Jesper Dangaard Brouer
2019-02-11 16:06 ` [net-next PATCH 2/2] net: page_pool: don't use page->private to store dma_addr_t Jesper Dangaard Brouer
2019-02-11 19:31 ` Alexander Duyck
2019-02-12 8:23 ` Jesper Dangaard Brouer
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=154990120685.24530.15350136329514629029.stgit@firesoul \
--to=brouer@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=ilias.apalodimas@linaro.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=tariqt@mellanox.com \
--cc=toke@toke.dk \
--cc=willy@infradead.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