* Re: TLB and PTE coherency during munmap
@ 2013-06-07 2:21 George Spelvin
0 siblings, 0 replies; only message in thread
From: George Spelvin @ 2013-06-07 2:21 UTC (permalink / raw)
To: peterz; +Cc: linux, linux-kernel
It's a bug in the original code, but as long as you're cleaning it up:
@@ -103,6 +97,7 @@ extern struct ia64_tr_entry *ia64_idtrs[NR_CPUS];
static inline void
ia64_tlb_flush_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long end)
{
+ unsigned long i;
unsigned int nr;
if (!tlb->need_flush)
@@ -141,13 +136,11 @@ ia64_tlb_flush_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long e
/* lastly, release the freed pages */
nr = tlb->nr;
- if (!tlb_fast_mode(tlb)) {
- unsigned long i;
- tlb->nr = 0;
- tlb->start_addr = ~0UL;
- for (i = 0; i < nr; ++i)
- free_page_and_swap_cache(tlb->pages[i]);
- }
+
+ tlb->nr = 0;
+ tlb->start_addr = ~0UL;
+ for (i = 0; i < nr; ++i)
+ free_page_and_swap_cache(tlb->pages[i]);
}
How about making that first hunk:
@@ -103,6 +97,6 @@ extern struct ia64_tr_entry *ia64_idtrs[NR_CPUS];
static inline void
ia64_tlb_flush_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long end)
{
- unsigned int nr;
+ unsigned int nr, i;
if (!tlb->need_flush)
Because i does not need to be 64 bits; tlb->nr is only 32.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-07 2:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 2:21 TLB and PTE coherency during munmap George Spelvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®