From: "Wang, Yalin" <Yalin.Wang@sonymobile.com>
To: "'Will Deacon'" <will.deacon@arm.com>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
"'linux-arch@vger.kernel.org'" <linux-arch@vger.kernel.org>
Subject: ARM pagetable setting in Linux
Date: Wed, 26 Jun 2013 10:41:40 +0800 [thread overview]
Message-ID: <35FD53F367049845BC99AC72306C23D19441BF5863@CNBJMBX05.corpusers.net> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1786 bytes --]
Hi Will,
I have a question about arm pagetable setting in Linux .
>From armV6, there is TTBR0 and TTBR1 translation base address registers in mmu .
But I found linux only use TTBR0 for translation base address ,
Could we use TTBR0 and TTBR1 to split user task and kernel pagetables (swapper_pg_dir)ï¼
But I found this need set TTBCR.N ,
If PAGE_OFFSET==0xc0000000 , set TTBCR.N=0x2 ,
Will not work , because only ensure 0--0x00FFFFFF MVA use TTBCR0
And other MVAãwill use TTBCR1 ,
But if we set PAGE_OFFSET==0x80000000 (2GB split ) ,
And set TTBCR.N=0x1 ,
This will make sure user task MVA use TTBCR0 and kernel MVA
Use TTBCR1 , this will make some improvement for the system .
1. Because we donât need copy kernel first âlevel pagetables into every
User taskâs pagetables and flush tlb (for example fork() a new process).
2. And donât need handle kernel page fault because that user taskâs kernel
Pagetable when it is not set up , need copy again( for example vmalloc() ioremap() kmap() will change
Kernel pagetables and need update to every task pagetables ) .
3. We even can only allocate 8KB first level pagetables for user task to save
Memorys .
I am not sure if its possible to implement this on cortex-A cpus ?
And if there is some side effects if we use this in linux ?
If possible , I can make a change to do some test .
Thanks for your help .
Yalin.Wang
Software Engineer
OS Kernel&Graphics
Â
Sony Mobile Communications
Tel: +86 10 5966 9819
Phone: 18610323092
Address: No.16 Guangshun South Street, Chaoyang, Beijing, P.R.C.
sonymobile.com
 Â
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next reply other threads:[~2013-06-26 2:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 2:41 Wang, Yalin [this message]
2013-06-26 17:16 ` Will Deacon
2013-06-26 17:54 ` Russell King - ARM Linux
2013-06-28 2:18 ` Wang, Yalin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35FD53F367049845BC99AC72306C23D19441BF5863@CNBJMBX05.corpusers.net \
--to=yalin.wang@sonymobile.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®