Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 16/27] mips: Use common bits from generic tlb.h
       [not found] <1400093999-18703-1-git-send-email-richard@nod.at>
@ 2014-05-14 18:59 ` Richard Weinberger
  2014-05-15 18:02   ` Leonid Yegoshin
  2014-05-27  9:17   ` Ralf Baechle
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Weinberger @ 2014-05-14 18:59 UTC (permalink / raw)
  To: linux-arch, arnd, linux-kernel
  Cc: Richard Weinberger, Ralf Baechle, John Crispin, Markos Chandras,
	Leonid Yegoshin, linux-mips

It is no longer needed to define them on our own.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: John Crispin <blogic@openwrt.org>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/mips/include/asm/tlb.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/arch/mips/include/asm/tlb.h b/arch/mips/include/asm/tlb.h
index 4a23493..5ea43ca 100644
--- a/arch/mips/include/asm/tlb.h
+++ b/arch/mips/include/asm/tlb.h
@@ -10,13 +10,6 @@
 		if (!tlb->fullmm)				\
 			flush_cache_range(vma, vma->vm_start, vma->vm_end); \
 	}  while (0)
-#define tlb_end_vma(tlb, vma) do { } while (0)
-#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
-
-/*
- * .. because we flush the whole mm when it fills up.
- */
-#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
 
 #define UNIQUE_ENTRYHI(idx)						\
 		((CKSEG0 + ((idx) << (PAGE_SHIFT + 1))) |		\
-- 
1.8.4.2

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

* Re: [PATCH 16/27] mips: Use common bits from generic tlb.h
  2014-05-14 18:59 ` [PATCH 16/27] mips: Use common bits from generic tlb.h Richard Weinberger
@ 2014-05-15 18:02   ` Leonid Yegoshin
  2014-05-15 18:02     ` Leonid Yegoshin
  2014-05-15 18:31     ` Richard Weinberger
  2014-05-27  9:17   ` Ralf Baechle
  1 sibling, 2 replies; 5+ messages in thread
From: Leonid Yegoshin @ 2014-05-15 18:02 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-arch, arnd, linux-kernel, Ralf Baechle, John Crispin,
	Markos Chandras, linux-mips

