diff options
Diffstat (limited to 'arch/ia64/include')
30 files changed, 211 insertions, 476 deletions
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h index 837dc82a013e..a06dfb13d518 100644 --- a/arch/ia64/include/asm/acpi.h +++ b/arch/ia64/include/asm/acpi.h | |||
@@ -128,9 +128,9 @@ static inline const char *acpi_get_sysname (void) | |||
128 | int acpi_request_vector (u32 int_type); | 128 | int acpi_request_vector (u32 int_type); |
129 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 129 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
130 | 130 | ||
131 | /* routines for saving/restoring kernel state */ | 131 | /* Low-level suspend routine. */ |
132 | extern int acpi_save_state_mem(void); | 132 | extern int acpi_suspend_lowlevel(void); |
133 | extern void acpi_restore_state_mem(void); | 133 | |
134 | extern unsigned long acpi_wakeup_address; | 134 | extern unsigned long acpi_wakeup_address; |
135 | 135 | ||
136 | /* | 136 | /* |
diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h index 9da3df6f1a52..b76f7e009218 100644 --- a/arch/ia64/include/asm/bitops.h +++ b/arch/ia64/include/asm/bitops.h | |||
@@ -456,12 +456,11 @@ static __inline__ unsigned long __arch_hweight64(unsigned long x) | |||
456 | 456 | ||
457 | #ifdef __KERNEL__ | 457 | #ifdef __KERNEL__ |
458 | 458 | ||
459 | #include <asm-generic/bitops/ext2-non-atomic.h> | 459 | #include <asm-generic/bitops/le.h> |
460 | 460 | ||
461 | #define ext2_set_bit_atomic(l,n,a) test_and_set_bit(n,a) | 461 | #define ext2_set_bit_atomic(l,n,a) test_and_set_bit(n,a) |
462 | #define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a) | 462 | #define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a) |
463 | 463 | ||
464 | #include <asm-generic/bitops/minix.h> | ||
465 | #include <asm-generic/bitops/sched.h> | 464 | #include <asm-generic/bitops/sched.h> |
466 | 465 | ||
467 | #endif /* __KERNEL__ */ | 466 | #endif /* __KERNEL__ */ |
diff --git a/arch/ia64/include/asm/compat.h b/arch/ia64/include/asm/compat.h deleted file mode 100644 index 9301a2821615..000000000000 --- a/arch/ia64/include/asm/compat.h +++ /dev/null | |||
@@ -1,208 +0,0 @@ | |||
1 | #ifndef _ASM_IA64_COMPAT_H | ||
2 | #define _ASM_IA64_COMPAT_H | ||
3 | /* | ||
4 | * Architecture specific compatibility types | ||
5 | */ | ||
6 | #include <linux/types.h> | ||
7 | |||
8 | #define COMPAT_USER_HZ 100 | ||
9 | #define COMPAT_UTS_MACHINE "i686\0\0\0" | ||
10 | |||
11 | typedef u32 compat_size_t; | ||
12 | typedef s32 compat_ssize_t; | ||
13 | typedef s32 compat_time_t; | ||
14 | typedef s32 compat_clock_t; | ||
15 | typedef s32 compat_key_t; | ||
16 | typedef s32 compat_pid_t; | ||
17 | typedef u16 __compat_uid_t; | ||
18 | typedef u16 __compat_gid_t; | ||
19 | typedef u32 __compat_uid32_t; | ||
20 | typedef u32 __compat_gid32_t; | ||
21 | typedef u16 compat_mode_t; | ||
22 | typedef u32 compat_ino_t; | ||
23 | typedef u16 compat_dev_t; | ||
24 | typedef s32 compat_off_t; | ||
25 | typedef s64 compat_loff_t; | ||
26 | typedef u16 compat_nlink_t; | ||
27 | typedef u16 compat_ipc_pid_t; | ||
28 | typedef s32 compat_daddr_t; | ||
29 | typedef u32 compat_caddr_t; | ||
30 | typedef __kernel_fsid_t compat_fsid_t; | ||
31 | typedef s32 compat_timer_t; | ||
32 | |||
33 | typedef s32 compat_int_t; | ||
34 | typedef s32 compat_long_t; | ||
35 | typedef s64 __attribute__((aligned(4))) compat_s64; | ||
36 | typedef u32 compat_uint_t; | ||
37 | typedef u32 compat_ulong_t; | ||
38 | typedef u64 __attribute__((aligned(4))) compat_u64; | ||
39 | |||
40 | struct compat_timespec { | ||
41 | compat_time_t tv_sec; | ||
42 | s32 tv_nsec; | ||
43 | }; | ||
44 | |||
45 | struct compat_timeval { | ||
46 | compat_time_t tv_sec; | ||
47 | s32 tv_usec; | ||
48 | }; | ||
49 | |||
50 | struct compat_stat { | ||
51 | compat_dev_t st_dev; | ||
52 | u16 __pad1; | ||
53 | compat_ino_t st_ino; | ||
54 | compat_mode_t st_mode; | ||
55 | compat_nlink_t st_nlink; | ||
56 | __compat_uid_t st_uid; | ||
57 | __compat_gid_t st_gid; | ||
58 | compat_dev_t st_rdev; | ||
59 | u16 __pad2; | ||
60 | u32 st_size; | ||
61 | u32 st_blksize; | ||
62 | u32 st_blocks; | ||
63 | u32 st_atime; | ||
64 | u32 st_atime_nsec; | ||
65 | u32 st_mtime; | ||
66 | u32 st_mtime_nsec; | ||
67 | u32 st_ctime; | ||
68 | u32 st_ctime_nsec; | ||
69 | u32 __unused4; | ||
70 | u32 __unused5; | ||
71 | }; | ||
72 | |||
73 | struct compat_flock { | ||
74 | short l_type; | ||
75 | short l_whence; | ||
76 | compat_off_t l_start; | ||
77 | compat_off_t l_len; | ||
78 | compat_pid_t l_pid; | ||
79 | }; | ||
80 | |||
81 | #define F_GETLK64 12 | ||
82 | #define F_SETLK64 13 | ||
83 | #define F_SETLKW64 14 | ||
84 | |||
85 | /* | ||
86 | * IA32 uses 4 byte alignment for 64 bit quantities, | ||
87 | * so we need to pack this structure. | ||
88 | */ | ||
89 | struct compat_flock64 { | ||
90 | short l_type; | ||
91 | short l_whence; | ||
92 | compat_loff_t l_start; | ||
93 | compat_loff_t l_len; | ||
94 | compat_pid_t l_pid; | ||
95 | } __attribute__((packed)); | ||
96 | |||
97 | struct compat_statfs { | ||
98 | int f_type; | ||
99 | int f_bsize; | ||
100 | int f_blocks; | ||
101 | int f_bfree; | ||
102 | int f_bavail; | ||
103 | int f_files; | ||
104 | int f_ffree; | ||
105 | compat_fsid_t f_fsid; | ||
106 | int f_namelen; /* SunOS ignores this field. */ | ||
107 | int f_frsize; | ||
108 | int f_spare[5]; | ||
109 | }; | ||
110 | |||
111 | #define COMPAT_RLIM_OLD_INFINITY 0x7fffffff | ||
112 | #define COMPAT_RLIM_INFINITY 0xffffffff | ||
113 | |||
114 | typedef u32 compat_old_sigset_t; /* at least 32 bits */ | ||
115 | |||
116 | #define _COMPAT_NSIG 64 | ||
117 | #define _COMPAT_NSIG_BPW 32 | ||
118 | |||
119 | typedef u32 compat_sigset_word; | ||
120 | |||
121 | #define COMPAT_OFF_T_MAX 0x7fffffff | ||
122 | #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL | ||
123 | |||
124 | struct compat_ipc64_perm { | ||
125 | compat_key_t key; | ||
126 | __compat_uid32_t uid; | ||
127 | __compat_gid32_t gid; | ||
128 | __compat_uid32_t cuid; | ||
129 | __compat_gid32_t cgid; | ||
130 | unsigned short mode; | ||
131 | unsigned short __pad1; | ||
132 | unsigned short seq; | ||
133 | unsigned short __pad2; | ||
134 | compat_ulong_t unused1; | ||
135 | compat_ulong_t unused2; | ||
136 | }; | ||
137 | |||
138 | struct compat_semid64_ds { | ||
139 | struct compat_ipc64_perm sem_perm; | ||
140 | compat_time_t sem_otime; | ||
141 | compat_ulong_t __unused1; | ||
142 | compat_time_t sem_ctime; | ||
143 | compat_ulong_t __unused2; | ||
144 | compat_ulong_t sem_nsems; | ||
145 | compat_ulong_t __unused3; | ||
146 | compat_ulong_t __unused4; | ||
147 | }; | ||
148 | |||
149 | struct compat_msqid64_ds { | ||
150 | struct compat_ipc64_perm msg_perm; | ||
151 | compat_time_t msg_stime; | ||
152 | compat_ulong_t __unused1; | ||
153 | compat_time_t msg_rtime; | ||
154 | compat_ulong_t __unused2; | ||
155 | compat_time_t msg_ctime; | ||
156 | compat_ulong_t __unused3; | ||
157 | compat_ulong_t msg_cbytes; | ||
158 | compat_ulong_t msg_qnum; | ||
159 | compat_ulong_t msg_qbytes; | ||
160 | compat_pid_t msg_lspid; | ||
161 | compat_pid_t msg_lrpid; | ||
162 | compat_ulong_t __unused4; | ||
163 | compat_ulong_t __unused5; | ||
164 | }; | ||
165 | |||
166 | struct compat_shmid64_ds { | ||
167 | struct compat_ipc64_perm shm_perm; | ||
168 | compat_size_t shm_segsz; | ||
169 | compat_time_t shm_atime; | ||
170 | compat_ulong_t __unused1; | ||
171 | compat_time_t shm_dtime; | ||
172 | compat_ulong_t __unused2; | ||
173 | compat_time_t shm_ctime; | ||
174 | compat_ulong_t __unused3; | ||
175 | compat_pid_t shm_cpid; | ||
176 | compat_pid_t shm_lpid; | ||
177 | compat_ulong_t shm_nattch; | ||
178 | compat_ulong_t __unused4; | ||
179 | compat_ulong_t __unused5; | ||
180 | }; | ||
181 | |||
182 | /* | ||
183 | * A pointer passed in from user mode. This should not be used for syscall parameters, | ||
184 | * just declare them as pointers because the syscall entry code will have appropriately | ||
185 | * converted them already. | ||
186 | */ | ||
187 | typedef u32 compat_uptr_t; | ||
188 | |||
189 | static inline void __user * | ||
190 | compat_ptr (compat_uptr_t uptr) | ||
191 | { | ||
192 | return (void __user *) (unsigned long) uptr; | ||
193 | } | ||
194 | |||
195 | static inline compat_uptr_t | ||
196 | ptr_to_compat(void __user *uptr) | ||
197 | { | ||
198 | return (u32)(unsigned long)uptr; | ||
199 | } | ||
200 | |||
201 | static __inline__ void __user * | ||
202 | arch_compat_alloc_user_space (long len) | ||
203 | { | ||
204 | struct pt_regs *regs = task_pt_regs(current); | ||
205 | return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len); | ||
206 | } | ||
207 | |||
208 | #endif /* _ASM_IA64_COMPAT_H */ | ||
diff --git a/arch/ia64/include/asm/cputime.h b/arch/ia64/include/asm/cputime.h index 7fa8a8594660..6073b187528a 100644 --- a/arch/ia64/include/asm/cputime.h +++ b/arch/ia64/include/asm/cputime.h | |||
@@ -56,10 +56,10 @@ typedef u64 cputime64_t; | |||
56 | #define jiffies64_to_cputime64(__jif) ((__jif) * (NSEC_PER_SEC / HZ)) | 56 | #define jiffies64_to_cputime64(__jif) ((__jif) * (NSEC_PER_SEC / HZ)) |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Convert cputime <-> milliseconds | 59 | * Convert cputime <-> microseconds |
60 | */ | 60 | */ |
61 | #define cputime_to_msecs(__ct) ((__ct) / NSEC_PER_MSEC) | 61 | #define cputime_to_usecs(__ct) ((__ct) / NSEC_PER_USEC) |
62 | #define msecs_to_cputime(__msecs) ((__msecs) * NSEC_PER_MSEC) | 62 | #define usecs_to_cputime(__usecs) ((__usecs) * NSEC_PER_USEC) |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * Convert cputime <-> seconds | 65 | * Convert cputime <-> seconds |
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index a2e7368a0150..4336d080b241 100644 --- a/arch/ia64/include/asm/dma-mapping.h +++ b/arch/ia64/include/asm/dma-mapping.h | |||
@@ -12,6 +12,8 @@ | |||
12 | 12 | ||
13 | #define ARCH_HAS_DMA_GET_REQUIRED_MASK | 13 | #define ARCH_HAS_DMA_GET_REQUIRED_MASK |
14 | 14 | ||
15 | #define DMA_ERROR_CODE 0 | ||
16 | |||
15 | extern struct dma_map_ops *dma_ops; | 17 | extern struct dma_map_ops *dma_ops; |
16 | extern struct ia64_machine_vector ia64_mv; | 18 | extern struct ia64_machine_vector ia64_mv; |
17 | extern void set_iommu_machvec(void); | 19 | extern void set_iommu_machvec(void); |
diff --git a/arch/ia64/include/asm/futex.h b/arch/ia64/include/asm/futex.h index c7f0f062239c..8428525ddb22 100644 --- a/arch/ia64/include/asm/futex.h +++ b/arch/ia64/include/asm/futex.h | |||
@@ -46,7 +46,7 @@ do { \ | |||
46 | } while (0) | 46 | } while (0) |
47 | 47 | ||
48 | static inline int | 48 | static inline int |
49 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | 49 | futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) |
50 | { | 50 | { |
51 | int op = (encoded_op >> 28) & 7; | 51 | int op = (encoded_op >> 28) & 7; |
52 | int cmp = (encoded_op >> 24) & 15; | 52 | int cmp = (encoded_op >> 24) & 15; |
@@ -56,7 +56,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
56 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 56 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
57 | oparg = 1 << oparg; | 57 | oparg = 1 << oparg; |
58 | 58 | ||
59 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | 59 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(u32))) |
60 | return -EFAULT; | 60 | return -EFAULT; |
61 | 61 | ||
62 | pagefault_disable(); | 62 | pagefault_disable(); |
@@ -100,23 +100,26 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | static inline int | 102 | static inline int |
103 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | 103 | futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, |
104 | u32 oldval, u32 newval) | ||
104 | { | 105 | { |
105 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | 106 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) |
106 | return -EFAULT; | 107 | return -EFAULT; |
107 | 108 | ||
108 | { | 109 | { |
109 | register unsigned long r8 __asm ("r8"); | 110 | register unsigned long r8 __asm ("r8") = 0; |
111 | unsigned long prev; | ||
110 | __asm__ __volatile__( | 112 | __asm__ __volatile__( |
111 | " mf;; \n" | 113 | " mf;; \n" |
112 | " mov ar.ccv=%3;; \n" | 114 | " mov ar.ccv=%3;; \n" |
113 | "[1:] cmpxchg4.acq %0=[%1],%2,ar.ccv \n" | 115 | "[1:] cmpxchg4.acq %0=[%1],%2,ar.ccv \n" |
114 | " .xdata4 \"__ex_table\", 1b-., 2f-. \n" | 116 | " .xdata4 \"__ex_table\", 1b-., 2f-. \n" |
115 | "[2:]" | 117 | "[2:]" |
116 | : "=r" (r8) | 118 | : "=r" (prev) |
117 | : "r" (uaddr), "r" (newval), | 119 | : "r" (uaddr), "r" (newval), |
118 | "rO" ((long) (unsigned) oldval) | 120 | "rO" ((long) (unsigned) oldval) |
119 | : "memory"); | 121 | : "memory"); |
122 | *uval = prev; | ||
120 | return r8; | 123 | return r8; |
121 | } | 124 | } |
122 | } | 125 | } |
diff --git a/arch/ia64/include/asm/hardirq.h b/arch/ia64/include/asm/hardirq.h index d514cd9edb49..8fb7d33a661f 100644 --- a/arch/ia64/include/asm/hardirq.h +++ b/arch/ia64/include/asm/hardirq.h | |||
@@ -6,12 +6,6 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | |||
10 | #include <linux/threads.h> | ||
11 | #include <linux/irq.h> | ||
12 | |||
13 | #include <asm/processor.h> | ||
14 | |||
15 | /* | 9 | /* |
16 | * No irq_cpustat_t for IA-64. The data is held in the per-CPU data structure. | 10 | * No irq_cpustat_t for IA-64. The data is held in the per-CPU data structure. |
17 | */ | 11 | */ |
@@ -20,6 +14,11 @@ | |||
20 | 14 | ||
21 | #define local_softirq_pending() (local_cpu_data->softirq_pending) | 15 | #define local_softirq_pending() (local_cpu_data->softirq_pending) |
22 | 16 | ||
17 | #include <linux/threads.h> | ||
18 | #include <linux/irq.h> | ||
19 | |||
20 | #include <asm/processor.h> | ||
21 | |||
23 | extern void __iomem *ipi_base_addr; | 22 | extern void __iomem *ipi_base_addr; |
24 | 23 | ||
25 | void ack_bad_irq(unsigned int irq); | 24 | void ack_bad_irq(unsigned int irq); |
diff --git a/arch/ia64/include/asm/hw_irq.h b/arch/ia64/include/asm/hw_irq.h index bf2e37493e04..a681d02cb324 100644 --- a/arch/ia64/include/asm/hw_irq.h +++ b/arch/ia64/include/asm/hw_irq.h | |||
@@ -151,9 +151,6 @@ static inline void ia64_native_resend_irq(unsigned int vector) | |||
151 | /* | 151 | /* |
152 | * Default implementations for the irq-descriptor API: | 152 | * Default implementations for the irq-descriptor API: |
153 | */ | 153 | */ |
154 | |||
155 | extern struct irq_desc irq_desc[NR_IRQS]; | ||
156 | |||
157 | #ifndef CONFIG_IA64_GENERIC | 154 | #ifndef CONFIG_IA64_GENERIC |
158 | static inline ia64_vector __ia64_irq_to_vector(int irq) | 155 | static inline ia64_vector __ia64_irq_to_vector(int irq) |
159 | { | 156 | { |
diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index cc8335eb3110..e5a6c3530c6c 100644 --- a/arch/ia64/include/asm/io.h +++ b/arch/ia64/include/asm/io.h | |||
@@ -426,6 +426,11 @@ extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size) | |||
426 | extern void iounmap (volatile void __iomem *addr); | 426 | extern void iounmap (volatile void __iomem *addr); |
427 | extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size); | 427 | extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size); |
428 | extern void early_iounmap (volatile void __iomem *addr, unsigned long size); | 428 | extern void early_iounmap (volatile void __iomem *addr, unsigned long size); |
429 | static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned long size) | ||
430 | { | ||
431 | return ioremap(phys_addr, size); | ||
432 | } | ||
433 | |||
429 | 434 | ||
430 | /* | 435 | /* |
431 | * String version of IO memory access ops: | 436 | * String version of IO memory access ops: |
diff --git a/arch/ia64/include/asm/ioctls.h b/arch/ia64/include/asm/ioctls.h index b79c385114ef..f3aab5512e98 100644 --- a/arch/ia64/include/asm/ioctls.h +++ b/arch/ia64/include/asm/ioctls.h | |||
@@ -1,93 +1,6 @@ | |||
1 | #ifndef _ASM_IA64_IOCTLS_H | 1 | #ifndef _ASM_IA64_IOCTLS_H |
2 | #define _ASM_IA64_IOCTLS_H | 2 | #define _ASM_IA64_IOCTLS_H |
3 | 3 | ||
4 | /* | 4 | #include <asm-generic/ioctls.h> |
5 | * Based on <asm-i386/ioctls.h> | ||
6 | * | ||
7 | * Modified 1998, 1999, 2002 | ||
8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | ||
9 | */ | ||
10 | |||
11 | #include <asm/ioctl.h> | ||
12 | |||
13 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
14 | |||
15 | #define TCGETS 0x5401 | ||
16 | #define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */ | ||
17 | #define TCSETSW 0x5403 | ||
18 | #define TCSETSF 0x5404 | ||
19 | #define TCGETA 0x5405 | ||
20 | #define TCSETA 0x5406 | ||
21 | #define TCSETAW 0x5407 | ||
22 | #define TCSETAF 0x5408 | ||
23 | #define TCSBRK 0x5409 | ||
24 | #define TCXONC 0x540A | ||
25 | #define TCFLSH 0x540B | ||
26 | #define TIOCEXCL 0x540C | ||
27 | #define TIOCNXCL 0x540D | ||
28 | #define TIOCSCTTY 0x540E | ||
29 | #define TIOCGPGRP 0x540F | ||
30 | #define TIOCSPGRP 0x5410 | ||
31 | #define TIOCOUTQ 0x5411 | ||
32 | #define TIOCSTI 0x5412 | ||
33 | #define TIOCGWINSZ 0x5413 | ||
34 | #define TIOCSWINSZ 0x5414 | ||
35 | #define TIOCMGET 0x5415 | ||
36 | #define TIOCMBIS 0x5416 | ||
37 | #define TIOCMBIC 0x5417 | ||
38 | #define TIOCMSET 0x5418 | ||
39 | #define TIOCGSOFTCAR 0x5419 | ||
40 | #define TIOCSSOFTCAR 0x541A | ||
41 | #define FIONREAD 0x541B | ||
42 | #define TIOCINQ FIONREAD | ||
43 | #define TIOCLINUX 0x541C | ||
44 | #define TIOCCONS 0x541D | ||
45 | #define TIOCGSERIAL 0x541E | ||
46 | #define TIOCSSERIAL 0x541F | ||
47 | #define TIOCPKT 0x5420 | ||
48 | #define FIONBIO 0x5421 | ||
49 | #define TIOCNOTTY 0x5422 | ||
50 | #define TIOCSETD 0x5423 | ||
51 | #define TIOCGETD 0x5424 | ||
52 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
53 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
54 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
55 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
56 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
57 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
58 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
59 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
60 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | ||
61 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | ||
62 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
63 | |||
64 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | ||
65 | #define FIOCLEX 0x5451 | ||
66 | #define FIOASYNC 0x5452 | ||
67 | #define TIOCSERCONFIG 0x5453 | ||
68 | #define TIOCSERGWILD 0x5454 | ||
69 | #define TIOCSERSWILD 0x5455 | ||
70 | #define TIOCGLCKTRMIOS 0x5456 | ||
71 | #define TIOCSLCKTRMIOS 0x5457 | ||
72 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
73 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
74 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
75 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
76 | |||
77 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
78 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
79 | #define FIOQSIZE 0x5460 | ||
80 | |||
81 | /* Used for packet mode */ | ||
82 | #define TIOCPKT_DATA 0 | ||
83 | #define TIOCPKT_FLUSHREAD 1 | ||
84 | #define TIOCPKT_FLUSHWRITE 2 | ||
85 | #define TIOCPKT_STOP 4 | ||
86 | #define TIOCPKT_START 8 | ||
87 | #define TIOCPKT_NOSTOP 16 | ||
88 | #define TIOCPKT_DOSTOP 32 | ||
89 | #define TIOCPKT_IOCTL 64 | ||
90 | |||
91 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
92 | 5 | ||
93 | #endif /* _ASM_IA64_IOCTLS_H */ | 6 | #endif /* _ASM_IA64_IOCTLS_H */ |
diff --git a/arch/ia64/include/asm/iommu_table.h b/arch/ia64/include/asm/iommu_table.h new file mode 100644 index 000000000000..92c8d36ae5ae --- /dev/null +++ b/arch/ia64/include/asm/iommu_table.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _ASM_IA64_IOMMU_TABLE_H | ||
2 | #define _ASM_IA64_IOMMU_TABLE_H | ||
3 | |||
4 | #define IOMMU_INIT_POST(_detect) | ||
5 | |||
6 | #endif /* _ASM_IA64_IOMMU_TABLE_H */ | ||
diff --git a/arch/ia64/include/asm/irqflags.h b/arch/ia64/include/asm/irqflags.h new file mode 100644 index 000000000000..f82d6be2ecd2 --- /dev/null +++ b/arch/ia64/include/asm/irqflags.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * IRQ flags defines. | ||
3 | * | ||
4 | * Copyright (C) 1998-2003 Hewlett-Packard Co | ||
5 | * David Mosberger-Tang <davidm@hpl.hp.com> | ||
6 | * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com> | ||
7 | * Copyright (C) 1999 Don Dugger <don.dugger@intel.com> | ||
8 | */ | ||
9 | |||
10 | #ifndef _ASM_IA64_IRQFLAGS_H | ||
11 | #define _ASM_IA64_IRQFLAGS_H | ||
12 | |||
13 | #ifdef CONFIG_IA64_DEBUG_IRQ | ||
14 | extern unsigned long last_cli_ip; | ||
15 | static inline void arch_maybe_save_ip(unsigned long flags) | ||
16 | { | ||
17 | if (flags & IA64_PSR_I) | ||
18 | last_cli_ip = ia64_getreg(_IA64_REG_IP); | ||
19 | } | ||
20 | #else | ||
21 | #define arch_maybe_save_ip(flags) do {} while (0) | ||
22 | #endif | ||
23 | |||
24 | /* | ||
25 | * - clearing psr.i is implicitly serialized (visible by next insn) | ||
26 | * - setting psr.i requires data serialization | ||
27 | * - we need a stop-bit before reading PSR because we sometimes | ||
28 | * write a floating-point register right before reading the PSR | ||
29 | * and that writes to PSR.mfl | ||
30 | */ | ||
31 | |||
32 | static inline unsigned long arch_local_save_flags(void) | ||
33 | { | ||
34 | ia64_stop(); | ||
35 | #ifdef CONFIG_PARAVIRT | ||
36 | return ia64_get_psr_i(); | ||
37 | #else | ||
38 | return ia64_getreg(_IA64_REG_PSR); | ||
39 | #endif | ||
40 | } | ||
41 | |||
42 | static inline unsigned long arch_local_irq_save(void) | ||
43 | { | ||
44 | unsigned long flags = arch_local_save_flags(); | ||
45 | |||
46 | ia64_stop(); | ||
47 | ia64_rsm(IA64_PSR_I); | ||
48 | arch_maybe_save_ip(flags); | ||
49 | return flags; | ||
50 | } | ||
51 | |||
52 | static inline void arch_local_irq_disable(void) | ||
53 | { | ||
54 | #ifdef CONFIG_IA64_DEBUG_IRQ | ||
55 | arch_local_irq_save(); | ||
56 | #else | ||
57 | ia64_stop(); | ||
58 | ia64_rsm(IA64_PSR_I); | ||
59 | #endif | ||
60 | } | ||
61 | |||
62 | static inline void arch_local_irq_enable(void) | ||
63 | { | ||
64 | ia64_stop(); | ||
65 | ia64_ssm(IA64_PSR_I); | ||
66 | ia64_srlz_d(); | ||
67 | } | ||
68 | |||
69 | static inline void arch_local_irq_restore(unsigned long flags) | ||
70 | { | ||
71 | #ifdef CONFIG_IA64_DEBUG_IRQ | ||
72 | unsigned long old_psr = arch_local_save_flags(); | ||
73 | #endif | ||
74 | ia64_intrin_local_irq_restore(flags & IA64_PSR_I); | ||
75 | arch_maybe_save_ip(old_psr & ~flags); | ||
76 | } | ||
77 | |||
78 | static inline bool arch_irqs_disabled_flags(unsigned long flags) | ||
79 | { | ||
80 | return (flags & IA64_PSR_I) == 0; | ||
81 | } | ||
82 | |||
83 | static inline bool arch_irqs_disabled(void) | ||
84 | { | ||
85 | return arch_irqs_disabled_flags(arch_local_save_flags()); | ||
86 | } | ||
87 | |||
88 | static inline void arch_safe_halt(void) | ||
89 | { | ||
90 | ia64_pal_halt_light(); /* PAL_HALT_LIGHT */ | ||
91 | } | ||
92 | |||
93 | |||
94 | #endif /* _ASM_IA64_IRQFLAGS_H */ | ||
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index 2f229e5de498..2689ee54a1c9 100644 --- a/arch/ia64/include/asm/kvm_host.h +++ b/arch/ia64/include/asm/kvm_host.h | |||
@@ -590,6 +590,10 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu); | |||
590 | int kvm_pal_emul(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run); | 590 | int kvm_pal_emul(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run); |
591 | void kvm_sal_emul(struct kvm_vcpu *vcpu); | 591 | void kvm_sal_emul(struct kvm_vcpu *vcpu); |
592 | 592 | ||
593 | #define __KVM_HAVE_ARCH_VM_ALLOC 1 | ||
594 | struct kvm *kvm_arch_alloc_vm(void); | ||
595 | void kvm_arch_free_vm(struct kvm *kvm); | ||
596 | |||
593 | #endif /* __ASSEMBLY__*/ | 597 | #endif /* __ASSEMBLY__*/ |
594 | 598 | ||
595 | #endif | 599 | #endif |
diff --git a/arch/ia64/include/asm/page.h b/arch/ia64/include/asm/page.h index 41b6d31110fd..961a16f43e6b 100644 --- a/arch/ia64/include/asm/page.h +++ b/arch/ia64/include/asm/page.h | |||
@@ -189,6 +189,7 @@ get_order (unsigned long size) | |||
189 | # define pgprot_val(x) ((x).pgprot) | 189 | # define pgprot_val(x) ((x).pgprot) |
190 | 190 | ||
191 | # define __pte(x) ((pte_t) { (x) } ) | 191 | # define __pte(x) ((pte_t) { (x) } ) |
192 | # define __pmd(x) ((pmd_t) { (x) } ) | ||
192 | # define __pgprot(x) ((pgprot_t) { (x) } ) | 193 | # define __pgprot(x) ((pgprot_t) { (x) } ) |
193 | 194 | ||
194 | #else /* !STRICT_MM_TYPECHECKS */ | 195 | #else /* !STRICT_MM_TYPECHECKS */ |
diff --git a/arch/ia64/include/asm/pal.h b/arch/ia64/include/asm/pal.h index 6a292505b396..2e69284df8e7 100644 --- a/arch/ia64/include/asm/pal.h +++ b/arch/ia64/include/asm/pal.h | |||
@@ -1669,7 +1669,7 @@ typedef union pal_vp_info_u { | |||
1669 | } pal_vp_info_u_t; | 1669 | } pal_vp_info_u_t; |
1670 | 1670 | ||
1671 | /* | 1671 | /* |
1672 | * Returns infomation about virtual processor features | 1672 | * Returns information about virtual processor features |
1673 | */ | 1673 | */ |
1674 | static inline s64 | 1674 | static inline s64 |
1675 | ia64_pal_vp_info (u64 feature_set, u64 vp_buffer, u64 *vp_info, u64 *vmm_id) | 1675 | ia64_pal_vp_info (u64 feature_set, u64 vp_buffer, u64 *vp_info, u64 *vmm_id) |
diff --git a/arch/ia64/include/asm/perfmon.h b/arch/ia64/include/asm/perfmon.h index 7f3333dd00e4..d551183fee90 100644 --- a/arch/ia64/include/asm/perfmon.h +++ b/arch/ia64/include/asm/perfmon.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #define _ASM_IA64_PERFMON_H | 7 | #define _ASM_IA64_PERFMON_H |
8 | 8 | ||
9 | /* | 9 | /* |
10 | * perfmon comamnds supported on all CPU models | 10 | * perfmon commands supported on all CPU models |
11 | */ | 11 | */ |
12 | #define PFM_WRITE_PMCS 0x01 | 12 | #define PFM_WRITE_PMCS 0x01 |
13 | #define PFM_WRITE_PMDS 0x02 | 13 | #define PFM_WRITE_PMDS 0x02 |
diff --git a/arch/ia64/include/asm/perfmon_default_smpl.h b/arch/ia64/include/asm/perfmon_default_smpl.h index 74724b24c2b7..a2d560c67230 100644 --- a/arch/ia64/include/asm/perfmon_default_smpl.h +++ b/arch/ia64/include/asm/perfmon_default_smpl.h | |||
@@ -67,8 +67,8 @@ typedef struct { | |||
67 | unsigned long ip; /* where did the overflow interrupt happened */ | 67 | unsigned long ip; /* where did the overflow interrupt happened */ |
68 | unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */ | 68 | unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */ |
69 | 69 | ||
70 | unsigned short cpu; /* cpu on which the overflow occured */ | 70 | unsigned short cpu; /* cpu on which the overflow occurred */ |
71 | unsigned short set; /* event set active when overflow ocurred */ | 71 | unsigned short set; /* event set active when overflow occurred */ |
72 | int tgid; /* thread group id (for NPTL, this is getpid()) */ | 72 | int tgid; /* thread group id (for NPTL, this is getpid()) */ |
73 | } pfm_default_smpl_entry_t; | 73 | } pfm_default_smpl_entry_t; |
74 | 74 | ||
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h index c3286f42e501..1a97af31ef17 100644 --- a/arch/ia64/include/asm/pgtable.h +++ b/arch/ia64/include/asm/pgtable.h | |||
@@ -406,9 +406,7 @@ pgd_offset (const struct mm_struct *mm, unsigned long address) | |||
406 | #define pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 406 | #define pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
407 | #define pte_offset_kernel(dir,addr) ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr)) | 407 | #define pte_offset_kernel(dir,addr) ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr)) |
408 | #define pte_offset_map(dir,addr) pte_offset_kernel(dir, addr) | 408 | #define pte_offset_map(dir,addr) pte_offset_kernel(dir, addr) |
409 | #define pte_offset_map_nested(dir,addr) pte_offset_map(dir, addr) | ||
410 | #define pte_unmap(pte) do { } while (0) | 409 | #define pte_unmap(pte) do { } while (0) |
411 | #define pte_unmap_nested(pte) do { } while (0) | ||
412 | 410 | ||
413 | /* atomic versions of the some PTE manipulations: */ | 411 | /* atomic versions of the some PTE manipulations: */ |
414 | 412 | ||
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h index 348e44d08ce3..03afe7970748 100644 --- a/arch/ia64/include/asm/processor.h +++ b/arch/ia64/include/asm/processor.h | |||
@@ -717,8 +717,9 @@ prefetchw (const void *x) | |||
717 | #define spin_lock_prefetch(x) prefetchw(x) | 717 | #define spin_lock_prefetch(x) prefetchw(x) |
718 | 718 | ||
719 | extern unsigned long boot_option_idle_override; | 719 | extern unsigned long boot_option_idle_override; |
720 | extern unsigned long idle_halt; | 720 | |
721 | extern unsigned long idle_nomwait; | 721 | enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_FORCE_MWAIT, |
722 | IDLE_NOMWAIT, IDLE_POLL}; | ||
722 | 723 | ||
723 | #endif /* !__ASSEMBLY__ */ | 724 | #endif /* !__ASSEMBLY__ */ |
724 | 725 | ||
diff --git a/arch/ia64/include/asm/rwsem.h b/arch/ia64/include/asm/rwsem.h index 215d5454c7d3..3027e7516d85 100644 --- a/arch/ia64/include/asm/rwsem.h +++ b/arch/ia64/include/asm/rwsem.h | |||
@@ -25,20 +25,8 @@ | |||
25 | #error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead." | 25 | #error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead." |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #include <linux/list.h> | ||
29 | #include <linux/spinlock.h> | ||
30 | |||
31 | #include <asm/intrinsics.h> | 28 | #include <asm/intrinsics.h> |
32 | 29 | ||
33 | /* | ||
34 | * the semaphore definition | ||
35 | */ | ||
36 | struct rw_semaphore { | ||
37 | signed long count; | ||
38 | spinlock_t wait_lock; | ||
39 | struct list_head wait_list; | ||
40 | }; | ||
41 | |||
42 | #define RWSEM_UNLOCKED_VALUE __IA64_UL_CONST(0x0000000000000000) | 30 | #define RWSEM_UNLOCKED_VALUE __IA64_UL_CONST(0x0000000000000000) |
43 | #define RWSEM_ACTIVE_BIAS (1L) | 31 | #define RWSEM_ACTIVE_BIAS (1L) |
44 | #define RWSEM_ACTIVE_MASK (0xffffffffL) | 32 | #define RWSEM_ACTIVE_MASK (0xffffffffL) |
@@ -46,26 +34,6 @@ struct rw_semaphore { | |||
46 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS | 34 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS |
47 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 35 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
48 | 36 | ||
49 | #define __RWSEM_INITIALIZER(name) \ | ||
50 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ | ||
51 | LIST_HEAD_INIT((name).wait_list) } | ||
52 | |||
53 | #define DECLARE_RWSEM(name) \ | ||
54 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | ||
55 | |||
56 | extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); | ||
57 | extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); | ||
58 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem); | ||
59 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); | ||
60 | |||
61 | static inline void | ||
62 | init_rwsem (struct rw_semaphore *sem) | ||
63 | { | ||
64 | sem->count = RWSEM_UNLOCKED_VALUE; | ||
65 | spin_lock_init(&sem->wait_lock); | ||
66 | INIT_LIST_HEAD(&sem->wait_list); | ||
67 | } | ||
68 | |||
69 | /* | 37 | /* |
70 | * lock for reading | 38 | * lock for reading |
71 | */ | 39 | */ |
@@ -174,9 +142,4 @@ __downgrade_write (struct rw_semaphore *sem) | |||
174 | #define rwsem_atomic_add(delta, sem) atomic64_add(delta, (atomic64_t *)(&(sem)->count)) | 142 | #define rwsem_atomic_add(delta, sem) atomic64_add(delta, (atomic64_t *)(&(sem)->count)) |
175 | #define rwsem_atomic_update(delta, sem) atomic64_add_return(delta, (atomic64_t *)(&(sem)->count)) | 143 | #define rwsem_atomic_update(delta, sem) atomic64_add_return(delta, (atomic64_t *)(&(sem)->count)) |
176 | 144 | ||
177 | static inline int rwsem_is_locked(struct rw_semaphore *sem) | ||
178 | { | ||
179 | return (sem->count != 0); | ||
180 | } | ||
181 | |||
182 | #endif /* _ASM_IA64_RWSEM_H */ | 145 | #endif /* _ASM_IA64_RWSEM_H */ |
diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h index 118d42979003..c8fcaa2ac48f 100644 --- a/arch/ia64/include/asm/siginfo.h +++ b/arch/ia64/include/asm/siginfo.h | |||
@@ -62,6 +62,7 @@ typedef struct siginfo { | |||
62 | int _imm; /* immediate value for "break" */ | 62 | int _imm; /* immediate value for "break" */ |
63 | unsigned int _flags; /* see below */ | 63 | unsigned int _flags; /* see below */ |
64 | unsigned long _isr; /* isr */ | 64 | unsigned long _isr; /* isr */ |
65 | short _addr_lsb; /* lsb of faulting address */ | ||
65 | } _sigfault; | 66 | } _sigfault; |
66 | 67 | ||
67 | /* SIGPOLL */ | 68 | /* SIGPOLL */ |
diff --git a/arch/ia64/include/asm/sn/bte.h b/arch/ia64/include/asm/sn/bte.h index 96798d2da7c2..cc6c4dbf53af 100644 --- a/arch/ia64/include/asm/sn/bte.h +++ b/arch/ia64/include/asm/sn/bte.h | |||
@@ -216,7 +216,7 @@ extern void bte_error_handler(unsigned long); | |||
216 | bte_copy(0, dest, len, ((mode) | BTE_ZERO_FILL), notification) | 216 | bte_copy(0, dest, len, ((mode) | BTE_ZERO_FILL), notification) |
217 | 217 | ||
218 | /* | 218 | /* |
219 | * The following is the prefered way of calling bte_unaligned_copy | 219 | * The following is the preferred way of calling bte_unaligned_copy |
220 | * If the copy is fully cache line aligned, then bte_copy is | 220 | * If the copy is fully cache line aligned, then bte_copy is |
221 | * used instead. Since bte_copy is inlined, this saves a call | 221 | * used instead. Since bte_copy is inlined, this saves a call |
222 | * stack. NOTE: bte_copy is called synchronously and does block | 222 | * stack. NOTE: bte_copy is called synchronously and does block |
diff --git a/arch/ia64/include/asm/sn/shub_mmr.h b/arch/ia64/include/asm/sn/shub_mmr.h index 7de1d1d4b71a..a84d870f4294 100644 --- a/arch/ia64/include/asm/sn/shub_mmr.h +++ b/arch/ia64/include/asm/sn/shub_mmr.h | |||
@@ -459,7 +459,7 @@ | |||
459 | /* ==================================================================== */ | 459 | /* ==================================================================== */ |
460 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ | 460 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ |
461 | /* and SHUB2 that it makes sense to define a geberic name for the MMR. */ | 461 | /* and SHUB2 that it makes sense to define a geberic name for the MMR. */ |
462 | /* It is acceptible to use (for example) SH_IPI_INT to reference the */ | 462 | /* It is acceptable to use (for example) SH_IPI_INT to reference the */ |
463 | /* the IPI MMR. The value of SH_IPI_INT is determined at runtime based */ | 463 | /* the IPI MMR. The value of SH_IPI_INT is determined at runtime based */ |
464 | /* on the type of the SHUB. Do not use these #defines in performance */ | 464 | /* on the type of the SHUB. Do not use these #defines in performance */ |
465 | /* critical code or loops - there is a small performance penalty. */ | 465 | /* critical code or loops - there is a small performance penalty. */ |
diff --git a/arch/ia64/include/asm/sn/shubio.h b/arch/ia64/include/asm/sn/shubio.h index 6052422a22b3..ecb8a49476b6 100644 --- a/arch/ia64/include/asm/sn/shubio.h +++ b/arch/ia64/include/asm/sn/shubio.h | |||
@@ -1383,7 +1383,7 @@ typedef union ii_ibcr_u { | |||
1383 | * response is capture in IXSM and IXSS, and IXSS[VALID] is set. The * | 1383 | * response is capture in IXSM and IXSS, and IXSS[VALID] is set. The * |
1384 | * errant header is thereby captured, and no further spurious read * | 1384 | * errant header is thereby captured, and no further spurious read * |
1385 | * respones are captured until IXSS[VALID] is cleared by setting the * | 1385 | * respones are captured until IXSS[VALID] is cleared by setting the * |
1386 | * appropriate bit in IECLR.Everytime a spurious read response is * | 1386 | * appropriate bit in IECLR. Every time a spurious read response is * |
1387 | * detected, the SPUR_RD bit of the PRB corresponding to the incoming * | 1387 | * detected, the SPUR_RD bit of the PRB corresponding to the incoming * |
1388 | * message's SIDN field is set. This always happens, regarless of * | 1388 | * message's SIDN field is set. This always happens, regarless of * |
1389 | * whether a header is captured. The programmer should check * | 1389 | * whether a header is captured. The programmer should check * |
@@ -2738,7 +2738,7 @@ typedef union ii_ippr_u { | |||
2738 | /************************************************************************ | 2738 | /************************************************************************ |
2739 | * * | 2739 | * * |
2740 | * The following defines which were not formed into structures are * | 2740 | * The following defines which were not formed into structures are * |
2741 | * probably indentical to another register, and the name of the * | 2741 | * probably identical to another register, and the name of the * |
2742 | * register is provided against each of these registers. This * | 2742 | * register is provided against each of these registers. This * |
2743 | * information needs to be checked carefully * | 2743 | * information needs to be checked carefully * |
2744 | * * | 2744 | * * |
diff --git a/arch/ia64/include/asm/system.h b/arch/ia64/include/asm/system.h index 9f342a574ce8..6cca30705d50 100644 --- a/arch/ia64/include/asm/system.h +++ b/arch/ia64/include/asm/system.h | |||
@@ -107,87 +107,11 @@ extern struct ia64_boot_param { | |||
107 | */ | 107 | */ |
108 | #define set_mb(var, value) do { (var) = (value); mb(); } while (0) | 108 | #define set_mb(var, value) do { (var) = (value); mb(); } while (0) |
109 | 109 | ||
110 | #define safe_halt() ia64_pal_halt_light() /* PAL_HALT_LIGHT */ | ||
111 | |||
112 | /* | 110 | /* |
113 | * The group barrier in front of the rsm & ssm are necessary to ensure | 111 | * The group barrier in front of the rsm & ssm are necessary to ensure |
114 | * that none of the previous instructions in the same group are | 112 | * that none of the previous instructions in the same group are |
115 | * affected by the rsm/ssm. | 113 | * affected by the rsm/ssm. |
116 | */ | 114 | */ |
117 | /* For spinlocks etc */ | ||
118 | |||
119 | /* | ||
120 | * - clearing psr.i is implicitly serialized (visible by next insn) | ||
121 | * - setting psr.i requires data serialization | ||
122 | * - we need a stop-bit before reading PSR because we sometimes | ||
123 | * write a floating-point register right before reading the PSR | ||
124 | * and that writes to PSR.mfl | ||
125 | */ | ||
126 | #ifdef CONFIG_PARAVIRT | ||
127 | #define __local_save_flags() ia64_get_psr_i() | ||
128 | #else | ||
129 | #define __local_save_flags() ia64_getreg(_IA64_REG_PSR) | ||
130 | #endif | ||
131 | |||
132 | #define __local_irq_save(x) \ | ||
133 | do { \ | ||
134 | ia64_stop(); \ | ||
135 | (x) = __local_save_flags(); \ | ||
136 | ia64_stop(); \ | ||
137 | ia64_rsm(IA64_PSR_I); \ | ||
138 | } while (0) | ||
139 | |||
140 | #define __local_irq_disable() \ | ||
141 | do { \ | ||
142 | ia64_stop(); \ | ||
143 | ia64_rsm(IA64_PSR_I); \ | ||
144 | } while (0) | ||
145 | |||
146 | #define __local_irq_restore(x) ia64_intrin_local_irq_restore((x) & IA64_PSR_I) | ||
147 | |||
148 | #ifdef CONFIG_IA64_DEBUG_IRQ | ||
149 | |||
150 | extern unsigned long last_cli_ip; | ||
151 | |||
152 | # define __save_ip() last_cli_ip = ia64_getreg(_IA64_REG_IP) | ||
153 | |||
154 | # define local_irq_save(x) \ | ||
155 | do { \ | ||
156 | unsigned long __psr; \ | ||
157 | \ | ||
158 | __local_irq_save(__psr); \ | ||
159 | if (__psr & IA64_PSR_I) \ | ||
160 | __save_ip(); \ | ||
161 | (x) = __psr; \ | ||
162 | } while (0) | ||
163 | |||
164 | # define local_irq_disable() do { unsigned long __x; local_irq_save(__x); } while (0) | ||
165 | |||
166 | # define local_irq_restore(x) \ | ||
167 | do { \ | ||
168 | unsigned long __old_psr, __psr = (x); \ | ||
169 | \ | ||
170 | local_save_flags(__old_psr); \ | ||
171 | __local_irq_restore(__psr); \ | ||
172 | if ((__old_psr & IA64_PSR_I) && !(__psr & IA64_PSR_I)) \ | ||
173 | __save_ip(); \ | ||
174 | } while (0) | ||
175 | |||
176 | #else /* !CONFIG_IA64_DEBUG_IRQ */ | ||
177 | # define local_irq_save(x) __local_irq_save(x) | ||
178 | # define local_irq_disable() __local_irq_disable() | ||
179 | # define local_irq_restore(x) __local_irq_restore(x) | ||
180 | #endif /* !CONFIG_IA64_DEBUG_IRQ */ | ||
181 | |||
182 | #define local_irq_enable() ({ ia64_stop(); ia64_ssm(IA64_PSR_I); ia64_srlz_d(); }) | ||
183 | #define local_save_flags(flags) ({ ia64_stop(); (flags) = __local_save_flags(); }) | ||
184 | |||
185 | #define irqs_disabled() \ | ||
186 | ({ \ | ||
187 | unsigned long __ia64_id_flags; \ | ||
188 | local_save_flags(__ia64_id_flags); \ | ||
189 | (__ia64_id_flags & IA64_PSR_I) == 0; \ | ||
190 | }) | ||
191 | 115 | ||
192 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
193 | 117 | ||
@@ -272,10 +196,6 @@ void cpu_idle_wait(void); | |||
272 | 196 | ||
273 | void default_idle(void); | 197 | void default_idle(void); |
274 | 198 | ||
275 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
276 | extern void account_system_vtime(struct task_struct *); | ||
277 | #endif | ||
278 | |||
279 | #endif /* __KERNEL__ */ | 199 | #endif /* __KERNEL__ */ |
280 | 200 | ||
281 | #endif /* __ASSEMBLY__ */ | 201 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index b6a5ba2aca34..ff0cc84e7bcc 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -59,11 +59,12 @@ struct thread_info { | |||
59 | #ifndef ASM_OFFSETS_C | 59 | #ifndef ASM_OFFSETS_C |
60 | /* how to get the thread information struct from C */ | 60 | /* how to get the thread information struct from C */ |
61 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) | 61 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) |
62 | #define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | 62 | #define alloc_thread_info_node(tsk, node) \ |
63 | ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | ||
63 | #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | 64 | #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) |
64 | #else | 65 | #else |
65 | #define current_thread_info() ((struct thread_info *) 0) | 66 | #define current_thread_info() ((struct thread_info *) 0) |
66 | #define alloc_thread_info(tsk) ((struct thread_info *) 0) | 67 | #define alloc_thread_info_node(tsk, node) ((struct thread_info *) 0) |
67 | #define task_thread_info(tsk) ((struct thread_info *) 0) | 68 | #define task_thread_info(tsk) ((struct thread_info *) 0) |
68 | #endif | 69 | #endif |
69 | #define free_thread_info(ti) /* nothing */ | 70 | #define free_thread_info(ti) /* nothing */ |
@@ -84,7 +85,14 @@ struct thread_info { | |||
84 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) | 85 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) |
85 | 86 | ||
86 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR | 87 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR |
87 | #define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) | 88 | #define alloc_task_struct_node(node) \ |
89 | ({ \ | ||
90 | struct page *page = alloc_pages_node(node, GFP_KERNEL | __GFP_COMP, \ | ||
91 | KERNEL_STACK_SIZE_ORDER); \ | ||
92 | struct task_struct *ret = page ? page_address(page) : NULL; \ | ||
93 | \ | ||
94 | ret; \ | ||
95 | }) | ||
88 | #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) | 96 | #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) |
89 | 97 | ||
90 | #endif /* !__ASSEMBLY */ | 98 | #endif /* !__ASSEMBLY */ |
diff --git a/arch/ia64/include/asm/tlb.h b/arch/ia64/include/asm/tlb.h index 23cce999eb1c..c3ffe3e54edc 100644 --- a/arch/ia64/include/asm/tlb.h +++ b/arch/ia64/include/asm/tlb.h | |||
@@ -47,21 +47,27 @@ | |||
47 | #include <asm/machvec.h> | 47 | #include <asm/machvec.h> |
48 | 48 | ||
49 | #ifdef CONFIG_SMP | 49 | #ifdef CONFIG_SMP |
50 | # define FREE_PTE_NR 2048 | ||
51 | # define tlb_fast_mode(tlb) ((tlb)->nr == ~0U) | 50 | # define tlb_fast_mode(tlb) ((tlb)->nr == ~0U) |
52 | #else | 51 | #else |
53 | # define FREE_PTE_NR 0 | ||
54 | # define tlb_fast_mode(tlb) (1) | 52 | # define tlb_fast_mode(tlb) (1) |
55 | #endif | 53 | #endif |
56 | 54 | ||
55 | /* | ||
56 | * If we can't allocate a page to make a big batch of page pointers | ||
57 | * to work on, then just handle a few from the on-stack structure. | ||
58 | */ | ||
59 | #define IA64_GATHER_BUNDLE 8 | ||
60 | |||
57 | struct mmu_gather { | 61 | struct mmu_gather { |
58 | struct mm_struct *mm; | 62 | struct mm_struct *mm; |
59 | unsigned int nr; /* == ~0U => fast mode */ | 63 | unsigned int nr; /* == ~0U => fast mode */ |
64 | unsigned int max; | ||
60 | unsigned char fullmm; /* non-zero means full mm flush */ | 65 | unsigned char fullmm; /* non-zero means full mm flush */ |
61 | unsigned char need_flush; /* really unmapped some PTEs? */ | 66 | unsigned char need_flush; /* really unmapped some PTEs? */ |
62 | unsigned long start_addr; | 67 | unsigned long start_addr; |
63 | unsigned long end_addr; | 68 | unsigned long end_addr; |
64 | struct page *pages[FREE_PTE_NR]; | 69 | struct page **pages; |
70 | struct page *local[IA64_GATHER_BUNDLE]; | ||
65 | }; | 71 | }; |
66 | 72 | ||
67 | struct ia64_tr_entry { | 73 | struct ia64_tr_entry { |
@@ -90,9 +96,6 @@ extern struct ia64_tr_entry *ia64_idtrs[NR_CPUS]; | |||
90 | #define RR_RID_MASK 0x00000000ffffff00L | 96 | #define RR_RID_MASK 0x00000000ffffff00L |
91 | #define RR_TO_RID(val) ((val >> 8) & 0xffffff) | 97 | #define RR_TO_RID(val) ((val >> 8) & 0xffffff) |
92 | 98 | ||
93 | /* Users of the generic TLB shootdown code must declare this storage space. */ | ||
94 | DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); | ||
95 | |||
96 | /* | 99 | /* |
97 | * Flush the TLB for address range START to END and, if not in fast mode, release the | 100 | * Flush the TLB for address range START to END and, if not in fast mode, release the |
98 | * freed pages that where gathered up to this point. | 101 | * freed pages that where gathered up to this point. |
@@ -147,15 +150,23 @@ ia64_tlb_flush_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long e | |||
147 | } | 150 | } |
148 | } | 151 | } |
149 | 152 | ||
150 | /* | 153 | static inline void __tlb_alloc_page(struct mmu_gather *tlb) |
151 | * Return a pointer to an initialized struct mmu_gather. | ||
152 | */ | ||
153 | static inline struct mmu_gather * | ||
154 | tlb_gather_mmu (struct mm_struct *mm, unsigned int full_mm_flush) | ||
155 | { | 154 | { |
156 | struct mmu_gather *tlb = &get_cpu_var(mmu_gathers); | 155 | unsigned long addr = __get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0); |
157 | 156 | ||
157 | if (addr) { | ||
158 | tlb->pages = (void *)addr; | ||
159 | tlb->max = PAGE_SIZE / sizeof(void *); | ||
160 | } | ||
161 | } | ||
162 | |||
163 | |||
164 | static inline void | ||
165 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int full_mm_flush) | ||
166 | { | ||
158 | tlb->mm = mm; | 167 | tlb->mm = mm; |
168 | tlb->max = ARRAY_SIZE(tlb->local); | ||
169 | tlb->pages = tlb->local; | ||
159 | /* | 170 | /* |
160 | * Use fast mode if only 1 CPU is online. | 171 | * Use fast mode if only 1 CPU is online. |
161 | * | 172 | * |
@@ -172,7 +183,6 @@ tlb_gather_mmu (struct mm_struct *mm, unsigned int full_mm_flush) | |||
172 | tlb->nr = (num_online_cpus() == 1) ? ~0U : 0; | 183 | tlb->nr = (num_online_cpus() == 1) ? ~0U : 0; |
173 | tlb->fullmm = full_mm_flush; | 184 | tlb->fullmm = full_mm_flush; |
174 | tlb->start_addr = ~0UL; | 185 | tlb->start_addr = ~0UL; |
175 | return tlb; | ||
176 | } | 186 | } |
177 | 187 | ||
178 | /* | 188 | /* |
@@ -180,7 +190,7 @@ tlb_gather_mmu (struct mm_struct *mm, unsigned int full_mm_flush) | |||
180 | * collected. | 190 | * collected. |
181 | */ | 191 | */ |
182 | static inline void | 192 | static inline void |
183 | tlb_finish_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long end) | 193 | tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) |
184 | { | 194 | { |
185 | /* | 195 | /* |
186 | * Note: tlb->nr may be 0 at this point, so we can't rely on tlb->start_addr and | 196 | * Note: tlb->nr may be 0 at this point, so we can't rely on tlb->start_addr and |
@@ -191,7 +201,8 @@ tlb_finish_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long end) | |||
191 | /* keep the page table cache within bounds */ | 201 | /* keep the page table cache within bounds */ |
192 | check_pgt_cache(); | 202 | check_pgt_cache(); |
193 | 203 | ||
194 | put_cpu_var(mmu_gathers); | 204 | if (tlb->pages != tlb->local) |
205 | free_pages((unsigned long)tlb->pages, 0); | ||
195 | } | 206 | } |
196 | 207 | ||
197 | /* | 208 | /* |
@@ -199,18 +210,33 @@ tlb_finish_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long end) | |||
199 | * must be delayed until after the TLB has been flushed (see comments at the beginning of | 210 | * must be delayed until after the TLB has been flushed (see comments at the beginning of |
200 | * this file). | 211 | * this file). |
201 | */ | 212 | */ |
202 | static inline void | 213 | static inline int __tlb_remove_page(struct mmu_gather *tlb, struct page *page) |
203 | tlb_remove_page (struct mmu_gather *tlb, struct page *page) | ||
204 | { | 214 | { |
205 | tlb->need_flush = 1; | 215 | tlb->need_flush = 1; |
206 | 216 | ||
207 | if (tlb_fast_mode(tlb)) { | 217 | if (tlb_fast_mode(tlb)) { |
208 | free_page_and_swap_cache(page); | 218 | free_page_and_swap_cache(page); |
209 | return; | 219 | return 1; /* avoid calling tlb_flush_mmu */ |
210 | } | 220 | } |
221 | |||
222 | if (!tlb->nr && tlb->pages == tlb->local) | ||
223 | __tlb_alloc_page(tlb); | ||
224 | |||
211 | tlb->pages[tlb->nr++] = page; | 225 | tlb->pages[tlb->nr++] = page; |
212 | if (tlb->nr >= FREE_PTE_NR) | 226 | VM_BUG_ON(tlb->nr > tlb->max); |
213 | ia64_tlb_flush_mmu(tlb, tlb->start_addr, tlb->end_addr); | 227 | |
228 | return tlb->max - tlb->nr; | ||
229 | } | ||
230 | |||
231 | static inline void tlb_flush_mmu(struct mmu_gather *tlb) | ||
232 | { | ||
233 | ia64_tlb_flush_mmu(tlb, tlb->start_addr, tlb->end_addr); | ||
234 | } | ||
235 | |||
236 | static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | ||
237 | { | ||
238 | if (!__tlb_remove_page(tlb, page)) | ||
239 | tlb_flush_mmu(tlb); | ||
214 | } | 240 | } |
215 | 241 | ||
216 | /* | 242 | /* |
diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h index 93773fd37be0..82b3939d2718 100644 --- a/arch/ia64/include/asm/types.h +++ b/arch/ia64/include/asm/types.h | |||
@@ -40,9 +40,6 @@ struct fnptr { | |||
40 | unsigned long gp; | 40 | unsigned long gp; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | /* DMA addresses are 64-bits wide, in general. */ | ||
44 | typedef u64 dma_addr_t; | ||
45 | |||
46 | # endif /* __KERNEL__ */ | 43 | # endif /* __KERNEL__ */ |
47 | #endif /* !__ASSEMBLY__ */ | 44 | #endif /* !__ASSEMBLY__ */ |
48 | 45 | ||
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h index 954d398a54b4..7c928da35b17 100644 --- a/arch/ia64/include/asm/unistd.h +++ b/arch/ia64/include/asm/unistd.h | |||
@@ -315,11 +315,17 @@ | |||
315 | #define __NR_fanotify_init 1323 | 315 | #define __NR_fanotify_init 1323 |
316 | #define __NR_fanotify_mark 1324 | 316 | #define __NR_fanotify_mark 1324 |
317 | #define __NR_prlimit64 1325 | 317 | #define __NR_prlimit64 1325 |
318 | #define __NR_name_to_handle_at 1326 | ||
319 | #define __NR_open_by_handle_at 1327 | ||
320 | #define __NR_clock_adjtime 1328 | ||
321 | #define __NR_syncfs 1329 | ||
322 | #define __NR_setns 1330 | ||
323 | #define __NR_sendmmsg 1331 | ||
318 | 324 | ||
319 | #ifdef __KERNEL__ | 325 | #ifdef __KERNEL__ |
320 | 326 | ||
321 | 327 | ||
322 | #define NR_syscalls 302 /* length of syscall table */ | 328 | #define NR_syscalls 308 /* length of syscall table */ |
323 | 329 | ||
324 | /* | 330 | /* |
325 | * The following defines stop scripts/checksyscalls.sh from complaining about | 331 | * The following defines stop scripts/checksyscalls.sh from complaining about |
diff --git a/arch/ia64/include/asm/xen/hypercall.h b/arch/ia64/include/asm/xen/hypercall.h index 96fc62366aa4..ed28bcd5bb85 100644 --- a/arch/ia64/include/asm/xen/hypercall.h +++ b/arch/ia64/include/asm/xen/hypercall.h | |||
@@ -107,7 +107,7 @@ extern unsigned long __hypercall(unsigned long a1, unsigned long a2, | |||
107 | static inline int | 107 | static inline int |
108 | xencomm_arch_hypercall_sched_op(int cmd, struct xencomm_handle *arg) | 108 | xencomm_arch_hypercall_sched_op(int cmd, struct xencomm_handle *arg) |
109 | { | 109 | { |
110 | return _hypercall2(int, sched_op_new, cmd, arg); | 110 | return _hypercall2(int, sched_op, cmd, arg); |
111 | } | 111 | } |
112 | 112 | ||
113 | static inline long | 113 | static inline long |