diff options
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/cputype.h | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/exception.h | 19 | ||||
-rw-r--r-- | arch/arm/include/asm/localtimer.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/smp.h | 11 | ||||
-rw-r--r-- | arch/arm/include/asm/system.h | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/topology.h | 33 |
6 files changed, 73 insertions, 7 deletions
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index cd4458f64171..cb47d28cbe1f 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define CPUID_CACHETYPE 1 | 8 | #define CPUID_CACHETYPE 1 |
9 | #define CPUID_TCM 2 | 9 | #define CPUID_TCM 2 |
10 | #define CPUID_TLBTYPE 3 | 10 | #define CPUID_TLBTYPE 3 |
11 | #define CPUID_MPIDR 5 | ||
11 | 12 | ||
12 | #define CPUID_EXT_PFR0 "c1, 0" | 13 | #define CPUID_EXT_PFR0 "c1, 0" |
13 | #define CPUID_EXT_PFR1 "c1, 1" | 14 | #define CPUID_EXT_PFR1 "c1, 1" |
@@ -70,6 +71,11 @@ static inline unsigned int __attribute_const__ read_cpuid_tcmstatus(void) | |||
70 | return read_cpuid(CPUID_TCM); | 71 | return read_cpuid(CPUID_TCM); |
71 | } | 72 | } |
72 | 73 | ||
74 | static inline unsigned int __attribute_const__ read_cpuid_mpidr(void) | ||
75 | { | ||
76 | return read_cpuid(CPUID_MPIDR); | ||
77 | } | ||
78 | |||
73 | /* | 79 | /* |
74 | * Intel's XScale3 core supports some v6 features (supersections, L2) | 80 | * Intel's XScale3 core supports some v6 features (supersections, L2) |
75 | * but advertises itself as v5 as it does not support the v6 ISA. For | 81 | * but advertises itself as v5 as it does not support the v6 ISA. For |
diff --git a/arch/arm/include/asm/exception.h b/arch/arm/include/asm/exception.h new file mode 100644 index 000000000000..5abaf5bbd985 --- /dev/null +++ b/arch/arm/include/asm/exception.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Annotations for marking C functions as exception handlers. | ||
3 | * | ||
4 | * These should only be used for C functions that are called from the low | ||
5 | * level exception entry code and not any intervening C code. | ||
6 | */ | ||
7 | #ifndef __ASM_ARM_EXCEPTION_H | ||
8 | #define __ASM_ARM_EXCEPTION_H | ||
9 | |||
10 | #include <linux/ftrace.h> | ||
11 | |||
12 | #define __exception __attribute__((section(".exception.text"))) | ||
13 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
14 | #define __exception_irq_entry __irq_entry | ||
15 | #else | ||
16 | #define __exception_irq_entry __exception | ||
17 | #endif | ||
18 | |||
19 | #endif /* __ASM_ARM_EXCEPTION_H */ | ||
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h index 080d74f8128d..3306f281333c 100644 --- a/arch/arm/include/asm/localtimer.h +++ b/arch/arm/include/asm/localtimer.h | |||
@@ -22,6 +22,10 @@ void percpu_timer_setup(void); | |||
22 | */ | 22 | */ |
23 | asmlinkage void do_local_timer(struct pt_regs *); | 23 | asmlinkage void do_local_timer(struct pt_regs *); |
24 | 24 | ||
25 | /* | ||
26 | * Called from C code | ||
27 | */ | ||
28 | void handle_local_timer(struct pt_regs *); | ||
25 | 29 | ||
26 | #ifdef CONFIG_LOCAL_TIMERS | 30 | #ifdef CONFIG_LOCAL_TIMERS |
27 | 31 | ||
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index e42d96a45d3e..0a17b62538c2 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -33,6 +33,11 @@ extern void show_ipi_list(struct seq_file *, int); | |||
33 | asmlinkage void do_IPI(int ipinr, struct pt_regs *regs); | 33 | asmlinkage void do_IPI(int ipinr, struct pt_regs *regs); |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Called from C code, this handles an IPI. | ||
37 | */ | ||
38 | void handle_IPI(int ipinr, struct pt_regs *regs); | ||
39 | |||
40 | /* | ||
36 | * Setup the set of possible CPUs (via set_cpu_possible) | 41 | * Setup the set of possible CPUs (via set_cpu_possible) |
37 | */ | 42 | */ |
38 | extern void smp_init_cpus(void); | 43 | extern void smp_init_cpus(void); |
@@ -66,6 +71,12 @@ extern void platform_secondary_init(unsigned int cpu); | |||
66 | extern void platform_smp_prepare_cpus(unsigned int); | 71 | extern void platform_smp_prepare_cpus(unsigned int); |
67 | 72 | ||
68 | /* | 73 | /* |
74 | * Logical CPU mapping. | ||
75 | */ | ||
76 | extern int __cpu_logical_map[NR_CPUS]; | ||
77 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] | ||
78 | |||
79 | /* | ||
69 | * Initial data for bringing up a secondary CPU. | 80 | * Initial data for bringing up a secondary CPU. |
70 | */ | 81 | */ |
71 | struct secondary_data { | 82 | struct secondary_data { |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 832888d0c20c..ed6b0499a106 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -62,13 +62,6 @@ | |||
62 | 62 | ||
63 | #include <asm/outercache.h> | 63 | #include <asm/outercache.h> |
64 | 64 | ||
65 | #define __exception __attribute__((section(".exception.text"))) | ||
66 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
67 | #define __exception_irq_entry __irq_entry | ||
68 | #else | ||
69 | #define __exception_irq_entry __exception | ||
70 | #endif | ||
71 | |||
72 | struct thread_info; | 65 | struct thread_info; |
73 | struct task_struct; | 66 | struct task_struct; |
74 | 67 | ||
diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h index accbd7cad9b5..a7e457ed27c3 100644 --- a/arch/arm/include/asm/topology.h +++ b/arch/arm/include/asm/topology.h | |||
@@ -1,6 +1,39 @@ | |||
1 | #ifndef _ASM_ARM_TOPOLOGY_H | 1 | #ifndef _ASM_ARM_TOPOLOGY_H |
2 | #define _ASM_ARM_TOPOLOGY_H | 2 | #define _ASM_ARM_TOPOLOGY_H |
3 | 3 | ||
4 | #ifdef CONFIG_ARM_CPU_TOPOLOGY | ||
5 | |||
6 | #include <linux/cpumask.h> | ||
7 | |||
8 | struct cputopo_arm { | ||
9 | int thread_id; | ||
10 | int core_id; | ||
11 | int socket_id; | ||
12 | cpumask_t thread_sibling; | ||
13 | cpumask_t core_sibling; | ||
14 | }; | ||
15 | |||
16 | extern struct cputopo_arm cpu_topology[NR_CPUS]; | ||
17 | |||
18 | #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id) | ||
19 | #define topology_core_id(cpu) (cpu_topology[cpu].core_id) | ||
20 | #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling) | ||
21 | #define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_sibling) | ||
22 | |||
23 | #define mc_capable() (cpu_topology[0].socket_id != -1) | ||
24 | #define smt_capable() (cpu_topology[0].thread_id != -1) | ||
25 | |||
26 | void init_cpu_topology(void); | ||
27 | void store_cpu_topology(unsigned int cpuid); | ||
28 | const struct cpumask *cpu_coregroup_mask(unsigned int cpu); | ||
29 | |||
30 | #else | ||
31 | |||
32 | static inline void init_cpu_topology(void) { } | ||
33 | static inline void store_cpu_topology(unsigned int cpuid) { } | ||
34 | |||
35 | #endif | ||
36 | |||
4 | #include <asm-generic/topology.h> | 37 | #include <asm-generic/topology.h> |
5 | 38 | ||
6 | #endif /* _ASM_ARM_TOPOLOGY_H */ | 39 | #endif /* _ASM_ARM_TOPOLOGY_H */ |