diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-16 20:01:19 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-16 20:01:19 -0500 |
commit | 23dd64011285010ac291f7dddf6e287bdb43a0ad (patch) | |
tree | 0e4f4569d38d82f4dceb4150d5ad940e0fd5f24f /include | |
parent | 516450179454de9e689e0a53ed8f34b896e8651c (diff) | |
parent | 485ff09990416c75ae9593ddc71619939ab9dd51 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/fpstate.h | 4 | ||||
-rw-r--r-- | include/asm-arm/system.h | 3 | ||||
-rw-r--r-- | include/asm-arm/thread_info.h | 2 | ||||
-rw-r--r-- | include/asm-m68k/atomic.h | 35 | ||||
-rw-r--r-- | include/asm-mips/vga.h | 3 | ||||
-rw-r--r-- | include/asm-powerpc/ppc-pci.h | 1 | ||||
-rw-r--r-- | include/linux/compat_ioctl.h | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/linux/gfp.h | 4 | ||||
-rw-r--r-- | include/linux/sched.h | 1 |
10 files changed, 49 insertions, 8 deletions
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index f7430e3aa55d..6246bf83627d 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h | |||
@@ -55,8 +55,10 @@ struct fp_soft_struct { | |||
55 | unsigned int save[FP_SOFT_SIZE]; /* undefined information */ | 55 | unsigned int save[FP_SOFT_SIZE]; /* undefined information */ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | #define IWMMXT_SIZE 0x98 | ||
59 | |||
58 | struct iwmmxt_struct { | 60 | struct iwmmxt_struct { |
59 | unsigned int save[0x98/sizeof(int) + 1]; | 61 | unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)]; |
60 | }; | 62 | }; |
61 | 63 | ||
62 | union fp_state { | 64 | union fp_state { |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index eb2de8c10515..ec91d1ff032a 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -415,6 +415,9 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size | |||
415 | return ret; | 415 | return ret; |
416 | } | 416 | } |
417 | 417 | ||
418 | extern void disable_hlt(void); | ||
419 | extern void enable_hlt(void); | ||
420 | |||
418 | #endif /* __ASSEMBLY__ */ | 421 | #endif /* __ASSEMBLY__ */ |
419 | 422 | ||
420 | #define arch_align_stack(x) (x) | 423 | #define arch_align_stack(x) (x) |
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index 33a33cbb6329..cfbccb63c67b 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -59,7 +59,7 @@ struct thread_info { | |||
59 | struct cpu_context_save cpu_context; /* cpu context */ | 59 | struct cpu_context_save cpu_context; /* cpu context */ |
60 | __u8 used_cp[16]; /* thread used copro */ | 60 | __u8 used_cp[16]; /* thread used copro */ |
61 | unsigned long tp_value; | 61 | unsigned long tp_value; |
62 | union fp_state fpstate; | 62 | union fp_state fpstate __attribute__((aligned(8))); |
63 | union vfp_state vfpstate; | 63 | union vfp_state vfpstate; |
64 | struct restart_block restart_block; | 64 | struct restart_block restart_block; |
65 | }; | 65 | }; |
diff --git a/include/asm-m68k/atomic.h b/include/asm-m68k/atomic.h index a4a84d5c65d5..862e497c2645 100644 --- a/include/asm-m68k/atomic.h +++ b/include/asm-m68k/atomic.h | |||
@@ -55,6 +55,7 @@ static inline int atomic_inc_and_test(atomic_t *v) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | #ifdef CONFIG_RMW_INSNS | 57 | #ifdef CONFIG_RMW_INSNS |
58 | |||
58 | static inline int atomic_add_return(int i, atomic_t *v) | 59 | static inline int atomic_add_return(int i, atomic_t *v) |
59 | { | 60 | { |
60 | int t, tmp; | 61 | int t, tmp; |
@@ -82,7 +83,12 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
82 | : "g" (i), "2" (atomic_read(v))); | 83 | : "g" (i), "2" (atomic_read(v))); |
83 | return t; | 84 | return t; |
84 | } | 85 | } |
86 | |||
87 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | ||
88 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
89 | |||
85 | #else /* !CONFIG_RMW_INSNS */ | 90 | #else /* !CONFIG_RMW_INSNS */ |
91 | |||
86 | static inline int atomic_add_return(int i, atomic_t * v) | 92 | static inline int atomic_add_return(int i, atomic_t * v) |
87 | { | 93 | { |
88 | unsigned long flags; | 94 | unsigned long flags; |
@@ -110,6 +116,32 @@ static inline int atomic_sub_return(int i, atomic_t * v) | |||
110 | 116 | ||
111 | return t; | 117 | return t; |
112 | } | 118 | } |
119 | |||
120 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) | ||
121 | { | ||
122 | unsigned long flags; | ||
123 | int prev; | ||
124 | |||
125 | local_irq_save(flags); | ||
126 | prev = atomic_read(v); | ||
127 | if (prev == old) | ||
128 | atomic_set(v, new); | ||
129 | local_irq_restore(flags); | ||
130 | return prev; | ||
131 | } | ||
132 | |||
133 | static inline int atomic_xchg(atomic_t *v, int new) | ||
134 | { | ||
135 | unsigned long flags; | ||
136 | int prev; | ||
137 | |||
138 | local_irq_save(flags); | ||
139 | prev = atomic_read(v); | ||
140 | atomic_set(v, new); | ||
141 | local_irq_restore(flags); | ||
142 | return prev; | ||
143 | } | ||
144 | |||
113 | #endif /* !CONFIG_RMW_INSNS */ | 145 | #endif /* !CONFIG_RMW_INSNS */ |
114 | 146 | ||
115 | #define atomic_dec_return(v) atomic_sub_return(1, (v)) | 147 | #define atomic_dec_return(v) atomic_sub_return(1, (v)) |
@@ -139,9 +171,6 @@ static inline void atomic_set_mask(unsigned long mask, unsigned long *v) | |||
139 | __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); | 171 | __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); |
140 | } | 172 | } |
141 | 173 | ||
142 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | ||
143 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
144 | |||
145 | #define atomic_add_unless(v, a, u) \ | 174 | #define atomic_add_unless(v, a, u) \ |
146 | ({ \ | 175 | ({ \ |
147 | int c, old; \ | 176 | int c, old; \ |
diff --git a/include/asm-mips/vga.h b/include/asm-mips/vga.h index ca5cec97e167..34755c0a6398 100644 --- a/include/asm-mips/vga.h +++ b/include/asm-mips/vga.h | |||
@@ -26,6 +26,9 @@ | |||
26 | * <linux/vt_buffer.h> has already done the right job for us. | 26 | * <linux/vt_buffer.h> has already done the right job for us. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #undef scr_writew | ||
30 | #undef scr_readw | ||
31 | |||
29 | static inline void scr_writew(u16 val, volatile u16 *addr) | 32 | static inline void scr_writew(u16 val, volatile u16 *addr) |
30 | { | 33 | { |
31 | *addr = cpu_to_le16(val); | 34 | *addr = cpu_to_le16(val); |
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h index f80482c7231f..cf79bc7ebb55 100644 --- a/include/asm-powerpc/ppc-pci.h +++ b/include/asm-powerpc/ppc-pci.h | |||
@@ -38,6 +38,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, | |||
38 | 38 | ||
39 | void pci_devs_phb_init(void); | 39 | void pci_devs_phb_init(void); |
40 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); | 40 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); |
41 | int setup_phb(struct device_node *dev, struct pci_controller *phb); | ||
41 | void __devinit scan_phb(struct pci_controller *hose); | 42 | void __devinit scan_phb(struct pci_controller *hose); |
42 | 43 | ||
43 | /* From rtas_pci.h */ | 44 | /* From rtas_pci.h */ |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 8fad50f8e389..ae7dfb790df3 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -696,6 +696,8 @@ COMPATIBLE_IOCTL(MEMLOCK) | |||
696 | COMPATIBLE_IOCTL(MEMUNLOCK) | 696 | COMPATIBLE_IOCTL(MEMUNLOCK) |
697 | COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) | 697 | COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) |
698 | COMPATIBLE_IOCTL(MEMGETREGIONINFO) | 698 | COMPATIBLE_IOCTL(MEMGETREGIONINFO) |
699 | COMPATIBLE_IOCTL(MEMGETBADBLOCK) | ||
700 | COMPATIBLE_IOCTL(MEMSETBADBLOCK) | ||
699 | /* NBD */ | 701 | /* NBD */ |
700 | ULONG_IOCTL(NBD_SET_SOCK) | 702 | ULONG_IOCTL(NBD_SET_SOCK) |
701 | ULONG_IOCTL(NBD_SET_BLKSIZE) | 703 | ULONG_IOCTL(NBD_SET_BLKSIZE) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 51c0c93bdf93..128d0082522c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1664,6 +1664,8 @@ extern int vfs_follow_link(struct nameidata *, const char *); | |||
1664 | extern int page_readlink(struct dentry *, char __user *, int); | 1664 | extern int page_readlink(struct dentry *, char __user *, int); |
1665 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); | 1665 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); |
1666 | extern void page_put_link(struct dentry *, struct nameidata *, void *); | 1666 | extern void page_put_link(struct dentry *, struct nameidata *, void *); |
1667 | extern int __page_symlink(struct inode *inode, const char *symname, int len, | ||
1668 | gfp_t gfp_mask); | ||
1667 | extern int page_symlink(struct inode *inode, const char *symname, int len); | 1669 | extern int page_symlink(struct inode *inode, const char *symname, int len); |
1668 | extern struct inode_operations page_symlink_inode_operations; | 1670 | extern struct inode_operations page_symlink_inode_operations; |
1669 | extern int generic_readlink(struct dentry *, char __user *, int); | 1671 | extern int generic_readlink(struct dentry *, char __user *, int); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 20f9148e38d9..7851e6b520cf 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -157,9 +157,9 @@ extern void FASTCALL(free_cold_page(struct page *page)); | |||
157 | 157 | ||
158 | void page_alloc_init(void); | 158 | void page_alloc_init(void); |
159 | #ifdef CONFIG_NUMA | 159 | #ifdef CONFIG_NUMA |
160 | void drain_remote_pages(void); | 160 | void drain_node_pages(int node); |
161 | #else | 161 | #else |
162 | static inline void drain_remote_pages(void) { }; | 162 | static inline void drain_node_pages(int node) { }; |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | #endif /* __LINUX_GFP_H */ | 165 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ff2e09c953b9..62e6314382f0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -892,7 +892,6 @@ static inline int pid_alive(struct task_struct *p) | |||
892 | } | 892 | } |
893 | 893 | ||
894 | extern void free_task(struct task_struct *tsk); | 894 | extern void free_task(struct task_struct *tsk); |
895 | extern void __put_task_struct(struct task_struct *tsk); | ||
896 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 895 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
897 | 896 | ||
898 | extern void __put_task_struct_cb(struct rcu_head *rhp); | 897 | extern void __put_task_struct_cb(struct rcu_head *rhp); |