diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2009-11-19 19:21:03 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:10:36 -0500 |
commit | fe11dc3f9628e5393e932567b7e29d35cbbad136 (patch) | |
tree | 32b2513f5799946d42a7b4c912c0fa094763810f /arch/powerpc/include | |
parent | 5efab4a02c89c252fb4cce097aafde5f8208dbfe (diff) |
powerpc/8xx: Update TLB asm so it behaves as linux mm expects.
Update the TLB asm to make proper use of _PAGE_DIRY and _PAGE_ACCESSED.
Get rid of _PAGE_HWWRITE too.
Pros:
- I/D TLB Miss never needs to write to the linux pte.
- _PAGE_ACCESSED is only set on TLB Error fixing accounting
- _PAGE_DIRTY is mapped to 0x100, the changed bit, and is set directly
when a page has been made dirty.
- Proper RO/RW mapping of user space.
- Free up 2 SW TLB bits in the linux pte(add back _PAGE_WRITETHRU ?)
- kernel RO/user NA support.
Cons:
- A few more instructions in the TLB Miss routines.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/pte-8xx.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/pte-8xx.h b/arch/powerpc/include/asm/pte-8xx.h index dd5ea95fe61e..68ba861331ee 100644 --- a/arch/powerpc/include/asm/pte-8xx.h +++ b/arch/powerpc/include/asm/pte-8xx.h | |||
@@ -33,21 +33,20 @@ | |||
33 | #define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */ | 33 | #define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */ |
34 | #define _PAGE_SHARED 0x0004 /* No ASID (context) compare */ | 34 | #define _PAGE_SHARED 0x0004 /* No ASID (context) compare */ |
35 | #define _PAGE_SPECIAL 0x0008 /* SW entry, forced to 0 by the TLB miss */ | 35 | #define _PAGE_SPECIAL 0x0008 /* SW entry, forced to 0 by the TLB miss */ |
36 | #define _PAGE_DIRTY 0x0100 /* C: page changed */ | ||
36 | 37 | ||
37 | /* These five software bits must be masked out when the entry is loaded | 38 | /* These 3 software bits must be masked out when the entry is loaded |
38 | * into the TLB. | 39 | * into the TLB, 2 SW bits left. |
39 | */ | 40 | */ |
40 | #define _PAGE_GUARDED 0x0010 /* software: guarded access */ | 41 | #define _PAGE_GUARDED 0x0010 /* software: guarded access */ |
41 | #define _PAGE_DIRTY 0x0020 /* software: page changed */ | 42 | #define _PAGE_ACCESSED 0x0020 /* software: page referenced */ |
42 | #define _PAGE_RW 0x0040 /* software: user write access allowed */ | ||
43 | #define _PAGE_ACCESSED 0x0080 /* software: page referenced */ | ||
44 | 43 | ||
45 | /* Setting any bits in the nibble with the follow two controls will | 44 | /* Setting any bits in the nibble with the follow two controls will |
46 | * require a TLB exception handler change. It is assumed unused bits | 45 | * require a TLB exception handler change. It is assumed unused bits |
47 | * are always zero. | 46 | * are always zero. |
48 | */ | 47 | */ |
49 | #define _PAGE_HWWRITE 0x0100 /* h/w write enable: never set in Linux PTE */ | 48 | #define _PAGE_RW 0x0400 /* lsb PP bits, inverted in HW */ |
50 | #define _PAGE_USER 0x0800 /* One of the PP bits, the other is USER&~RW */ | 49 | #define _PAGE_USER 0x0800 /* msb PP bits */ |
51 | 50 | ||
52 | #define _PMD_PRESENT 0x0001 | 51 | #define _PMD_PRESENT 0x0001 |
53 | #define _PMD_BAD 0x0ff0 | 52 | #define _PMD_BAD 0x0ff0 |