diff options
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r-- | arch/mips/include/asm/cop2.h | 18 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-ip28/spaces.h | 7 | ||||
-rw-r--r-- | arch/mips/include/asm/page.h | 5 | ||||
-rw-r--r-- | arch/mips/include/asm/smp.h | 5 | ||||
-rw-r--r-- | arch/mips/include/asm/switch_to.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/topology.h | 8 |
6 files changed, 22 insertions, 25 deletions
diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h index d0352983b94d..51f80bd36fcc 100644 --- a/arch/mips/include/asm/cop2.h +++ b/arch/mips/include/asm/cop2.h | |||
@@ -16,8 +16,8 @@ | |||
16 | extern void octeon_cop2_save(struct octeon_cop2_state *); | 16 | extern void octeon_cop2_save(struct octeon_cop2_state *); |
17 | extern void octeon_cop2_restore(struct octeon_cop2_state *); | 17 | extern void octeon_cop2_restore(struct octeon_cop2_state *); |
18 | 18 | ||
19 | #define cop2_save(r) octeon_cop2_save(r) | 19 | #define cop2_save(r) octeon_cop2_save(&(r)->thread.cp2) |
20 | #define cop2_restore(r) octeon_cop2_restore(r) | 20 | #define cop2_restore(r) octeon_cop2_restore(&(r)->thread.cp2) |
21 | 21 | ||
22 | #define cop2_present 1 | 22 | #define cop2_present 1 |
23 | #define cop2_lazy_restore 1 | 23 | #define cop2_lazy_restore 1 |
@@ -26,26 +26,26 @@ extern void octeon_cop2_restore(struct octeon_cop2_state *); | |||
26 | 26 | ||
27 | extern void nlm_cop2_save(struct nlm_cop2_state *); | 27 | extern void nlm_cop2_save(struct nlm_cop2_state *); |
28 | extern void nlm_cop2_restore(struct nlm_cop2_state *); | 28 | extern void nlm_cop2_restore(struct nlm_cop2_state *); |
29 | #define cop2_save(r) nlm_cop2_save(r) | 29 | |
30 | #define cop2_restore(r) nlm_cop2_restore(r) | 30 | #define cop2_save(r) nlm_cop2_save(&(r)->thread.cp2) |
31 | #define cop2_restore(r) nlm_cop2_restore(&(r)->thread.cp2) | ||
31 | 32 | ||
32 | #define cop2_present 1 | 33 | #define cop2_present 1 |
33 | #define cop2_lazy_restore 0 | 34 | #define cop2_lazy_restore 0 |
34 | 35 | ||
35 | #elif defined(CONFIG_CPU_LOONGSON3) | 36 | #elif defined(CONFIG_CPU_LOONGSON3) |
36 | 37 | ||
37 | #define cop2_save(r) | ||
38 | #define cop2_restore(r) | ||
39 | |||
40 | #define cop2_present 1 | 38 | #define cop2_present 1 |
41 | #define cop2_lazy_restore 1 | 39 | #define cop2_lazy_restore 1 |
40 | #define cop2_save(r) do { (r); } while (0) | ||
41 | #define cop2_restore(r) do { (r); } while (0) | ||
42 | 42 | ||
43 | #else | 43 | #else |
44 | 44 | ||
45 | #define cop2_present 0 | 45 | #define cop2_present 0 |
46 | #define cop2_lazy_restore 0 | 46 | #define cop2_lazy_restore 0 |
47 | #define cop2_save(r) | 47 | #define cop2_save(r) do { (r); } while (0) |
48 | #define cop2_restore(r) | 48 | #define cop2_restore(r) do { (r); } while (0) |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | enum cu2_ops { | 51 | enum cu2_ops { |
diff --git a/arch/mips/include/asm/mach-ip28/spaces.h b/arch/mips/include/asm/mach-ip28/spaces.h index 5d6a76434d00..c4a912733b65 100644 --- a/arch/mips/include/asm/mach-ip28/spaces.h +++ b/arch/mips/include/asm/mach-ip28/spaces.h | |||
@@ -11,15 +11,8 @@ | |||
11 | #ifndef _ASM_MACH_IP28_SPACES_H | 11 | #ifndef _ASM_MACH_IP28_SPACES_H |
12 | #define _ASM_MACH_IP28_SPACES_H | 12 | #define _ASM_MACH_IP28_SPACES_H |
13 | 13 | ||
14 | #define CAC_BASE _AC(0xa800000000000000, UL) | ||
15 | |||
16 | #define HIGHMEM_START (~0UL) | ||
17 | |||
18 | #define PHYS_OFFSET _AC(0x20000000, UL) | 14 | #define PHYS_OFFSET _AC(0x20000000, UL) |
19 | 15 | ||
20 | #define UNCAC_BASE _AC(0xc0000000, UL) /* 0xa0000000 + PHYS_OFFSET */ | ||
21 | #define IO_BASE UNCAC_BASE | ||
22 | |||
23 | #include <asm/mach-generic/spaces.h> | 16 | #include <asm/mach-generic/spaces.h> |
24 | 17 | ||
25 | #endif /* _ASM_MACH_IP28_SPACES_H */ | 18 | #endif /* _ASM_MACH_IP28_SPACES_H */ |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index 5699ec3a71af..3be81803595d 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | /* | 38 | /* |
39 | * This is used for calculating the real page sizes | 39 | * This is used for calculating the real page sizes |
40 | * for FTLB or VTLB + FTLB confugrations. | 40 | * for FTLB or VTLB + FTLB configurations. |
41 | */ | 41 | */ |
42 | static inline unsigned int page_size_ftlb(unsigned int mmuextdef) | 42 | static inline unsigned int page_size_ftlb(unsigned int mmuextdef) |
43 | { | 43 | { |
@@ -223,7 +223,8 @@ static inline int pfn_valid(unsigned long pfn) | |||
223 | 223 | ||
224 | #endif | 224 | #endif |
225 | 225 | ||
226 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) | 226 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys((void *) \ |
227 | (kaddr)))) | ||
227 | 228 | ||
228 | extern int __virt_addr_valid(const volatile void *kaddr); | 229 | extern int __virt_addr_valid(const volatile void *kaddr); |
229 | #define virt_addr_valid(kaddr) \ | 230 | #define virt_addr_valid(kaddr) \ |
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index 1e0f20a9cdda..eacf865d21c2 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h | |||
@@ -37,11 +37,6 @@ extern int __cpu_logical_map[NR_CPUS]; | |||
37 | 37 | ||
38 | #define NO_PROC_ID (-1) | 38 | #define NO_PROC_ID (-1) |
39 | 39 | ||
40 | #define topology_physical_package_id(cpu) (cpu_data[cpu].package) | ||
41 | #define topology_core_id(cpu) (cpu_data[cpu].core) | ||
42 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | ||
43 | #define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu]) | ||
44 | |||
45 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ | 40 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ |
46 | #define SMP_CALL_FUNCTION 0x2 | 41 | #define SMP_CALL_FUNCTION 0x2 |
47 | /* Octeon - Tell another core to flush its icache */ | 42 | /* Octeon - Tell another core to flush its icache */ |
diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h index 495c1041a2cc..b928b6f898cd 100644 --- a/arch/mips/include/asm/switch_to.h +++ b/arch/mips/include/asm/switch_to.h | |||
@@ -92,7 +92,7 @@ do { \ | |||
92 | KSTK_STATUS(prev) &= ~ST0_CU2; \ | 92 | KSTK_STATUS(prev) &= ~ST0_CU2; \ |
93 | __c0_stat = read_c0_status(); \ | 93 | __c0_stat = read_c0_status(); \ |
94 | write_c0_status(__c0_stat | ST0_CU2); \ | 94 | write_c0_status(__c0_stat | ST0_CU2); \ |
95 | cop2_save(&prev->thread.cp2); \ | 95 | cop2_save(prev); \ |
96 | write_c0_status(__c0_stat & ~ST0_CU2); \ | 96 | write_c0_status(__c0_stat & ~ST0_CU2); \ |
97 | } \ | 97 | } \ |
98 | __clear_software_ll_bit(); \ | 98 | __clear_software_ll_bit(); \ |
@@ -111,7 +111,7 @@ do { \ | |||
111 | (KSTK_STATUS(current) & ST0_CU2)) { \ | 111 | (KSTK_STATUS(current) & ST0_CU2)) { \ |
112 | __c0_stat = read_c0_status(); \ | 112 | __c0_stat = read_c0_status(); \ |
113 | write_c0_status(__c0_stat | ST0_CU2); \ | 113 | write_c0_status(__c0_stat | ST0_CU2); \ |
114 | cop2_restore(¤t->thread.cp2); \ | 114 | cop2_restore(current); \ |
115 | write_c0_status(__c0_stat & ~ST0_CU2); \ | 115 | write_c0_status(__c0_stat & ~ST0_CU2); \ |
116 | } \ | 116 | } \ |
117 | if (cpu_has_dsp) \ | 117 | if (cpu_has_dsp) \ |
diff --git a/arch/mips/include/asm/topology.h b/arch/mips/include/asm/topology.h index 20ea4859c822..3e307ec2afba 100644 --- a/arch/mips/include/asm/topology.h +++ b/arch/mips/include/asm/topology.h | |||
@@ -9,5 +9,13 @@ | |||
9 | #define __ASM_TOPOLOGY_H | 9 | #define __ASM_TOPOLOGY_H |
10 | 10 | ||
11 | #include <topology.h> | 11 | #include <topology.h> |
12 | #include <linux/smp.h> | ||
13 | |||
14 | #ifdef CONFIG_SMP | ||
15 | #define topology_physical_package_id(cpu) (cpu_data[cpu].package) | ||
16 | #define topology_core_id(cpu) (cpu_data[cpu].core) | ||
17 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | ||
18 | #define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu]) | ||
19 | #endif | ||
12 | 20 | ||
13 | #endif /* __ASM_TOPOLOGY_H */ | 21 | #endif /* __ASM_TOPOLOGY_H */ |