diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-04 21:39:31 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-04 21:39:31 -0500 |
| commit | c2cc87ca9561ddfe744d446789cc10f507e87db9 (patch) | |
| tree | d505fc0110eb1a3d8750ba2f67648c131f0d9aca /include/linux | |
| parent | ce1eeb95fc4eb25109c00bea3e83a87eeff6b07d (diff) | |
| parent | 7015faa7df829876a0f931cd18aa6d7c24a1b581 (diff) | |
Merge branch 'master'
Diffstat (limited to 'include/linux')
46 files changed, 385 insertions, 105 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 86dd5502b05c..7d8ff97b3e92 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
| @@ -40,6 +40,8 @@ | |||
| 40 | * bitmap_weight(src, nbits) Hamming Weight: number set bits | 40 | * bitmap_weight(src, nbits) Hamming Weight: number set bits |
| 41 | * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n | 41 | * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n |
| 42 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n | 42 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n |
| 43 | * bitmap_remap(dst, src, old, new, nbits) *dst = map(old, new)(src) | ||
| 44 | * bitmap_bitremap(oldbit, old, new, nbits) newbit = map(old, new)(oldbit) | ||
| 43 | * bitmap_scnprintf(buf, len, src, nbits) Print bitmap src to buf | 45 | * bitmap_scnprintf(buf, len, src, nbits) Print bitmap src to buf |
| 44 | * bitmap_parse(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf | 46 | * bitmap_parse(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf |
| 45 | * bitmap_scnlistprintf(buf, len, src, nbits) Print bitmap src as list to buf | 47 | * bitmap_scnlistprintf(buf, len, src, nbits) Print bitmap src as list to buf |
| @@ -104,6 +106,10 @@ extern int bitmap_scnlistprintf(char *buf, unsigned int len, | |||
| 104 | const unsigned long *src, int nbits); | 106 | const unsigned long *src, int nbits); |
| 105 | extern int bitmap_parselist(const char *buf, unsigned long *maskp, | 107 | extern int bitmap_parselist(const char *buf, unsigned long *maskp, |
| 106 | int nmaskbits); | 108 | int nmaskbits); |
| 109 | extern void bitmap_remap(unsigned long *dst, const unsigned long *src, | ||
| 110 | const unsigned long *old, const unsigned long *new, int bits); | ||
| 111 | extern int bitmap_bitremap(int oldbit, | ||
| 112 | const unsigned long *old, const unsigned long *new, int bits); | ||
| 107 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); | 113 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); |
| 108 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); | 114 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); |
| 109 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); | 115 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index c937d6e65502..1db061bb6b08 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -190,6 +190,7 @@ extern int buffer_heads_over_limit; | |||
| 190 | */ | 190 | */ |
| 191 | int try_to_release_page(struct page * page, gfp_t gfp_mask); | 191 | int try_to_release_page(struct page * page, gfp_t gfp_mask); |
| 192 | int block_invalidatepage(struct page *page, unsigned long offset); | 192 | int block_invalidatepage(struct page *page, unsigned long offset); |
| 193 | int do_invalidatepage(struct page *page, unsigned long offset); | ||
| 193 | int block_write_full_page(struct page *page, get_block_t *get_block, | 194 | int block_write_full_page(struct page *page, get_block_t *get_block, |
| 194 | struct writeback_control *wbc); | 195 | struct writeback_control *wbc); |
| 195 | int block_read_full_page(struct page*, get_block_t*); | 196 | int block_read_full_page(struct page*, get_block_t*); |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 86980c68234a..1f7b2c097503 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -32,6 +32,7 @@ struct cpu { | |||
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | extern int register_cpu(struct cpu *, int, struct node *); | 34 | extern int register_cpu(struct cpu *, int, struct node *); |
| 35 | extern struct sys_device *get_cpu_sysdev(int cpu); | ||
| 35 | #ifdef CONFIG_HOTPLUG_CPU | 36 | #ifdef CONFIG_HOTPLUG_CPU |
| 36 | extern void unregister_cpu(struct cpu *, struct node *); | 37 | extern void unregister_cpu(struct cpu *, struct node *); |
| 37 | #endif | 38 | #endif |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index ff7f80f48df1..d068176b7ad7 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/completion.h> | 23 | #include <linux/completion.h> |
| 24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
| 25 | #include <linux/cpumask.h> | 25 | #include <linux/cpumask.h> |
| 26 | #include <asm/div64.h> | ||
| 26 | 27 | ||
| 27 | #define CPUFREQ_NAME_LEN 16 | 28 | #define CPUFREQ_NAME_LEN 16 |
| 28 | 29 | ||
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9bdba8169b41..13e9f4a3ab26 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c. | 12 | * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c. |
| 13 | * For details of cpulist_scnprintf() and cpulist_parse(), see | 13 | * For details of cpulist_scnprintf() and cpulist_parse(), see |
| 14 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. | 14 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. |
| 15 | * For details of cpu_remap(), see bitmap_bitremap in lib/bitmap.c | ||
| 16 | * For details of cpus_remap(), see bitmap_remap in lib/bitmap.c. | ||
| 15 | * | 17 | * |
| 16 | * The available cpumask operations are: | 18 | * The available cpumask operations are: |
| 17 | * | 19 | * |
| @@ -50,6 +52,8 @@ | |||
| 50 | * int cpumask_parse(ubuf, ulen, mask) Parse ascii string as cpumask | 52 | * int cpumask_parse(ubuf, ulen, mask) Parse ascii string as cpumask |
| 51 | * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing | 53 | * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing |
| 52 | * int cpulist_parse(buf, map) Parse ascii string as cpulist | 54 | * int cpulist_parse(buf, map) Parse ascii string as cpulist |
| 55 | * int cpu_remap(oldbit, old, new) newbit = map(old, new)(oldbit) | ||
| 56 | * int cpus_remap(dst, src, old, new) *dst = map(old, new)(src) | ||
| 53 | * | 57 | * |
| 54 | * for_each_cpu_mask(cpu, mask) for-loop cpu over mask | 58 | * for_each_cpu_mask(cpu, mask) for-loop cpu over mask |
| 55 | * | 59 | * |
| @@ -294,6 +298,22 @@ static inline int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits) | |||
| 294 | return bitmap_parselist(buf, dstp->bits, nbits); | 298 | return bitmap_parselist(buf, dstp->bits, nbits); |
| 295 | } | 299 | } |
| 296 | 300 | ||
| 301 | #define cpu_remap(oldbit, old, new) \ | ||
| 302 | __cpu_remap((oldbit), &(old), &(new), NR_CPUS) | ||
| 303 | static inline int __cpu_remap(int oldbit, | ||
| 304 | const cpumask_t *oldp, const cpumask_t *newp, int nbits) | ||
| 305 | { | ||
| 306 | return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); | ||
| 307 | } | ||
| 308 | |||
| 309 | #define cpus_remap(dst, src, old, new) \ | ||
| 310 | __cpus_remap(&(dst), &(src), &(old), &(new), NR_CPUS) | ||
| 311 | static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, | ||
| 312 | const cpumask_t *oldp, const cpumask_t *newp, int nbits) | ||
| 313 | { | ||
| 314 | bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); | ||
| 315 | } | ||
| 316 | |||
| 297 | #if NR_CPUS > 1 | 317 | #if NR_CPUS > 1 |
| 298 | #define for_each_cpu_mask(cpu, mask) \ | 318 | #define for_each_cpu_mask(cpu, mask) \ |
| 299 | for ((cpu) = first_cpu(mask); \ | 319 | for ((cpu) = first_cpu(mask); \ |
diff --git a/include/linux/device.h b/include/linux/device.h index a9e72ac3fb9f..17cbc6db67b4 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -396,32 +396,6 @@ extern struct device * get_device(struct device * dev); | |||
| 396 | extern void put_device(struct device * dev); | 396 | extern void put_device(struct device * dev); |
| 397 | 397 | ||
| 398 | 398 | ||
| 399 | /* drivers/base/platform.c */ | ||
| 400 | |||
| 401 | struct platform_device { | ||
| 402 | const char * name; | ||
| 403 | u32 id; | ||
| 404 | struct device dev; | ||
| 405 | u32 num_resources; | ||
| 406 | struct resource * resource; | ||
| 407 | }; | ||
| 408 | |||
| 409 | #define to_platform_device(x) container_of((x), struct platform_device, dev) | ||
| 410 | |||
| 411 | extern int platform_device_register(struct platform_device *); | ||
| 412 | extern void platform_device_unregister(struct platform_device *); | ||
| 413 | |||
| 414 | extern struct bus_type platform_bus_type; | ||
| 415 | extern struct device platform_bus; | ||
| 416 | |||
| 417 | extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); | ||
| 418 | extern int platform_get_irq(struct platform_device *, unsigned int); | ||
| 419 | extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, char *); | ||
| 420 | extern int platform_get_irq_byname(struct platform_device *, char *); | ||
| 421 | extern int platform_add_devices(struct platform_device **, int); | ||
| 422 | |||
| 423 | extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int); | ||
| 424 | |||
| 425 | /* drivers/base/power.c */ | 399 | /* drivers/base/power.c */ |
| 426 | extern void device_shutdown(void); | 400 | extern void device_shutdown(void); |
| 427 | 401 | ||
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index a415f1d93e9a..05f4132622fc 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
| @@ -60,7 +60,7 @@ struct dmi_device { | |||
| 60 | void *device_data; /* Type specific data */ | 60 | void *device_data; /* Type specific data */ |
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | #if defined(CONFIG_X86) && !defined(CONFIG_X86_64) | 63 | #if defined(CONFIG_X86_32) |
| 64 | 64 | ||
| 65 | extern int dmi_check_system(struct dmi_system_id *list); | 65 | extern int dmi_check_system(struct dmi_system_id *list); |
| 66 | extern char * dmi_get_system_info(int field); | 66 | extern char * dmi_get_system_info(int field); |
diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h index cb31719ee192..2fda1b2aabd9 100644 --- a/include/linux/dqblk_xfs.h +++ b/include/linux/dqblk_xfs.h | |||
| @@ -1,22 +1,18 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 1995-2001,2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 1995-2001,2004 Silicon Graphics, Inc. All Rights Reserved. |
| 3 | * | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or |
| 5 | * under the terms of version 2.1 of the GNU Lesser General Public License | 5 | * modify it under the terms of the GNU Lesser General Public License |
| 6 | * as published by the Free Software Foundation. | 6 | * as published by the Free Software Foundation. |
| 7 | * | 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. | 11 | * GNU Lesser General Public License for more details. |
| 12 | * | 12 | * |
| 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU Lesset General Public License |
| 14 | * along with this program; if not, write to the Free Software | 14 | * along with this program; if not, write to the Free Software Foundation, |
| 15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | 15 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 16 | * USA | ||
| 17 | * | ||
| 18 | * Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane, | ||
| 19 | * Mountain View, CA 94043, USA, or: http://www.sgi.com | ||
| 20 | */ | 16 | */ |
| 21 | #ifndef _LINUX_DQBLK_XFS_H | 17 | #ifndef _LINUX_DQBLK_XFS_H |
| 22 | #define _LINUX_DQBLK_XFS_H | 18 | #define _LINUX_DQBLK_XFS_H |
| @@ -32,7 +28,8 @@ | |||
| 32 | 28 | ||
| 33 | #define XQM_USRQUOTA 0 /* system call user quota type */ | 29 | #define XQM_USRQUOTA 0 /* system call user quota type */ |
| 34 | #define XQM_GRPQUOTA 1 /* system call group quota type */ | 30 | #define XQM_GRPQUOTA 1 /* system call group quota type */ |
| 35 | #define XQM_MAXQUOTAS 2 | 31 | #define XQM_PRJQUOTA 2 /* system call project quota type */ |
| 32 | #define XQM_MAXQUOTAS 3 | ||
| 36 | 33 | ||
| 37 | #define Q_XQUOTAON XQM_CMD(1) /* enable accounting/enforcement */ | 34 | #define Q_XQUOTAON XQM_CMD(1) /* enable accounting/enforcement */ |
| 38 | #define Q_XQUOTAOFF XQM_CMD(2) /* disable accounting/enforcement */ | 35 | #define Q_XQUOTAOFF XQM_CMD(2) /* disable accounting/enforcement */ |
| @@ -40,6 +37,7 @@ | |||
| 40 | #define Q_XSETQLIM XQM_CMD(4) /* set disk limits */ | 37 | #define Q_XSETQLIM XQM_CMD(4) /* set disk limits */ |
| 41 | #define Q_XGETQSTAT XQM_CMD(5) /* get quota subsystem status */ | 38 | #define Q_XGETQSTAT XQM_CMD(5) /* get quota subsystem status */ |
| 42 | #define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */ | 39 | #define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */ |
| 40 | #define Q_XQUOTASYNC XQM_CMD(7) /* delalloc flush, updates dquots */ | ||
| 43 | 41 | ||
| 44 | /* | 42 | /* |
| 45 | * fs_disk_quota structure: | 43 | * fs_disk_quota structure: |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index cc84934f9059..5f49a30eb6f2 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
| @@ -48,8 +48,10 @@ static inline void eth_copy_and_sum (struct sk_buff *dest, | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | /** | 50 | /** |
| 51 | * is_zero_ether_addr - Determine if give Ethernet address is all | 51 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. |
| 52 | * zeros. | 52 | * @addr: Pointer to a six-byte array containing the Ethernet address |
| 53 | * | ||
| 54 | * Return true if the address is all zeroes. | ||
| 53 | */ | 55 | */ |
| 54 | static inline int is_zero_ether_addr(const u8 *addr) | 56 | static inline int is_zero_ether_addr(const u8 *addr) |
| 55 | { | 57 | { |
| @@ -57,9 +59,7 @@ static inline int is_zero_ether_addr(const u8 *addr) | |||
| 57 | } | 59 | } |
| 58 | 60 | ||
| 59 | /** | 61 | /** |
| 60 | * is_multicast_ether_addr - Determine if the given Ethernet address is a | 62 | * is_multicast_ether_addr - Determine if the Ethernet address is a multicast. |
| 61 | * multicast address. | ||
| 62 | * | ||
| 63 | * @addr: Pointer to a six-byte array containing the Ethernet address | 63 | * @addr: Pointer to a six-byte array containing the Ethernet address |
| 64 | * | 64 | * |
| 65 | * Return true if the address is a multicast address. | 65 | * Return true if the address is a multicast address. |
| @@ -69,10 +69,15 @@ static inline int is_multicast_ether_addr(const u8 *addr) | |||
| 69 | return ((addr[0] != 0xff) && (0x01 & addr[0])); | 69 | return ((addr[0] != 0xff) && (0x01 & addr[0])); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | /** | ||
| 73 | * is_broadcast_ether_addr - Determine if the Ethernet address is broadcast | ||
| 74 | * @addr: Pointer to a six-byte array containing the Ethernet address | ||
| 75 | * | ||
| 76 | * Return true if the address is the broadcast address. | ||
| 77 | */ | ||
| 72 | static inline int is_broadcast_ether_addr(const u8 *addr) | 78 | static inline int is_broadcast_ether_addr(const u8 *addr) |
| 73 | { | 79 | { |
| 74 | return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && | 80 | return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff; |
| 75 | (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); | ||
| 76 | } | 81 | } |
| 77 | 82 | ||
| 78 | /** | 83 | /** |
| @@ -108,14 +113,14 @@ static inline void random_ether_addr(u8 *addr) | |||
| 108 | /** | 113 | /** |
| 109 | * compare_ether_addr - Compare two Ethernet addresses | 114 | * compare_ether_addr - Compare two Ethernet addresses |
| 110 | * @addr1: Pointer to a six-byte array containing the Ethernet address | 115 | * @addr1: Pointer to a six-byte array containing the Ethernet address |
| 111 | * @addr2 Pointer other six-byte array containing the Ethernet address | 116 | * @addr2: Pointer other six-byte array containing the Ethernet address |
| 112 | * | 117 | * |
| 113 | * Compare two ethernet addresses, returns 0 if equal | 118 | * Compare two ethernet addresses, returns 0 if equal |
| 114 | */ | 119 | */ |
| 115 | static inline unsigned compare_ether_addr(const u8 *_a, const u8 *_b) | 120 | static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2) |
| 116 | { | 121 | { |
| 117 | const u16 *a = (const u16 *) _a; | 122 | const u16 *a = (const u16 *) addr1; |
| 118 | const u16 *b = (const u16 *) _b; | 123 | const u16 *b = (const u16 *) addr2; |
| 119 | 124 | ||
| 120 | BUILD_BUG_ON(ETH_ALEN != 6); | 125 | BUILD_BUG_ON(ETH_ALEN != 6); |
| 121 | return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0; | 126 | return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index f83d997c5582..6d6226732c93 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -574,7 +574,14 @@ struct file_ra_state { | |||
| 574 | #define RA_FLAG_INCACHE 0x02 /* file is already in cache */ | 574 | #define RA_FLAG_INCACHE 0x02 /* file is already in cache */ |
| 575 | 575 | ||
| 576 | struct file { | 576 | struct file { |
| 577 | struct list_head f_list; | 577 | /* |
| 578 | * fu_list becomes invalid after file_free is called and queued via | ||
| 579 | * fu_rcuhead for RCU freeing | ||
| 580 | */ | ||
| 581 | union { | ||
| 582 | struct list_head fu_list; | ||
| 583 | struct rcu_head fu_rcuhead; | ||
| 584 | } f_u; | ||
| 578 | struct dentry *f_dentry; | 585 | struct dentry *f_dentry; |
| 579 | struct vfsmount *f_vfsmnt; | 586 | struct vfsmount *f_vfsmnt; |
| 580 | struct file_operations *f_op; | 587 | struct file_operations *f_op; |
| @@ -598,7 +605,6 @@ struct file { | |||
| 598 | spinlock_t f_ep_lock; | 605 | spinlock_t f_ep_lock; |
| 599 | #endif /* #ifdef CONFIG_EPOLL */ | 606 | #endif /* #ifdef CONFIG_EPOLL */ |
| 600 | struct address_space *f_mapping; | 607 | struct address_space *f_mapping; |
| 601 | struct rcu_head f_rcuhead; | ||
| 602 | }; | 608 | }; |
| 603 | extern spinlock_t files_lock; | 609 | extern spinlock_t files_lock; |
| 604 | #define file_list_lock() spin_lock(&files_lock); | 610 | #define file_list_lock() spin_lock(&files_lock); |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 70f54af87b9f..114d5d59f695 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
| @@ -47,16 +47,21 @@ | |||
| 47 | struct gianfar_platform_data { | 47 | struct gianfar_platform_data { |
| 48 | /* device specific information */ | 48 | /* device specific information */ |
| 49 | u32 device_flags; | 49 | u32 device_flags; |
| 50 | u32 phy_reg_addr; | ||
| 51 | 50 | ||
| 52 | /* board specific information */ | 51 | /* board specific information */ |
| 53 | u32 board_flags; | 52 | u32 board_flags; |
| 54 | u32 phy_flags; | 53 | const char *bus_id; |
| 55 | u32 phyid; | ||
| 56 | u32 interruptPHY; | ||
| 57 | u8 mac_addr[6]; | 54 | u8 mac_addr[6]; |
| 58 | }; | 55 | }; |
| 59 | 56 | ||
| 57 | struct gianfar_mdio_data { | ||
| 58 | /* device specific information */ | ||
| 59 | u32 paddr; | ||
| 60 | |||
| 61 | /* board specific information */ | ||
| 62 | int irq[32]; | ||
| 63 | }; | ||
| 64 | |||
| 60 | /* Flags related to gianfar device features */ | 65 | /* Flags related to gianfar device features */ |
| 61 | #define FSL_GIANFAR_DEV_HAS_GIGABIT 0x00000001 | 66 | #define FSL_GIANFAR_DEV_HAS_GIGABIT 0x00000001 |
| 62 | #define FSL_GIANFAR_DEV_HAS_COALESCE 0x00000002 | 67 | #define FSL_GIANFAR_DEV_HAS_COALESCE 0x00000002 |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index acbeb96a3353..f98854c2abd7 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
| @@ -61,7 +61,6 @@ struct fuse_kstatfs { | |||
| 61 | #define FATTR_SIZE (1 << 3) | 61 | #define FATTR_SIZE (1 << 3) |
| 62 | #define FATTR_ATIME (1 << 4) | 62 | #define FATTR_ATIME (1 << 4) |
| 63 | #define FATTR_MTIME (1 << 5) | 63 | #define FATTR_MTIME (1 << 5) |
| 64 | #define FATTR_CTIME (1 << 6) | ||
| 65 | 64 | ||
| 66 | /** | 65 | /** |
| 67 | * Flags returned by the OPEN request | 66 | * Flags returned by the OPEN request |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index cd623eccdbea..2401dea2b867 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
| 13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
| 14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
| 15 | #include <linux/timer.h> | ||
| 15 | 16 | ||
| 16 | struct gameport { | 17 | struct gameport { |
| 17 | 18 | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index eabdb5cce357..8eeaa53a68c9 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -78,7 +78,7 @@ struct hd_struct { | |||
| 78 | sector_t start_sect; | 78 | sector_t start_sect; |
| 79 | sector_t nr_sects; | 79 | sector_t nr_sects; |
| 80 | struct kobject kobj; | 80 | struct kobject kobj; |
| 81 | unsigned reads, read_sectors, writes, write_sectors; | 81 | unsigned ios[2], sectors[2]; |
| 82 | int policy, partno; | 82 | int policy, partno; |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| @@ -89,10 +89,10 @@ struct hd_struct { | |||
| 89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
| 90 | 90 | ||
| 91 | struct disk_stats { | 91 | struct disk_stats { |
| 92 | unsigned read_sectors, write_sectors; | 92 | unsigned sectors[2]; |
| 93 | unsigned reads, writes; | 93 | unsigned ios[2]; |
| 94 | unsigned read_merges, write_merges; | 94 | unsigned merges[2]; |
| 95 | unsigned read_ticks, write_ticks; | 95 | unsigned ticks[2]; |
| 96 | unsigned io_ticks; | 96 | unsigned io_ticks; |
| 97 | unsigned time_in_queue; | 97 | unsigned time_in_queue; |
| 98 | }; | 98 | }; |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index f88577ca3b3a..5e19a7ba69b2 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/i2c-id.h> | 31 | #include <linux/i2c-id.h> |
| 32 | #include <linux/mod_devicetable.h> | 32 | #include <linux/mod_devicetable.h> |
| 33 | #include <linux/device.h> /* for struct device */ | 33 | #include <linux/device.h> /* for struct device */ |
| 34 | #include <linux/sched.h> /* for completion */ | ||
| 34 | #include <asm/semaphore.h> | 35 | #include <asm/semaphore.h> |
| 35 | 36 | ||
| 36 | /* --- For i2c-isa ---------------------------------------------------- */ | 37 | /* --- For i2c-isa ---------------------------------------------------- */ |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 92300325dbcd..d79c8a4bc4f8 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
| @@ -25,10 +25,14 @@ | |||
| 25 | /* How many different OSM's are we allowing */ | 25 | /* How many different OSM's are we allowing */ |
| 26 | #define I2O_MAX_DRIVERS 8 | 26 | #define I2O_MAX_DRIVERS 8 |
| 27 | 27 | ||
| 28 | #include <asm/io.h> | ||
| 29 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ | ||
| 30 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
| 31 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
| 30 | #include <linux/string.h> | ||
| 31 | #include <linux/slab.h> | ||
| 32 | #include <linux/workqueue.h> /* work_struct */ | ||
| 33 | |||
| 34 | #include <asm/io.h> | ||
| 35 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ | ||
| 32 | 36 | ||
| 33 | /* message queue empty */ | 37 | /* message queue empty */ |
| 34 | #define I2O_QUEUE_EMPTY 0xffffffff | 38 | #define I2O_QUEUE_EMPTY 0xffffffff |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 4367ce4db52a..f1925ccc9fe1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -307,7 +307,7 @@ struct sysinfo { | |||
| 307 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | 307 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
| 308 | }; | 308 | }; |
| 309 | 309 | ||
| 310 | /* Force a compilation error if condition is false */ | 310 | /* Force a compilation error if condition is true */ |
| 311 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 311 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
| 312 | 312 | ||
| 313 | #ifdef CONFIG_SYSCTL | 313 | #ifdef CONFIG_SYSCTL |
diff --git a/include/linux/key-ui.h b/include/linux/key-ui.h index 7a2e332067c3..e8b8a7a5c496 100644 --- a/include/linux/key-ui.h +++ b/include/linux/key-ui.h | |||
| @@ -24,7 +24,8 @@ extern spinlock_t key_serial_lock; | |||
| 24 | #define KEY_WRITE 0x04 /* require permission to update / modify */ | 24 | #define KEY_WRITE 0x04 /* require permission to update / modify */ |
| 25 | #define KEY_SEARCH 0x08 /* require permission to search (keyring) or find (key) */ | 25 | #define KEY_SEARCH 0x08 /* require permission to search (keyring) or find (key) */ |
| 26 | #define KEY_LINK 0x10 /* require permission to link */ | 26 | #define KEY_LINK 0x10 /* require permission to link */ |
| 27 | #define KEY_ALL 0x1f /* all the above permissions */ | 27 | #define KEY_SETATTR 0x20 /* require permission to change attributes */ |
| 28 | #define KEY_ALL 0x3f /* all the above permissions */ | ||
| 28 | 29 | ||
| 29 | /* | 30 | /* |
| 30 | * the keyring payload contains a list of the keys to which the keyring is | 31 | * the keyring payload contains a list of the keys to which the keyring is |
diff --git a/include/linux/key.h b/include/linux/key.h index f1efa016dbf3..53513a3be53b 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
| @@ -40,28 +40,32 @@ struct key; | |||
| 40 | #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */ | 40 | #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */ |
| 41 | #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */ | 41 | #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */ |
| 42 | #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */ | 42 | #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */ |
| 43 | #define KEY_POS_ALL 0x1f000000 | 43 | #define KEY_POS_SETATTR 0x20000000 /* possessor can set key attributes */ |
| 44 | #define KEY_POS_ALL 0x3f000000 | ||
| 44 | 45 | ||
| 45 | #define KEY_USR_VIEW 0x00010000 /* user permissions... */ | 46 | #define KEY_USR_VIEW 0x00010000 /* user permissions... */ |
| 46 | #define KEY_USR_READ 0x00020000 | 47 | #define KEY_USR_READ 0x00020000 |
| 47 | #define KEY_USR_WRITE 0x00040000 | 48 | #define KEY_USR_WRITE 0x00040000 |
| 48 | #define KEY_USR_SEARCH 0x00080000 | 49 | #define KEY_USR_SEARCH 0x00080000 |
| 49 | #define KEY_USR_LINK 0x00100000 | 50 | #define KEY_USR_LINK 0x00100000 |
| 50 | #define KEY_USR_ALL 0x001f0000 | 51 | #define KEY_USR_SETATTR 0x00200000 |
| 52 | #define KEY_USR_ALL 0x003f0000 | ||
| 51 | 53 | ||
| 52 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ | 54 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ |
| 53 | #define KEY_GRP_READ 0x00000200 | 55 | #define KEY_GRP_READ 0x00000200 |
| 54 | #define KEY_GRP_WRITE 0x00000400 | 56 | #define KEY_GRP_WRITE 0x00000400 |
| 55 | #define KEY_GRP_SEARCH 0x00000800 | 57 | #define KEY_GRP_SEARCH 0x00000800 |
| 56 | #define KEY_GRP_LINK 0x00001000 | 58 | #define KEY_GRP_LINK 0x00001000 |
| 57 | #define KEY_GRP_ALL 0x00001f00 | 59 | #define KEY_GRP_SETATTR 0x00002000 |
| 60 | #define KEY_GRP_ALL 0x00003f00 | ||
| 58 | 61 | ||
| 59 | #define KEY_OTH_VIEW 0x00000001 /* third party permissions... */ | 62 | #define KEY_OTH_VIEW 0x00000001 /* third party permissions... */ |
| 60 | #define KEY_OTH_READ 0x00000002 | 63 | #define KEY_OTH_READ 0x00000002 |
| 61 | #define KEY_OTH_WRITE 0x00000004 | 64 | #define KEY_OTH_WRITE 0x00000004 |
| 62 | #define KEY_OTH_SEARCH 0x00000008 | 65 | #define KEY_OTH_SEARCH 0x00000008 |
| 63 | #define KEY_OTH_LINK 0x00000010 | 66 | #define KEY_OTH_LINK 0x00000010 |
| 64 | #define KEY_OTH_ALL 0x0000001f | 67 | #define KEY_OTH_SETATTR 0x00000020 |
| 68 | #define KEY_OTH_ALL 0x0000003f | ||
| 65 | 69 | ||
| 66 | struct seq_file; | 70 | struct seq_file; |
| 67 | struct user_struct; | 71 | struct user_struct; |
| @@ -119,6 +123,7 @@ struct key { | |||
| 119 | struct key_type *type; /* type of key */ | 123 | struct key_type *type; /* type of key */ |
| 120 | struct rw_semaphore sem; /* change vs change sem */ | 124 | struct rw_semaphore sem; /* change vs change sem */ |
| 121 | struct key_user *user; /* owner of this key */ | 125 | struct key_user *user; /* owner of this key */ |
| 126 | void *security; /* security data for this key */ | ||
| 122 | time_t expiry; /* time at which key expires (or 0) */ | 127 | time_t expiry; /* time at which key expires (or 0) */ |
| 123 | uid_t uid; | 128 | uid_t uid; |
| 124 | gid_t gid; | 129 | gid_t gid; |
diff --git a/include/linux/kobj_map.h b/include/linux/kobj_map.h index b6cc10bf8dfc..cbe7d8008042 100644 --- a/include/linux/kobj_map.h +++ b/include/linux/kobj_map.h | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | #ifdef __KERNEL__ | 1 | #ifdef __KERNEL__ |
| 2 | 2 | ||
| 3 | #include <asm/semaphore.h> | ||
| 4 | |||
| 3 | typedef struct kobject *kobj_probe_t(dev_t, int *, void *); | 5 | typedef struct kobject *kobj_probe_t(dev_t, int *, void *); |
| 4 | struct kobj_map; | 6 | struct kobj_map; |
| 5 | 7 | ||
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 3fa786448db3..ebdd41fd1082 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -70,6 +70,18 @@ void kthread_bind(struct task_struct *k, unsigned int cpu); | |||
| 70 | int kthread_stop(struct task_struct *k); | 70 | int kthread_stop(struct task_struct *k); |
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| 73 | * kthread_stop_sem: stop a thread created by kthread_create(). | ||
| 74 | * @k: thread created by kthread_create(). | ||
| 75 | * @s: semaphore that @k waits on while idle. | ||
| 76 | * | ||
| 77 | * Does essentially the same thing as kthread_stop() above, but wakes | ||
| 78 | * @k by calling up(@s). | ||
| 79 | * | ||
| 80 | * Returns the result of threadfn(), or -EINTR if wake_up_process() | ||
| 81 | * was never called. */ | ||
| 82 | int kthread_stop_sem(struct task_struct *k, struct semaphore *s); | ||
| 83 | |||
| 84 | /** | ||
| 73 | * kthread_should_stop: should this kthread return now? | 85 | * kthread_should_stop: should this kthread return now? |
| 74 | * | 86 | * |
| 75 | * When someone calls kthread_stop on your kthread, it will be woken | 87 | * When someone calls kthread_stop on your kthread, it will be woken |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 7af8cb836e78..8b67cf837ca9 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
| @@ -154,6 +154,7 @@ struct mempolicy *get_vma_policy(struct task_struct *task, | |||
| 154 | 154 | ||
| 155 | extern void numa_default_policy(void); | 155 | extern void numa_default_policy(void); |
| 156 | extern void numa_policy_init(void); | 156 | extern void numa_policy_init(void); |
| 157 | extern void numa_policy_rebind(const nodemask_t *old, const nodemask_t *new); | ||
| 157 | extern struct mempolicy default_policy; | 158 | extern struct mempolicy default_policy; |
| 158 | 159 | ||
| 159 | #else | 160 | #else |
| @@ -226,6 +227,11 @@ static inline void numa_default_policy(void) | |||
| 226 | { | 227 | { |
| 227 | } | 228 | } |
| 228 | 229 | ||
| 230 | static inline void numa_policy_rebind(const nodemask_t *old, | ||
| 231 | const nodemask_t *new) | ||
| 232 | { | ||
| 233 | } | ||
| 234 | |||
| 229 | #endif /* CONFIG_NUMA */ | 235 | #endif /* CONFIG_NUMA */ |
| 230 | #endif /* __KERNEL__ */ | 236 | #endif /* __KERNEL__ */ |
| 231 | 237 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index f05372b7fe77..84d75f3a8aca 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -554,7 +554,9 @@ static inline void MODULE_PARM_(void) { } | |||
| 554 | #ifdef MODULE | 554 | #ifdef MODULE |
| 555 | /* DEPRECATED: Do not use. */ | 555 | /* DEPRECATED: Do not use. */ |
| 556 | #define MODULE_PARM(var,type) \ | 556 | #define MODULE_PARM(var,type) \ |
| 557 | struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \ | 557 | extern struct obsolete_modparm __parm_##var \ |
| 558 | __attribute__((section("__obsparm"))); \ | ||
| 559 | struct obsolete_modparm __parm_##var = \ | ||
| 558 | { __stringify(var), type, &MODULE_PARM_ }; \ | 560 | { __stringify(var), type, &MODULE_PARM_ }; \ |
| 559 | __MODULE_PARM_TYPE(var, type); | 561 | __MODULE_PARM_TYPE(var, type); |
| 560 | #else | 562 | #else |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 9a3d27257984..941da5c016a0 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
| @@ -282,6 +282,17 @@ static inline u8 fat_attr(struct inode *inode) | |||
| 282 | MSDOS_I(inode)->i_attrs; | 282 | MSDOS_I(inode)->i_attrs; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | static inline unsigned char fat_checksum(const __u8 *name) | ||
| 286 | { | ||
| 287 | unsigned char s = name[0]; | ||
| 288 | s = (s<<7) + (s>>1) + name[1]; s = (s<<7) + (s>>1) + name[2]; | ||
| 289 | s = (s<<7) + (s>>1) + name[3]; s = (s<<7) + (s>>1) + name[4]; | ||
| 290 | s = (s<<7) + (s>>1) + name[5]; s = (s<<7) + (s>>1) + name[6]; | ||
| 291 | s = (s<<7) + (s>>1) + name[7]; s = (s<<7) + (s>>1) + name[8]; | ||
| 292 | s = (s<<7) + (s>>1) + name[9]; s = (s<<7) + (s>>1) + name[10]; | ||
| 293 | return s; | ||
| 294 | } | ||
| 295 | |||
| 285 | static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus) | 296 | static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus) |
| 286 | { | 297 | { |
| 287 | return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus | 298 | return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 142963f01d29..fc28841f3409 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
| @@ -8,7 +8,10 @@ | |||
| 8 | #include <linux/config.h> | 8 | #include <linux/config.h> |
| 9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
| 10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
| 11 | #include <linux/string.h> | ||
| 12 | |||
| 11 | #include <linux/mtd/compatmac.h> | 13 | #include <linux/mtd/compatmac.h> |
| 14 | |||
| 12 | #include <asm/unaligned.h> | 15 | #include <asm/unaligned.h> |
| 13 | #include <asm/system.h> | 16 | #include <asm/system.h> |
| 14 | #include <asm/io.h> | 17 | #include <asm/io.h> |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index d759a637bded..e98a870a20be 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
| @@ -68,7 +68,8 @@ struct arpt_entry_target | |||
| 68 | u_int16_t target_size; | 68 | u_int16_t target_size; |
| 69 | 69 | ||
| 70 | /* Used by userspace */ | 70 | /* Used by userspace */ |
| 71 | char name[ARPT_FUNCTION_MAXNAMELEN]; | 71 | char name[ARPT_FUNCTION_MAXNAMELEN-1]; |
| 72 | u_int8_t revision; | ||
| 72 | } user; | 73 | } user; |
| 73 | struct { | 74 | struct { |
| 74 | u_int16_t target_size; | 75 | u_int16_t target_size; |
| @@ -148,7 +149,9 @@ struct arpt_entry | |||
| 148 | 149 | ||
| 149 | #define ARPT_SO_GET_INFO (ARPT_BASE_CTL) | 150 | #define ARPT_SO_GET_INFO (ARPT_BASE_CTL) |
| 150 | #define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1) | 151 | #define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1) |
| 151 | #define ARPT_SO_GET_MAX ARPT_SO_GET_ENTRIES | 152 | /* #define ARPT_SO_GET_REVISION_MATCH (ARPT_BASE_CTL + 2)*/ |
| 153 | #define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3) | ||
| 154 | #define ARPT_SO_GET_MAX ARPT_SO_GET_REVISION_TARGET | ||
| 152 | 155 | ||
| 153 | /* CONTINUE verdict for targets */ | 156 | /* CONTINUE verdict for targets */ |
| 154 | #define ARPT_CONTINUE 0xFFFFFFFF | 157 | #define ARPT_CONTINUE 0xFFFFFFFF |
| @@ -236,6 +239,15 @@ struct arpt_get_entries | |||
| 236 | struct arpt_entry entrytable[0]; | 239 | struct arpt_entry entrytable[0]; |
| 237 | }; | 240 | }; |
| 238 | 241 | ||
| 242 | /* The argument to ARPT_SO_GET_REVISION_*. Returns highest revision | ||
| 243 | * kernel supports, if >= revision. */ | ||
| 244 | struct arpt_get_revision | ||
| 245 | { | ||
| 246 | char name[ARPT_FUNCTION_MAXNAMELEN-1]; | ||
| 247 | |||
| 248 | u_int8_t revision; | ||
| 249 | }; | ||
| 250 | |||
| 239 | /* Standard return verdict, or do jump. */ | 251 | /* Standard return verdict, or do jump. */ |
| 240 | #define ARPT_STANDARD_TARGET "" | 252 | #define ARPT_STANDARD_TARGET "" |
| 241 | /* Error verdict. */ | 253 | /* Error verdict. */ |
| @@ -274,7 +286,9 @@ struct arpt_target | |||
| 274 | { | 286 | { |
| 275 | struct list_head list; | 287 | struct list_head list; |
| 276 | 288 | ||
| 277 | const char name[ARPT_FUNCTION_MAXNAMELEN]; | 289 | const char name[ARPT_FUNCTION_MAXNAMELEN-1]; |
| 290 | |||
| 291 | u_int8_t revision; | ||
| 278 | 292 | ||
| 279 | /* Returns verdict. */ | 293 | /* Returns verdict. */ |
| 280 | unsigned int (*target)(struct sk_buff **pskb, | 294 | unsigned int (*target)(struct sk_buff **pskb, |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 59f70b34e029..2efc046d9e94 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -57,7 +57,8 @@ struct ip6t_entry_match | |||
| 57 | u_int16_t match_size; | 57 | u_int16_t match_size; |
| 58 | 58 | ||
| 59 | /* Used by userspace */ | 59 | /* Used by userspace */ |
| 60 | char name[IP6T_FUNCTION_MAXNAMELEN]; | 60 | char name[IP6T_FUNCTION_MAXNAMELEN-1]; |
| 61 | u_int8_t revision; | ||
| 61 | } user; | 62 | } user; |
| 62 | struct { | 63 | struct { |
| 63 | u_int16_t match_size; | 64 | u_int16_t match_size; |
| @@ -80,7 +81,8 @@ struct ip6t_entry_target | |||
| 80 | u_int16_t target_size; | 81 | u_int16_t target_size; |
| 81 | 82 | ||
| 82 | /* Used by userspace */ | 83 | /* Used by userspace */ |
| 83 | char name[IP6T_FUNCTION_MAXNAMELEN]; | 84 | char name[IP6T_FUNCTION_MAXNAMELEN-1]; |
| 85 | u_int8_t revision; | ||
| 84 | } user; | 86 | } user; |
| 85 | struct { | 87 | struct { |
| 86 | u_int16_t target_size; | 88 | u_int16_t target_size; |
| @@ -161,7 +163,9 @@ struct ip6t_entry | |||
| 161 | 163 | ||
| 162 | #define IP6T_SO_GET_INFO (IP6T_BASE_CTL) | 164 | #define IP6T_SO_GET_INFO (IP6T_BASE_CTL) |
| 163 | #define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1) | 165 | #define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1) |
| 164 | #define IP6T_SO_GET_MAX IP6T_SO_GET_ENTRIES | 166 | #define IP6T_SO_GET_REVISION_MATCH (IP6T_BASE_CTL + 2) |
| 167 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 3) | ||
| 168 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET | ||
| 165 | 169 | ||
| 166 | /* CONTINUE verdict for targets */ | 170 | /* CONTINUE verdict for targets */ |
| 167 | #define IP6T_CONTINUE 0xFFFFFFFF | 171 | #define IP6T_CONTINUE 0xFFFFFFFF |
| @@ -291,6 +295,15 @@ struct ip6t_get_entries | |||
| 291 | struct ip6t_entry entrytable[0]; | 295 | struct ip6t_entry entrytable[0]; |
| 292 | }; | 296 | }; |
| 293 | 297 | ||
| 298 | /* The argument to IP6T_SO_GET_REVISION_*. Returns highest revision | ||
| 299 | * kernel supports, if >= revision. */ | ||
| 300 | struct ip6t_get_revision | ||
| 301 | { | ||
| 302 | char name[IP6T_FUNCTION_MAXNAMELEN-1]; | ||
| 303 | |||
| 304 | u_int8_t revision; | ||
| 305 | }; | ||
| 306 | |||
| 294 | /* Standard return verdict, or do jump. */ | 307 | /* Standard return verdict, or do jump. */ |
| 295 | #define IP6T_STANDARD_TARGET "" | 308 | #define IP6T_STANDARD_TARGET "" |
| 296 | /* Error verdict. */ | 309 | /* Error verdict. */ |
| @@ -352,7 +365,9 @@ struct ip6t_match | |||
| 352 | { | 365 | { |
| 353 | struct list_head list; | 366 | struct list_head list; |
| 354 | 367 | ||
| 355 | const char name[IP6T_FUNCTION_MAXNAMELEN]; | 368 | const char name[IP6T_FUNCTION_MAXNAMELEN-1]; |
| 369 | |||
| 370 | u_int8_t revision; | ||
| 356 | 371 | ||
| 357 | /* Return true or false: return FALSE and set *hotdrop = 1 to | 372 | /* Return true or false: return FALSE and set *hotdrop = 1 to |
| 358 | force immediate packet drop. */ | 373 | force immediate packet drop. */ |
| @@ -387,7 +402,9 @@ struct ip6t_target | |||
| 387 | { | 402 | { |
| 388 | struct list_head list; | 403 | struct list_head list; |
| 389 | 404 | ||
| 390 | const char name[IP6T_FUNCTION_MAXNAMELEN]; | 405 | const char name[IP6T_FUNCTION_MAXNAMELEN-1]; |
| 406 | |||
| 407 | u_int8_t revision; | ||
| 391 | 408 | ||
| 392 | /* Returns verdict. Argument order changed since 2.6.9, as this | 409 | /* Returns verdict. Argument order changed since 2.6.9, as this |
| 393 | must now handle non-linear skbs, using skb_copy_bits and | 410 | must now handle non-linear skbs, using skb_copy_bits and |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 325fe7ae49bb..12787a9b0259 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -316,7 +316,7 @@ extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, st | |||
| 316 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 316 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
| 317 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 317 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |
| 318 | extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx); | 318 | extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx); |
| 319 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, int mode); | 319 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); |
| 320 | extern void nfs_file_clear_open_context(struct file *filp); | 320 | extern void nfs_file_clear_open_context(struct file *filp); |
| 321 | 321 | ||
| 322 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ | 322 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index e96fe9062500..4726ef7ba8e8 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c. | 12 | * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c. |
| 13 | * For details of nodelist_scnprintf() and nodelist_parse(), see | 13 | * For details of nodelist_scnprintf() and nodelist_parse(), see |
| 14 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. | 14 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. |
| 15 | * For details of node_remap(), see bitmap_bitremap in lib/bitmap.c. | ||
| 16 | * For details of nodes_remap(), see bitmap_remap in lib/bitmap.c. | ||
| 15 | * | 17 | * |
| 16 | * The available nodemask operations are: | 18 | * The available nodemask operations are: |
| 17 | * | 19 | * |
| @@ -52,6 +54,8 @@ | |||
| 52 | * int nodemask_parse(ubuf, ulen, mask) Parse ascii string as nodemask | 54 | * int nodemask_parse(ubuf, ulen, mask) Parse ascii string as nodemask |
| 53 | * int nodelist_scnprintf(buf, len, mask) Format nodemask as list for printing | 55 | * int nodelist_scnprintf(buf, len, mask) Format nodemask as list for printing |
| 54 | * int nodelist_parse(buf, map) Parse ascii string as nodelist | 56 | * int nodelist_parse(buf, map) Parse ascii string as nodelist |
| 57 | * int node_remap(oldbit, old, new) newbit = map(old, new)(oldbit) | ||
| 58 | * int nodes_remap(dst, src, old, new) *dst = map(old, new)(dst) | ||
| 55 | * | 59 | * |
| 56 | * for_each_node_mask(node, mask) for-loop node over mask | 60 | * for_each_node_mask(node, mask) for-loop node over mask |
| 57 | * | 61 | * |
| @@ -307,6 +311,22 @@ static inline int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits) | |||
| 307 | return bitmap_parselist(buf, dstp->bits, nbits); | 311 | return bitmap_parselist(buf, dstp->bits, nbits); |
| 308 | } | 312 | } |
| 309 | 313 | ||
| 314 | #define node_remap(oldbit, old, new) \ | ||
| 315 | __node_remap((oldbit), &(old), &(new), MAX_NUMNODES) | ||
| 316 | static inline int __node_remap(int oldbit, | ||
| 317 | const nodemask_t *oldp, const nodemask_t *newp, int nbits) | ||
| 318 | { | ||
| 319 | return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); | ||
| 320 | } | ||
| 321 | |||
| 322 | #define nodes_remap(dst, src, old, new) \ | ||
| 323 | __nodes_remap(&(dst), &(src), &(old), &(new), MAX_NUMNODES) | ||
| 324 | static inline void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp, | ||
| 325 | const nodemask_t *oldp, const nodemask_t *newp, int nbits) | ||
| 326 | { | ||
| 327 | bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); | ||
| 328 | } | ||
| 329 | |||
| 310 | #if MAX_NUMNODES > 1 | 330 | #if MAX_NUMNODES > 1 |
| 311 | #define for_each_node_mask(node, mask) \ | 331 | #define for_each_node_mask(node, mask) \ |
| 312 | for ((node) = first_node(mask); \ | 332 | for ((node) = first_node(mask); \ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 56192005fa4d..88de3f8ce1a2 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -990,6 +990,10 @@ | |||
| 990 | #define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a | 990 | #define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a |
| 991 | #define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c | 991 | #define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c |
| 992 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e | 992 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e |
| 993 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GT 0x0090 | ||
| 994 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GTX 0x0091 | ||
| 995 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_7800 0x0098 | ||
| 996 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_7800_GTX 0x0099 | ||
| 993 | #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 | 997 | #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 |
| 994 | #define PCI_DEVICE_ID_GEFORCE_6800A 0x00c1 | 998 | #define PCI_DEVICE_ID_GEFORCE_6800A 0x00c1 |
| 995 | #define PCI_DEVICE_ID_GEFORCE_6800A_LE 0x00c2 | 999 | #define PCI_DEVICE_ID_GEFORCE_6800A_LE 0x00c2 |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h new file mode 100644 index 000000000000..a726225e0afe --- /dev/null +++ b/include/linux/platform_device.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* | ||
| 2 | * platform_device.h - generic, centralized driver model | ||
| 3 | * | ||
| 4 | * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> | ||
| 5 | * | ||
| 6 | * This file is released under the GPLv2 | ||
| 7 | * | ||
| 8 | * See Documentation/driver-model/ for more information. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _PLATFORM_DEVICE_H_ | ||
| 12 | #define _PLATFORM_DEVICE_H_ | ||
| 13 | |||
| 14 | #include <linux/device.h> | ||
| 15 | |||
| 16 | struct platform_device { | ||
| 17 | const char * name; | ||
| 18 | u32 id; | ||
| 19 | struct device dev; | ||
| 20 | u32 num_resources; | ||
| 21 | struct resource * resource; | ||
| 22 | }; | ||
| 23 | |||
| 24 | #define to_platform_device(x) container_of((x), struct platform_device, dev) | ||
| 25 | |||
| 26 | extern int platform_device_register(struct platform_device *); | ||
| 27 | extern void platform_device_unregister(struct platform_device *); | ||
| 28 | |||
| 29 | extern struct bus_type platform_bus_type; | ||
| 30 | extern struct device platform_bus; | ||
| 31 | |||
| 32 | extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); | ||
| 33 | extern int platform_get_irq(struct platform_device *, unsigned int); | ||
| 34 | extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, char *); | ||
| 35 | extern int platform_get_irq_byname(struct platform_device *, char *); | ||
| 36 | extern int platform_add_devices(struct platform_device **, int); | ||
| 37 | |||
| 38 | extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int); | ||
| 39 | |||
| 40 | #endif /* _PLATFORM_DEVICE_H_ */ | ||
diff --git a/include/linux/pm.h b/include/linux/pm.h index c61d5de837ef..1514098d156d 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -170,6 +170,7 @@ typedef int __bitwise suspend_disk_method_t; | |||
| 170 | 170 | ||
| 171 | struct pm_ops { | 171 | struct pm_ops { |
| 172 | suspend_disk_method_t pm_disk_mode; | 172 | suspend_disk_method_t pm_disk_mode; |
| 173 | int (*valid)(suspend_state_t state); | ||
| 173 | int (*prepare)(suspend_state_t state); | 174 | int (*prepare)(suspend_state_t state); |
| 174 | int (*enter)(suspend_state_t state); | 175 | int (*enter)(suspend_state_t state); |
| 175 | int (*finish)(suspend_state_t state); | 176 | int (*finish)(suspend_state_t state); |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 70191a5a148f..cce25591eec2 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -275,6 +275,7 @@ static inline int rcu_pending(int cpu) | |||
| 275 | extern void rcu_init(void); | 275 | extern void rcu_init(void); |
| 276 | extern void rcu_check_callbacks(int cpu, int user); | 276 | extern void rcu_check_callbacks(int cpu, int user); |
| 277 | extern void rcu_restart_cpu(int cpu); | 277 | extern void rcu_restart_cpu(int cpu); |
| 278 | extern long rcu_batches_completed(void); | ||
| 278 | 279 | ||
| 279 | /* Exported interfaces */ | 280 | /* Exported interfaces */ |
| 280 | extern void FASTCALL(call_rcu(struct rcu_head *head, | 281 | extern void FASTCALL(call_rcu(struct rcu_head *head, |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1c30bc308ef1..03b68a7b4b82 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -940,7 +940,7 @@ extern int set_cpus_allowed(task_t *p, cpumask_t new_mask); | |||
| 940 | #else | 940 | #else |
| 941 | static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask) | 941 | static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask) |
| 942 | { | 942 | { |
| 943 | if (!cpus_intersects(new_mask, cpu_online_map)) | 943 | if (!cpu_isset(0, new_mask)) |
| 944 | return -EINVAL; | 944 | return -EINVAL; |
| 945 | return 0; | 945 | return 0; |
| 946 | } | 946 | } |
| @@ -1084,6 +1084,11 @@ extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned lon | |||
| 1084 | #define SEND_SIG_PRIV ((struct siginfo *) 1) | 1084 | #define SEND_SIG_PRIV ((struct siginfo *) 1) |
| 1085 | #define SEND_SIG_FORCED ((struct siginfo *) 2) | 1085 | #define SEND_SIG_FORCED ((struct siginfo *) 2) |
| 1086 | 1086 | ||
| 1087 | static inline int is_si_special(const struct siginfo *info) | ||
| 1088 | { | ||
| 1089 | return info <= SEND_SIG_FORCED; | ||
| 1090 | } | ||
| 1091 | |||
| 1087 | /* True if we are on the alternate signal stack. */ | 1092 | /* True if we are on the alternate signal stack. */ |
| 1088 | 1093 | ||
| 1089 | static inline int on_sig_stack(unsigned long sp) | 1094 | static inline int on_sig_stack(unsigned long sp) |
| @@ -1211,7 +1216,7 @@ extern void unhash_process(struct task_struct *p); | |||
| 1211 | /* | 1216 | /* |
| 1212 | * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info, ->comm, keyring | 1217 | * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info, ->comm, keyring |
| 1213 | * subscriptions and synchronises with wait4(). Also used in procfs. Also | 1218 | * subscriptions and synchronises with wait4(). Also used in procfs. Also |
| 1214 | * pins the final release of task.io_context. | 1219 | * pins the final release of task.io_context. Also protects ->cpuset. |
| 1215 | * | 1220 | * |
| 1216 | * Nests both inside and outside of read_lock(&tasklist_lock). | 1221 | * Nests both inside and outside of read_lock(&tasklist_lock). |
| 1217 | * It must not be nested with write_lock_irq(&tasklist_lock), | 1222 | * It must not be nested with write_lock_irq(&tasklist_lock), |
diff --git a/include/linux/security.h b/include/linux/security.h index dac956ed98f0..f7e0ae018712 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/shm.h> | 30 | #include <linux/shm.h> |
| 31 | #include <linux/msg.h> | 31 | #include <linux/msg.h> |
| 32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
| 33 | #include <linux/key.h> | ||
| 33 | 34 | ||
| 34 | struct ctl_table; | 35 | struct ctl_table; |
| 35 | 36 | ||
| @@ -385,6 +386,9 @@ struct swap_info_struct; | |||
| 385 | * NULL to request the size of the buffer required. @size indicates | 386 | * NULL to request the size of the buffer required. @size indicates |
| 386 | * the size of @buffer in bytes. Note that @name is the remainder | 387 | * the size of @buffer in bytes. Note that @name is the remainder |
| 387 | * of the attribute name after the security. prefix has been removed. | 388 | * of the attribute name after the security. prefix has been removed. |
| 389 | * @err is the return value from the preceding fs getxattr call, | ||
| 390 | * and can be used by the security module to determine whether it | ||
| 391 | * should try and canonicalize the attribute value. | ||
| 388 | * Return number of bytes used/required on success. | 392 | * Return number of bytes used/required on success. |
| 389 | * @inode_setsecurity: | 393 | * @inode_setsecurity: |
| 390 | * Set the security label associated with @name for @inode from the | 394 | * Set the security label associated with @name for @inode from the |
| @@ -785,6 +789,27 @@ struct swap_info_struct; | |||
| 785 | * @sk_free_security: | 789 | * @sk_free_security: |
| 786 | * Deallocate security structure. | 790 | * Deallocate security structure. |
| 787 | * | 791 | * |
| 792 | * Security hooks affecting all Key Management operations | ||
| 793 | * | ||
| 794 | * @key_alloc: | ||
| 795 | * Permit allocation of a key and assign security data. Note that key does | ||
| 796 | * not have a serial number assigned at this point. | ||
| 797 | * @key points to the key. | ||
| 798 | * Return 0 if permission is granted, -ve error otherwise. | ||
| 799 | * @key_free: | ||
| 800 | * Notification of destruction; free security data. | ||
| 801 | * @key points to the key. | ||
| 802 | * No return value. | ||
| 803 | * @key_permission: | ||
| 804 | * See whether a specific operational right is granted to a process on a | ||
| 805 | * key. | ||
| 806 | * @key_ref refers to the key (key pointer + possession attribute bit). | ||
| 807 | * @context points to the process to provide the context against which to | ||
| 808 | * evaluate the security data on the key. | ||
| 809 | * @perm describes the combination of permissions required of this key. | ||
| 810 | * Return 1 if permission granted, 0 if permission denied and -ve it the | ||
| 811 | * normal permissions model should be effected. | ||
| 812 | * | ||
| 788 | * Security hooks affecting all System V IPC operations. | 813 | * Security hooks affecting all System V IPC operations. |
| 789 | * | 814 | * |
| 790 | * @ipc_permission: | 815 | * @ipc_permission: |
| @@ -1091,7 +1116,7 @@ struct security_operations { | |||
| 1091 | int (*inode_getxattr) (struct dentry *dentry, char *name); | 1116 | int (*inode_getxattr) (struct dentry *dentry, char *name); |
| 1092 | int (*inode_listxattr) (struct dentry *dentry); | 1117 | int (*inode_listxattr) (struct dentry *dentry); |
| 1093 | int (*inode_removexattr) (struct dentry *dentry, char *name); | 1118 | int (*inode_removexattr) (struct dentry *dentry, char *name); |
| 1094 | int (*inode_getsecurity)(struct inode *inode, const char *name, void *buffer, size_t size); | 1119 | int (*inode_getsecurity)(struct inode *inode, const char *name, void *buffer, size_t size, int err); |
| 1095 | int (*inode_setsecurity)(struct inode *inode, const char *name, const void *value, size_t size, int flags); | 1120 | int (*inode_setsecurity)(struct inode *inode, const char *name, const void *value, size_t size, int flags); |
| 1096 | int (*inode_listsecurity)(struct inode *inode, char *buffer, size_t buffer_size); | 1121 | int (*inode_listsecurity)(struct inode *inode, char *buffer, size_t buffer_size); |
| 1097 | 1122 | ||
| @@ -1213,6 +1238,17 @@ struct security_operations { | |||
| 1213 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); | 1238 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); |
| 1214 | void (*sk_free_security) (struct sock *sk); | 1239 | void (*sk_free_security) (struct sock *sk); |
| 1215 | #endif /* CONFIG_SECURITY_NETWORK */ | 1240 | #endif /* CONFIG_SECURITY_NETWORK */ |
| 1241 | |||
| 1242 | /* key management security hooks */ | ||
| 1243 | #ifdef CONFIG_KEYS | ||
| 1244 | int (*key_alloc)(struct key *key); | ||
| 1245 | void (*key_free)(struct key *key); | ||
| 1246 | int (*key_permission)(key_ref_t key_ref, | ||
| 1247 | struct task_struct *context, | ||
| 1248 | key_perm_t perm); | ||
| 1249 | |||
| 1250 | #endif /* CONFIG_KEYS */ | ||
| 1251 | |||
| 1216 | }; | 1252 | }; |
| 1217 | 1253 | ||
| 1218 | /* global variables */ | 1254 | /* global variables */ |
| @@ -1580,11 +1616,11 @@ static inline int security_inode_removexattr (struct dentry *dentry, char *name) | |||
| 1580 | return security_ops->inode_removexattr (dentry, name); | 1616 | return security_ops->inode_removexattr (dentry, name); |
| 1581 | } | 1617 | } |
| 1582 | 1618 | ||
| 1583 | static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size) | 1619 | static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size, int err) |
| 1584 | { | 1620 | { |
| 1585 | if (unlikely (IS_PRIVATE (inode))) | 1621 | if (unlikely (IS_PRIVATE (inode))) |
| 1586 | return 0; | 1622 | return 0; |
| 1587 | return security_ops->inode_getsecurity(inode, name, buffer, size); | 1623 | return security_ops->inode_getsecurity(inode, name, buffer, size, err); |
| 1588 | } | 1624 | } |
| 1589 | 1625 | ||
| 1590 | static inline int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) | 1626 | static inline int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) |
| @@ -2222,7 +2258,7 @@ static inline int security_inode_removexattr (struct dentry *dentry, char *name) | |||
| 2222 | return cap_inode_removexattr(dentry, name); | 2258 | return cap_inode_removexattr(dentry, name); |
| 2223 | } | 2259 | } |
| 2224 | 2260 | ||
| 2225 | static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size) | 2261 | static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size, int err) |
| 2226 | { | 2262 | { |
| 2227 | return -EOPNOTSUPP; | 2263 | return -EOPNOTSUPP; |
| 2228 | } | 2264 | } |
| @@ -2761,5 +2797,45 @@ static inline void security_sk_free(struct sock *sk) | |||
| 2761 | } | 2797 | } |
| 2762 | #endif /* CONFIG_SECURITY_NETWORK */ | 2798 | #endif /* CONFIG_SECURITY_NETWORK */ |
| 2763 | 2799 | ||
| 2800 | #ifdef CONFIG_KEYS | ||
| 2801 | #ifdef CONFIG_SECURITY | ||
| 2802 | static inline int security_key_alloc(struct key *key) | ||
| 2803 | { | ||
| 2804 | return security_ops->key_alloc(key); | ||
| 2805 | } | ||
| 2806 | |||
| 2807 | static inline void security_key_free(struct key *key) | ||
| 2808 | { | ||
| 2809 | security_ops->key_free(key); | ||
| 2810 | } | ||
| 2811 | |||
| 2812 | static inline int security_key_permission(key_ref_t key_ref, | ||
| 2813 | struct task_struct *context, | ||
| 2814 | key_perm_t perm) | ||
| 2815 | { | ||
| 2816 | return security_ops->key_permission(key_ref, context, perm); | ||
| 2817 | } | ||
| 2818 | |||
| 2819 | #else | ||
| 2820 | |||
| 2821 | static inline int security_key_alloc(struct key *key) | ||
| 2822 | { | ||
| 2823 | return 0; | ||
| 2824 | } | ||
| 2825 | |||
| 2826 | static inline void security_key_free(struct key *key) | ||
| 2827 | { | ||
| 2828 | } | ||
| 2829 | |||
| 2830 | static inline int security_key_permission(key_ref_t key_ref, | ||
| 2831 | struct task_struct *context, | ||
| 2832 | key_perm_t perm) | ||
| 2833 | { | ||
| 2834 | return 0; | ||
| 2835 | } | ||
| 2836 | |||
| 2837 | #endif | ||
| 2838 | #endif /* CONFIG_KEYS */ | ||
| 2839 | |||
| 2764 | #endif /* ! __LINUX_SECURITY_H */ | 2840 | #endif /* ! __LINUX_SECURITY_H */ |
| 2765 | 2841 | ||
diff --git a/include/linux/serial.h b/include/linux/serial.h index 12cd9cf65e8f..33fc8cb8ddfb 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #define _LINUX_SERIAL_H | 11 | #define _LINUX_SERIAL_H |
| 12 | 12 | ||
| 13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
| 14 | #include <linux/types.h> | ||
| 14 | #include <asm/page.h> | 15 | #include <asm/page.h> |
| 15 | 16 | ||
| 16 | /* | 17 | /* |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 317a979b24de..2b799d40d669 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #define _LINUX_SERIAL_8250_H | 12 | #define _LINUX_SERIAL_8250_H |
| 13 | 13 | ||
| 14 | #include <linux/serial_core.h> | 14 | #include <linux/serial_core.h> |
| 15 | #include <linux/device.h> | 15 | #include <linux/platform_device.h> |
| 16 | 16 | ||
| 17 | /* | 17 | /* |
| 18 | * This is the platform device platform_data structure | 18 | * This is the platform device platform_data structure |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 2b0401b93f2b..9d2579230689 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -39,8 +39,7 @@ | |||
| 39 | #define PORT_RSA 13 | 39 | #define PORT_RSA 13 |
| 40 | #define PORT_NS16550A 14 | 40 | #define PORT_NS16550A 14 |
| 41 | #define PORT_XSCALE 15 | 41 | #define PORT_XSCALE 15 |
| 42 | #define PORT_IP3106 16 | 42 | #define PORT_MAX_8250 15 /* max port ID */ |
| 43 | #define PORT_MAX_8250 16 /* max port ID */ | ||
| 44 | 43 | ||
| 45 | /* | 44 | /* |
| 46 | * ARM specific type numbers. These are not currently guaranteed | 45 | * ARM specific type numbers. These are not currently guaranteed |
| @@ -118,7 +117,9 @@ | |||
| 118 | #define PORT_M32R_SIO 68 | 117 | #define PORT_M32R_SIO 68 |
| 119 | 118 | ||
| 120 | /*Digi jsm */ | 119 | /*Digi jsm */ |
| 121 | #define PORT_JSM 65 | 120 | #define PORT_JSM 69 |
| 121 | |||
| 122 | #define PORT_IP3106 70 | ||
| 122 | 123 | ||
| 123 | #ifdef __KERNEL__ | 124 | #ifdef __KERNEL__ |
| 124 | 125 | ||
diff --git a/include/linux/signal.h b/include/linux/signal.h index 7be18b5e2fb4..5dd5f02c5c5f 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | 25 | ||
| 26 | struct sigqueue { | 26 | struct sigqueue { |
| 27 | struct list_head list; | 27 | struct list_head list; |
| 28 | spinlock_t *lock; | ||
| 29 | int flags; | 28 | int flags; |
| 30 | siginfo_t info; | 29 | siginfo_t info; |
| 31 | struct user_struct *user; | 30 | struct user_struct *user; |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index cdc99a27840d..0e9682c9def5 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -171,23 +171,42 @@ extern int __lockfunc generic__raw_read_trylock(raw_rwlock_t *lock); | |||
| 171 | #define write_lock_irq(lock) _write_lock_irq(lock) | 171 | #define write_lock_irq(lock) _write_lock_irq(lock) |
| 172 | #define write_lock_bh(lock) _write_lock_bh(lock) | 172 | #define write_lock_bh(lock) _write_lock_bh(lock) |
| 173 | 173 | ||
| 174 | #define spin_unlock(lock) _spin_unlock(lock) | 174 | /* |
| 175 | #define write_unlock(lock) _write_unlock(lock) | 175 | * We inline the unlock functions in the nondebug case: |
| 176 | #define read_unlock(lock) _read_unlock(lock) | 176 | */ |
| 177 | #if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) | ||
| 178 | # define spin_unlock(lock) _spin_unlock(lock) | ||
| 179 | # define read_unlock(lock) _read_unlock(lock) | ||
| 180 | # define write_unlock(lock) _write_unlock(lock) | ||
| 181 | #else | ||
| 182 | # define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) | ||
| 183 | # define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) | ||
| 184 | # define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) | ||
| 185 | #endif | ||
| 186 | |||
| 187 | #if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) | ||
| 188 | # define spin_unlock_irq(lock) _spin_unlock_irq(lock) | ||
| 189 | # define read_unlock_irq(lock) _read_unlock_irq(lock) | ||
| 190 | # define write_unlock_irq(lock) _write_unlock_irq(lock) | ||
| 191 | #else | ||
| 192 | # define spin_unlock_irq(lock) \ | ||
| 193 | do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | ||
| 194 | # define read_unlock_irq(lock) \ | ||
| 195 | do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | ||
| 196 | # define write_unlock_irq(lock) \ | ||
| 197 | do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | ||
| 198 | #endif | ||
| 177 | 199 | ||
| 178 | #define spin_unlock_irqrestore(lock, flags) \ | 200 | #define spin_unlock_irqrestore(lock, flags) \ |
| 179 | _spin_unlock_irqrestore(lock, flags) | 201 | _spin_unlock_irqrestore(lock, flags) |
| 180 | #define spin_unlock_irq(lock) _spin_unlock_irq(lock) | ||
| 181 | #define spin_unlock_bh(lock) _spin_unlock_bh(lock) | 202 | #define spin_unlock_bh(lock) _spin_unlock_bh(lock) |
| 182 | 203 | ||
| 183 | #define read_unlock_irqrestore(lock, flags) \ | 204 | #define read_unlock_irqrestore(lock, flags) \ |
| 184 | _read_unlock_irqrestore(lock, flags) | 205 | _read_unlock_irqrestore(lock, flags) |
| 185 | #define read_unlock_irq(lock) _read_unlock_irq(lock) | ||
| 186 | #define read_unlock_bh(lock) _read_unlock_bh(lock) | 206 | #define read_unlock_bh(lock) _read_unlock_bh(lock) |
| 187 | 207 | ||
| 188 | #define write_unlock_irqrestore(lock, flags) \ | 208 | #define write_unlock_irqrestore(lock, flags) \ |
| 189 | _write_unlock_irqrestore(lock, flags) | 209 | _write_unlock_irqrestore(lock, flags) |
| 190 | #define write_unlock_irq(lock) _write_unlock_irq(lock) | ||
| 191 | #define write_unlock_bh(lock) _write_unlock_bh(lock) | 210 | #define write_unlock_bh(lock) _write_unlock_bh(lock) |
| 192 | 211 | ||
| 193 | #define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock)) | 212 | #define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock)) |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index ba448c760168..a61c04f804b2 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -71,7 +71,12 @@ void restore_processor_state(void); | |||
| 71 | struct saved_context; | 71 | struct saved_context; |
| 72 | void __save_processor_state(struct saved_context *ctxt); | 72 | void __save_processor_state(struct saved_context *ctxt); |
| 73 | void __restore_processor_state(struct saved_context *ctxt); | 73 | void __restore_processor_state(struct saved_context *ctxt); |
| 74 | extern unsigned long get_usable_page(gfp_t gfp_mask); | 74 | unsigned long get_safe_page(gfp_t gfp_mask); |
| 75 | extern void free_eaten_memory(void); | 75 | |
| 76 | /* | ||
| 77 | * XXX: We try to keep some more pages free so that I/O operations succeed | ||
| 78 | * without paging. Might this be more? | ||
| 79 | */ | ||
| 80 | #define PAGES_FOR_IO 512 | ||
| 76 | 81 | ||
| 77 | #endif /* _LINUX_SWSUSP_H */ | 82 | #endif /* _LINUX_SWSUSP_H */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a6f03e473737..c7007b1db91d 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -491,6 +491,7 @@ asmlinkage long sys_nfsservctl(int cmd, | |||
| 491 | asmlinkage long sys_syslog(int type, char __user *buf, int len); | 491 | asmlinkage long sys_syslog(int type, char __user *buf, int len); |
| 492 | asmlinkage long sys_uselib(const char __user *library); | 492 | asmlinkage long sys_uselib(const char __user *library); |
| 493 | asmlinkage long sys_ni_syscall(void); | 493 | asmlinkage long sys_ni_syscall(void); |
| 494 | asmlinkage long sys_ptrace(long request, long pid, long addr, long data); | ||
| 494 | 495 | ||
| 495 | asmlinkage long sys_add_key(const char __user *_type, | 496 | asmlinkage long sys_add_key(const char __user *_type, |
| 496 | const char __user *_description, | 497 | const char __user *_description, |
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index fc5bb4e91a58..7dac8f04d28e 100644 --- a/include/linux/textsearch.h +++ b/include/linux/textsearch.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
| 9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
| 10 | #include <linux/err.h> | 10 | #include <linux/err.h> |
| 11 | #include <linux/slab.h> | ||
| 11 | 12 | ||
| 12 | struct ts_config; | 13 | struct ts_config; |
| 13 | 14 | ||
diff --git a/include/linux/timer.h b/include/linux/timer.h index 3340f3bd135d..72f3a7781106 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -12,16 +12,12 @@ struct timer_list { | |||
| 12 | struct list_head entry; | 12 | struct list_head entry; |
| 13 | unsigned long expires; | 13 | unsigned long expires; |
| 14 | 14 | ||
| 15 | unsigned long magic; | ||
| 16 | |||
| 17 | void (*function)(unsigned long); | 15 | void (*function)(unsigned long); |
| 18 | unsigned long data; | 16 | unsigned long data; |
| 19 | 17 | ||
| 20 | struct timer_base_s *base; | 18 | struct timer_base_s *base; |
| 21 | }; | 19 | }; |
| 22 | 20 | ||
| 23 | #define TIMER_MAGIC 0x4b87ad6e | ||
| 24 | |||
| 25 | extern struct timer_base_s __init_timer_base; | 21 | extern struct timer_base_s __init_timer_base; |
| 26 | 22 | ||
| 27 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ | 23 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ |
| @@ -29,7 +25,6 @@ extern struct timer_base_s __init_timer_base; | |||
| 29 | .expires = (_expires), \ | 25 | .expires = (_expires), \ |
| 30 | .data = (_data), \ | 26 | .data = (_data), \ |
| 31 | .base = &__init_timer_base, \ | 27 | .base = &__init_timer_base, \ |
| 32 | .magic = TIMER_MAGIC, \ | ||
| 33 | } | 28 | } |
| 34 | 29 | ||
| 35 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ | 30 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ |
| @@ -38,6 +33,15 @@ extern struct timer_base_s __init_timer_base; | |||
| 38 | 33 | ||
| 39 | void fastcall init_timer(struct timer_list * timer); | 34 | void fastcall init_timer(struct timer_list * timer); |
| 40 | 35 | ||
| 36 | static inline void setup_timer(struct timer_list * timer, | ||
| 37 | void (*function)(unsigned long), | ||
| 38 | unsigned long data) | ||
| 39 | { | ||
| 40 | timer->function = function; | ||
| 41 | timer->data = data; | ||
| 42 | init_timer(timer); | ||
| 43 | } | ||
| 44 | |||
| 41 | /*** | 45 | /*** |
| 42 | * timer_pending - is a timer pending? | 46 | * timer_pending - is a timer pending? |
| 43 | * @timer: the timer in question | 47 | * @timer: the timer in question |
| @@ -74,8 +78,9 @@ extern unsigned long next_timer_interrupt(void); | |||
| 74 | * Timers with an ->expired field in the past will be executed in the next | 78 | * Timers with an ->expired field in the past will be executed in the next |
| 75 | * timer tick. | 79 | * timer tick. |
| 76 | */ | 80 | */ |
| 77 | static inline void add_timer(struct timer_list * timer) | 81 | static inline void add_timer(struct timer_list *timer) |
| 78 | { | 82 | { |
| 83 | BUG_ON(timer_pending(timer)); | ||
| 79 | __mod_timer(timer, timer->expires); | 84 | __mod_timer(timer, timer->expires); |
| 80 | } | 85 | } |
| 81 | 86 | ||
diff --git a/include/linux/timex.h b/include/linux/timex.h index 7e050a2cc35b..04a4a8cb4ed3 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
| @@ -282,6 +282,13 @@ static inline int ntp_synced(void) | |||
| 282 | return !(time_status & STA_UNSYNC); | 282 | return !(time_status & STA_UNSYNC); |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | /* Required to safely shift negative values */ | ||
| 286 | #define shift_right(x, s) ({ \ | ||
| 287 | __typeof__(x) __x = (x); \ | ||
| 288 | __typeof__(s) __s = (s); \ | ||
| 289 | __x < 0 ? -(-__x >> __s) : __x >> __s; \ | ||
| 290 | }) | ||
| 291 | |||
| 285 | 292 | ||
| 286 | #ifdef CONFIG_TIME_INTERPOLATION | 293 | #ifdef CONFIG_TIME_INTERPOLATION |
| 287 | 294 | ||
diff --git a/include/linux/zutil.h b/include/linux/zutil.h index fdfd5ed41ec4..ee0c59cf2136 100644 --- a/include/linux/zutil.h +++ b/include/linux/zutil.h | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/zlib.h> | 16 | #include <linux/zlib.h> |
| 17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
| 18 | #include <linux/errno.h> | ||
| 19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
| 20 | 19 | ||
| 21 | typedef unsigned char uch; | 20 | typedef unsigned char uch; |
