diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-11-07 05:10:28 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-07 05:10:28 -0500 |
commit | cd03adb0812fe0fb06cdb935e61ec9514254e951 (patch) | |
tree | 6a79344e646b6c3815a77f0eb4ed721f50c31701 /arch/arm/mm/proc-v6.S | |
parent | 0b154bb7d0cce80e9c0bcf11d4f9e71b59409d26 (diff) |
[ARM SMP] Add support for shared memory attribute
We need to set the shared memory attribute in the page tables
on SMP systems to allow the cache coherency to operate.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/proc-v6.S')
-rw-r--r-- | arch/arm/mm/proc-v6.S | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 9bb5fff406fb..a39d8fa2ede5 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -112,6 +112,9 @@ ENTRY(cpu_v6_dcache_clean_area) | |||
112 | ENTRY(cpu_v6_switch_mm) | 112 | ENTRY(cpu_v6_switch_mm) |
113 | mov r2, #0 | 113 | mov r2, #0 |
114 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id | 114 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id |
115 | #ifdef CONFIG_SMP | ||
116 | orr r0, r0, #2 @ set shared pgtable | ||
117 | #endif | ||
115 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | 118 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB |
116 | mcr p15, 0, r2, c7, c10, 4 @ drain write buffer | 119 | mcr p15, 0, r2, c7, c10, 4 @ drain write buffer |
117 | mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | 120 | mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 |
@@ -140,7 +143,7 @@ ENTRY(cpu_v6_switch_mm) | |||
140 | ENTRY(cpu_v6_set_pte) | 143 | ENTRY(cpu_v6_set_pte) |
141 | str r1, [r0], #-2048 @ linux version | 144 | str r1, [r0], #-2048 @ linux version |
142 | 145 | ||
143 | bic r2, r1, #0x000007f0 | 146 | bic r2, r1, #0x000003f0 |
144 | bic r2, r2, #0x00000003 | 147 | bic r2, r2, #0x00000003 |
145 | orr r2, r2, #PTE_EXT_AP0 | 2 | 148 | orr r2, r2, #PTE_EXT_AP0 | 2 |
146 | 149 | ||
@@ -198,6 +201,9 @@ __v6_setup: | |||
198 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 201 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
199 | mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs | 202 | mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs |
200 | mcr p15, 0, r0, c2, c0, 2 @ TTB control register | 203 | mcr p15, 0, r0, c2, c0, 2 @ TTB control register |
204 | #ifdef CONFIG_SMP | ||
205 | orr r4, r4, #2 @ set shared pgtable | ||
206 | #endif | ||
201 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 207 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 |
202 | #ifdef CONFIG_VFP | 208 | #ifdef CONFIG_VFP |
203 | mrc p15, 0, r0, c1, c0, 2 | 209 | mrc p15, 0, r0, c1, c0, 2 |