From: Zong Li <zongbox@gmail.com>
To: palmer@sifive.com, aou@eecs.berkeley.edu
Cc: hch@infradead.org, zong@andestech.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Zong Li <zongbox@gmail.com>
Subject: [PATCH v3 2/5] RISC-V: Use swiotlb on RV64 only
Date: Tue, 2 Oct 2018 16:52:28 +0800 [thread overview]
Message-ID: <a2ae9d4b7cd1d97cafe8161ec28f46e4a7968776.1538470103.git.zongbox@gmail.com> (raw)
In-Reply-To: <cover.1538470103.git.zongbox@gmail.com>
Only RV64 supports swiotlb. On RV32, it don't select the SWIOTLB.
Signed-off-by: Zong Li <zong@andestech.com>
---
arch/riscv/kernel/setup.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index aee6031..6de6584 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -227,7 +227,10 @@ void __init setup_arch(char **cmdline_p)
setup_bootmem();
paging_init();
unflatten_device_tree();
+
+#ifdef CONFIG_SWIOTLB
swiotlb_init(1);
+#endif
#ifdef CONFIG_SMP
setup_smp();
--
2.7.4
next prev parent reply other threads:[~2018-10-02 8:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1538470103.git.zongbox@gmail.com>
2018-10-02 8:52 ` [PATCH v3 1/5] RISC-V: Build tishift only on 64-bit Zong Li
2018-10-02 14:47 ` Christoph Hellwig
2018-10-02 8:52 ` Zong Li [this message]
2018-10-02 14:47 ` [PATCH v3 2/5] RISC-V: Use swiotlb on RV64 only Christoph Hellwig
2018-10-02 8:52 ` [PATCH v3 3/5] lib: Add umoddi3 and udivmoddi4 of GCC library routines Zong Li
2018-10-02 14:50 ` Christoph Hellwig
2018-10-02 15:02 ` Palmer Dabbelt
2018-10-03 1:39 ` Zong Li
2018-10-02 8:52 ` [PATCH v3 4/5] RISC-V: Select GENERIC_LIB_UMODDI3 on RV32 Zong Li
2018-10-02 14:50 ` Christoph Hellwig
2018-10-02 8:52 ` [PATCH v3 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap Zong Li
2018-10-02 14:51 ` Christoph Hellwig
2018-10-03 3:26 ` Zong Li
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=a2ae9d4b7cd1d97cafe8161ec28f46e4a7968776.1538470103.git.zongbox@gmail.com \
--to=zongbox@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@sifive.com \
--cc=zong@andestech.com \
/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;
as well as URLs for NNTP newsgroup(s).