diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-06-11 10:35:00 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-06-11 10:35:00 -0400 |
commit | 42578c82e0f1810a07ebe29cb05e874893243d8c (patch) | |
tree | e2a3811677d3594e891fc82c940438f6b6abc3e0 /arch/arm/include | |
parent | 2631182bf93919577730e6a6c4345308db590057 (diff) | |
parent | 85d6943af50537d3aec58b967ffbd3fec88453e9 (diff) |
Merge branch 'for-rmk' of git://linux-arm.org/linux-2.6 into devel
Conflicts:
arch/arm/Kconfig
arch/arm/kernel/smp.c
arch/arm/mach-realview/Makefile
arch/arm/mach-realview/platsmp.c
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/cputype.h | 25 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/cache-l2x0.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/ptrace.h | 17 | ||||
-rw-r--r-- | arch/arm/include/asm/tlbflush.h | 26 |
5 files changed, 69 insertions, 2 deletions
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index 7b9d27e749b8..b3e656c6fb78 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -8,6 +8,21 @@ | |||
8 | #define CPUID_TCM 2 | 8 | #define CPUID_TCM 2 |
9 | #define CPUID_TLBTYPE 3 | 9 | #define CPUID_TLBTYPE 3 |
10 | 10 | ||
11 | #define CPUID_EXT_PFR0 "c1, 0" | ||
12 | #define CPUID_EXT_PFR1 "c1, 1" | ||
13 | #define CPUID_EXT_DFR0 "c1, 2" | ||
14 | #define CPUID_EXT_AFR0 "c1, 3" | ||
15 | #define CPUID_EXT_MMFR0 "c1, 4" | ||
16 | #define CPUID_EXT_MMFR1 "c1, 5" | ||
17 | #define CPUID_EXT_MMFR2 "c1, 6" | ||
18 | #define CPUID_EXT_MMFR3 "c1, 7" | ||
19 | #define CPUID_EXT_ISAR0 "c2, 0" | ||
20 | #define CPUID_EXT_ISAR1 "c2, 1" | ||
21 | #define CPUID_EXT_ISAR2 "c2, 2" | ||
22 | #define CPUID_EXT_ISAR3 "c2, 3" | ||
23 | #define CPUID_EXT_ISAR4 "c2, 4" | ||
24 | #define CPUID_EXT_ISAR5 "c2, 5" | ||
25 | |||
11 | #ifdef CONFIG_CPU_CP15 | 26 | #ifdef CONFIG_CPU_CP15 |
12 | #define read_cpuid(reg) \ | 27 | #define read_cpuid(reg) \ |
13 | ({ \ | 28 | ({ \ |
@@ -18,9 +33,19 @@ | |||
18 | : "cc"); \ | 33 | : "cc"); \ |
19 | __val; \ | 34 | __val; \ |
20 | }) | 35 | }) |
36 | #define read_cpuid_ext(ext_reg) \ | ||
37 | ({ \ | ||
38 | unsigned int __val; \ | ||
39 | asm("mrc p15, 0, %0, c0, " ext_reg \ | ||
40 | : "=r" (__val) \ | ||
41 | : \ | ||
42 | : "cc"); \ | ||
43 | __val; \ | ||
44 | }) | ||
21 | #else | 45 | #else |
22 | extern unsigned int processor_id; | 46 | extern unsigned int processor_id; |
23 | #define read_cpuid(reg) (processor_id) | 47 | #define read_cpuid(reg) (processor_id) |
48 | #define read_cpuid_ext(reg) 0 | ||
24 | #endif | 49 | #endif |
25 | 50 | ||
26 | /* | 51 | /* |
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 64f2252a25cd..cdb9022716fd 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #define L2X0_CACHE_TYPE 0x004 | 24 | #define L2X0_CACHE_TYPE 0x004 |
25 | #define L2X0_CTRL 0x100 | 25 | #define L2X0_CTRL 0x100 |
26 | #define L2X0_AUX_CTRL 0x104 | 26 | #define L2X0_AUX_CTRL 0x104 |
27 | #define L2X0_TAG_LATENCY_CTRL 0x108 | ||
28 | #define L2X0_DATA_LATENCY_CTRL 0x10C | ||
27 | #define L2X0_EVENT_CNT_CTRL 0x200 | 29 | #define L2X0_EVENT_CNT_CTRL 0x200 |
28 | #define L2X0_EVENT_CNT1_CFG 0x204 | 30 | #define L2X0_EVENT_CNT1_CFG 0x204 |
29 | #define L2X0_EVENT_CNT0_CFG 0x208 | 31 | #define L2X0_EVENT_CNT0_CFG 0x208 |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 1845892260e7..6a89567ffc5b 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -71,6 +71,7 @@ struct thread_struct { | |||
71 | regs->ARM_cpsr = USR26_MODE; \ | 71 | regs->ARM_cpsr = USR26_MODE; \ |
72 | if (elf_hwcap & HWCAP_THUMB && pc & 1) \ | 72 | if (elf_hwcap & HWCAP_THUMB && pc & 1) \ |
73 | regs->ARM_cpsr |= PSR_T_BIT; \ | 73 | regs->ARM_cpsr |= PSR_T_BIT; \ |
74 | regs->ARM_cpsr |= PSR_ENDSTATE; \ | ||
74 | regs->ARM_pc = pc & ~1; /* pc */ \ | 75 | regs->ARM_pc = pc & ~1; /* pc */ \ |
75 | regs->ARM_sp = sp; /* sp */ \ | 76 | regs->ARM_sp = sp; /* sp */ \ |
76 | regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ | 77 | regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ |
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 236a06b9b7ce..67b833c9b6b9 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -50,6 +50,7 @@ | |||
50 | #define PSR_F_BIT 0x00000040 | 50 | #define PSR_F_BIT 0x00000040 |
51 | #define PSR_I_BIT 0x00000080 | 51 | #define PSR_I_BIT 0x00000080 |
52 | #define PSR_A_BIT 0x00000100 | 52 | #define PSR_A_BIT 0x00000100 |
53 | #define PSR_E_BIT 0x00000200 | ||
53 | #define PSR_J_BIT 0x01000000 | 54 | #define PSR_J_BIT 0x01000000 |
54 | #define PSR_Q_BIT 0x08000000 | 55 | #define PSR_Q_BIT 0x08000000 |
55 | #define PSR_V_BIT 0x10000000 | 56 | #define PSR_V_BIT 0x10000000 |
@@ -65,6 +66,22 @@ | |||
65 | #define PSR_x 0x0000ff00 /* Extension */ | 66 | #define PSR_x 0x0000ff00 /* Extension */ |
66 | #define PSR_c 0x000000ff /* Control */ | 67 | #define PSR_c 0x000000ff /* Control */ |
67 | 68 | ||
69 | /* | ||
70 | * ARMv7 groups of APSR bits | ||
71 | */ | ||
72 | #define PSR_ISET_MASK 0x01000010 /* ISA state (J, T) mask */ | ||
73 | #define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ | ||
74 | #define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */ | ||
75 | |||
76 | /* | ||
77 | * Default endianness state | ||
78 | */ | ||
79 | #ifdef CONFIG_CPU_ENDIAN_BE8 | ||
80 | #define PSR_ENDSTATE PSR_E_BIT | ||
81 | #else | ||
82 | #define PSR_ENDSTATE 0 | ||
83 | #endif | ||
84 | |||
68 | #ifndef __ASSEMBLY__ | 85 | #ifndef __ASSEMBLY__ |
69 | 86 | ||
70 | /* | 87 | /* |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index a62218013c78..c964f3fc3bc5 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -40,6 +40,12 @@ | |||
40 | #define TLB_V6_I_ASID (1 << 18) | 40 | #define TLB_V6_I_ASID (1 << 18) |
41 | 41 | ||
42 | #define TLB_BTB (1 << 28) | 42 | #define TLB_BTB (1 << 28) |
43 | |||
44 | /* Unified Inner Shareable TLB operations (ARMv7 MP extensions) */ | ||
45 | #define TLB_V7_UIS_PAGE (1 << 19) | ||
46 | #define TLB_V7_UIS_FULL (1 << 20) | ||
47 | #define TLB_V7_UIS_ASID (1 << 21) | ||
48 | |||
43 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ | 49 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ |
44 | #define TLB_DCLEAN (1 << 30) | 50 | #define TLB_DCLEAN (1 << 30) |
45 | #define TLB_WB (1 << 31) | 51 | #define TLB_WB (1 << 31) |
@@ -176,9 +182,17 @@ | |||
176 | # define v6wbi_always_flags (-1UL) | 182 | # define v6wbi_always_flags (-1UL) |
177 | #endif | 183 | #endif |
178 | 184 | ||
185 | #ifdef CONFIG_SMP | ||
186 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ | ||
187 | TLB_V7_UIS_FULL | TLB_V7_UIS_PAGE | TLB_V7_UIS_ASID) | ||
188 | #else | ||
189 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ | ||
190 | TLB_V6_U_FULL | TLB_V6_U_PAGE | TLB_V6_U_ASID) | ||
191 | #endif | ||
192 | |||
179 | #ifdef CONFIG_CPU_TLB_V7 | 193 | #ifdef CONFIG_CPU_TLB_V7 |
180 | # define v7wbi_possible_flags v6wbi_tlb_flags | 194 | # define v7wbi_possible_flags v7wbi_tlb_flags |
181 | # define v7wbi_always_flags v6wbi_tlb_flags | 195 | # define v7wbi_always_flags v7wbi_tlb_flags |
182 | # ifdef _TLB | 196 | # ifdef _TLB |
183 | # define MULTI_TLB 1 | 197 | # define MULTI_TLB 1 |
184 | # else | 198 | # else |
@@ -316,6 +330,8 @@ static inline void local_flush_tlb_all(void) | |||
316 | asm("mcr p15, 0, %0, c8, c6, 0" : : "r" (zero) : "cc"); | 330 | asm("mcr p15, 0, %0, c8, c6, 0" : : "r" (zero) : "cc"); |
317 | if (tlb_flag(TLB_V4_I_FULL | TLB_V6_I_FULL)) | 331 | if (tlb_flag(TLB_V4_I_FULL | TLB_V6_I_FULL)) |
318 | asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); | 332 | asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); |
333 | if (tlb_flag(TLB_V7_UIS_FULL)) | ||
334 | asm("mcr p15, 0, %0, c8, c3, 0" : : "r" (zero) : "cc"); | ||
319 | 335 | ||
320 | if (tlb_flag(TLB_BTB)) { | 336 | if (tlb_flag(TLB_BTB)) { |
321 | /* flush the branch target cache */ | 337 | /* flush the branch target cache */ |
@@ -351,6 +367,8 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) | |||
351 | asm("mcr p15, 0, %0, c8, c6, 2" : : "r" (asid) : "cc"); | 367 | asm("mcr p15, 0, %0, c8, c6, 2" : : "r" (asid) : "cc"); |
352 | if (tlb_flag(TLB_V6_I_ASID)) | 368 | if (tlb_flag(TLB_V6_I_ASID)) |
353 | asm("mcr p15, 0, %0, c8, c5, 2" : : "r" (asid) : "cc"); | 369 | asm("mcr p15, 0, %0, c8, c5, 2" : : "r" (asid) : "cc"); |
370 | if (tlb_flag(TLB_V7_UIS_ASID)) | ||
371 | asm("mcr p15, 0, %0, c8, c3, 2" : : "r" (asid) : "cc"); | ||
354 | 372 | ||
355 | if (tlb_flag(TLB_BTB)) { | 373 | if (tlb_flag(TLB_BTB)) { |
356 | /* flush the branch target cache */ | 374 | /* flush the branch target cache */ |
@@ -389,6 +407,8 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
389 | asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (uaddr) : "cc"); | 407 | asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (uaddr) : "cc"); |
390 | if (tlb_flag(TLB_V6_I_PAGE)) | 408 | if (tlb_flag(TLB_V6_I_PAGE)) |
391 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); | 409 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); |
410 | if (tlb_flag(TLB_V7_UIS_PAGE)) | ||
411 | asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (uaddr) : "cc"); | ||
392 | 412 | ||
393 | if (tlb_flag(TLB_BTB)) { | 413 | if (tlb_flag(TLB_BTB)) { |
394 | /* flush the branch target cache */ | 414 | /* flush the branch target cache */ |
@@ -424,6 +444,8 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
424 | asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (kaddr) : "cc"); | 444 | asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (kaddr) : "cc"); |
425 | if (tlb_flag(TLB_V6_I_PAGE)) | 445 | if (tlb_flag(TLB_V6_I_PAGE)) |
426 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (kaddr) : "cc"); | 446 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (kaddr) : "cc"); |
447 | if (tlb_flag(TLB_V7_UIS_PAGE)) | ||
448 | asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (kaddr) : "cc"); | ||
427 | 449 | ||
428 | if (tlb_flag(TLB_BTB)) { | 450 | if (tlb_flag(TLB_BTB)) { |
429 | /* flush the branch target cache */ | 451 | /* flush the branch target cache */ |