* some questions about translation lookaside buffer
@ 2011-10-17 11:36 loody
2011-10-17 14:57 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: loody @ 2011-10-17 11:36 UTC (permalink / raw)
To: Linux MIPS Mailing List
Dear all:
I have some questions about local_flush_tlb_one.
1. what will happen if I use local_flush_tlb_one to flush a page that
doesn't exist in translation lookaside buffer entries.
The index return by read_c0_index(), should be negative.
but this function seems not handle the case that idx < 0.
2. as I know, translation lookaside buffer is a place to keep record
the memory mapping, it doesn't like cache have place to store the
data.
a. If the entry is cacheable, what we only to do is flush the cache?
b. if the entry is uncached, there is nothing to do?
if above b is correct, what will happen if we have an entry that is
uncached and dirty?
--
Regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: some questions about translation lookaside buffer
2011-10-17 11:36 some questions about translation lookaside buffer loody
@ 2011-10-17 14:57 ` Ralf Baechle
2011-10-17 16:17 ` loody
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2011-10-17 14:57 UTC (permalink / raw)
To: loody; +Cc: Linux MIPS Mailing List
On Mon, Oct 17, 2011 at 07:36:11PM +0800, loody wrote:
> Dear all:
> I have some questions about local_flush_tlb_one.
> 1. what will happen if I use local_flush_tlb_one to flush a page that
> doesn't exist in translation lookaside buffer entries.
>
> The index return by read_c0_index(), should be negative.
> but this function seems not handle the case that idx < 0.
>
> 2. as I know, translation lookaside buffer is a place to keep record
> the memory mapping, it doesn't like cache have place to store the
> data.
> a. If the entry is cacheable, what we only to do is flush the cache?
> b. if the entry is uncached, there is nothing to do?
> if above b is correct, what will happen if we have an entry that is
> uncached and dirty?
If c0_index contains a value < 0 (or rather one with bit 31 set) then
there is nothing that needs to be flushed.
Note that MIPS D-cache (I-caches don't get written back so are not of
concern) are tagged with a physical address so cache handling is no
consideration for local_flush_tlb_one or any of the other TLB flush
functions.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: some questions about translation lookaside buffer
2011-10-17 14:57 ` Ralf Baechle
@ 2011-10-17 16:17 ` loody
0 siblings, 0 replies; 3+ messages in thread
From: loody @ 2011-10-17 16:17 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Linux MIPS Mailing List
hi ralf:
Thanks for your reply :)
2011/10/17 Ralf Baechle <ralf@linux-mips.org>:
> On Mon, Oct 17, 2011 at 07:36:11PM +0800, loody wrote:
>
>> Dear all:
>> I have some questions about local_flush_tlb_one.
>> 1. what will happen if I use local_flush_tlb_one to flush a page that
>> doesn't exist in translation lookaside buffer entries.
>>
>> The index return by read_c0_index(), should be negative.
>> but this function seems not handle the case that idx < 0.
>>
>> 2. as I know, translation lookaside buffer is a place to keep record
>> the memory mapping, it doesn't like cache have place to store the
>> data.
>> a. If the entry is cacheable, what we only to do is flush the cache?
>> b. if the entry is uncached, there is nothing to do?
>> if above b is correct, what will happen if we have an entry that is
>> uncached and dirty?
>
> If c0_index contains a value < 0 (or rather one with bit 31 set) then
> there is nothing that needs to be flushed.
but how about the case of c0_index >= 0, I found the code tried to
write the index with entry_lo0 and entry_lo1 as 0.
it seems clear the PFN part of the index. So it is the flush action?
>
> Note that MIPS D-cache (I-caches don't get written back so are not of
> concern) are tagged with a physical address so cache handling is no
> consideration for local_flush_tlb_one or any of the other TLB flush
> functions.
why tlb flush functions don't need to take care cache handling?
if tlb flush don't need to care cache, what is tlb flush used for,
since tlb is nothing but a place to do the address translation, right?
--
Appreciate your help,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-17 16:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 11:36 some questions about translation lookaside buffer loody
2011-10-17 14:57 ` Ralf Baechle
2011-10-17 16:17 ` loody
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.