linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] MIPS: tx39: adjust tx39_flush_cache_page
       [not found] ` <20211206061944.21323-3-huangpei@loongson.cn>
@ 2021-12-13 15:21   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-12-13 15:21 UTC (permalink / raw)
  To: Huang Pei
  Cc: ambrosehua, Bibo Mao, linux-mips, Jiaxun Yang, Paul Burton,
	Li Xuefeng, Yang Tiezhu, Gao Juxin, Huacai Chen

On Mon, Dec 06, 2021 at 02:19:44PM +0800, Huang Pei wrote:
> Indexed cache operation actually use KSEG0/CKSEG0 (AKA physical
> address) to index cache line, so it CAN NOT handle cache alias.
> 
> Remove checking for cpu_has_dc_aliases.
> 
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
> ---
>  arch/mips/mm/c-tx39.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c
> index 03dfbb40ec73..c2ecdde0371d 100644
> --- a/arch/mips/mm/c-tx39.c
> +++ b/arch/mips/mm/c-tx39.c
> @@ -207,11 +207,12 @@ static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page
>  	/*
>  	 * Do indexed flush, too much work to get the (possible) TLB refills
>  	 * to work correctly.
> +	 *
>  	 */
> -	if (cpu_has_dc_aliases || exec)
> +	if (exec) {
>  		tx39_blast_dcache_page_indexed(page);
> -	if (exec)
>  		tx39_blast_icache_page_indexed(page);
> +	}
>  }
>  
>  static void local_tx39_flush_data_cache_page(void * addr)

do you have the hardware to test your patch or do you have at least
the manual for the CPU core used ? If both answers are no, please
drop this patch from you patch queue.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] MIPS: rework local_t operation on MIPS64
       [not found] ` <20211206061944.21323-2-huangpei@loongson.cn>
@ 2021-12-13 15:25   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-12-13 15:25 UTC (permalink / raw)
  To: Huang Pei
  Cc: ambrosehua, Bibo Mao, linux-mips, Jiaxun Yang, Paul Burton,
	Li Xuefeng, Yang Tiezhu, Gao Juxin, Huacai Chen,
	Maciej W . Rozycki

On Mon, Dec 06, 2021 at 02:19:43PM +0800, Huang Pei wrote:
> +. use "daddu/dsubu" for long int on MIPS64 instead of "addu/subu"
> 
> +. remove "asm/war.h" since R10000_LLSC_WAR became a config option
> 
> +. clean up
> 
> Fixes: 7232311ef14c ("local_t: mips extension")
> Suggested-by:  Maciej W. Rozycki <macro@orcam.me.uk>
> Signed-off-by: Huang Pei <huangpei@loongson.cn>

please split this into at least two patches. One which just fixes
the bug and then do the cleanups.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-13 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20211206061944.21323-1-huangpei@loongson.cn>
     [not found] ` <20211206061944.21323-3-huangpei@loongson.cn>
2021-12-13 15:21   ` [PATCH 2/2] MIPS: tx39: adjust tx39_flush_cache_page Thomas Bogendoerfer
     [not found] ` <20211206061944.21323-2-huangpei@loongson.cn>
2021-12-13 15:25   ` [PATCH 1/2] MIPS: rework local_t operation on MIPS64 Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).