On 05/14/2014 11:59 AM, Richard Weinberger wrote:
> It is no longer needed to define them on our own.
>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: John Crispin <blogic@openwrt.org>
> Cc: Markos Chandras <markos.chandras@imgtec.com>
> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: linux-mips@linux-mips.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
>   arch/mips/include/asm/tlb.h | 7 -------
>   1 file changed, 7 deletions(-)
>
> diff --git a/arch/mips/include/asm/tlb.h b/arch/mips/include/asm/tlb.h
> index 4a23493..5ea43ca 100644
> --- a/arch/mips/include/asm/tlb.h
> +++ b/arch/mips/include/asm/tlb.h
> @@ -10,13 +10,6 @@
>   		if (!tlb->fullmm)				\
>   			flush_cache_range(vma, vma->vm_start, vma->vm_end); \
>   	}  while (0)
> -#define tlb_end_vma(tlb, vma) do { } while (0)
> -#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
> -
> -/*
> - * .. because we flush the whole mm when it fills up.
> - */
> -#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
>   
>   #define UNIQUE_ENTRYHI(idx)						\
>   		((CKSEG0 + ((idx) << (PAGE_SHIFT + 1))) |		\

I would like to know why these functions are eliminated (don't find any 
clue).
Is it just because there will be a generic one or the calls would be 
eliminated?
And if there are generic - can I tune it later?

Explanation of Q:  MIPS R6 architecture has now TLBINV instruction which 
eliminates TLB elements only for specific ASID (read here - "mm_struct") 
and I would like to use it for efficiency in tlb_flush()/flush_tlb_mm.
(Not sure about tlb_end_vma()/ __tlb_remove_tlb_entry() yet)

- Leonid.

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

* Re: [PATCH 16/27] mips: Use common bits from generic tlb.h
  2014-05-15 18:02   ` Leonid Yegoshin
@ 2014-05-15 18:02     ` Leonid Yegoshin
  2014-05-15 18:31     ` Richard Weinberger
  1 sibling, 0 replies; 5+ messages in thread
From: Leonid Yegoshin @ 2014-05-15 18:02 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-arch, arnd, linux-kernel, Ralf Baechle, John Crispin,
	Markos Chandras, linux-mips

On 05/14/2014 11:59 AM, Richard Weinberger wrote:
> It is no longer needed to define them on our own.
>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: John Crispin <blogic@openwrt.org>
> Cc: Markos Chandras <markos.chandras@imgtec.com>
> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: linux-mips@linux-mips.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
>   arch/mips/include/asm/tlb.h | 7 -------
>   1 file changed, 7 deletions(-)
>
> diff --git a/arch/mips/include/asm/tlb.h b/arch/mips/include/asm/tlb.h
> index 4a23493..5ea43ca 100644
> --- a/arch/mips/include/asm/tlb.h
> +++ b/arch/mips/include/asm/tlb.h
> @@ -10,13 +10,6 @@
>   		if (!tlb->fullmm)				\
>   			flush_cache_range(vma, vma->vm_start, vma->vm_end); \
>   	}  while (0)
> -#define tlb_end_vma(tlb, vma) do { } while (0)
> -#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
> -
> -/*
> - * .. because we flush the whole mm when it fills up.
> - */
> -#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
>   
>   #define UNIQUE_ENTRYHI(idx)						\
>   		((CKSEG0 + ((idx) << (PAGE_SHIFT + 1))) |		\

I would like to know why these functions are eliminated (don't find any 
clue).
Is it just because there will be a generic one or the calls would be 
eliminated?
And if there are generic - can I tune it later?

Explanation of Q:  MIPS R6 architecture has now TLBINV instruction which 
eliminates TLB elements only for specific ASID (read here - "mm_struct") 
and I would like to use it for efficiency in tlb_flush()/flush_tlb_mm.
(Not sure about tlb_end_vma()/ __tlb_remove_tlb_entry() yet)

- Leonid.

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

* Re: [PATCH 16/27] mips: Use common bits from generic tlb.h
  2014-05-15 18:02   ` Leonid Yegoshin
  2014-05-15 18:02     ` Leonid Yegoshin
@ 2014-05-15 18:31     ` Richard Weinberger
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Weinberger @ 2014-05-15 18:31 UTC (permalink / raw)
  To: Leonid Yegoshin
  Cc: linux-arch, arnd, linux-kernel, Ralf Baechle, John Crispin,
	Markos Chandras, linux-mips

Am 15.05.2014 20:02, schrieb Leonid Yegoshin:
> On 05/14/2014 11:59 AM, Richard Weinberger wrote:
>> It is no longer needed to define them on our own.
>>
>> Cc: Ralf Baechle <ralf@linux-mips.org>
>> Cc: John Crispin <blogic@openwrt.org>
>> Cc: Markos Chandras <markos.chandras@imgtec.com>
>> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
>> Cc: Richard Weinberger <richard@nod.at>
>> Cc: linux-mips@linux-mips.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Richard Weinberger <richard@nod.at>
>> ---
>>   arch/mips/include/asm/tlb.h | 7 -------
>>   1 file changed, 7 deletions(-)
>>
>> diff --git a/arch/mips/include/asm/tlb.h b/arch/mips/include/asm/tlb.h
>> index 4a23493..5ea43ca 100644
>> --- a/arch/mips/include/asm/tlb.h
>> +++ b/arch/mips/include/asm/tlb.h
>> @@ -10,13 +10,6 @@
>>           if (!tlb->fullmm)                \
>>               flush_cache_range(vma, vma->vm_start, vma->vm_end); \
>>       }  while (0)
>> -#define tlb_end_vma(tlb, vma) do { } while (0)
>> -#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
>> -
>> -/*
>> - * .. because we flush the whole mm when it fills up.
>> - */
>> -#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
>>     #define UNIQUE_ENTRYHI(idx)                        \
>>           ((CKSEG0 + ((idx) << (PAGE_SHIFT + 1))) |        \
> 
> I would like to know why these functions are eliminated (don't find any clue).
> Is it just because there will be a generic one or the calls would be eliminated?

There will be a generic one.
See [PATCH 03/27] generic/tlb.h: Move common defines into generic tlb.h

> And if there are generic - can I tune it later?

Yes. You can always define your own and override the generic one.

Thanks,
//richard

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

* Re: [PATCH 16/27] mips: Use common bits from generic tlb.h
  2014-05-14 18:59 ` [PATCH 16/27] mips: Use common bits from generic tlb.h Richard Weinberger
  2014-05-15 18:02   ` Leonid Yegoshin
@ 2014-05-27  9:17   ` Ralf Baechle
  1 sibling, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2014-05-27  9:17 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-arch, arnd, linux-kernel, John Crispin, Markos Chandras,
	Leonid Yegoshin, linux-mips

On Wed, May 14, 2014 at 08:59:48PM +0200, Richard Weinberger wrote:

Acked-by: Ralf Baechle <ralf@linux-mips.org>

  Ralf

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

end of thread, other threads:[~2014-05-27  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1400093999-18703-1-git-send-email-richard@nod.at>
2014-05-14 18:59 ` [PATCH 16/27] mips: Use common bits from generic tlb.h Richard Weinberger
2014-05-15 18:02   ` Leonid Yegoshin
2014-05-15 18:02     ` Leonid Yegoshin
2014-05-15 18:31     ` Richard Weinberger
2014-05-27  9:17   ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox