diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
commit | bd3c97a7c718bfb9f1e4f31c16c383a5c6f815eb (patch) | |
tree | 3f56594e813c6f35cbacbdb3e137ba5bfd0b3069 /include/linux | |
parent | 6c33cafc794d07c9254c160789120a0e98c088c9 (diff) | |
parent | 0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux')
43 files changed, 276 insertions, 171 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index f4ebf96f5308..80b17f440ec1 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -196,7 +196,7 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | |||
196 | #define BITS_TO_COMPAT_LONGS(bits) \ | 196 | #define BITS_TO_COMPAT_LONGS(bits) \ |
197 | (((bits)+BITS_PER_COMPAT_LONG-1)/BITS_PER_COMPAT_LONG) | 197 | (((bits)+BITS_PER_COMPAT_LONG-1)/BITS_PER_COMPAT_LONG) |
198 | 198 | ||
199 | long compat_get_bitmap(unsigned long *mask, compat_ulong_t __user *umask, | 199 | long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask, |
200 | unsigned long bitmap_size); | 200 | unsigned long bitmap_size); |
201 | long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask, | 201 | long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask, |
202 | unsigned long bitmap_size); | 202 | unsigned long bitmap_size); |
@@ -230,5 +230,9 @@ asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); | |||
230 | extern int compat_printk(const char *fmt, ...); | 230 | extern int compat_printk(const char *fmt, ...); |
231 | extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); | 231 | extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); |
232 | 232 | ||
233 | asmlinkage long compat_sys_migrate_pages(compat_pid_t pid, | ||
234 | compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes, | ||
235 | const compat_ulong_t __user *new_nodes); | ||
236 | |||
233 | #endif /* CONFIG_COMPAT */ | 237 | #endif /* CONFIG_COMPAT */ |
234 | #endif /* _LINUX_COMPAT_H */ | 238 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index cfdb4f6a89d4..c26c3adcfacf 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -131,6 +131,7 @@ COMPATIBLE_IOCTL(RUN_ARRAY) | |||
131 | COMPATIBLE_IOCTL(STOP_ARRAY) | 131 | COMPATIBLE_IOCTL(STOP_ARRAY) |
132 | COMPATIBLE_IOCTL(STOP_ARRAY_RO) | 132 | COMPATIBLE_IOCTL(STOP_ARRAY_RO) |
133 | COMPATIBLE_IOCTL(RESTART_ARRAY_RW) | 133 | COMPATIBLE_IOCTL(RESTART_ARRAY_RW) |
134 | COMPATIBLE_IOCTL(GET_BITMAP_FILE) | ||
134 | ULONG_IOCTL(SET_BITMAP_FILE) | 135 | ULONG_IOCTL(SET_BITMAP_FILE) |
135 | /* DM */ | 136 | /* DM */ |
136 | COMPATIBLE_IOCTL(DM_VERSION_32) | 137 | COMPATIBLE_IOCTL(DM_VERSION_32) |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 8f2ffa4caabf..6485e9716b36 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -245,7 +245,7 @@ int crypto_alg_available(const char *name, u32 flags) | |||
245 | __deprecated_for_modules; | 245 | __deprecated_for_modules; |
246 | int crypto_has_alg(const char *name, u32 type, u32 mask); | 246 | int crypto_has_alg(const char *name, u32 type, u32 mask); |
247 | #else | 247 | #else |
248 | static int crypto_alg_available(const char *name, u32 flags); | 248 | static int crypto_alg_available(const char *name, u32 flags) |
249 | __deprecated_for_modules; | 249 | __deprecated_for_modules; |
250 | static inline int crypto_alg_available(const char *name, u32 flags) | 250 | static inline int crypto_alg_available(const char *name, u32 flags) |
251 | { | 251 | { |
diff --git a/include/linux/device.h b/include/linux/device.h index 662e6a10144e..9d4f6a963936 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -393,7 +393,7 @@ extern void device_unregister(struct device * dev); | |||
393 | extern void device_initialize(struct device * dev); | 393 | extern void device_initialize(struct device * dev); |
394 | extern int __must_check device_add(struct device * dev); | 394 | extern int __must_check device_add(struct device * dev); |
395 | extern void device_del(struct device * dev); | 395 | extern void device_del(struct device * dev); |
396 | extern int __must_check device_for_each_child(struct device *, void *, | 396 | extern int device_for_each_child(struct device *, void *, |
397 | int (*fn)(struct device *, void *)); | 397 | int (*fn)(struct device *, void *)); |
398 | extern int device_rename(struct device *dev, char *new_name); | 398 | extern int device_rename(struct device *dev, char *new_name); |
399 | 399 | ||
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 38dc403be70b..904bf3d2d90b 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -69,6 +69,7 @@ extern struct dmi_device * dmi_find_device(int type, const char *name, | |||
69 | struct dmi_device *from); | 69 | struct dmi_device *from); |
70 | extern void dmi_scan_machine(void); | 70 | extern void dmi_scan_machine(void); |
71 | extern int dmi_get_year(int field); | 71 | extern int dmi_get_year(int field); |
72 | extern int dmi_name_in_vendors(char *str); | ||
72 | 73 | ||
73 | #else | 74 | #else |
74 | 75 | ||
@@ -77,6 +78,7 @@ static inline char * dmi_get_system_info(int field) { return NULL; } | |||
77 | static inline struct dmi_device * dmi_find_device(int type, const char *name, | 78 | static inline struct dmi_device * dmi_find_device(int type, const char *name, |
78 | struct dmi_device *from) { return NULL; } | 79 | struct dmi_device *from) { return NULL; } |
79 | static inline int dmi_get_year(int year) { return 0; } | 80 | static inline int dmi_get_year(int year) { return 0; } |
81 | static inline int dmi_name_in_vendors(char *s) { return 0; } | ||
80 | 82 | ||
81 | #endif | 83 | #endif |
82 | 84 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 661c7c572149..2fe6e3f900ba 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -623,6 +623,9 @@ enum inode_i_mutex_lock_class | |||
623 | I_MUTEX_QUOTA | 623 | I_MUTEX_QUOTA |
624 | }; | 624 | }; |
625 | 625 | ||
626 | extern void inode_double_lock(struct inode *inode1, struct inode *inode2); | ||
627 | extern void inode_double_unlock(struct inode *inode1, struct inode *inode2); | ||
628 | |||
626 | /* | 629 | /* |
627 | * NOTE: in a 32bit arch with a preemptable kernel and | 630 | * NOTE: in a 32bit arch with a preemptable kernel and |
628 | * an UP compile the i_size_read/write must be atomic | 631 | * an UP compile the i_size_read/write must be atomic |
@@ -1709,6 +1712,8 @@ extern void __iget(struct inode * inode); | |||
1709 | extern void clear_inode(struct inode *); | 1712 | extern void clear_inode(struct inode *); |
1710 | extern void destroy_inode(struct inode *); | 1713 | extern void destroy_inode(struct inode *); |
1711 | extern struct inode *new_inode(struct super_block *); | 1714 | extern struct inode *new_inode(struct super_block *); |
1715 | extern int __remove_suid(struct dentry *, int); | ||
1716 | extern int should_remove_suid(struct dentry *); | ||
1712 | extern int remove_suid(struct dentry *); | 1717 | extern int remove_suid(struct dentry *); |
1713 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); | 1718 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); |
1714 | 1719 | ||
@@ -1755,6 +1760,8 @@ extern ssize_t generic_file_splice_read(struct file *, loff_t *, | |||
1755 | struct pipe_inode_info *, size_t, unsigned int); | 1760 | struct pipe_inode_info *, size_t, unsigned int); |
1756 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, | 1761 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, |
1757 | struct file *, loff_t *, size_t, unsigned int); | 1762 | struct file *, loff_t *, size_t, unsigned int); |
1763 | extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *, | ||
1764 | struct file *, loff_t *, size_t, unsigned int); | ||
1758 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | 1765 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, |
1759 | struct file *out, loff_t *, size_t len, unsigned int flags); | 1766 | struct file *out, loff_t *, size_t len, unsigned int flags); |
1760 | extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | 1767 | extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, |
diff --git a/include/linux/htirq.h b/include/linux/htirq.h index 1f15ce279a23..c96ea46737d0 100644 --- a/include/linux/htirq.h +++ b/include/linux/htirq.h | |||
@@ -1,15 +1,23 @@ | |||
1 | #ifndef LINUX_HTIRQ_H | 1 | #ifndef LINUX_HTIRQ_H |
2 | #define LINUX_HTIRQ_H | 2 | #define LINUX_HTIRQ_H |
3 | 3 | ||
4 | struct ht_irq_msg { | ||
5 | u32 address_lo; /* low 32 bits of the ht irq message */ | ||
6 | u32 address_hi; /* high 32 bits of the it irq message */ | ||
7 | }; | ||
8 | |||
4 | /* Helper functions.. */ | 9 | /* Helper functions.. */ |
5 | void write_ht_irq_low(unsigned int irq, u32 data); | 10 | void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg); |
6 | void write_ht_irq_high(unsigned int irq, u32 data); | 11 | void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg); |
7 | u32 read_ht_irq_low(unsigned int irq); | ||
8 | u32 read_ht_irq_high(unsigned int irq); | ||
9 | void mask_ht_irq(unsigned int irq); | 12 | void mask_ht_irq(unsigned int irq); |
10 | void unmask_ht_irq(unsigned int irq); | 13 | void unmask_ht_irq(unsigned int irq); |
11 | 14 | ||
12 | /* The arch hook for getting things started */ | 15 | /* The arch hook for getting things started */ |
13 | int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); | 16 | int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); |
14 | 17 | ||
18 | /* For drivers of buggy hardware */ | ||
19 | typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq, | ||
20 | struct ht_irq_msg *msg); | ||
21 | int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update); | ||
22 | |||
15 | #endif /* LINUX_HTIRQ_H */ | 23 | #endif /* LINUX_HTIRQ_H */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 5081d27bfa27..ace64e57e17f 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -60,8 +60,11 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | |||
60 | * If the arch doesn't supply something else, assume that hugepage | 60 | * If the arch doesn't supply something else, assume that hugepage |
61 | * size aligned regions are ok without further preparation. | 61 | * size aligned regions are ok without further preparation. |
62 | */ | 62 | */ |
63 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 63 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, |
64 | pgoff_t pgoff) | ||
64 | { | 65 | { |
66 | if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) | ||
67 | return -EINVAL; | ||
65 | if (len & ~HPAGE_MASK) | 68 | if (len & ~HPAGE_MASK) |
66 | return -EINVAL; | 69 | return -EINVAL; |
67 | if (addr & ~HPAGE_MASK) | 70 | if (addr & ~HPAGE_MASK) |
@@ -69,7 +72,8 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | |||
69 | return 0; | 72 | return 0; |
70 | } | 73 | } |
71 | #else | 74 | #else |
72 | int prepare_hugepage_range(unsigned long addr, unsigned long len); | 75 | int prepare_hugepage_range(unsigned long addr, unsigned long len, |
76 | pgoff_t pgoff); | ||
73 | #endif | 77 | #endif |
74 | 78 | ||
75 | #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE | 79 | #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE |
@@ -107,7 +111,7 @@ static inline unsigned long hugetlb_total_pages(void) | |||
107 | #define hugetlb_report_meminfo(buf) 0 | 111 | #define hugetlb_report_meminfo(buf) 0 |
108 | #define hugetlb_report_node_meminfo(n, buf) 0 | 112 | #define hugetlb_report_node_meminfo(n, buf) 0 |
109 | #define follow_huge_pmd(mm, addr, pmd, write) NULL | 113 | #define follow_huge_pmd(mm, addr, pmd, write) NULL |
110 | #define prepare_hugepage_range(addr, len) (-EINVAL) | 114 | #define prepare_hugepage_range(addr,len,pgoff) (-EINVAL) |
111 | #define pmd_huge(x) 0 | 115 | #define pmd_huge(x) 0 |
112 | #define is_hugepage_only_range(mm, addr, len) 0 | 116 | #define is_hugepage_only_range(mm, addr, len) 0 |
113 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 117 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 03f43e2893a4..21dd56905271 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -191,7 +191,7 @@ struct ip_mc_list | |||
191 | #define IGMPV3_MASK(value, nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value)) | 191 | #define IGMPV3_MASK(value, nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value)) |
192 | #define IGMPV3_EXP(thresh, nbmant, nbexp, value) \ | 192 | #define IGMPV3_EXP(thresh, nbmant, nbexp, value) \ |
193 | ((value) < (thresh) ? (value) : \ | 193 | ((value) < (thresh) ? (value) : \ |
194 | ((IGMPV3_MASK(value, nbmant) | (1<<(nbmant+nbexp))) << \ | 194 | ((IGMPV3_MASK(value, nbmant) | (1<<(nbmant))) << \ |
195 | (IGMPV3_MASK((value) >> (nbmant), nbexp) + (nbexp)))) | 195 | (IGMPV3_MASK((value) >> (nbmant), nbexp) + (nbexp)))) |
196 | 196 | ||
197 | #define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value) | 197 | #define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value) |
diff --git a/include/linux/in6.h b/include/linux/in6.h index 9be6a4756f0b..f28621f638e0 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -225,7 +225,7 @@ struct in6_flowlabel_req | |||
225 | #endif | 225 | #endif |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Netfilter | 228 | * Netfilter (1) |
229 | * | 229 | * |
230 | * Following socket options are used in ip6_tables; | 230 | * Following socket options are used in ip6_tables; |
231 | * see include/linux/netfilter_ipv6/ip6_tables.h. | 231 | * see include/linux/netfilter_ipv6/ip6_tables.h. |
@@ -240,4 +240,14 @@ struct in6_flowlabel_req | |||
240 | #define IPV6_RECVTCLASS 66 | 240 | #define IPV6_RECVTCLASS 66 |
241 | #define IPV6_TCLASS 67 | 241 | #define IPV6_TCLASS 67 |
242 | 242 | ||
243 | /* | ||
244 | * Netfilter (2) | ||
245 | * | ||
246 | * Following socket options are used in ip6_tables; | ||
247 | * see include/linux/netfilter_ipv6/ip6_tables.h. | ||
248 | * | ||
249 | * IP6T_SO_GET_REVISION_MATCH 68 | ||
250 | * IP6T_SO_GET_REVISION_TARGET 69 | ||
251 | */ | ||
252 | |||
243 | #endif | 253 | #endif |
diff --git a/include/linux/init.h b/include/linux/init.h index e92b1455d7af..5eb5d24b7680 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -84,19 +84,37 @@ extern void setup_arch(char **); | |||
84 | * by link order. | 84 | * by link order. |
85 | * For backwards compatibility, initcall() puts the call in | 85 | * For backwards compatibility, initcall() puts the call in |
86 | * the device init subsection. | 86 | * the device init subsection. |
87 | * | ||
88 | * The `id' arg to __define_initcall() is needed so that multiple initcalls | ||
89 | * can point at the same handler without causing duplicate-symbol build errors. | ||
87 | */ | 90 | */ |
88 | 91 | ||
89 | #define __define_initcall(level,fn) \ | 92 | #define __define_initcall(level,fn,id) \ |
90 | static initcall_t __initcall_##fn __attribute_used__ \ | 93 | static initcall_t __initcall_##fn##id __attribute_used__ \ |
91 | __attribute__((__section__(".initcall" level ".init"))) = fn | 94 | __attribute__((__section__(".initcall" level ".init"))) = fn |
92 | 95 | ||
93 | #define core_initcall(fn) __define_initcall("1",fn) | 96 | /* |
94 | #define postcore_initcall(fn) __define_initcall("2",fn) | 97 | * A "pure" initcall has no dependencies on anything else, and purely |
95 | #define arch_initcall(fn) __define_initcall("3",fn) | 98 | * initializes variables that couldn't be statically initialized. |
96 | #define subsys_initcall(fn) __define_initcall("4",fn) | 99 | * |
97 | #define fs_initcall(fn) __define_initcall("5",fn) | 100 | * This only exists for built-in code, not for modules. |
98 | #define device_initcall(fn) __define_initcall("6",fn) | 101 | */ |
99 | #define late_initcall(fn) __define_initcall("7",fn) | 102 | #define pure_initcall(fn) __define_initcall("0",fn,1) |
103 | |||
104 | #define core_initcall(fn) __define_initcall("1",fn,1) | ||
105 | #define core_initcall_sync(fn) __define_initcall("1s",fn,1s) | ||
106 | #define postcore_initcall(fn) __define_initcall("2",fn,2) | ||
107 | #define postcore_initcall_sync(fn) __define_initcall("2s",fn,2s) | ||
108 | #define arch_initcall(fn) __define_initcall("3",fn,3) | ||
109 | #define arch_initcall_sync(fn) __define_initcall("3s",fn,3s) | ||
110 | #define subsys_initcall(fn) __define_initcall("4",fn,4) | ||
111 | #define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s) | ||
112 | #define fs_initcall(fn) __define_initcall("5",fn,5) | ||
113 | #define fs_initcall_sync(fn) __define_initcall("5s",fn,5s) | ||
114 | #define device_initcall(fn) __define_initcall("6",fn,6) | ||
115 | #define device_initcall_sync(fn) __define_initcall("6s",fn,6s) | ||
116 | #define late_initcall(fn) __define_initcall("7",fn,7) | ||
117 | #define late_initcall_sync(fn) __define_initcall("7s",fn,7s) | ||
100 | 118 | ||
101 | #define __initcall(fn) device_initcall(fn) | 119 | #define __initcall(fn) device_initcall(fn) |
102 | 120 | ||
diff --git a/include/linux/ipmi_msgdefs.h b/include/linux/ipmi_msgdefs.h index 22f5e2afda4f..4d04d8b58a0a 100644 --- a/include/linux/ipmi_msgdefs.h +++ b/include/linux/ipmi_msgdefs.h | |||
@@ -75,6 +75,8 @@ | |||
75 | #define IPMI_INVALID_COMMAND_ERR 0xc1 | 75 | #define IPMI_INVALID_COMMAND_ERR 0xc1 |
76 | #define IPMI_ERR_MSG_TRUNCATED 0xc6 | 76 | #define IPMI_ERR_MSG_TRUNCATED 0xc6 |
77 | #define IPMI_LOST_ARBITRATION_ERR 0x81 | 77 | #define IPMI_LOST_ARBITRATION_ERR 0x81 |
78 | #define IPMI_BUS_ERR 0x82 | ||
79 | #define IPMI_NAK_ON_WRITE_ERR 0x83 | ||
78 | #define IPMI_ERR_UNSPECIFIED 0xff | 80 | #define IPMI_ERR_UNSPECIFIED 0xff |
79 | 81 | ||
80 | #define IPMI_CHANNEL_PROTOCOL_IPMB 1 | 82 | #define IPMI_CHANNEL_PROTOCOL_IPMB 1 |
diff --git a/include/linux/ipx.h b/include/linux/ipx.h index 4f29c60964c4..eb19b4ea84f4 100644 --- a/include/linux/ipx.h +++ b/include/linux/ipx.h | |||
@@ -7,8 +7,8 @@ | |||
7 | 7 | ||
8 | struct sockaddr_ipx { | 8 | struct sockaddr_ipx { |
9 | sa_family_t sipx_family; | 9 | sa_family_t sipx_family; |
10 | __u16 sipx_port; | 10 | __be16 sipx_port; |
11 | __u32 sipx_network; | 11 | __be32 sipx_network; |
12 | unsigned char sipx_node[IPX_NODE_LEN]; | 12 | unsigned char sipx_node[IPX_NODE_LEN]; |
13 | __u8 sipx_type; | 13 | __u8 sipx_type; |
14 | unsigned char sipx_zero; /* 16 byte fill */ | 14 | unsigned char sipx_zero; /* 16 byte fill */ |
@@ -23,13 +23,13 @@ struct sockaddr_ipx { | |||
23 | #define IPX_CRTITF 1 | 23 | #define IPX_CRTITF 1 |
24 | 24 | ||
25 | struct ipx_route_definition { | 25 | struct ipx_route_definition { |
26 | __u32 ipx_network; | 26 | __be32 ipx_network; |
27 | __u32 ipx_router_network; | 27 | __be32 ipx_router_network; |
28 | unsigned char ipx_router_node[IPX_NODE_LEN]; | 28 | unsigned char ipx_router_node[IPX_NODE_LEN]; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | struct ipx_interface_definition { | 31 | struct ipx_interface_definition { |
32 | __u32 ipx_network; | 32 | __be32 ipx_network; |
33 | unsigned char ipx_device[16]; | 33 | unsigned char ipx_device[16]; |
34 | unsigned char ipx_dlink_type; | 34 | unsigned char ipx_dlink_type; |
35 | #define IPX_FRAME_NONE 0 | 35 | #define IPX_FRAME_NONE 0 |
@@ -55,8 +55,8 @@ struct ipx_config_data { | |||
55 | */ | 55 | */ |
56 | 56 | ||
57 | struct ipx_route_def { | 57 | struct ipx_route_def { |
58 | __u32 ipx_network; | 58 | __be32 ipx_network; |
59 | __u32 ipx_router_network; | 59 | __be32 ipx_router_network; |
60 | #define IPX_ROUTE_NO_ROUTER 0 | 60 | #define IPX_ROUTE_NO_ROUTER 0 |
61 | unsigned char ipx_router_node[IPX_NODE_LEN]; | 61 | unsigned char ipx_router_node[IPX_NODE_LEN]; |
62 | unsigned char ipx_device[16]; | 62 | unsigned char ipx_device[16]; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 80f39cab470a..b9b5e4ba166a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -30,8 +30,10 @@ extern const char linux_banner[]; | |||
30 | 30 | ||
31 | #define STACK_MAGIC 0xdeadbeef | 31 | #define STACK_MAGIC 0xdeadbeef |
32 | 32 | ||
33 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | ||
34 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | ||
35 | |||
33 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
34 | #define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL)) | ||
35 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 37 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
36 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 38 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
37 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 39 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
@@ -171,6 +173,8 @@ __attribute_const__ roundup_pow_of_two(unsigned long x) | |||
171 | 173 | ||
172 | extern int printk_ratelimit(void); | 174 | extern int printk_ratelimit(void); |
173 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); | 175 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); |
176 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
177 | unsigned int interval_msec); | ||
174 | 178 | ||
175 | static inline void console_silent(void) | 179 | static inline void console_silent(void) |
176 | { | 180 | { |
diff --git a/include/linux/libata.h b/include/linux/libata.h index d0a7ad5ed518..abd2debebca2 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -143,7 +143,7 @@ enum { | |||
143 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, | 143 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, |
144 | 144 | ||
145 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ | 145 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ |
146 | ATA_DFLAG_NCQ_OFF = (1 << 9), /* devied limited to non-NCQ mode */ | 146 | ATA_DFLAG_NCQ_OFF = (1 << 9), /* device limited to non-NCQ mode */ |
147 | ATA_DFLAG_SUSPENDED = (1 << 10), /* device suspended */ | 147 | ATA_DFLAG_SUSPENDED = (1 << 10), /* device suspended */ |
148 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, | 148 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, |
149 | 149 | ||
@@ -702,7 +702,6 @@ extern int ata_std_prereset(struct ata_port *ap); | |||
702 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); | 702 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); |
703 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); | 703 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); |
704 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); | 704 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); |
705 | extern int ata_dev_revalidate(struct ata_device *dev, int post_reset); | ||
706 | extern void ata_port_disable(struct ata_port *); | 705 | extern void ata_port_disable(struct ata_port *); |
707 | extern void ata_std_ports(struct ata_ioports *ioaddr); | 706 | extern void ata_std_ports(struct ata_ioports *ioaddr); |
708 | #ifdef CONFIG_PCI | 707 | #ifdef CONFIG_PCI |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 09f0f575ddff..daabb3aa1ec6 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -150,7 +150,7 @@ extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new); | |||
150 | extern void mpol_fix_fork_child_flag(struct task_struct *p); | 150 | extern void mpol_fix_fork_child_flag(struct task_struct *p); |
151 | #define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x)) | 151 | #define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x)) |
152 | 152 | ||
153 | #ifdef CONFIG_CPUSET | 153 | #ifdef CONFIG_CPUSETS |
154 | #define current_cpuset_is_being_rebound() \ | 154 | #define current_cpuset_is_being_rebound() \ |
155 | (cpuset_being_rebound == current->cpuset) | 155 | (cpuset_being_rebound == current->cpuset) |
156 | #else | 156 | #else |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 59855b8718a0..e06683e2bea3 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -218,13 +218,9 @@ struct zone { | |||
218 | * under - it drives the swappiness decision: whether to unmap mapped | 218 | * under - it drives the swappiness decision: whether to unmap mapped |
219 | * pages. | 219 | * pages. |
220 | * | 220 | * |
221 | * temp_priority is used to remember the scanning priority at which | 221 | * Access to both this field is quite racy even on uniprocessor. But |
222 | * this zone was successfully refilled to free_pages == pages_high. | ||
223 | * | ||
224 | * Access to both these fields is quite racy even on uniprocessor. But | ||
225 | * it is expected to average out OK. | 222 | * it is expected to average out OK. |
226 | */ | 223 | */ |
227 | int temp_priority; | ||
228 | int prev_priority; | 224 | int prev_priority; |
229 | 225 | ||
230 | 226 | ||
@@ -674,6 +670,12 @@ void sparse_init(void); | |||
674 | #define sparse_index_init(_sec, _nid) do {} while (0) | 670 | #define sparse_index_init(_sec, _nid) do {} while (0) |
675 | #endif /* CONFIG_SPARSEMEM */ | 671 | #endif /* CONFIG_SPARSEMEM */ |
676 | 672 | ||
673 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES | ||
674 | #define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid)) | ||
675 | #else | ||
676 | #define early_pfn_in_nid(pfn, nid) (1) | ||
677 | #endif | ||
678 | |||
677 | #ifndef early_pfn_valid | 679 | #ifndef early_pfn_valid |
678 | #define early_pfn_valid(pfn) (1) | 680 | #define early_pfn_valid(pfn) (1) |
679 | #endif | 681 | #endif |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index ce6c85815cbd..24a9ef1506b6 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -402,6 +402,8 @@ extern const struct file_operations fat_file_operations; | |||
402 | extern struct inode_operations fat_file_inode_operations; | 402 | extern struct inode_operations fat_file_inode_operations; |
403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); | 403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); |
404 | extern void fat_truncate(struct inode *inode); | 404 | extern void fat_truncate(struct inode *inode); |
405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, | ||
406 | struct kstat *stat); | ||
405 | 407 | ||
406 | /* fat/inode.c */ | 408 | /* fat/inode.c */ |
407 | extern void fat_attach(struct inode *inode, loff_t i_pos); | 409 | extern void fat_attach(struct inode *inode, loff_t i_pos); |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 1aeedf27a1ff..2071b02f0526 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -358,7 +358,7 @@ struct nand_buffers { | |||
358 | * @priv: [OPTIONAL] pointer to private chip date | 358 | * @priv: [OPTIONAL] pointer to private chip date |
359 | * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks | 359 | * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks |
360 | * (determine if errors are correctable) | 360 | * (determine if errors are correctable) |
361 | * @write_page [REPLACEABLE] High-level page write function | 361 | * @write_page: [REPLACEABLE] High-level page write function |
362 | */ | 362 | */ |
363 | 363 | ||
364 | struct nand_chip { | 364 | struct nand_chip { |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9264139bd8df..83b8c4f1d69d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -93,8 +93,10 @@ struct netpoll_info; | |||
93 | #endif | 93 | #endif |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #if !defined(CONFIG_NET_IPIP) && \ | 96 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ |
97 | !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE) | 97 | !defined(CONFIG_NET_IPGRE) && !defined(CONFIG_NET_IPGRE_MODULE) && \ |
98 | !defined(CONFIG_IPV6_SIT) && !defined(CONFIG_IPV6_SIT_MODULE) && \ | ||
99 | !defined(CONFIG_IPV6_TUNNEL) && !defined(CONFIG_IPV6_TUNNEL_MODULE) | ||
98 | #define MAX_HEADER LL_MAX_HEADER | 100 | #define MAX_HEADER LL_MAX_HEADER |
99 | #else | 101 | #else |
100 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 102 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 04319a76103a..022edfa97ed9 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -96,22 +96,6 @@ struct _xt_align | |||
96 | /* Error verdict. */ | 96 | /* Error verdict. */ |
97 | #define XT_ERROR_TARGET "ERROR" | 97 | #define XT_ERROR_TARGET "ERROR" |
98 | 98 | ||
99 | /* | ||
100 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | ||
101 | * Unlike BSD Linux inherits IP options so you don't have to use a raw | ||
102 | * socket for this. Instead we check rights in the calls. */ | ||
103 | #define XT_BASE_CTL 64 /* base for firewall socket options */ | ||
104 | |||
105 | #define XT_SO_SET_REPLACE (XT_BASE_CTL) | ||
106 | #define XT_SO_SET_ADD_COUNTERS (XT_BASE_CTL + 1) | ||
107 | #define XT_SO_SET_MAX XT_SO_SET_ADD_COUNTERS | ||
108 | |||
109 | #define XT_SO_GET_INFO (XT_BASE_CTL) | ||
110 | #define XT_SO_GET_ENTRIES (XT_BASE_CTL + 1) | ||
111 | #define XT_SO_GET_REVISION_MATCH (XT_BASE_CTL + 2) | ||
112 | #define XT_SO_GET_REVISION_TARGET (XT_BASE_CTL + 3) | ||
113 | #define XT_SO_GET_MAX XT_SO_GET_REVISION_TARGET | ||
114 | |||
115 | #define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0) | 99 | #define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0) |
116 | #define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0) | 100 | #define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0) |
117 | 101 | ||
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 44e39b61d9e7..0be235418a2f 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -112,19 +112,20 @@ struct arpt_entry | |||
112 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 112 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
113 | * Unlike BSD Linux inherits IP options so you don't have to use a raw | 113 | * Unlike BSD Linux inherits IP options so you don't have to use a raw |
114 | * socket for this. Instead we check rights in the calls. | 114 | * socket for this. Instead we check rights in the calls. |
115 | * | ||
116 | * ATTENTION: check linux/in.h before adding new number here. | ||
115 | */ | 117 | */ |
116 | #define ARPT_CTL_OFFSET 32 | 118 | #define ARPT_BASE_CTL 96 |
117 | #define ARPT_BASE_CTL (XT_BASE_CTL+ARPT_CTL_OFFSET) | 119 | |
118 | 120 | #define ARPT_SO_SET_REPLACE (ARPT_BASE_CTL) | |
119 | #define ARPT_SO_SET_REPLACE (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET) | 121 | #define ARPT_SO_SET_ADD_COUNTERS (ARPT_BASE_CTL + 1) |
120 | #define ARPT_SO_SET_ADD_COUNTERS (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET) | 122 | #define ARPT_SO_SET_MAX ARPT_SO_SET_ADD_COUNTERS |
121 | #define ARPT_SO_SET_MAX (XT_SO_SET_MAX+ARPT_CTL_OFFSET) | 123 | |
122 | 124 | #define ARPT_SO_GET_INFO (ARPT_BASE_CTL) | |
123 | #define ARPT_SO_GET_INFO (XT_SO_GET_INFO+ARPT_CTL_OFFSET) | 125 | #define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1) |
124 | #define ARPT_SO_GET_ENTRIES (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET) | 126 | /* #define ARPT_SO_GET_REVISION_MATCH (APRT_BASE_CTL + 2) */ |
125 | /* #define ARPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH */ | 127 | #define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3) |
126 | #define ARPT_SO_GET_REVISION_TARGET (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET) | 128 | #define ARPT_SO_GET_MAX (ARPT_SO_GET_REVISION_TARGET) |
127 | #define ARPT_SO_GET_MAX (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET) | ||
128 | 129 | ||
129 | /* CONTINUE verdict for targets */ | 130 | /* CONTINUE verdict for targets */ |
130 | #define ARPT_CONTINUE XT_CONTINUE | 131 | #define ARPT_CONTINUE XT_CONTINUE |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index a536bbdef145..4f06dad0bde9 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -101,18 +101,21 @@ struct ipt_entry | |||
101 | /* | 101 | /* |
102 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 102 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
103 | * Unlike BSD Linux inherits IP options so you don't have to use a raw | 103 | * Unlike BSD Linux inherits IP options so you don't have to use a raw |
104 | * socket for this. Instead we check rights in the calls. */ | 104 | * socket for this. Instead we check rights in the calls. |
105 | #define IPT_BASE_CTL XT_BASE_CTL | 105 | * |
106 | 106 | * ATTENTION: check linux/in.h before adding new number here. | |
107 | #define IPT_SO_SET_REPLACE XT_SO_SET_REPLACE | 107 | */ |
108 | #define IPT_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS | 108 | #define IPT_BASE_CTL 64 |
109 | #define IPT_SO_SET_MAX XT_SO_SET_MAX | 109 | |
110 | 110 | #define IPT_SO_SET_REPLACE (IPT_BASE_CTL) | |
111 | #define IPT_SO_GET_INFO XT_SO_GET_INFO | 111 | #define IPT_SO_SET_ADD_COUNTERS (IPT_BASE_CTL + 1) |
112 | #define IPT_SO_GET_ENTRIES XT_SO_GET_ENTRIES | 112 | #define IPT_SO_SET_MAX IPT_SO_SET_ADD_COUNTERS |
113 | #define IPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH | 113 | |
114 | #define IPT_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET | 114 | #define IPT_SO_GET_INFO (IPT_BASE_CTL) |
115 | #define IPT_SO_GET_MAX XT_SO_GET_REVISION_TARGET | 115 | #define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1) |
116 | #define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2) | ||
117 | #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3) | ||
118 | #define IPT_SO_GET_MAX IPT_SO_GET_REVISION_TARGET | ||
116 | 119 | ||
117 | #define IPT_CONTINUE XT_CONTINUE | 120 | #define IPT_CONTINUE XT_CONTINUE |
118 | #define IPT_RETURN XT_RETURN | 121 | #define IPT_RETURN XT_RETURN |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index d7a8e9c0dad0..4aed340401db 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -107,18 +107,21 @@ struct ip6t_entry | |||
107 | /* | 107 | /* |
108 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 108 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
109 | * Unlike BSD Linux inherits IP options so you don't have to use | 109 | * Unlike BSD Linux inherits IP options so you don't have to use |
110 | * a raw socket for this. Instead we check rights in the calls. */ | 110 | * a raw socket for this. Instead we check rights in the calls. |
111 | #define IP6T_BASE_CTL XT_BASE_CTL | 111 | * |
112 | 112 | * ATTENTION: check linux/in6.h before adding new number here. | |
113 | #define IP6T_SO_SET_REPLACE XT_SO_SET_REPLACE | 113 | */ |
114 | #define IP6T_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS | 114 | #define IP6T_BASE_CTL 64 |
115 | #define IP6T_SO_SET_MAX XT_SO_SET_MAX | 115 | |
116 | 116 | #define IP6T_SO_SET_REPLACE (IP6T_BASE_CTL) | |
117 | #define IP6T_SO_GET_INFO XT_SO_GET_INFO | 117 | #define IP6T_SO_SET_ADD_COUNTERS (IP6T_BASE_CTL + 1) |
118 | #define IP6T_SO_GET_ENTRIES XT_SO_GET_ENTRIES | 118 | #define IP6T_SO_SET_MAX IP6T_SO_SET_ADD_COUNTERS |
119 | #define IP6T_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH | 119 | |
120 | #define IP6T_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET | 120 | #define IP6T_SO_GET_INFO (IP6T_BASE_CTL) |
121 | #define IP6T_SO_GET_MAX XT_SO_GET_REVISION_TARGET | 121 | #define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1) |
122 | #define IP6T_SO_GET_REVISION_MATCH (IP6T_BASE_CTL + 4) | ||
123 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 5) | ||
124 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET | ||
122 | 125 | ||
123 | /* CONTINUE verdict for targets */ | 126 | /* CONTINUE verdict for targets */ |
124 | #define IP6T_CONTINUE XT_CONTINUE | 127 | #define IP6T_CONTINUE XT_CONTINUE |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index eb231143d579..edb54c3171b3 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -89,7 +89,7 @@ __be32 nfsd_access(struct svc_rqst *, struct svc_fh *, u32 *, u32 *); | |||
89 | __be32 nfsd_create_v3(struct svc_rqst *, struct svc_fh *, | 89 | __be32 nfsd_create_v3(struct svc_rqst *, struct svc_fh *, |
90 | char *name, int len, struct iattr *attrs, | 90 | char *name, int len, struct iattr *attrs, |
91 | struct svc_fh *res, int createmode, | 91 | struct svc_fh *res, int createmode, |
92 | u32 *verifier, int *truncp); | 92 | u32 *verifier, int *truncp, int *created); |
93 | __be32 nfsd_commit(struct svc_rqst *, struct svc_fh *, | 93 | __be32 nfsd_commit(struct svc_rqst *, struct svc_fh *, |
94 | loff_t, unsigned long); | 94 | loff_t, unsigned long); |
95 | #endif /* CONFIG_NFSD_V3 */ | 95 | #endif /* CONFIG_NFSD_V3 */ |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index f6baecdeecd6..971d1c6dfc4b 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -45,8 +45,10 @@ static inline void exit_task_namespaces(struct task_struct *p) | |||
45 | { | 45 | { |
46 | struct nsproxy *ns = p->nsproxy; | 46 | struct nsproxy *ns = p->nsproxy; |
47 | if (ns) { | 47 | if (ns) { |
48 | put_nsproxy(ns); | 48 | task_lock(p); |
49 | p->nsproxy = NULL; | 49 | p->nsproxy = NULL; |
50 | task_unlock(p); | ||
51 | put_nsproxy(ns); | ||
50 | } | 52 | } |
51 | } | 53 | } |
52 | #endif | 54 | #endif |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 64f950925151..c3e255bf8594 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -52,19 +52,23 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) | |||
52 | void release_pages(struct page **pages, int nr, int cold); | 52 | void release_pages(struct page **pages, int nr, int cold); |
53 | 53 | ||
54 | #ifdef CONFIG_NUMA | 54 | #ifdef CONFIG_NUMA |
55 | extern struct page *page_cache_alloc(struct address_space *x); | 55 | extern struct page *__page_cache_alloc(gfp_t gfp); |
56 | extern struct page *page_cache_alloc_cold(struct address_space *x); | ||
57 | #else | 56 | #else |
57 | static inline struct page *__page_cache_alloc(gfp_t gfp) | ||
58 | { | ||
59 | return alloc_pages(gfp, 0); | ||
60 | } | ||
61 | #endif | ||
62 | |||
58 | static inline struct page *page_cache_alloc(struct address_space *x) | 63 | static inline struct page *page_cache_alloc(struct address_space *x) |
59 | { | 64 | { |
60 | return alloc_pages(mapping_gfp_mask(x), 0); | 65 | return __page_cache_alloc(mapping_gfp_mask(x)); |
61 | } | 66 | } |
62 | 67 | ||
63 | static inline struct page *page_cache_alloc_cold(struct address_space *x) | 68 | static inline struct page *page_cache_alloc_cold(struct address_space *x) |
64 | { | 69 | { |
65 | return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD, 0); | 70 | return __page_cache_alloc(mapping_gfp_mask(x)|__GFP_COLD); |
66 | } | 71 | } |
67 | #endif | ||
68 | 72 | ||
69 | typedef int filler_t(void *, struct page *); | 73 | typedef int filler_t(void *, struct page *); |
70 | 74 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 4689e2a699c0..09be0f81b27b 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -455,7 +455,11 @@ int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | |||
455 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 455 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
456 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); | 456 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); |
457 | 457 | ||
458 | struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); | 458 | struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, |
459 | struct pci_dev *from); | ||
460 | struct pci_dev *pci_get_device_reverse(unsigned int vendor, unsigned int device, | ||
461 | struct pci_dev *from); | ||
462 | |||
459 | struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, | 463 | struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, |
460 | unsigned int ss_vendor, unsigned int ss_device, | 464 | unsigned int ss_vendor, unsigned int ss_device, |
461 | struct pci_dev *from); | 465 | struct pci_dev *from); |
@@ -660,7 +664,12 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int | |||
660 | static inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn) | 664 | static inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn) |
661 | { return NULL; } | 665 | { return NULL; } |
662 | 666 | ||
663 | static inline struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from) | 667 | static inline struct pci_dev *pci_get_device(unsigned int vendor, |
668 | unsigned int device, struct pci_dev *from) | ||
669 | { return NULL; } | ||
670 | |||
671 | static inline struct pci_dev *pci_get_device_reverse(unsigned int vendor, | ||
672 | unsigned int device, struct pci_dev *from) | ||
664 | { return NULL; } | 673 | { return NULL; } |
665 | 674 | ||
666 | static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, | 675 | static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f3a168f3c9df..fa4e1d799782 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1213,6 +1213,7 @@ | |||
1213 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 | 1213 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 |
1214 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 | 1214 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 |
1215 | #define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 | 1215 | #define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 |
1216 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 | ||
1216 | 1217 | ||
1217 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1218 | #define PCI_VENDOR_ID_IMS 0x10e0 |
1218 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1219 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index c312a12ad2d6..c321316f1bc7 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -371,6 +371,7 @@ | |||
371 | #define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ | 371 | #define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ |
372 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ | 372 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ |
373 | #define PCI_EXP_LNKCTL 16 /* Link Control */ | 373 | #define PCI_EXP_LNKCTL 16 /* Link Control */ |
374 | #define PCI_EXP_LNKCTL_CLKREQ_EN 0x100 /* Enable clkreq */ | ||
374 | #define PCI_EXP_LNKSTA 18 /* Link Status */ | 375 | #define PCI_EXP_LNKSTA 18 /* Link Status */ |
375 | #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ | 376 | #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ |
376 | #define PCI_EXP_SLTCTL 24 /* Slot Control */ | 377 | #define PCI_EXP_SLTCTL 24 /* Slot Control */ |
diff --git a/include/linux/personality.h b/include/linux/personality.h index bf4cf2080e5c..012cd558189b 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h | |||
@@ -114,7 +114,7 @@ struct exec_domain { | |||
114 | * Change personality of the currently running process. | 114 | * Change personality of the currently running process. |
115 | */ | 115 | */ |
116 | #define set_personality(pers) \ | 116 | #define set_personality(pers) \ |
117 | ((current->personality == pers) ? 0 : __set_personality(pers)) | 117 | ((current->personality == (pers)) ? 0 : __set_personality(pers)) |
118 | 118 | ||
119 | #endif /* __KERNEL__ */ | 119 | #endif /* __KERNEL__ */ |
120 | 120 | ||
diff --git a/include/linux/pm.h b/include/linux/pm.h index 6b27e07aef19..070394e846d0 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -116,7 +116,9 @@ typedef int __bitwise suspend_disk_method_t; | |||
116 | #define PM_DISK_PLATFORM ((__force suspend_disk_method_t) 2) | 116 | #define PM_DISK_PLATFORM ((__force suspend_disk_method_t) 2) |
117 | #define PM_DISK_SHUTDOWN ((__force suspend_disk_method_t) 3) | 117 | #define PM_DISK_SHUTDOWN ((__force suspend_disk_method_t) 3) |
118 | #define PM_DISK_REBOOT ((__force suspend_disk_method_t) 4) | 118 | #define PM_DISK_REBOOT ((__force suspend_disk_method_t) 4) |
119 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 5) | 119 | #define PM_DISK_TEST ((__force suspend_disk_method_t) 5) |
120 | #define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 6) | ||
121 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 7) | ||
120 | 122 | ||
121 | struct pm_ops { | 123 | struct pm_ops { |
122 | suspend_disk_method_t pm_disk_mode; | 124 | suspend_disk_method_t pm_disk_mode; |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 84d887751855..ebd42a3710b4 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -146,16 +146,16 @@ enum bitmap_state { | |||
146 | 146 | ||
147 | /* the superblock at the front of the bitmap file -- little endian */ | 147 | /* the superblock at the front of the bitmap file -- little endian */ |
148 | typedef struct bitmap_super_s { | 148 | typedef struct bitmap_super_s { |
149 | __u32 magic; /* 0 BITMAP_MAGIC */ | 149 | __le32 magic; /* 0 BITMAP_MAGIC */ |
150 | __u32 version; /* 4 the bitmap major for now, could change... */ | 150 | __le32 version; /* 4 the bitmap major for now, could change... */ |
151 | __u8 uuid[16]; /* 8 128 bit uuid - must match md device uuid */ | 151 | __u8 uuid[16]; /* 8 128 bit uuid - must match md device uuid */ |
152 | __u64 events; /* 24 event counter for the bitmap (1)*/ | 152 | __le64 events; /* 24 event counter for the bitmap (1)*/ |
153 | __u64 events_cleared;/*32 event counter when last bit cleared (2) */ | 153 | __le64 events_cleared;/*32 event counter when last bit cleared (2) */ |
154 | __u64 sync_size; /* 40 the size of the md device's sync range(3) */ | 154 | __le64 sync_size; /* 40 the size of the md device's sync range(3) */ |
155 | __u32 state; /* 48 bitmap state information */ | 155 | __le32 state; /* 48 bitmap state information */ |
156 | __u32 chunksize; /* 52 the bitmap chunk size in bytes */ | 156 | __le32 chunksize; /* 52 the bitmap chunk size in bytes */ |
157 | __u32 daemon_sleep; /* 56 seconds between disk flushes */ | 157 | __le32 daemon_sleep; /* 56 seconds between disk flushes */ |
158 | __u32 write_behind; /* 60 number of outstanding write-behind writes */ | 158 | __le32 write_behind; /* 60 number of outstanding write-behind writes */ |
159 | 159 | ||
160 | __u8 pad[256 - 64]; /* set to zero */ | 160 | __u8 pad[256 - 64]; /* set to zero */ |
161 | } bitmap_super_t; | 161 | } bitmap_super_t; |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index b6ebc69bae54..3f2cd98c508b 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -206,52 +206,52 @@ static inline __u64 md_event(mdp_super_t *sb) { | |||
206 | */ | 206 | */ |
207 | struct mdp_superblock_1 { | 207 | struct mdp_superblock_1 { |
208 | /* constant array information - 128 bytes */ | 208 | /* constant array information - 128 bytes */ |
209 | __u32 magic; /* MD_SB_MAGIC: 0xa92b4efc - little endian */ | 209 | __le32 magic; /* MD_SB_MAGIC: 0xa92b4efc - little endian */ |
210 | __u32 major_version; /* 1 */ | 210 | __le32 major_version; /* 1 */ |
211 | __u32 feature_map; /* bit 0 set if 'bitmap_offset' is meaningful */ | 211 | __le32 feature_map; /* bit 0 set if 'bitmap_offset' is meaningful */ |
212 | __u32 pad0; /* always set to 0 when writing */ | 212 | __le32 pad0; /* always set to 0 when writing */ |
213 | 213 | ||
214 | __u8 set_uuid[16]; /* user-space generated. */ | 214 | __u8 set_uuid[16]; /* user-space generated. */ |
215 | char set_name[32]; /* set and interpreted by user-space */ | 215 | char set_name[32]; /* set and interpreted by user-space */ |
216 | 216 | ||
217 | __u64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/ | 217 | __le64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/ |
218 | __u32 level; /* -4 (multipath), -1 (linear), 0,1,4,5 */ | 218 | __le32 level; /* -4 (multipath), -1 (linear), 0,1,4,5 */ |
219 | __u32 layout; /* only for raid5 and raid10 currently */ | 219 | __le32 layout; /* only for raid5 and raid10 currently */ |
220 | __u64 size; /* used size of component devices, in 512byte sectors */ | 220 | __le64 size; /* used size of component devices, in 512byte sectors */ |
221 | 221 | ||
222 | __u32 chunksize; /* in 512byte sectors */ | 222 | __le32 chunksize; /* in 512byte sectors */ |
223 | __u32 raid_disks; | 223 | __le32 raid_disks; |
224 | __u32 bitmap_offset; /* sectors after start of superblock that bitmap starts | 224 | __le32 bitmap_offset; /* sectors after start of superblock that bitmap starts |
225 | * NOTE: signed, so bitmap can be before superblock | 225 | * NOTE: signed, so bitmap can be before superblock |
226 | * only meaningful of feature_map[0] is set. | 226 | * only meaningful of feature_map[0] is set. |
227 | */ | 227 | */ |
228 | 228 | ||
229 | /* These are only valid with feature bit '4' */ | 229 | /* These are only valid with feature bit '4' */ |
230 | __u32 new_level; /* new level we are reshaping to */ | 230 | __le32 new_level; /* new level we are reshaping to */ |
231 | __u64 reshape_position; /* next address in array-space for reshape */ | 231 | __le64 reshape_position; /* next address in array-space for reshape */ |
232 | __u32 delta_disks; /* change in number of raid_disks */ | 232 | __le32 delta_disks; /* change in number of raid_disks */ |
233 | __u32 new_layout; /* new layout */ | 233 | __le32 new_layout; /* new layout */ |
234 | __u32 new_chunk; /* new chunk size (bytes) */ | 234 | __le32 new_chunk; /* new chunk size (bytes) */ |
235 | __u8 pad1[128-124]; /* set to 0 when written */ | 235 | __u8 pad1[128-124]; /* set to 0 when written */ |
236 | 236 | ||
237 | /* constant this-device information - 64 bytes */ | 237 | /* constant this-device information - 64 bytes */ |
238 | __u64 data_offset; /* sector start of data, often 0 */ | 238 | __le64 data_offset; /* sector start of data, often 0 */ |
239 | __u64 data_size; /* sectors in this device that can be used for data */ | 239 | __le64 data_size; /* sectors in this device that can be used for data */ |
240 | __u64 super_offset; /* sector start of this superblock */ | 240 | __le64 super_offset; /* sector start of this superblock */ |
241 | __u64 recovery_offset;/* sectors before this offset (from data_offset) have been recovered */ | 241 | __le64 recovery_offset;/* sectors before this offset (from data_offset) have been recovered */ |
242 | __u32 dev_number; /* permanent identifier of this device - not role in raid */ | 242 | __le32 dev_number; /* permanent identifier of this device - not role in raid */ |
243 | __u32 cnt_corrected_read; /* number of read errors that were corrected by re-writing */ | 243 | __le32 cnt_corrected_read; /* number of read errors that were corrected by re-writing */ |
244 | __u8 device_uuid[16]; /* user-space setable, ignored by kernel */ | 244 | __u8 device_uuid[16]; /* user-space setable, ignored by kernel */ |
245 | __u8 devflags; /* per-device flags. Only one defined...*/ | 245 | __u8 devflags; /* per-device flags. Only one defined...*/ |
246 | #define WriteMostly1 1 /* mask for writemostly flag in above */ | 246 | #define WriteMostly1 1 /* mask for writemostly flag in above */ |
247 | __u8 pad2[64-57]; /* set to 0 when writing */ | 247 | __u8 pad2[64-57]; /* set to 0 when writing */ |
248 | 248 | ||
249 | /* array state information - 64 bytes */ | 249 | /* array state information - 64 bytes */ |
250 | __u64 utime; /* 40 bits second, 24 btes microseconds */ | 250 | __le64 utime; /* 40 bits second, 24 btes microseconds */ |
251 | __u64 events; /* incremented when superblock updated */ | 251 | __le64 events; /* incremented when superblock updated */ |
252 | __u64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ | 252 | __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ |
253 | __u32 sb_csum; /* checksum upto devs[max_dev] */ | 253 | __le32 sb_csum; /* checksum upto devs[max_dev] */ |
254 | __u32 max_dev; /* size of devs[] array to consider */ | 254 | __le32 max_dev; /* size of devs[] array to consider */ |
255 | __u8 pad3[64-32]; /* set to 0 when writing */ | 255 | __u8 pad3[64-32]; /* set to 0 when writing */ |
256 | 256 | ||
257 | /* device state information. Indexed by dev_number. | 257 | /* device state information. Indexed by dev_number. |
@@ -260,7 +260,7 @@ struct mdp_superblock_1 { | |||
260 | * into the 'roles' value. If a device is spare or faulty, then it doesn't | 260 | * into the 'roles' value. If a device is spare or faulty, then it doesn't |
261 | * have a meaningful role. | 261 | * have a meaningful role. |
262 | */ | 262 | */ |
263 | __u16 dev_roles[0]; /* role in array, or 0xffff for a spare, or 0xfffe for faulty */ | 263 | __le16 dev_roles[0]; /* role in array, or 0xffff for a spare, or 0xfffe for faulty */ |
264 | }; | 264 | }; |
265 | 265 | ||
266 | /* feature_map bits */ | 266 | /* feature_map bits */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6735c1cf334c..eafe4a7b8237 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -466,7 +466,6 @@ struct signal_struct { | |||
466 | struct pacct_struct pacct; /* per-process accounting information */ | 466 | struct pacct_struct pacct; /* per-process accounting information */ |
467 | #endif | 467 | #endif |
468 | #ifdef CONFIG_TASKSTATS | 468 | #ifdef CONFIG_TASKSTATS |
469 | spinlock_t stats_lock; | ||
470 | struct taskstats *stats; | 469 | struct taskstats *stats; |
471 | #endif | 470 | #endif |
472 | }; | 471 | }; |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index b800d2d68b32..8451052ca66f 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -183,13 +183,27 @@ do { \ | |||
183 | #define read_lock(lock) _read_lock(lock) | 183 | #define read_lock(lock) _read_lock(lock) |
184 | 184 | ||
185 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 185 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
186 | |||
186 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) | 187 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) |
187 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) | 188 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) |
188 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) | 189 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) |
190 | |||
191 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
192 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
193 | flags = _spin_lock_irqsave_nested(lock, subclass) | ||
194 | #else | ||
195 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
196 | flags = _spin_lock_irqsave(lock) | ||
197 | #endif | ||
198 | |||
189 | #else | 199 | #else |
200 | |||
190 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) | 201 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) |
191 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) | 202 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) |
192 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) | 203 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) |
204 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
205 | spin_lock_irqsave(lock, flags) | ||
206 | |||
193 | #endif | 207 | #endif |
194 | 208 | ||
195 | #define spin_lock_irq(lock) _spin_lock_irq(lock) | 209 | #define spin_lock_irq(lock) _spin_lock_irq(lock) |
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h index 8828b8155e9c..8a2307ce7296 100644 --- a/include/linux/spinlock_api_smp.h +++ b/include/linux/spinlock_api_smp.h | |||
@@ -32,6 +32,8 @@ void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(lock); | |||
32 | void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(lock); | 32 | void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(lock); |
33 | unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) | 33 | unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) |
34 | __acquires(lock); | 34 | __acquires(lock); |
35 | unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass) | ||
36 | __acquires(lock); | ||
35 | unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) | 37 | unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) |
36 | __acquires(lock); | 38 | __acquires(lock); |
37 | unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) | 39 | unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 1b24bd45e080..d98562f1df76 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -6,10 +6,17 @@ | |||
6 | **************************************************************** | 6 | **************************************************************** |
7 | **************************************************************** | 7 | **************************************************************** |
8 | ** | 8 | ** |
9 | ** WARNING: | ||
9 | ** The values in this file are exported to user space via | 10 | ** The values in this file are exported to user space via |
10 | ** the sysctl() binary interface. However this interface | 11 | ** the sysctl() binary interface. Do *NOT* change the |
11 | ** is unstable and deprecated and will be removed in the future. | 12 | ** numbering of any existing values here, and do not change |
12 | ** For a stable interface use /proc/sys. | 13 | ** any numbers within any one set of values. If you have to |
14 | ** have to redefine an existing interface, use a new number for it. | ||
15 | ** The kernel will then return -ENOTDIR to any application using | ||
16 | ** the old binary interface. | ||
17 | ** | ||
18 | ** For new interfaces unless you really need a binary number | ||
19 | ** please use CTL_UNNUMBERED. | ||
13 | ** | 20 | ** |
14 | **************************************************************** | 21 | **************************************************************** |
15 | **************************************************************** | 22 | **************************************************************** |
@@ -48,6 +55,7 @@ struct __sysctl_args { | |||
48 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
49 | #define CTL_ANY -1 /* Matches any name */ | 56 | #define CTL_ANY -1 /* Matches any name */ |
50 | #define CTL_NONE 0 | 57 | #define CTL_NONE 0 |
58 | #define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */ | ||
51 | #endif | 59 | #endif |
52 | 60 | ||
53 | enum | 61 | enum |
@@ -961,8 +969,8 @@ extern ctl_handler sysctl_ms_jiffies; | |||
961 | /* | 969 | /* |
962 | * Register a set of sysctl names by calling register_sysctl_table | 970 | * Register a set of sysctl names by calling register_sysctl_table |
963 | * with an initialised array of ctl_table's. An entry with zero | 971 | * with an initialised array of ctl_table's. An entry with zero |
964 | * ctl_name terminates the table. table->de will be set up by the | 972 | * ctl_name and NULL procname terminates the table. table->de will be |
965 | * registration and need not be initialised in advance. | 973 | * set up by the registration and need not be initialised in advance. |
966 | * | 974 | * |
967 | * sysctl names can be mirrored automatically under /proc/sys. The | 975 | * sysctl names can be mirrored automatically under /proc/sys. The |
968 | * procname supplied controls /proc naming. | 976 | * procname supplied controls /proc naming. |
@@ -973,7 +981,10 @@ extern ctl_handler sysctl_ms_jiffies; | |||
973 | * Leaf nodes in the sysctl tree will be represented by a single file | 981 | * Leaf nodes in the sysctl tree will be represented by a single file |
974 | * under /proc; non-leaf nodes will be represented by directories. A | 982 | * under /proc; non-leaf nodes will be represented by directories. A |
975 | * null procname disables /proc mirroring at this node. | 983 | * null procname disables /proc mirroring at this node. |
976 | * | 984 | * |
985 | * sysctl entries with a zero ctl_name will not be available through | ||
986 | * the binary sysctl interface. | ||
987 | * | ||
977 | * sysctl(2) can automatically manage read and write requests through | 988 | * sysctl(2) can automatically manage read and write requests through |
978 | * the sysctl table. The data and maxlen fields of the ctl_table | 989 | * the sysctl table. The data and maxlen fields of the ctl_table |
979 | * struct enable minimal validation of the values being written to be | 990 | * struct enable minimal validation of the values being written to be |
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index 16894b7edcc8..6562a2050a25 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
@@ -23,25 +23,26 @@ static inline void taskstats_exit_free(struct taskstats *tidstats) | |||
23 | 23 | ||
24 | static inline void taskstats_tgid_init(struct signal_struct *sig) | 24 | static inline void taskstats_tgid_init(struct signal_struct *sig) |
25 | { | 25 | { |
26 | spin_lock_init(&sig->stats_lock); | ||
27 | sig->stats = NULL; | 26 | sig->stats = NULL; |
28 | } | 27 | } |
29 | 28 | ||
30 | static inline void taskstats_tgid_alloc(struct signal_struct *sig) | 29 | static inline void taskstats_tgid_alloc(struct task_struct *tsk) |
31 | { | 30 | { |
31 | struct signal_struct *sig = tsk->signal; | ||
32 | struct taskstats *stats; | 32 | struct taskstats *stats; |
33 | unsigned long flags; | ||
34 | 33 | ||
35 | stats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL); | 34 | if (sig->stats != NULL) |
36 | if (!stats) | ||
37 | return; | 35 | return; |
38 | 36 | ||
39 | spin_lock_irqsave(&sig->stats_lock, flags); | 37 | /* No problem if kmem_cache_zalloc() fails */ |
38 | stats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL); | ||
39 | |||
40 | spin_lock_irq(&tsk->sighand->siglock); | ||
40 | if (!sig->stats) { | 41 | if (!sig->stats) { |
41 | sig->stats = stats; | 42 | sig->stats = stats; |
42 | stats = NULL; | 43 | stats = NULL; |
43 | } | 44 | } |
44 | spin_unlock_irqrestore(&sig->stats_lock, flags); | 45 | spin_unlock_irq(&tsk->sighand->siglock); |
45 | 46 | ||
46 | if (stats) | 47 | if (stats) |
47 | kmem_cache_free(taskstats_cache, stats); | 48 | kmem_cache_free(taskstats_cache, stats); |
@@ -49,23 +50,13 @@ static inline void taskstats_tgid_alloc(struct signal_struct *sig) | |||
49 | 50 | ||
50 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 51 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
51 | { | 52 | { |
52 | struct taskstats *stats = NULL; | 53 | if (sig->stats) |
53 | unsigned long flags; | 54 | kmem_cache_free(taskstats_cache, sig->stats); |
54 | |||
55 | spin_lock_irqsave(&sig->stats_lock, flags); | ||
56 | if (sig->stats) { | ||
57 | stats = sig->stats; | ||
58 | sig->stats = NULL; | ||
59 | } | ||
60 | spin_unlock_irqrestore(&sig->stats_lock, flags); | ||
61 | if (stats) | ||
62 | kmem_cache_free(taskstats_cache, stats); | ||
63 | } | 55 | } |
64 | 56 | ||
65 | extern void taskstats_exit_alloc(struct taskstats **, unsigned int *); | 57 | extern void taskstats_exit_alloc(struct taskstats **, unsigned int *); |
66 | extern void taskstats_exit_send(struct task_struct *, struct taskstats *, int, unsigned int); | 58 | extern void taskstats_exit_send(struct task_struct *, struct taskstats *, int, unsigned int); |
67 | extern void taskstats_init_early(void); | 59 | extern void taskstats_init_early(void); |
68 | extern void taskstats_tgid_alloc(struct signal_struct *); | ||
69 | #else | 60 | #else |
70 | static inline void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu) | 61 | static inline void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu) |
71 | {} | 62 | {} |
@@ -77,7 +68,7 @@ static inline void taskstats_exit_send(struct task_struct *tsk, | |||
77 | {} | 68 | {} |
78 | static inline void taskstats_tgid_init(struct signal_struct *sig) | 69 | static inline void taskstats_tgid_init(struct signal_struct *sig) |
79 | {} | 70 | {} |
80 | static inline void taskstats_tgid_alloc(struct signal_struct *sig) | 71 | static inline void taskstats_tgid_alloc(struct task_struct *tsk) |
81 | {} | 72 | {} |
82 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 73 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
83 | {} | 74 | {} |
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 61eef508b041..28967eda9d7b 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -908,7 +908,7 @@ struct ufs_super_block_third { | |||
908 | __fs64 fs_csaddr; /* blk addr of cyl grp summary area */ | 908 | __fs64 fs_csaddr; /* blk addr of cyl grp summary area */ |
909 | __fs64 fs_pendingblocks;/* blocks in process of being freed */ | 909 | __fs64 fs_pendingblocks;/* blocks in process of being freed */ |
910 | __fs32 fs_pendinginodes;/*inodes in process of being freed */ | 910 | __fs32 fs_pendinginodes;/*inodes in process of being freed */ |
911 | } fs_u2; | 911 | } __attribute__ ((packed)) fs_u2; |
912 | } fs_un1; | 912 | } fs_un1; |
913 | union { | 913 | union { |
914 | struct { | 914 | struct { |
diff --git a/include/linux/unwind.h b/include/linux/unwind.h index 73e1751d03dd..749928c161fb 100644 --- a/include/linux/unwind.h +++ b/include/linux/unwind.h | |||
@@ -26,6 +26,7 @@ struct module; | |||
26 | * Initialize unwind support. | 26 | * Initialize unwind support. |
27 | */ | 27 | */ |
28 | extern void unwind_init(void); | 28 | extern void unwind_init(void); |
29 | extern void unwind_setup(void); | ||
29 | 30 | ||
30 | #ifdef CONFIG_MODULES | 31 | #ifdef CONFIG_MODULES |
31 | 32 | ||
@@ -73,6 +74,7 @@ extern int unwind_to_user(struct unwind_frame_info *); | |||
73 | struct unwind_frame_info {}; | 74 | struct unwind_frame_info {}; |
74 | 75 | ||
75 | static inline void unwind_init(void) {} | 76 | static inline void unwind_init(void) {} |
77 | static inline void unwind_setup(void) {} | ||
76 | 78 | ||
77 | #ifdef CONFIG_MODULES | 79 | #ifdef CONFIG_MODULES |
78 | 80 | ||
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index ce5f1482e6be..924e502905d4 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -23,13 +23,14 @@ struct vm_area_struct; | |||
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | struct vm_struct { | 25 | struct vm_struct { |
26 | /* keep next,addr,size together to speedup lookups */ | ||
27 | struct vm_struct *next; | ||
26 | void *addr; | 28 | void *addr; |
27 | unsigned long size; | 29 | unsigned long size; |
28 | unsigned long flags; | 30 | unsigned long flags; |
29 | struct page **pages; | 31 | struct page **pages; |
30 | unsigned int nr_pages; | 32 | unsigned int nr_pages; |
31 | unsigned long phys_addr; | 33 | unsigned long phys_addr; |
32 | struct vm_struct *next; | ||
33 | }; | 34 | }; |
34 | 35 | ||
35 | /* | 36 | /* |
@@ -60,7 +61,8 @@ extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); | |||
60 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, | 61 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, |
61 | unsigned long start, unsigned long end); | 62 | unsigned long start, unsigned long end); |
62 | extern struct vm_struct *get_vm_area_node(unsigned long size, | 63 | extern struct vm_struct *get_vm_area_node(unsigned long size, |
63 | unsigned long flags, int node); | 64 | unsigned long flags, int node, |
65 | gfp_t gfp_mask); | ||
64 | extern struct vm_struct *remove_vm_area(void *addr); | 66 | extern struct vm_struct *remove_vm_area(void *addr); |
65 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 67 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
66 | struct page ***pages); | 68 | struct page ***pages); |
diff --git a/include/linux/wait.h b/include/linux/wait.h index b3b9048421d8..e820d00e1383 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -79,6 +79,15 @@ struct task_struct; | |||
79 | 79 | ||
80 | extern void init_waitqueue_head(wait_queue_head_t *q); | 80 | extern void init_waitqueue_head(wait_queue_head_t *q); |
81 | 81 | ||
82 | #ifdef CONFIG_LOCKDEP | ||
83 | # define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \ | ||
84 | ({ init_waitqueue_head(&name); name; }) | ||
85 | # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) \ | ||
86 | wait_queue_head_t name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) | ||
87 | #else | ||
88 | # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) DECLARE_WAIT_QUEUE_HEAD(name) | ||
89 | #endif | ||
90 | |||
82 | static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) | 91 | static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) |
83 | { | 92 | { |
84 | q->flags = 0; | 93 | q->flags = 0; |