[PATCH 5/9] MIPS donot build fast TLB refill handler with 32-bit kernels.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit  35d0470668cca234e49ed35342b3f9a0eec8355c upstream

The fast handler only supports 64-bit kernels.

Signed-off-by: David Daney <david.daney@xxxxxxxxxx>
Signed-off-by: Andreas Herrmann <andreas.herrmann@xxxxxxxxxxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxx
Cc: James Hogan <james.hogan@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx
Patchwork: https://patchwork.linux-mips.org/patch/7010/
Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Signed-off-by: Abhishek Paliwal <abhishek.paliwal@xxxxxxxxxxx>
---
 arch/mips/mm/tlbex.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index aa24119..c05f2fd 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -1247,13 +1247,17 @@ static void build_r4000_tlb_refill_handler(void)
        unsigned int final_len;
        struct mips_huge_tlb_info htlb_info __maybe_unused;
        enum vmalloc64_mode vmalloc_mode __maybe_unused;
-
+#ifdef CONFIG_64BIT
+       bool is64bit = true;
+#else
+       bool is64bit = false;
+#endif
        memset(tlb_handler, 0, sizeof(tlb_handler));
        memset(labels, 0, sizeof(labels));
        memset(relocs, 0, sizeof(relocs));
        memset(final_handler, 0, sizeof(final_handler));

-       if ((scratch_reg >= 0 || scratchpad_available()) && use_bbit_insns()) {
+       if (is64bit && (scratch_reg >= 0 || scratchpad_available()) && use_bbit_insns()) {
                htlb_info = build_fast_tlb_refill_handler(&p, &l, &r, K0, K1,
                                                          scratch_reg);
                vmalloc_mode = refill_scratch;
--
1.8.1.4



"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux