aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/compat.h2
-rw-r--r--include/asm-sparc64/percpu.h22
-rw-r--r--include/asm-sparc64/pgalloc.h8
-rw-r--r--include/asm-sparc64/socket.h1
-rw-r--r--include/asm-sparc64/tlb.h4
5 files changed, 11 insertions, 26 deletions
diff --git a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h
index 01fe6682b405..f260b58f5ce9 100644
--- a/include/asm-sparc64/compat.h
+++ b/include/asm-sparc64/compat.h
@@ -152,7 +152,7 @@ typedef u32 compat_sigset_word;
152 * A pointer passed in from user mode. This should not 152 * A pointer passed in from user mode. This should not
153 * be used for syscall parameters, just declare them 153 * be used for syscall parameters, just declare them
154 * as pointers because the syscall entry code will have 154 * as pointers because the syscall entry code will have
155 * appropriately comverted them already. 155 * appropriately converted them already.
156 */ 156 */
157typedef u32 compat_uptr_t; 157typedef u32 compat_uptr_t;
158 158
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h
index c7e52decba98..bee64593023e 100644
--- a/include/asm-sparc64/percpu.h
+++ b/include/asm-sparc64/percpu.h
@@ -7,7 +7,6 @@ register unsigned long __local_per_cpu_offset asm("g5");
7 7
8#ifdef CONFIG_SMP 8#ifdef CONFIG_SMP
9 9
10#define setup_per_cpu_areas() do { } while (0)
11extern void real_setup_per_cpu_areas(void); 10extern void real_setup_per_cpu_areas(void);
12 11
13extern unsigned long __per_cpu_base; 12extern unsigned long __per_cpu_base;
@@ -16,29 +15,14 @@ extern unsigned long __per_cpu_shift;
16 (__per_cpu_base + ((unsigned long)(__cpu) << __per_cpu_shift)) 15 (__per_cpu_base + ((unsigned long)(__cpu) << __per_cpu_shift))
17#define per_cpu_offset(x) (__per_cpu_offset(x)) 16#define per_cpu_offset(x) (__per_cpu_offset(x))
18 17
19/* var is in discarded region: offset to particular copy we want */ 18#define __my_cpu_offset __local_per_cpu_offset
20#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) 19
21#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))
22#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))
23
24/* A macro to avoid #include hell... */
25#define percpu_modcopy(pcpudst, src, size) \
26do { \
27 unsigned int __i; \
28 for_each_possible_cpu(__i) \
29 memcpy((pcpudst)+__per_cpu_offset(__i), \
30 (src), (size)); \
31} while (0)
32#else /* ! SMP */ 20#else /* ! SMP */
33 21
34#define real_setup_per_cpu_areas() do { } while (0) 22#define real_setup_per_cpu_areas() do { } while (0)
35 23
36#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var))
37#define __get_cpu_var(var) per_cpu__##var
38#define __raw_get_cpu_var(var) per_cpu__##var
39
40#endif /* SMP */ 24#endif /* SMP */
41 25
42#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name 26#include <asm-generic/percpu.h>
43 27
44#endif /* __ARCH_SPARC64_PERCPU__ */ 28#endif /* __ARCH_SPARC64_PERCPU__ */
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
index 5d66b858a965..b48f73c2274e 100644
--- a/include/asm-sparc64/pgalloc.h
+++ b/include/asm-sparc64/pgalloc.h
@@ -20,7 +20,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
20 return quicklist_alloc(0, GFP_KERNEL, NULL); 20 return quicklist_alloc(0, GFP_KERNEL, NULL);
21} 21}
22 22
23static inline void pgd_free(pgd_t *pgd) 23static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
24{ 24{
25 quicklist_free(0, NULL, pgd); 25 quicklist_free(0, NULL, pgd);
26} 26}
@@ -32,7 +32,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
32 return quicklist_alloc(0, GFP_KERNEL, NULL); 32 return quicklist_alloc(0, GFP_KERNEL, NULL);
33} 33}
34 34
35static inline void pmd_free(pmd_t *pmd) 35static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
36{ 36{
37 quicklist_free(0, NULL, pmd); 37 quicklist_free(0, NULL, pmd);
38} 38}
@@ -50,12 +50,12 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm,
50 return pg ? virt_to_page(pg) : NULL; 50 return pg ? virt_to_page(pg) : NULL;
51} 51}
52 52
53static inline void pte_free_kernel(pte_t *pte) 53static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
54{ 54{
55 quicklist_free(0, NULL, pte); 55 quicklist_free(0, NULL, pte);
56} 56}
57 57
58static inline void pte_free(struct page *ptepage) 58static inline void pte_free(struct mm_struct *mm, struct page *ptepage)
59{ 59{
60 quicklist_free_page(0, NULL, ptepage); 60 quicklist_free_page(0, NULL, ptepage);
61} 61}
diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h
index 986441dcb8f0..44a625af6e31 100644
--- a/include/asm-sparc64/socket.h
+++ b/include/asm-sparc64/socket.h
@@ -57,4 +57,5 @@
57#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 57#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
58#define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 58#define SO_SECURITY_ENCRYPTION_NETWORK 0x5004
59 59
60#define SO_MARK 0x0022
60#endif /* _ASM_SOCKET_H */ 61#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h
index 349d1d3e9c27..ec81cdedef2c 100644
--- a/include/asm-sparc64/tlb.h
+++ b/include/asm-sparc64/tlb.h
@@ -100,8 +100,8 @@ static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page)
100} 100}
101 101
102#define tlb_remove_tlb_entry(mp,ptep,addr) do { } while (0) 102#define tlb_remove_tlb_entry(mp,ptep,addr) do { } while (0)
103#define pte_free_tlb(mp,ptepage) pte_free(ptepage) 103#define pte_free_tlb(mp, ptepage) pte_free((mp)->mm, ptepage)
104#define pmd_free_tlb(mp,pmdp) pmd_free(pmdp) 104#define pmd_free_tlb(mp, pmdp) pmd_free((mp)->mm, pmdp)
105#define pud_free_tlb(tlb,pudp) __pud_free_tlb(tlb,pudp) 105#define pud_free_tlb(tlb,pudp) __pud_free_tlb(tlb,pudp)
106 106
107#define tlb_migrate_finish(mm) do { } while (0) 107#define tlb_migrate_finish(mm) do { } while (0)