Skip to content

Commit 4b5ef1e

Browse files
Kefeng Wangtorvalds
authored andcommitted
microblaze: use is_kernel_text() helper
Use is_kernel_text() helper to simplify code. Link: https://lkml.kernel.org/r/20210930071143.63410-11-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Alexander Potapenko <glider@google.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andrey Konovalov <andreyknvl@gmail.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Petr Mladek <pmladek@suse.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 843a1ff commit 4b5ef1e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/microblaze/mm/pgtable.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/mm_types.h>
3535
#include <linux/pgtable.h>
3636
#include <linux/memblock.h>
37+
#include <linux/kallsyms.h>
3738

3839
#include <asm/pgalloc.h>
3940
#include <linux/io.h>
@@ -171,7 +172,7 @@ void __init mapin_ram(void)
171172
for (s = 0; s < lowmem_size; s += PAGE_SIZE) {
172173
f = _PAGE_PRESENT | _PAGE_ACCESSED |
173174
_PAGE_SHARED | _PAGE_HWEXEC;
174-
if ((char *) v < _stext || (char *) v >= _etext)
175+
if (!is_kernel_text(v))
175176
f |= _PAGE_WRENABLE;
176177
else
177178
/* On the MicroBlaze, no user access

0 commit comments

Comments
 (0)