diff options
Diffstat (limited to 'arch/mips/mm/tlbex.c')
| -rw-r--r-- | arch/mips/mm/tlbex.c | 63 | 
1 files changed, 22 insertions, 41 deletions
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 144ceb0fba88..e01cb33bfa1a 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -545,7 +545,6 @@ void build_tlb_write_entry(u32 **p, struct uasm_label **l,  		tlbw(p);  		break; -	case CPU_R4300:  	case CPU_5KC:  	case CPU_TX49XX:  	case CPU_PR4450: @@ -604,13 +603,12 @@ void build_tlb_write_entry(u32 **p, struct uasm_label **l,  	case CPU_VR4131:  	case CPU_VR4133: -	case CPU_R5432:  		uasm_i_nop(p);  		uasm_i_nop(p);  		tlbw(p);  		break; -	case CPU_JZRISC: +	case CPU_XBURST:  		tlbw(p);  		uasm_i_nop(p);  		break; @@ -631,7 +629,7 @@ static __maybe_unused void build_convert_pte_to_entrylo(u32 **p,  		return;  	} -	if (cpu_has_rixi && _PAGE_NO_EXEC) { +	if (cpu_has_rixi && !!_PAGE_NO_EXEC) {  		if (fill_includes_sw_bits) {  			UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL));  		} else { @@ -2609,21 +2607,11 @@ void build_tlb_refill_handler(void)  	check_for_high_segbits = current_cpu_data.vmbits > (PGDIR_SHIFT + PGD_ORDER + PAGE_SHIFT - 3);  #endif -	switch (current_cpu_type()) { -	case CPU_R2000: -	case CPU_R3000: -	case CPU_R3000A: -	case CPU_R3081E: -	case CPU_TX3912: -	case CPU_TX3922: -	case CPU_TX3927: +	if (cpu_has_3kex) {  #ifndef CONFIG_MIPS_PGD_C0_CONTEXT -		if (cpu_has_local_ebase) -			build_r3000_tlb_refill_handler();  		if (!run_once) { -			if (!cpu_has_local_ebase) -				build_r3000_tlb_refill_handler();  			build_setup_pgd(); +			build_r3000_tlb_refill_handler();  			build_r3000_tlb_load_handler();  			build_r3000_tlb_store_handler();  			build_r3000_tlb_modify_handler(); @@ -2633,34 +2621,27 @@ void build_tlb_refill_handler(void)  #else  		panic("No R3000 TLB refill handler");  #endif -		break; +		return; +	} -	case CPU_R8000: -		panic("No R8000 TLB refill handler yet"); -		break; +	if (cpu_has_ldpte) +		setup_pw(); -	default: +	if (!run_once) { +		scratch_reg = allocate_kscratch(); +		build_setup_pgd(); +		build_r4000_tlb_load_handler(); +		build_r4000_tlb_store_handler(); +		build_r4000_tlb_modify_handler();  		if (cpu_has_ldpte) -			setup_pw(); - -		if (!run_once) { -			scratch_reg = allocate_kscratch(); -			build_setup_pgd(); -			build_r4000_tlb_load_handler(); -			build_r4000_tlb_store_handler(); -			build_r4000_tlb_modify_handler(); -			if (cpu_has_ldpte) -				build_loongson3_tlb_refill_handler(); -			else if (!cpu_has_local_ebase) -				build_r4000_tlb_refill_handler(); -			flush_tlb_handlers(); -			run_once++; -		} -		if (cpu_has_local_ebase) +			build_loongson3_tlb_refill_handler(); +		else  			build_r4000_tlb_refill_handler(); -		if (cpu_has_xpa) -			config_xpa_params(); -		if (cpu_has_htw) -			config_htw_params(); +		flush_tlb_handlers(); +		run_once++;  	} +	if (cpu_has_xpa) +		config_xpa_params(); +	if (cpu_has_htw) +		config_htw_params();  }  |