diff options
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/iommu.h | 3 | ||||
-rw-r--r-- | include/asm-sparc64/mmzone.h | 17 | ||||
-rw-r--r-- | include/asm-sparc64/numnodes.h | 6 | ||||
-rw-r--r-- | include/asm-sparc64/ptrace.h | 18 | ||||
-rw-r--r-- | include/asm-sparc64/sparsemem.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/topology.h | 73 | ||||
-rw-r--r-- | include/asm-sparc64/ttable.h | 14 |
7 files changed, 114 insertions, 19 deletions
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h index 46325ddee23b..d7b9afcba08b 100644 --- a/include/asm-sparc64/iommu.h +++ b/include/asm-sparc64/iommu.h | |||
@@ -56,6 +56,7 @@ struct strbuf { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | extern int iommu_table_init(struct iommu *iommu, int tsbsize, | 58 | extern int iommu_table_init(struct iommu *iommu, int tsbsize, |
59 | u32 dma_offset, u32 dma_addr_mask); | 59 | u32 dma_offset, u32 dma_addr_mask, |
60 | int numa_node); | ||
60 | 61 | ||
61 | #endif /* !(_SPARC64_IOMMU_H) */ | 62 | #endif /* !(_SPARC64_IOMMU_H) */ |
diff --git a/include/asm-sparc64/mmzone.h b/include/asm-sparc64/mmzone.h new file mode 100644 index 000000000000..ebf5986c12ed --- /dev/null +++ b/include/asm-sparc64/mmzone.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _SPARC64_MMZONE_H | ||
2 | #define _SPARC64_MMZONE_H | ||
3 | |||
4 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
5 | |||
6 | extern struct pglist_data *node_data[]; | ||
7 | |||
8 | #define NODE_DATA(nid) (node_data[nid]) | ||
9 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | ||
10 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_end_pfn) | ||
11 | |||
12 | extern int numa_cpu_lookup_table[]; | ||
13 | extern cpumask_t numa_cpumask_lookup_table[]; | ||
14 | |||
15 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ | ||
16 | |||
17 | #endif /* _SPARC64_MMZONE_H */ | ||
diff --git a/include/asm-sparc64/numnodes.h b/include/asm-sparc64/numnodes.h deleted file mode 100644 index 017e7e74f5e7..000000000000 --- a/include/asm-sparc64/numnodes.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _SPARC64_NUMNODES_H | ||
2 | #define _SPARC64_NUMNODES_H | ||
3 | |||
4 | #define NODES_SHIFT 0 | ||
5 | |||
6 | #endif /* !(_SPARC64_NUMNODES_H) */ | ||
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index 6da197803efc..b4b951d570bb 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h | |||
@@ -8,6 +8,8 @@ | |||
8 | * stack during a system call and basically all traps. | 8 | * stack during a system call and basically all traps. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define PT_REGS_MAGIC 0x57ac6c00 | ||
12 | |||
11 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
12 | 14 | ||
13 | struct pt_regs { | 15 | struct pt_regs { |
@@ -16,7 +18,19 @@ struct pt_regs { | |||
16 | unsigned long tpc; | 18 | unsigned long tpc; |
17 | unsigned long tnpc; | 19 | unsigned long tnpc; |
18 | unsigned int y; | 20 | unsigned int y; |
19 | unsigned int fprs; | 21 | |
22 | /* We encode a magic number, PT_REGS_MAGIC, along | ||
23 | * with the %tt (trap type) register value at trap | ||
24 | * entry time. The magic number allows us to identify | ||
25 | * accurately a trap stack frame in the stack | ||
26 | * unwinder, and the %tt value allows us to test | ||
27 | * things like "in a system call" etc. for an arbitray | ||
28 | * process. | ||
29 | * | ||
30 | * The PT_REGS_MAGIC is choosen such that it can be | ||
31 | * loaded completely using just a sethi instruction. | ||
32 | */ | ||
33 | unsigned int magic; | ||
20 | }; | 34 | }; |
21 | 35 | ||
22 | struct pt_regs32 { | 36 | struct pt_regs32 { |
@@ -147,7 +161,7 @@ extern void __show_regs(struct pt_regs *); | |||
147 | #define PT_V9_TPC 0x88 | 161 | #define PT_V9_TPC 0x88 |
148 | #define PT_V9_TNPC 0x90 | 162 | #define PT_V9_TNPC 0x90 |
149 | #define PT_V9_Y 0x98 | 163 | #define PT_V9_Y 0x98 |
150 | #define PT_V9_FPRS 0x9c | 164 | #define PT_V9_MAGIC 0x9c |
151 | #define PT_TSTATE PT_V9_TSTATE | 165 | #define PT_TSTATE PT_V9_TSTATE |
152 | #define PT_TPC PT_V9_TPC | 166 | #define PT_TPC PT_V9_TPC |
153 | #define PT_TNPC PT_V9_TNPC | 167 | #define PT_TNPC PT_V9_TNPC |
diff --git a/include/asm-sparc64/sparsemem.h b/include/asm-sparc64/sparsemem.h index 77bcd2bfa53c..b99d4e4b6d28 100644 --- a/include/asm-sparc64/sparsemem.h +++ b/include/asm-sparc64/sparsemem.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #define SECTION_SIZE_BITS 31 | 6 | #define SECTION_SIZE_BITS 30 |
7 | #define MAX_PHYSADDR_BITS 42 | 7 | #define MAX_PHYSADDR_BITS 42 |
8 | #define MAX_PHYSMEM_BITS 42 | 8 | #define MAX_PHYSMEM_BITS 42 |
9 | 9 | ||
diff --git a/include/asm-sparc64/topology.h b/include/asm-sparc64/topology.h index c6b557034f68..001c04027c82 100644 --- a/include/asm-sparc64/topology.h +++ b/include/asm-sparc64/topology.h | |||
@@ -1,6 +1,77 @@ | |||
1 | #ifndef _ASM_SPARC64_TOPOLOGY_H | 1 | #ifndef _ASM_SPARC64_TOPOLOGY_H |
2 | #define _ASM_SPARC64_TOPOLOGY_H | 2 | #define _ASM_SPARC64_TOPOLOGY_H |
3 | 3 | ||
4 | #ifdef CONFIG_NUMA | ||
5 | |||
6 | #include <asm/mmzone.h> | ||
7 | |||
8 | static inline int cpu_to_node(int cpu) | ||
9 | { | ||
10 | return numa_cpu_lookup_table[cpu]; | ||
11 | } | ||
12 | |||
13 | #define parent_node(node) (node) | ||
14 | |||
15 | static inline cpumask_t node_to_cpumask(int node) | ||
16 | { | ||
17 | return numa_cpumask_lookup_table[node]; | ||
18 | } | ||
19 | |||
20 | /* Returns a pointer to the cpumask of CPUs on Node 'node'. */ | ||
21 | #define node_to_cpumask_ptr(v, node) \ | ||
22 | cpumask_t *v = &(numa_cpumask_lookup_table[node]) | ||
23 | |||
24 | #define node_to_cpumask_ptr_next(v, node) \ | ||
25 | v = &(numa_cpumask_lookup_table[node]) | ||
26 | |||
27 | static inline int node_to_first_cpu(int node) | ||
28 | { | ||
29 | cpumask_t tmp; | ||
30 | tmp = node_to_cpumask(node); | ||
31 | return first_cpu(tmp); | ||
32 | } | ||
33 | |||
34 | struct pci_bus; | ||
35 | #ifdef CONFIG_PCI | ||
36 | extern int pcibus_to_node(struct pci_bus *pbus); | ||
37 | #else | ||
38 | static inline int pcibus_to_node(struct pci_bus *pbus) | ||
39 | { | ||
40 | return -1; | ||
41 | } | ||
42 | #endif | ||
43 | |||
44 | #define pcibus_to_cpumask(bus) \ | ||
45 | (pcibus_to_node(bus) == -1 ? \ | ||
46 | CPU_MASK_ALL : \ | ||
47 | node_to_cpumask(pcibus_to_node(bus))) | ||
48 | |||
49 | #define SD_NODE_INIT (struct sched_domain) { \ | ||
50 | .min_interval = 8, \ | ||
51 | .max_interval = 32, \ | ||
52 | .busy_factor = 32, \ | ||
53 | .imbalance_pct = 125, \ | ||
54 | .cache_nice_tries = 2, \ | ||
55 | .busy_idx = 3, \ | ||
56 | .idle_idx = 2, \ | ||
57 | .newidle_idx = 0, \ | ||
58 | .wake_idx = 1, \ | ||
59 | .forkexec_idx = 1, \ | ||
60 | .flags = SD_LOAD_BALANCE \ | ||
61 | | SD_BALANCE_FORK \ | ||
62 | | SD_BALANCE_EXEC \ | ||
63 | | SD_SERIALIZE \ | ||
64 | | SD_WAKE_BALANCE, \ | ||
65 | .last_balance = jiffies, \ | ||
66 | .balance_interval = 1, \ | ||
67 | } | ||
68 | |||
69 | #else /* CONFIG_NUMA */ | ||
70 | |||
71 | #include <asm-generic/topology.h> | ||
72 | |||
73 | #endif /* !(CONFIG_NUMA) */ | ||
74 | |||
4 | #ifdef CONFIG_SMP | 75 | #ifdef CONFIG_SMP |
5 | #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) | 76 | #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) |
6 | #define topology_core_id(cpu) (cpu_data(cpu).core_id) | 77 | #define topology_core_id(cpu) (cpu_data(cpu).core_id) |
@@ -10,8 +81,6 @@ | |||
10 | #define smt_capable() (sparc64_multi_core) | 81 | #define smt_capable() (sparc64_multi_core) |
11 | #endif /* CONFIG_SMP */ | 82 | #endif /* CONFIG_SMP */ |
12 | 83 | ||
13 | #include <asm-generic/topology.h> | ||
14 | |||
15 | #define cpu_coregroup_map(cpu) (cpu_core_map[cpu]) | 84 | #define cpu_coregroup_map(cpu) (cpu_core_map[cpu]) |
16 | 85 | ||
17 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ | 86 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ |
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index 7208a777750e..d3cc4eff39a6 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h | |||
@@ -28,7 +28,7 @@ | |||
28 | call routine; \ | 28 | call routine; \ |
29 | add %sp, PTREGS_OFF, %o0; \ | 29 | add %sp, PTREGS_OFF, %o0; \ |
30 | ba,pt %xcc, rtrap; \ | 30 | ba,pt %xcc, rtrap; \ |
31 | clr %l6; \ | 31 | nop; \ |
32 | nop; | 32 | nop; |
33 | 33 | ||
34 | #define TRAP_7INSNS(routine) \ | 34 | #define TRAP_7INSNS(routine) \ |
@@ -38,7 +38,7 @@ | |||
38 | call routine; \ | 38 | call routine; \ |
39 | add %sp, PTREGS_OFF, %o0; \ | 39 | add %sp, PTREGS_OFF, %o0; \ |
40 | ba,pt %xcc, rtrap; \ | 40 | ba,pt %xcc, rtrap; \ |
41 | clr %l6; | 41 | nop; |
42 | 42 | ||
43 | #define TRAP_SAVEFPU(routine) \ | 43 | #define TRAP_SAVEFPU(routine) \ |
44 | sethi %hi(109f), %g7; \ | 44 | sethi %hi(109f), %g7; \ |
@@ -47,7 +47,7 @@ | |||
47 | call routine; \ | 47 | call routine; \ |
48 | add %sp, PTREGS_OFF, %o0; \ | 48 | add %sp, PTREGS_OFF, %o0; \ |
49 | ba,pt %xcc, rtrap; \ | 49 | ba,pt %xcc, rtrap; \ |
50 | clr %l6; \ | 50 | nop; \ |
51 | nop; | 51 | nop; |
52 | 52 | ||
53 | #define TRAP_NOSAVE(routine) \ | 53 | #define TRAP_NOSAVE(routine) \ |
@@ -67,7 +67,7 @@ | |||
67 | call routine; \ | 67 | call routine; \ |
68 | add %sp, PTREGS_OFF, %o0; \ | 68 | add %sp, PTREGS_OFF, %o0; \ |
69 | ba,pt %xcc, rtrap; \ | 69 | ba,pt %xcc, rtrap; \ |
70 | clr %l6; \ | 70 | nop; \ |
71 | nop; | 71 | nop; |
72 | 72 | ||
73 | #define TRAP_ARG(routine, arg) \ | 73 | #define TRAP_ARG(routine, arg) \ |
@@ -78,7 +78,7 @@ | |||
78 | call routine; \ | 78 | call routine; \ |
79 | mov arg, %o1; \ | 79 | mov arg, %o1; \ |
80 | ba,pt %xcc, rtrap; \ | 80 | ba,pt %xcc, rtrap; \ |
81 | clr %l6; | 81 | nop; |
82 | 82 | ||
83 | #define TRAPTL1_ARG(routine, arg) \ | 83 | #define TRAPTL1_ARG(routine, arg) \ |
84 | sethi %hi(109f), %g7; \ | 84 | sethi %hi(109f), %g7; \ |
@@ -88,7 +88,7 @@ | |||
88 | call routine; \ | 88 | call routine; \ |
89 | mov arg, %o1; \ | 89 | mov arg, %o1; \ |
90 | ba,pt %xcc, rtrap; \ | 90 | ba,pt %xcc, rtrap; \ |
91 | clr %l6; | 91 | nop; |
92 | 92 | ||
93 | #define SYSCALL_TRAP(routine, systbl) \ | 93 | #define SYSCALL_TRAP(routine, systbl) \ |
94 | sethi %hi(109f), %g7; \ | 94 | sethi %hi(109f), %g7; \ |
@@ -166,7 +166,7 @@ | |||
166 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1; \ | 166 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1; \ |
167 | add %l1, 4, %l2; \ | 167 | add %l1, 4, %l2; \ |
168 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC]; \ | 168 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC]; \ |
169 | ba,pt %xcc, rtrap_clr_l6; \ | 169 | ba,pt %xcc, rtrap; \ |
170 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC]; | 170 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC]; |
171 | 171 | ||
172 | #ifdef CONFIG_KPROBES | 172 | #ifdef CONFIG_KPROBES |