From: Ralf Baechle <ralf@linux-mips.org>
To: linux-mips@linux-mips.org, Huacai Chen <chenhc@lemote.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Fuxin Zhang <zhangfx@lemote.com>,
Zhangjin Wu <wuzhangjin@gmail.com>
Subject: [PATCH] MIPS: Longson 3: Fix fast refill handler for 32 bit kernels
Date: Wed, 1 Jun 2016 23:11:20 +0200 [thread overview]
Message-ID: <20160601211120.GA16149@linux-mips.org> (raw)
A recent merge has broken the LLVMLinux build for 32-bit little endian. I've
bisected it to 380cd58 and it looks like a bug in the kernel to me. Clang is
rejecting the inline assembly in the expansion of 'write_c0_kpgd
(swapper_pg_dir)' of tlbex.c. The relevant inline assembly can be found in
__write_64bit_c0_split() and is attempting to use the 'L' and 'M' print
modifiers on swapper_pg_dir which is a 32-bit unsigned long. These print
modifiers only make sense for 64-bit values so I think the kernel source is
incorrect.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Daniel Sanders <Daniel.Sanders@imgtec.com>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
---
I don't have Loongson 3 hardware for testing, could somebody of the Loongson
folks please review / test this? Thanks!
arch/mips/include/asm/mipsregs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index e1ca65c..044fab6 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -1652,8 +1652,8 @@ do { \
#define read_c0_pgd() __read_64bit_c0_register($9, 7)
#define write_c0_pgd(val) __write_64bit_c0_register($9, 7, val)
-#define read_c0_kpgd() __read_64bit_c0_register($31, 7)
-#define write_c0_kpgd(val) __write_64bit_c0_register($31, 7, val)
+#define read_c0_kpgd() __read_ulong_c0_register($31, 7)
+#define write_c0_kpgd(val) __write_ulong_c0_register($31, 7, val)
/* Cavium OCTEON (cnMIPS) */
#define read_c0_cvmcount() __read_ulong_c0_register($9, 6)
next reply other threads:[~2016-06-01 21:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 21:11 Ralf Baechle [this message]
2016-06-02 7:12 ` [PATCH] MIPS: Longson 3: Fix fast refill handler for 32 bit kernels Huacai Chen
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=20160601211120.GA16149@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=aurelien@aurel32.net \
--cc=chenhc@lemote.com \
--cc=linux-mips@linux-mips.org \
--cc=wuzhangjin@gmail.com \
--cc=zhangfx@lemote.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