aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-parisc')
-rw-r--r--include/asm-parisc/agp.h1
-rw-r--r--include/asm-parisc/atomic.h33
-rw-r--r--include/asm-parisc/compat.h2
-rw-r--r--include/asm-parisc/elf.h5
-rw-r--r--include/asm-parisc/linkage.h2
-rw-r--r--include/asm-parisc/page.h4
-rw-r--r--include/asm-parisc/pdc.h3
-rw-r--r--include/asm-parisc/pgalloc.h10
-rw-r--r--include/asm-parisc/processor.h3
-rw-r--r--include/asm-parisc/socket.h2
-rw-r--r--include/asm-parisc/tlb.h4
-rw-r--r--include/asm-parisc/vga.h2
12 files changed, 49 insertions, 22 deletions
diff --git a/include/asm-parisc/agp.h b/include/asm-parisc/agp.h
index 9f61d4eb6c01..9651660da639 100644
--- a/include/asm-parisc/agp.h
+++ b/include/asm-parisc/agp.h
@@ -9,7 +9,6 @@
9 9
10#define map_page_into_agp(page) /* nothing */ 10#define map_page_into_agp(page) /* nothing */
11#define unmap_page_from_agp(page) /* nothing */ 11#define unmap_page_from_agp(page) /* nothing */
12#define flush_agp_mappings() /* nothing */
13#define flush_agp_cache() mb() 12#define flush_agp_cache() mb()
14 13
15/* Convert a physical address to an address suitable for the GART. */ 14/* Convert a physical address to an address suitable for the GART. */
diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h
index e894ee35074b..57fcc4a5ebb4 100644
--- a/include/asm-parisc/atomic.h
+++ b/include/asm-parisc/atomic.h
@@ -122,6 +122,39 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
122 (unsigned long)_n_, sizeof(*(ptr))); \ 122 (unsigned long)_n_, sizeof(*(ptr))); \
123 }) 123 })
124 124
125#include <asm-generic/cmpxchg-local.h>
126
127static inline unsigned long __cmpxchg_local(volatile void *ptr,
128 unsigned long old,
129 unsigned long new_, int size)
130{
131 switch (size) {
132#ifdef CONFIG_64BIT
133 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
134#endif
135 case 4: return __cmpxchg_u32(ptr, old, new_);
136 default:
137 return __cmpxchg_local_generic(ptr, old, new_, size);
138 }
139}
140
141/*
142 * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
143 * them available.
144 */
145#define cmpxchg_local(ptr, o, n) \
146 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
147 (unsigned long)(n), sizeof(*(ptr))))
148#ifdef CONFIG_64BIT
149#define cmpxchg64_local(ptr, o, n) \
150 ({ \
151 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
152 cmpxchg_local((ptr), (o), (n)); \
153 })
154#else
155#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
156#endif
157
125/* Note that we need not lock read accesses - aligned word writes/reads 158/* Note that we need not lock read accesses - aligned word writes/reads
126 * are atomic, so a reader never sees unconsistent values. 159 * are atomic, so a reader never sees unconsistent values.
127 * 160 *
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h
index 5a85d1b025c8..7f32611a7a5e 100644
--- a/include/asm-parisc/compat.h
+++ b/include/asm-parisc/compat.h
@@ -132,7 +132,7 @@ typedef u32 compat_sigset_word;
132 * A pointer passed in from user mode. This should not 132 * A pointer passed in from user mode. This should not
133 * be used for syscall parameters, just declare them 133 * be used for syscall parameters, just declare them
134 * as pointers because the syscall entry code will have 134 * as pointers because the syscall entry code will have
135 * appropriately comverted them already. 135 * appropriately converted them already.
136 */ 136 */
137typedef u32 compat_uptr_t; 137typedef u32 compat_uptr_t;
138 138
diff --git a/include/asm-parisc/elf.h b/include/asm-parisc/elf.h
index f628ac7de83d..ce0c0d844c7d 100644
--- a/include/asm-parisc/elf.h
+++ b/include/asm-parisc/elf.h
@@ -28,7 +28,7 @@
28#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */ 28#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */
29#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */ 29#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */
30 30
31/* Additional section indeces. */ 31/* Additional section indices. */
32 32
33#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared 33#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared
34 symbols in ANSI C. */ 34 symbols in ANSI C. */
@@ -237,14 +237,11 @@ typedef unsigned long elf_greg_t;
237 237
238#define ELF_PLATFORM ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */) 238#define ELF_PLATFORM ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */)
239 239
240#ifdef __KERNEL__
241#define SET_PERSONALITY(ex, ibcs2) \ 240#define SET_PERSONALITY(ex, ibcs2) \
242 current->personality = PER_LINUX; \ 241 current->personality = PER_LINUX; \
243 current->thread.map_base = DEFAULT_MAP_BASE; \ 242 current->thread.map_base = DEFAULT_MAP_BASE; \
244 current->thread.task_size = DEFAULT_TASK_SIZE \ 243 current->thread.task_size = DEFAULT_TASK_SIZE \
245 244
246#endif
247
248/* 245/*
249 * Fill in general registers in a core dump. This saves pretty 246 * Fill in general registers in a core dump. This saves pretty
250 * much the same registers as hp-ux, although in a different order. 247 * much the same registers as hp-ux, although in a different order.
diff --git a/include/asm-parisc/linkage.h b/include/asm-parisc/linkage.h
index ad8cd0d069ea..0b19a7242d0c 100644
--- a/include/asm-parisc/linkage.h
+++ b/include/asm-parisc/linkage.h
@@ -8,7 +8,7 @@
8 8
9/* 9/*
10 * In parisc assembly a semicolon marks a comment while a 10 * In parisc assembly a semicolon marks a comment while a
11 * exclamation mark is used to seperate independent lines. 11 * exclamation mark is used to separate independent lines.
12 */ 12 */
13#ifdef __ASSEMBLY__ 13#ifdef __ASSEMBLY__
14 14
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h
index b59a1504fc7a..b08d9151c71e 100644
--- a/include/asm-parisc/page.h
+++ b/include/asm-parisc/page.h
@@ -1,8 +1,6 @@
1#ifndef _PARISC_PAGE_H 1#ifndef _PARISC_PAGE_H
2#define _PARISC_PAGE_H 2#define _PARISC_PAGE_H
3 3
4#ifdef __KERNEL__
5
6#include <linux/const.h> 4#include <linux/const.h>
7 5
8#if defined(CONFIG_PARISC_PAGE_SIZE_4KB) 6#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
@@ -175,6 +173,4 @@ extern int npmem_ranges;
175#include <asm-generic/memory_model.h> 173#include <asm-generic/memory_model.h>
176#include <asm-generic/page.h> 174#include <asm-generic/page.h>
177 175
178#endif /* __KERNEL__ */
179
180#endif /* _PARISC_PAGE_H */ 176#endif /* _PARISC_PAGE_H */
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
index 5e0c3ca5450b..deda8c311373 100644
--- a/include/asm-parisc/pdc.h
+++ b/include/asm-parisc/pdc.h
@@ -645,8 +645,7 @@ int pdc_soft_power_button(int sw_control);
645void pdc_io_reset(void); 645void pdc_io_reset(void);
646void pdc_io_reset_devices(void); 646void pdc_io_reset_devices(void);
647int pdc_iodc_getc(void); 647int pdc_iodc_getc(void);
648void pdc_iodc_putc(unsigned char c); 648int pdc_iodc_print(unsigned char *str, unsigned count);
649void pdc_iodc_outc(unsigned char c);
650void pdc_printf(const char *fmt, ...); 649void pdc_printf(const char *fmt, ...);
651 650
652void pdc_emergency_unlock(void); 651void pdc_emergency_unlock(void);
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h
index 1af1a41e0723..aab66f1bea14 100644
--- a/include/asm-parisc/pgalloc.h
+++ b/include/asm-parisc/pgalloc.h
@@ -43,7 +43,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
43 return actual_pgd; 43 return actual_pgd;
44} 44}
45 45
46static inline void pgd_free(pgd_t *pgd) 46static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
47{ 47{
48#ifdef CONFIG_64BIT 48#ifdef CONFIG_64BIT
49 pgd -= PTRS_PER_PGD; 49 pgd -= PTRS_PER_PGD;
@@ -70,7 +70,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
70 return pmd; 70 return pmd;
71} 71}
72 72
73static inline void pmd_free(pmd_t *pmd) 73static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
74{ 74{
75#ifdef CONFIG_64BIT 75#ifdef CONFIG_64BIT
76 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) 76 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED)
@@ -91,7 +91,7 @@ static inline void pmd_free(pmd_t *pmd)
91 */ 91 */
92 92
93#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); }) 93#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); })
94#define pmd_free(x) do { } while (0) 94#define pmd_free(mm, x) do { } while (0)
95#define pgd_populate(mm, pmd, pte) BUG() 95#define pgd_populate(mm, pmd, pte) BUG()
96 96
97#endif 97#endif
@@ -130,12 +130,12 @@ pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
130 return pte; 130 return pte;
131} 131}
132 132
133static inline void pte_free_kernel(pte_t *pte) 133static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
134{ 134{
135 free_page((unsigned long)pte); 135 free_page((unsigned long)pte);
136} 136}
137 137
138#define pte_free(page) pte_free_kernel(page_address(page)) 138#define pte_free(mm, page) pte_free_kernel(page_address(page))
139 139
140#define check_pgt_cache() do { } while (0) 140#define check_pgt_cache() do { } while (0)
141 141
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h
index 6b294fb07a23..3bb06e898fde 100644
--- a/include/asm-parisc/processor.h
+++ b/include/asm-parisc/processor.h
@@ -32,7 +32,8 @@
32#endif 32#endif
33#define current_text_addr() ({ void *pc; current_ia(pc); pc; }) 33#define current_text_addr() ({ void *pc; current_ia(pc); pc; })
34 34
35#define TASK_SIZE (current->thread.task_size) 35#define TASK_SIZE_OF(tsk) ((tsk)->thread.task_size)
36#define TASK_SIZE TASK_SIZE_OF(current)
36#define TASK_UNMAPPED_BASE (current->thread.map_base) 37#define TASK_UNMAPPED_BASE (current->thread.map_base)
37 38
38#define DEFAULT_TASK_SIZE32 (0xFFF00000UL) 39#define DEFAULT_TASK_SIZE32 (0xFFF00000UL)
diff --git a/include/asm-parisc/socket.h b/include/asm-parisc/socket.h
index 99e868f6a8f5..69a7a0d30b02 100644
--- a/include/asm-parisc/socket.h
+++ b/include/asm-parisc/socket.h
@@ -52,4 +52,6 @@
52#define SO_PEERSEC 0x401d 52#define SO_PEERSEC 0x401d
53#define SO_PASSSEC 0x401e 53#define SO_PASSSEC 0x401e
54 54
55#define SO_MARK 0x401f
56
55#endif /* _ASM_SOCKET_H */ 57#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-parisc/tlb.h b/include/asm-parisc/tlb.h
index 33107a248e1f..383b1db310ee 100644
--- a/include/asm-parisc/tlb.h
+++ b/include/asm-parisc/tlb.h
@@ -21,7 +21,7 @@ do { if (!(tlb)->fullmm) \
21 21
22#include <asm-generic/tlb.h> 22#include <asm-generic/tlb.h>
23 23
24#define __pmd_free_tlb(tlb, pmd) pmd_free(pmd) 24#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd)
25#define __pte_free_tlb(tlb, pte) pte_free(pte) 25#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte)
26 26
27#endif 27#endif
diff --git a/include/asm-parisc/vga.h b/include/asm-parisc/vga.h
index 154a84c843a7..171399a88ca6 100644
--- a/include/asm-parisc/vga.h
+++ b/include/asm-parisc/vga.h
@@ -3,4 +3,4 @@
3 3
4/* nothing */ 4/* nothing */
5 5
6#endif __ASM_PARISC_VGA_H__ 6#endif /* __ASM_PARISC_VGA_H__ */