diff options
Diffstat (limited to 'arch/sparc/include/asm')
-rw-r--r-- | arch/sparc/include/asm/cpudata_64.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/pgtable_64.h | 22 | ||||
-rw-r--r-- | arch/sparc/include/asm/topology_64.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/trap_block.h | 2 |
4 files changed, 27 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/cpudata_64.h b/arch/sparc/include/asm/cpudata_64.h index a6e424d185d0..a6cfdabb6054 100644 --- a/arch/sparc/include/asm/cpudata_64.h +++ b/arch/sparc/include/asm/cpudata_64.h | |||
@@ -24,7 +24,8 @@ typedef struct { | |||
24 | unsigned int icache_line_size; | 24 | unsigned int icache_line_size; |
25 | unsigned int ecache_size; | 25 | unsigned int ecache_size; |
26 | unsigned int ecache_line_size; | 26 | unsigned int ecache_line_size; |
27 | int core_id; | 27 | unsigned short sock_id; |
28 | unsigned short core_id; | ||
28 | int proc_id; | 29 | int proc_id; |
29 | } cpuinfo_sparc; | 30 | } cpuinfo_sparc; |
30 | 31 | ||
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index dc165ebdf05a..2a52c91d2c8a 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
@@ -308,12 +308,26 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t prot) | |||
308 | " sllx %1, 32, %1\n" | 308 | " sllx %1, 32, %1\n" |
309 | " or %0, %1, %0\n" | 309 | " or %0, %1, %0\n" |
310 | " .previous\n" | 310 | " .previous\n" |
311 | " .section .sun_m7_2insn_patch, \"ax\"\n" | ||
312 | " .word 661b\n" | ||
313 | " sethi %%uhi(%4), %1\n" | ||
314 | " sethi %%hi(%4), %0\n" | ||
315 | " .word 662b\n" | ||
316 | " or %1, %%ulo(%4), %1\n" | ||
317 | " or %0, %%lo(%4), %0\n" | ||
318 | " .word 663b\n" | ||
319 | " sllx %1, 32, %1\n" | ||
320 | " or %0, %1, %0\n" | ||
321 | " .previous\n" | ||
311 | : "=r" (mask), "=r" (tmp) | 322 | : "=r" (mask), "=r" (tmp) |
312 | : "i" (_PAGE_PADDR_4U | _PAGE_MODIFIED_4U | _PAGE_ACCESSED_4U | | 323 | : "i" (_PAGE_PADDR_4U | _PAGE_MODIFIED_4U | _PAGE_ACCESSED_4U | |
313 | _PAGE_CP_4U | _PAGE_CV_4U | _PAGE_E_4U | | 324 | _PAGE_CP_4U | _PAGE_CV_4U | _PAGE_E_4U | |
314 | _PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4U), | 325 | _PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4U), |
315 | "i" (_PAGE_PADDR_4V | _PAGE_MODIFIED_4V | _PAGE_ACCESSED_4V | | 326 | "i" (_PAGE_PADDR_4V | _PAGE_MODIFIED_4V | _PAGE_ACCESSED_4V | |
316 | _PAGE_CP_4V | _PAGE_CV_4V | _PAGE_E_4V | | 327 | _PAGE_CP_4V | _PAGE_CV_4V | _PAGE_E_4V | |
328 | _PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4V), | ||
329 | "i" (_PAGE_PADDR_4V | _PAGE_MODIFIED_4V | _PAGE_ACCESSED_4V | | ||
330 | _PAGE_CP_4V | _PAGE_E_4V | | ||
317 | _PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4V)); | 331 | _PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4V)); |
318 | 332 | ||
319 | return __pte((pte_val(pte) & mask) | (pgprot_val(prot) & ~mask)); | 333 | return __pte((pte_val(pte) & mask) | (pgprot_val(prot) & ~mask)); |
@@ -342,9 +356,15 @@ static inline pgprot_t pgprot_noncached(pgprot_t prot) | |||
342 | " andn %0, %4, %0\n" | 356 | " andn %0, %4, %0\n" |
343 | " or %0, %5, %0\n" | 357 | " or %0, %5, %0\n" |
344 | " .previous\n" | 358 | " .previous\n" |
359 | " .section .sun_m7_2insn_patch, \"ax\"\n" | ||
360 | " .word 661b\n" | ||
361 | " andn %0, %6, %0\n" | ||
362 | " or %0, %5, %0\n" | ||
363 | " .previous\n" | ||
345 | : "=r" (val) | 364 | : "=r" (val) |
346 | : "0" (val), "i" (_PAGE_CP_4U | _PAGE_CV_4U), "i" (_PAGE_E_4U), | 365 | : "0" (val), "i" (_PAGE_CP_4U | _PAGE_CV_4U), "i" (_PAGE_E_4U), |
347 | "i" (_PAGE_CP_4V | _PAGE_CV_4V), "i" (_PAGE_E_4V)); | 366 | "i" (_PAGE_CP_4V | _PAGE_CV_4V), "i" (_PAGE_E_4V), |
367 | "i" (_PAGE_CP_4V)); | ||
348 | 368 | ||
349 | return __pgprot(val); | 369 | return __pgprot(val); |
350 | } | 370 | } |
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h index ed8f071132e4..d1761df5cca6 100644 --- a/arch/sparc/include/asm/topology_64.h +++ b/arch/sparc/include/asm/topology_64.h | |||
@@ -40,11 +40,12 @@ static inline int pcibus_to_node(struct pci_bus *pbus) | |||
40 | #ifdef CONFIG_SMP | 40 | #ifdef CONFIG_SMP |
41 | #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) | 41 | #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) |
42 | #define topology_core_id(cpu) (cpu_data(cpu).core_id) | 42 | #define topology_core_id(cpu) (cpu_data(cpu).core_id) |
43 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | 43 | #define topology_core_cpumask(cpu) (&cpu_core_sib_map[cpu]) |
44 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) | 44 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) |
45 | #endif /* CONFIG_SMP */ | 45 | #endif /* CONFIG_SMP */ |
46 | 46 | ||
47 | extern cpumask_t cpu_core_map[NR_CPUS]; | 47 | extern cpumask_t cpu_core_map[NR_CPUS]; |
48 | extern cpumask_t cpu_core_sib_map[NR_CPUS]; | ||
48 | static inline const struct cpumask *cpu_coregroup_mask(int cpu) | 49 | static inline const struct cpumask *cpu_coregroup_mask(int cpu) |
49 | { | 50 | { |
50 | return &cpu_core_map[cpu]; | 51 | return &cpu_core_map[cpu]; |
diff --git a/arch/sparc/include/asm/trap_block.h b/arch/sparc/include/asm/trap_block.h index 6fd4436d32f0..ec9c04de3664 100644 --- a/arch/sparc/include/asm/trap_block.h +++ b/arch/sparc/include/asm/trap_block.h | |||
@@ -79,6 +79,8 @@ struct sun4v_2insn_patch_entry { | |||
79 | }; | 79 | }; |
80 | extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch, | 80 | extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch, |
81 | __sun4v_2insn_patch_end; | 81 | __sun4v_2insn_patch_end; |
82 | extern struct sun4v_2insn_patch_entry __sun_m7_2insn_patch, | ||
83 | __sun_m7_2insn_patch_end; | ||
82 | 84 | ||
83 | 85 | ||
84 | #endif /* !(__ASSEMBLY__) */ | 86 | #endif /* !(__ASSEMBLY__) */ |