[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171218090848.GA5823@gary-OptiPlex-3050>
Date: Mon, 18 Dec 2017 17:08:48 +0800
From: Guo Ren <ren_guo@...ky.com>
To: Greentime Hu <green.hu@...il.com>
Cc: greentime@...estech.com, linux-kernel@...r.kernel.org,
arnd@...db.de, linux-arch@...r.kernel.org, tglx@...utronix.de,
jason@...edaemon.net, marc.zyngier@....com, robh+dt@...nel.org,
netdev@...r.kernel.org, deanbo422@...il.com,
devicetree@...r.kernel.org, viro@...iv.linux.org.uk,
dhowells@...hat.com, will.deacon@....com,
daniel.lezcano@...aro.org, linux-serial@...r.kernel.org,
geert.uytterhoeven@...il.com, linus.walleij@...aro.org,
mark.rutland@....com, greg@...ah.com,
Vincent Chen <vincentc@...estech.com>
Subject: Re: [PATCH v3 07/33] nds32: MMU initialization
Hi Greentime,
On Fri, Dec 08, 2017 at 05:11:50PM +0800, Greentime Hu wrote:
[...]
>
> diff --git a/arch/nds32/mm/highmem.c b/arch/nds32/mm/highmem.c
[...]
> +void *kmap(struct page *page)
> +{
> + unsigned long vaddr;
> + might_sleep();
> + if (!PageHighMem(page))
> + return page_address(page);
> + vaddr = (unsigned long)kmap_high(page);
Here should invalid the cpu_mmu_tlb's entry, Or invalid it in the
set_pte().
eg:
vaddr0 = kmap(page0)
*vaddr0 = val0 //It will cause tlb-miss, and hard-refill to MMU-tlb
kunmap(page0)
vaddr1 = kmap(page1) // Mostly vaddr1 = vaddr0
val = vaddr1; //No tlb-miss and it will get page0's val not page1, because
last expired vaddr0's entry is left in CPU-MMU-tlb.
Best Regards
Guo Ren
Powered by blists - more mailing lists