From: Conor Dooley <conor@kernel.org>
To: Jianwen Jiang <jiangjianwen@uniontech.com>
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, alexandre.ghiti@canonical.com,
geert@linux-m68k.org, panqinglin2020@iscas.ac.cn, arnd@arndb.de,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Implement ioremap_prot support (v2)
Date: Fri, 2 Dec 2022 10:36:07 +0000 [thread overview]
Message-ID: <Y4nVF9sDckD6cNug@spud> (raw)
In-Reply-To: <20221202083356.169176-1-jiangjianwen@uniontech.com>
[-- Attachment #1: Type: text/plain, Size: 2847 bytes --]
Hello!
On Fri, Dec 02, 2022 at 04:33:56PM +0800, Jianwen Jiang wrote:a
> [PATCH] Implement ioremap_prot support (v2)
Some process bits.. Please put the v2 inside the leading [], git
format-patch will do this for you with the `-v N` arg. Also, please add
a subsytem prefix to the $subject & drop the leading spaces.
> Feature ioremap_prot only needs an implementation of pte_pgprot on riscv.
There's also no need to tab this stuff in
> That macro is similar to the same one on platform loongarch, mips and sh.
> We just need:
> 1. replace _PFN_MASK with _PAGE_PFN_MASK in pte_gpprot;
> 2. add "select HAVE_IOREMAP_PROT" into arch/riscv/Kconfig;
> 3. add "depends on MMU" into drivers/fpga/Kconfig to fix the building error "undefined reference to generic_access_phys".
>
> Signed-off-by: Jianwen Jiang <jiangjianwen@uniontech.com>
And this line should not be tabbed in.
> ---
> arch/riscv/Kconfig | 1 +
> arch/riscv/include/asm/page.h | 2 ++
> drivers/fpga/Kconfig | 1 +
This needs to go as a separate patch to the FPGA subsystem, with the
FPGA maintainers in to/cc.
> 3 files changed, 4 insertions(+)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index fa78595a6089..5ed2c7361040 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -95,6 +95,7 @@ config RISCV
> select HAVE_FUNCTION_ERROR_INJECTION
> select HAVE_GCC_PLUGINS
> select HAVE_GENERIC_VDSO if MMU && 64BIT
> + select HAVE_IOREMAP_PROT
> select HAVE_IRQ_TIME_ACCOUNTING
> select HAVE_KPROBES if !XIP_KERNEL
> select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL
> diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h
> index ac70b0fd9a9a..cb08a4911d60 100644
> --- a/arch/riscv/include/asm/page.h
> +++ b/arch/riscv/include/asm/page.h
> @@ -84,6 +84,8 @@ typedef struct page *pgtable_t;
> #define __pgd(x) ((pgd_t) { (x) })
> #define __pgprot(x) ((pgprot_t) { (x) })
>
> +#define pte_pgprot(x) __pgprot(pte_val(x) & ~_PAGE_PFN_MASK)
> +
> #ifdef CONFIG_64BIT
> #define PTE_FMT "%016lx"
> #else
> diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
> index bbe0a7cabb75..0493272b8bff 100644
> --- a/drivers/fpga/Kconfig
> +++ b/drivers/fpga/Kconfig
> @@ -5,6 +5,7 @@
>
> menuconfig FPGA
> tristate "FPGA Configuration Framework"
> + depends on MMU
How come no other arch needs this dependancy?
Thanks,
Conor.
> help
> Say Y here if you want support for configuring FPGAs from the
> kernel. The FPGA framework adds an FPGA manager class and FPGA
> --
> 2.37.3.446.gd42b38dfb5
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-12-02 10:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 8:33 [PATCH] Implement ioremap_prot support (v2) Jianwen Jiang
2022-12-02 10:36 ` Conor Dooley [this message]
2022-12-02 14:59 ` Palmer Dabbelt
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=Y4nVF9sDckD6cNug@spud \
--to=conor@kernel.org \
--cc=alexandre.ghiti@canonical.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=geert@linux-m68k.org \
--cc=jiangjianwen@uniontech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=panqinglin2020@iscas.ac.cn \
--cc=paul.walmsley@sifive.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