diff options
Diffstat (limited to 'arch/sparc/include/asm')
-rw-r--r-- | arch/sparc/include/asm/btext.h | 6 | ||||
-rw-r--r-- | arch/sparc/include/asm/cacheflush_32.h | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/cacheflush_64.h | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/leon.h | 45 | ||||
-rw-r--r-- | arch/sparc/include/asm/prom.h | 55 | ||||
-rw-r--r-- | arch/sparc/include/asm/rwsem.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/smp_32.h | 9 | ||||
-rw-r--r-- | arch/sparc/include/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/unistd.h | 3 |
9 files changed, 64 insertions, 62 deletions
diff --git a/arch/sparc/include/asm/btext.h b/arch/sparc/include/asm/btext.h new file mode 100644 index 00000000000..9b2bc6b6ed0 --- /dev/null +++ b/arch/sparc/include/asm/btext.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _SPARC_BTEXT_H | ||
2 | #define _SPARC_BTEXT_H | ||
3 | |||
4 | extern int btext_find_display(void); | ||
5 | |||
6 | #endif /* _SPARC_BTEXT_H */ | ||
diff --git a/arch/sparc/include/asm/cacheflush_32.h b/arch/sparc/include/asm/cacheflush_32.h index 68ac1091027..2e468773f25 100644 --- a/arch/sparc/include/asm/cacheflush_32.h +++ b/arch/sparc/include/asm/cacheflush_32.h | |||
@@ -75,6 +75,7 @@ BTFIXUPDEF_CALL(void, flush_sig_insns, struct mm_struct *, unsigned long) | |||
75 | 75 | ||
76 | extern void sparc_flush_page_to_ram(struct page *page); | 76 | extern void sparc_flush_page_to_ram(struct page *page); |
77 | 77 | ||
78 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 | ||
78 | #define flush_dcache_page(page) sparc_flush_page_to_ram(page) | 79 | #define flush_dcache_page(page) sparc_flush_page_to_ram(page) |
79 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 80 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
80 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 81 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
diff --git a/arch/sparc/include/asm/cacheflush_64.h b/arch/sparc/include/asm/cacheflush_64.h index c43321729b3..b95384033e8 100644 --- a/arch/sparc/include/asm/cacheflush_64.h +++ b/arch/sparc/include/asm/cacheflush_64.h | |||
@@ -37,6 +37,7 @@ extern void flush_dcache_page_all(struct mm_struct *mm, struct page *page); | |||
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | extern void __flush_dcache_range(unsigned long start, unsigned long end); | 39 | extern void __flush_dcache_range(unsigned long start, unsigned long end); |
40 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 | ||
40 | extern void flush_dcache_page(struct page *page); | 41 | extern void flush_dcache_page(struct page *page); |
41 | 42 | ||
42 | #define flush_icache_page(vma, pg) do { } while(0) | 43 | #define flush_icache_page(vma, pg) do { } while(0) |
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h index 28a42b73f64..3ea5964c43b 100644 --- a/arch/sparc/include/asm/leon.h +++ b/arch/sparc/include/asm/leon.h | |||
@@ -148,7 +148,7 @@ static inline unsigned long leon_load_reg(unsigned long paddr) | |||
148 | return retval; | 148 | return retval; |
149 | } | 149 | } |
150 | 150 | ||
151 | extern inline void leon_srmmu_disabletlb(void) | 151 | static inline void leon_srmmu_disabletlb(void) |
152 | { | 152 | { |
153 | unsigned int retval; | 153 | unsigned int retval; |
154 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), | 154 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), |
@@ -158,7 +158,7 @@ extern inline void leon_srmmu_disabletlb(void) | |||
158 | "i"(ASI_LEON_MMUREGS) : "memory"); | 158 | "i"(ASI_LEON_MMUREGS) : "memory"); |
159 | } | 159 | } |
160 | 160 | ||
161 | extern inline void leon_srmmu_enabletlb(void) | 161 | static inline void leon_srmmu_enabletlb(void) |
162 | { | 162 | { |
163 | unsigned int retval; | 163 | unsigned int retval; |
164 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), | 164 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), |
@@ -190,7 +190,7 @@ extern void leon_init_IRQ(void); | |||
190 | 190 | ||
191 | extern unsigned long last_valid_pfn; | 191 | extern unsigned long last_valid_pfn; |
192 | 192 | ||
193 | extern inline unsigned long sparc_leon3_get_dcachecfg(void) | 193 | static inline unsigned long sparc_leon3_get_dcachecfg(void) |
194 | { | 194 | { |
195 | unsigned int retval; | 195 | unsigned int retval; |
196 | __asm__ __volatile__("lda [%1] %2, %0\n\t" : | 196 | __asm__ __volatile__("lda [%1] %2, %0\n\t" : |
@@ -201,7 +201,7 @@ extern inline unsigned long sparc_leon3_get_dcachecfg(void) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | /* enable snooping */ | 203 | /* enable snooping */ |
204 | extern inline void sparc_leon3_enable_snooping(void) | 204 | static inline void sparc_leon3_enable_snooping(void) |
205 | { | 205 | { |
206 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" | 206 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" |
207 | "set 0x800000, %%l2\n\t" | 207 | "set 0x800000, %%l2\n\t" |
@@ -209,7 +209,14 @@ extern inline void sparc_leon3_enable_snooping(void) | |||
209 | "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); | 209 | "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); |
210 | }; | 210 | }; |
211 | 211 | ||
212 | extern inline void sparc_leon3_disable_cache(void) | 212 | static inline int sparc_leon3_snooping_enabled(void) |
213 | { | ||
214 | u32 cctrl; | ||
215 | __asm__ __volatile__("lda [%%g0] 2, %0\n\t" : "=r"(cctrl)); | ||
216 | return (cctrl >> 23) & 1; | ||
217 | }; | ||
218 | |||
219 | static inline void sparc_leon3_disable_cache(void) | ||
213 | { | 220 | { |
214 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" | 221 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" |
215 | "set 0x00000f, %%l2\n\t" | 222 | "set 0x00000f, %%l2\n\t" |
@@ -340,6 +347,30 @@ extern int leon_flush_needed(void); | |||
340 | extern void leon_switch_mm(void); | 347 | extern void leon_switch_mm(void); |
341 | extern int srmmu_swprobe_trace; | 348 | extern int srmmu_swprobe_trace; |
342 | 349 | ||
350 | #ifdef CONFIG_SMP | ||
351 | extern int leon_smp_nrcpus(void); | ||
352 | extern void leon_clear_profile_irq(int cpu); | ||
353 | extern void leon_smp_done(void); | ||
354 | extern void leon_boot_cpus(void); | ||
355 | extern int leon_boot_one_cpu(int i); | ||
356 | void leon_init_smp(void); | ||
357 | extern void cpu_probe(void); | ||
358 | extern void cpu_idle(void); | ||
359 | extern void init_IRQ(void); | ||
360 | extern void cpu_panic(void); | ||
361 | extern int __leon_processor_id(void); | ||
362 | void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu); | ||
363 | |||
364 | extern unsigned int real_irq_entry[], smpleon_ticker[]; | ||
365 | extern unsigned int patchme_maybe_smp_msg[]; | ||
366 | extern unsigned long trapbase_cpu1[]; | ||
367 | extern unsigned long trapbase_cpu2[]; | ||
368 | extern unsigned long trapbase_cpu3[]; | ||
369 | extern unsigned int t_nmi[], linux_trap_ipi15_leon[]; | ||
370 | extern unsigned int linux_trap_ipi15_sun4m[]; | ||
371 | |||
372 | #endif /* CONFIG_SMP */ | ||
373 | |||
343 | #endif /* __KERNEL__ */ | 374 | #endif /* __KERNEL__ */ |
344 | 375 | ||
345 | #endif /* __ASSEMBLY__ */ | 376 | #endif /* __ASSEMBLY__ */ |
@@ -356,6 +387,10 @@ extern int srmmu_swprobe_trace; | |||
356 | #define leon_switch_mm() do {} while (0) | 387 | #define leon_switch_mm() do {} while (0) |
357 | #define leon_init_IRQ() do {} while (0) | 388 | #define leon_init_IRQ() do {} while (0) |
358 | #define init_leon() do {} while (0) | 389 | #define init_leon() do {} while (0) |
390 | #define leon_smp_done() do {} while (0) | ||
391 | #define leon_boot_cpus() do {} while (0) | ||
392 | #define leon_boot_one_cpu(i) 1 | ||
393 | #define leon_init_smp() do {} while (0) | ||
359 | 394 | ||
360 | #endif /* !defined(CONFIG_SPARC_LEON) */ | 395 | #endif /* !defined(CONFIG_SPARC_LEON) */ |
361 | 396 | ||
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h index 82a190d7efc..f845828ca4c 100644 --- a/arch/sparc/include/asm/prom.h +++ b/arch/sparc/include/asm/prom.h | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/of.h> /* linux/of.h gets to determine #include ordering */ | ||
1 | #ifndef _SPARC_PROM_H | 2 | #ifndef _SPARC_PROM_H |
2 | #define _SPARC_PROM_H | 3 | #define _SPARC_PROM_H |
3 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
@@ -28,50 +29,11 @@ | |||
28 | #define of_prop_cmp(s1, s2) strcasecmp((s1), (s2)) | 29 | #define of_prop_cmp(s1, s2) strcasecmp((s1), (s2)) |
29 | #define of_node_cmp(s1, s2) strcmp((s1), (s2)) | 30 | #define of_node_cmp(s1, s2) strcmp((s1), (s2)) |
30 | 31 | ||
31 | typedef u32 phandle; | ||
32 | typedef u32 ihandle; | ||
33 | |||
34 | struct property { | ||
35 | char *name; | ||
36 | int length; | ||
37 | void *value; | ||
38 | struct property *next; | ||
39 | unsigned long _flags; | ||
40 | unsigned int unique_id; | ||
41 | }; | ||
42 | |||
43 | struct of_irq_controller; | ||
44 | struct device_node { | ||
45 | const char *name; | ||
46 | const char *type; | ||
47 | phandle node; | ||
48 | char *path_component_name; | ||
49 | char *full_name; | ||
50 | |||
51 | struct property *properties; | ||
52 | struct property *deadprops; /* removed properties */ | ||
53 | struct device_node *parent; | ||
54 | struct device_node *child; | ||
55 | struct device_node *sibling; | ||
56 | struct device_node *next; /* next device of same type */ | ||
57 | struct device_node *allnext; /* next in list of all nodes */ | ||
58 | struct proc_dir_entry *pde; /* this node's proc directory */ | ||
59 | struct kref kref; | ||
60 | unsigned long _flags; | ||
61 | void *data; | ||
62 | unsigned int unique_id; | ||
63 | |||
64 | struct of_irq_controller *irq_trans; | ||
65 | }; | ||
66 | |||
67 | struct of_irq_controller { | 32 | struct of_irq_controller { |
68 | unsigned int (*irq_build)(struct device_node *, unsigned int, void *); | 33 | unsigned int (*irq_build)(struct device_node *, unsigned int, void *); |
69 | void *data; | 34 | void *data; |
70 | }; | 35 | }; |
71 | 36 | ||
72 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | ||
73 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | ||
74 | |||
75 | extern struct device_node *of_find_node_by_cpuid(int cpuid); | 37 | extern struct device_node *of_find_node_by_cpuid(int cpuid); |
76 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 38 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
77 | extern struct mutex of_set_property_mutex; | 39 | extern struct mutex of_set_property_mutex; |
@@ -89,15 +51,6 @@ extern void prom_build_devicetree(void); | |||
89 | extern void of_populate_present_mask(void); | 51 | extern void of_populate_present_mask(void); |
90 | extern void of_fill_in_cpu_data(void); | 52 | extern void of_fill_in_cpu_data(void); |
91 | 53 | ||
92 | /* Dummy ref counting routines - to be implemented later */ | ||
93 | static inline struct device_node *of_node_get(struct device_node *node) | ||
94 | { | ||
95 | return node; | ||
96 | } | ||
97 | static inline void of_node_put(struct device_node *node) | ||
98 | { | ||
99 | } | ||
100 | |||
101 | /* These routines are here to provide compatibility with how powerpc | 54 | /* These routines are here to provide compatibility with how powerpc |
102 | * handles IRQ mapping for OF device nodes. We precompute and permanently | 55 | * handles IRQ mapping for OF device nodes. We precompute and permanently |
103 | * register them in the of_device objects, whereas powerpc computes them | 56 | * register them in the of_device objects, whereas powerpc computes them |
@@ -108,12 +61,6 @@ static inline void irq_dispose_mapping(unsigned int virq) | |||
108 | { | 61 | { |
109 | } | 62 | } |
110 | 63 | ||
111 | /* | ||
112 | * NB: This is here while we transition from using asm/prom.h | ||
113 | * to linux/of.h | ||
114 | */ | ||
115 | #include <linux/of.h> | ||
116 | |||
117 | extern struct device_node *of_console_device; | 64 | extern struct device_node *of_console_device; |
118 | extern char *of_console_path; | 65 | extern char *of_console_path; |
119 | extern char *of_console_options; | 66 | extern char *of_console_options; |
diff --git a/arch/sparc/include/asm/rwsem.h b/arch/sparc/include/asm/rwsem.h index 1dc129ac2fe..6e5621006f8 100644 --- a/arch/sparc/include/asm/rwsem.h +++ b/arch/sparc/include/asm/rwsem.h | |||
@@ -35,8 +35,8 @@ struct rw_semaphore { | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #define __RWSEM_INITIALIZER(name) \ | 37 | #define __RWSEM_INITIALIZER(name) \ |
38 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \ | 38 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ |
39 | __RWSEM_DEP_MAP_INIT(name) } | 39 | LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } |
40 | 40 | ||
41 | #define DECLARE_RWSEM(name) \ | 41 | #define DECLARE_RWSEM(name) \ |
42 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | 42 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) |
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index 58101dc7049..841905c1021 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -106,6 +106,15 @@ static inline int hard_smp4d_processor_id(void) | |||
106 | return cpuid; | 106 | return cpuid; |
107 | } | 107 | } |
108 | 108 | ||
109 | extern inline int hard_smpleon_processor_id(void) | ||
110 | { | ||
111 | int cpuid; | ||
112 | __asm__ __volatile__("rd %%asr17,%0\n\t" | ||
113 | "srl %0,28,%0" : | ||
114 | "=&r" (cpuid) : ); | ||
115 | return cpuid; | ||
116 | } | ||
117 | |||
109 | #ifndef MODULE | 118 | #ifndef MODULE |
110 | static inline int hard_smp_processor_id(void) | 119 | static inline int hard_smp_processor_id(void) |
111 | { | 120 | { |
diff --git a/arch/sparc/include/asm/socket.h b/arch/sparc/include/asm/socket.h index 3a5ae3d1208..9d3fefcff2f 100644 --- a/arch/sparc/include/asm/socket.h +++ b/arch/sparc/include/asm/socket.h | |||
@@ -56,6 +56,8 @@ | |||
56 | #define SO_TIMESTAMPING 0x0023 | 56 | #define SO_TIMESTAMPING 0x0023 |
57 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | 57 | #define SCM_TIMESTAMPING SO_TIMESTAMPING |
58 | 58 | ||
59 | #define SO_RXQ_OVFL 0x0024 | ||
60 | |||
59 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | 61 | /* Security levels - as per NRL IPv6 - don't actually do anything */ |
60 | #define SO_SECURITY_AUTHENTICATION 0x5001 | 62 | #define SO_SECURITY_AUTHENTICATION 0x5001 |
61 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 | 63 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 |
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h index 42f2316c3ea..d8d25bd9712 100644 --- a/arch/sparc/include/asm/unistd.h +++ b/arch/sparc/include/asm/unistd.h | |||
@@ -396,8 +396,9 @@ | |||
396 | #define __NR_pwritev 325 | 396 | #define __NR_pwritev 325 |
397 | #define __NR_rt_tgsigqueueinfo 326 | 397 | #define __NR_rt_tgsigqueueinfo 326 |
398 | #define __NR_perf_event_open 327 | 398 | #define __NR_perf_event_open 327 |
399 | #define __NR_recvmmsg 328 | ||
399 | 400 | ||
400 | #define NR_SYSCALLS 328 | 401 | #define NR_SYSCALLS 329 |
401 | 402 | ||
402 | #ifdef __32bit_syscall_numbers__ | 403 | #ifdef __32bit_syscall_numbers__ |
403 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | 404 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, |