From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Herrmann Subject: [PATCH 05/15] MIPS: Don't build fast TLB refill handler with 32-bit kernels. Date: Tue, 20 May 2014 16:47:06 +0200 Message-ID: <1400597236-11352-6-git-send-email-andreas.herrmann@caviumnetworks.com> References: <1400597236-11352-1-git-send-email-andreas.herrmann@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: David Daney , Andreas Herrmann , Ralf Baechle , James Hogan , , David Daney To: Return-path: Received: from mail-bl2lp0212.outbound.protection.outlook.com ([207.46.163.212]:7450 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753277AbaETOsv (ORCPT ); Tue, 20 May 2014 10:48:51 -0400 In-Reply-To: <1400597236-11352-1-git-send-email-andreas.herrmann@caviumnetworks.com> Sender: kvm-owner@vger.kernel.org List-ID: From: David Daney The fast handler only supports 64-bit kernels. Signed-off-by: David Daney Signed-off-by: Andreas Herrmann --- 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 ee88367..781e183 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -1250,13 +1250,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.7.9.5