Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@gmail.com>
To: linux-riscv@lists.infradead.org
Cc: Pekka Enberg <penberg@kernel.org>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	aou@eecs.berkeley.edu, palmer@dabbelt.com,
	paul.walmsley@sifive.com
Subject: [RESEND PATCH] riscv: Move nommu pgprot_* macros to pgtable.h
Date: Tue, 30 Jun 2020 09:28:28 +0300	[thread overview]
Message-ID: <20200630062827.16589-1-penberg@gmail.com> (raw)

From: Pekka Enberg <penberg@kernel.org>

The mmio.h header file defines some pgprot macros for !CONFIG_MMU, but
pgtable.h seems like a better place for them.

Compile tested with defconfig + !CONFIG_MMU.

Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
Although the patche appeard on the mailing list, they never made it to
the inbox of some important folks such as maintainers... I assume the
reason is that "git-send-email" used "penberg@kernel.org" in the email
headers when it really was sent from "penberg@gmail.com".

 arch/riscv/include/asm/mmio.h    | 6 ------
 arch/riscv/include/asm/pgtable.h | 4 ++++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/riscv/include/asm/mmio.h b/arch/riscv/include/asm/mmio.h
index 56053c9838b2..aff6c33ab0c0 100644
--- a/arch/riscv/include/asm/mmio.h
+++ b/arch/riscv/include/asm/mmio.h
@@ -14,12 +14,6 @@
 #include <linux/types.h>
 #include <asm/mmiowb.h>
 
-#ifndef CONFIG_MMU
-#define pgprot_noncached(x)	(x)
-#define pgprot_writecombine(x)	(x)
-#define pgprot_device(x)	(x)
-#endif /* CONFIG_MMU */
-
 /* Generic IO read/write.  These perform native-endian accesses. */
 #define __raw_writeb __raw_writeb
 static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index eaea1f717010..e82a32112b7e 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -459,6 +459,10 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
 
 static inline void __kernel_map_pages(struct page *page, int numpages, int enable) {}
 
+#define pgprot_noncached(x)	(x)
+#define pgprot_writecombine(x)	(x)
+#define pgprot_device(x)	(x)
+
 #endif /* !CONFIG_MMU */
 
 #define kern_addr_valid(addr)   (1) /* FIXME */
-- 
2.25.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2020-06-30  6:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  6:28 Pekka Enberg [this message]
2020-07-14  1:21 ` [RESEND PATCH] riscv: Move nommu pgprot_* macros to pgtable.h Palmer Dabbelt
2020-07-14 10:00   ` Pekka Enberg

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=20200630062827.16589-1-penberg@gmail.com \
    --to=penberg@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=penberg@kernel.org \
    --cc=wangkefeng.wang@huawei.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