diff options
| author | Jody McIntyre <scjody@modernduck.com> | 2006-03-28 20:24:39 -0500 |
|---|---|---|
| committer | Jody McIntyre <scjody@modernduck.com> | 2006-03-28 20:24:39 -0500 |
| commit | c0e4077c946104e5d8a62f835dcdca5c79c8af7d (patch) | |
| tree | c1f458722f86690a6172bbac2dfef3241ba0ec7e /include/linux | |
| parent | 94c2d01a537daf51a9fcf229d7d2204c979355d9 (diff) | |
| parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) | |
Merge with git+ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/linux')
63 files changed, 685 insertions, 653 deletions
diff --git a/include/linux/adb.h b/include/linux/adb.h index e9fdc63483c7..b7305b178279 100644 --- a/include/linux/adb.h +++ b/include/linux/adb.h | |||
| @@ -85,7 +85,7 @@ enum adb_message { | |||
| 85 | ADB_MSG_POST_RESET /* Called after resetting the bus (re-do init & register) */ | 85 | ADB_MSG_POST_RESET /* Called after resetting the bus (re-do init & register) */ |
| 86 | }; | 86 | }; |
| 87 | extern struct adb_driver *adb_controller; | 87 | extern struct adb_driver *adb_controller; |
| 88 | extern struct notifier_block *adb_client_list; | 88 | extern struct blocking_notifier_head adb_client_list; |
| 89 | 89 | ||
| 90 | int adb_request(struct adb_request *req, void (*done)(struct adb_request *), | 90 | int adb_request(struct adb_request *req, void (*done)(struct adb_request *), |
| 91 | int flags, int nbytes, ...); | 91 | int flags, int nbytes, ...); |
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h index dc726ffccebd..48ee32a18ac5 100644 --- a/include/linux/amba/serial.h +++ b/include/linux/amba/serial.h | |||
| @@ -158,4 +158,10 @@ | |||
| 158 | #define UART01x_RSR_ANY (UART01x_RSR_OE|UART01x_RSR_BE|UART01x_RSR_PE|UART01x_RSR_FE) | 158 | #define UART01x_RSR_ANY (UART01x_RSR_OE|UART01x_RSR_BE|UART01x_RSR_PE|UART01x_RSR_FE) |
| 159 | #define UART01x_FR_MODEM_ANY (UART01x_FR_DCD|UART01x_FR_DSR|UART01x_FR_CTS) | 159 | #define UART01x_FR_MODEM_ANY (UART01x_FR_DCD|UART01x_FR_DSR|UART01x_FR_CTS) |
| 160 | 160 | ||
| 161 | #ifndef __ASSEMBLY__ | ||
| 162 | struct amba_pl010_data { | ||
| 163 | void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl); | ||
| 164 | }; | ||
| 165 | #endif | ||
| 166 | |||
| 161 | #endif | 167 | #endif |
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index 9343c89d843c..0a6bc52ffe88 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
| @@ -19,18 +19,37 @@ | |||
| 19 | #undef AUTOFS_MIN_PROTO_VERSION | 19 | #undef AUTOFS_MIN_PROTO_VERSION |
| 20 | #undef AUTOFS_MAX_PROTO_VERSION | 20 | #undef AUTOFS_MAX_PROTO_VERSION |
| 21 | 21 | ||
| 22 | #define AUTOFS_PROTO_VERSION 4 | 22 | #define AUTOFS_PROTO_VERSION 5 |
| 23 | #define AUTOFS_MIN_PROTO_VERSION 3 | 23 | #define AUTOFS_MIN_PROTO_VERSION 3 |
| 24 | #define AUTOFS_MAX_PROTO_VERSION 4 | 24 | #define AUTOFS_MAX_PROTO_VERSION 5 |
| 25 | 25 | ||
| 26 | #define AUTOFS_PROTO_SUBVERSION 7 | 26 | #define AUTOFS_PROTO_SUBVERSION 0 |
| 27 | 27 | ||
| 28 | /* Mask for expire behaviour */ | 28 | /* Mask for expire behaviour */ |
| 29 | #define AUTOFS_EXP_IMMEDIATE 1 | 29 | #define AUTOFS_EXP_IMMEDIATE 1 |
| 30 | #define AUTOFS_EXP_LEAVES 2 | 30 | #define AUTOFS_EXP_LEAVES 2 |
| 31 | 31 | ||
| 32 | /* New message type */ | 32 | /* Daemon notification packet types */ |
| 33 | #define autofs_ptype_expire_multi 2 /* Expire entry (umount request) */ | 33 | enum autofs_notify { |
| 34 | NFY_NONE, | ||
| 35 | NFY_MOUNT, | ||
| 36 | NFY_EXPIRE | ||
| 37 | }; | ||
| 38 | |||
| 39 | /* Kernel protocol version 4 packet types */ | ||
| 40 | |||
| 41 | /* Expire entry (umount request) */ | ||
| 42 | #define autofs_ptype_expire_multi 2 | ||
| 43 | |||
| 44 | /* Kernel protocol version 5 packet types */ | ||
| 45 | |||
| 46 | /* Indirect mount missing and expire requests. */ | ||
| 47 | #define autofs_ptype_missing_indirect 3 | ||
| 48 | #define autofs_ptype_expire_indirect 4 | ||
| 49 | |||
| 50 | /* Direct mount missing and expire requests */ | ||
| 51 | #define autofs_ptype_missing_direct 5 | ||
| 52 | #define autofs_ptype_expire_direct 6 | ||
| 34 | 53 | ||
| 35 | /* v4 multi expire (via pipe) */ | 54 | /* v4 multi expire (via pipe) */ |
| 36 | struct autofs_packet_expire_multi { | 55 | struct autofs_packet_expire_multi { |
| @@ -40,14 +59,36 @@ struct autofs_packet_expire_multi { | |||
| 40 | char name[NAME_MAX+1]; | 59 | char name[NAME_MAX+1]; |
| 41 | }; | 60 | }; |
| 42 | 61 | ||
| 62 | /* autofs v5 common packet struct */ | ||
| 63 | struct autofs_v5_packet { | ||
| 64 | struct autofs_packet_hdr hdr; | ||
| 65 | autofs_wqt_t wait_queue_token; | ||
| 66 | __u32 dev; | ||
| 67 | __u64 ino; | ||
| 68 | __u32 uid; | ||
| 69 | __u32 gid; | ||
| 70 | __u32 pid; | ||
| 71 | __u32 tgid; | ||
| 72 | __u32 len; | ||
| 73 | char name[NAME_MAX+1]; | ||
| 74 | }; | ||
| 75 | |||
| 76 | typedef struct autofs_v5_packet autofs_packet_missing_indirect_t; | ||
| 77 | typedef struct autofs_v5_packet autofs_packet_expire_indirect_t; | ||
| 78 | typedef struct autofs_v5_packet autofs_packet_missing_direct_t; | ||
| 79 | typedef struct autofs_v5_packet autofs_packet_expire_direct_t; | ||
| 80 | |||
| 43 | union autofs_packet_union { | 81 | union autofs_packet_union { |
| 44 | struct autofs_packet_hdr hdr; | 82 | struct autofs_packet_hdr hdr; |
| 45 | struct autofs_packet_missing missing; | 83 | struct autofs_packet_missing missing; |
| 46 | struct autofs_packet_expire expire; | 84 | struct autofs_packet_expire expire; |
| 47 | struct autofs_packet_expire_multi expire_multi; | 85 | struct autofs_packet_expire_multi expire_multi; |
| 86 | struct autofs_v5_packet v5_packet; | ||
| 48 | }; | 87 | }; |
| 49 | 88 | ||
| 50 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int) | 89 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int) |
| 90 | #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI | ||
| 91 | #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI | ||
| 51 | #define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int) | 92 | #define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int) |
| 52 | #define AUTOFS_IOC_ASKREGHOST _IOR(0x93,0x68,int) | 93 | #define AUTOFS_IOC_ASKREGHOST _IOR(0x93,0x68,int) |
| 53 | #define AUTOFS_IOC_TOGGLEREGHOST _IOR(0x93,0x69,int) | 94 | #define AUTOFS_IOC_TOGGLEREGHOST _IOR(0x93,0x69,int) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c179966f1a2f..d0cac8b58de7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -55,25 +55,29 @@ struct as_io_context { | |||
| 55 | 55 | ||
| 56 | struct cfq_queue; | 56 | struct cfq_queue; |
| 57 | struct cfq_io_context { | 57 | struct cfq_io_context { |
| 58 | /* | 58 | struct rb_node rb_node; |
| 59 | * circular list of cfq_io_contexts belonging to a process io context | ||
| 60 | */ | ||
| 61 | struct list_head list; | ||
| 62 | struct cfq_queue *cfqq[2]; | ||
| 63 | void *key; | 59 | void *key; |
| 64 | 60 | ||
| 61 | struct cfq_queue *cfqq[2]; | ||
| 62 | |||
| 65 | struct io_context *ioc; | 63 | struct io_context *ioc; |
| 66 | 64 | ||
| 67 | unsigned long last_end_request; | 65 | unsigned long last_end_request; |
| 68 | unsigned long last_queue; | 66 | sector_t last_request_pos; |
| 67 | unsigned long last_queue; | ||
| 68 | |||
| 69 | unsigned long ttime_total; | 69 | unsigned long ttime_total; |
| 70 | unsigned long ttime_samples; | 70 | unsigned long ttime_samples; |
| 71 | unsigned long ttime_mean; | 71 | unsigned long ttime_mean; |
| 72 | 72 | ||
| 73 | unsigned int seek_samples; | ||
| 74 | u64 seek_total; | ||
| 75 | sector_t seek_mean; | ||
| 76 | |||
| 73 | struct list_head queue_list; | 77 | struct list_head queue_list; |
| 74 | 78 | ||
| 75 | void (*dtor)(struct cfq_io_context *); | 79 | void (*dtor)(struct io_context *); /* destructor */ |
| 76 | void (*exit)(struct cfq_io_context *); | 80 | void (*exit)(struct io_context *); /* called on task exit */ |
| 77 | }; | 81 | }; |
| 78 | 82 | ||
| 79 | /* | 83 | /* |
| @@ -94,7 +98,7 @@ struct io_context { | |||
| 94 | int nr_batch_requests; /* Number of requests left in the batch */ | 98 | int nr_batch_requests; /* Number of requests left in the batch */ |
| 95 | 99 | ||
| 96 | struct as_io_context *aic; | 100 | struct as_io_context *aic; |
| 97 | struct cfq_io_context *cic; | 101 | struct rb_root cic_root; |
| 98 | }; | 102 | }; |
| 99 | 103 | ||
| 100 | void put_io_context(struct io_context *ioc); | 104 | void put_io_context(struct io_context *ioc); |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 7155452fb4a8..de3eb8d8ae26 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
| @@ -38,6 +38,7 @@ typedef struct bootmem_data { | |||
| 38 | unsigned long last_pos; | 38 | unsigned long last_pos; |
| 39 | unsigned long last_success; /* Previous allocation point. To speed | 39 | unsigned long last_success; /* Previous allocation point. To speed |
| 40 | * up searching */ | 40 | * up searching */ |
| 41 | struct list_head list; | ||
| 41 | } bootmem_data_t; | 42 | } bootmem_data_t; |
| 42 | 43 | ||
| 43 | extern unsigned long __init bootmem_bootmap_pages (unsigned long); | 44 | extern unsigned long __init bootmem_bootmap_pages (unsigned long); |
diff --git a/include/linux/cdev.h b/include/linux/cdev.h index 8da37e29cb87..2216638962d2 100644 --- a/include/linux/cdev.h +++ b/include/linux/cdev.h | |||
| @@ -5,13 +5,13 @@ | |||
| 5 | struct cdev { | 5 | struct cdev { |
| 6 | struct kobject kobj; | 6 | struct kobject kobj; |
| 7 | struct module *owner; | 7 | struct module *owner; |
| 8 | struct file_operations *ops; | 8 | const struct file_operations *ops; |
| 9 | struct list_head list; | 9 | struct list_head list; |
| 10 | dev_t dev; | 10 | dev_t dev; |
| 11 | unsigned int count; | 11 | unsigned int count; |
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | void cdev_init(struct cdev *, struct file_operations *); | 14 | void cdev_init(struct cdev *, const struct file_operations *); |
| 15 | 15 | ||
| 16 | struct cdev *cdev_alloc(void); | 16 | struct cdev *cdev_alloc(void); |
| 17 | 17 | ||
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index cc621ec409d8..b3ecf8f71d97 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
| @@ -30,9 +30,9 @@ extern struct inode_operations coda_ioctl_inode_operations; | |||
| 30 | extern struct address_space_operations coda_file_aops; | 30 | extern struct address_space_operations coda_file_aops; |
| 31 | extern struct address_space_operations coda_symlink_aops; | 31 | extern struct address_space_operations coda_symlink_aops; |
| 32 | 32 | ||
| 33 | extern struct file_operations coda_dir_operations; | 33 | extern const struct file_operations coda_dir_operations; |
| 34 | extern struct file_operations coda_file_operations; | 34 | extern const struct file_operations coda_file_operations; |
| 35 | extern struct file_operations coda_ioctl_operations; | 35 | extern const struct file_operations coda_ioctl_operations; |
| 36 | 36 | ||
| 37 | /* operations shared over more than one file */ | 37 | /* operations shared over more than one file */ |
| 38 | int coda_open(struct inode *i, struct file *f); | 38 | int coda_open(struct inode *i, struct file *f); |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 24d659cdbafe..6d3a654be1ae 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -147,6 +147,24 @@ typedef struct compat_sigevent { | |||
| 147 | } _sigev_un; | 147 | } _sigev_un; |
| 148 | } compat_sigevent_t; | 148 | } compat_sigevent_t; |
| 149 | 149 | ||
| 150 | struct compat_robust_list { | ||
| 151 | compat_uptr_t next; | ||
| 152 | }; | ||
| 153 | |||
| 154 | struct compat_robust_list_head { | ||
| 155 | struct compat_robust_list list; | ||
| 156 | compat_long_t futex_offset; | ||
| 157 | compat_uptr_t list_op_pending; | ||
| 158 | }; | ||
| 159 | |||
| 160 | extern void compat_exit_robust_list(struct task_struct *curr); | ||
| 161 | |||
| 162 | asmlinkage long | ||
| 163 | compat_sys_set_robust_list(struct compat_robust_list_head __user *head, | ||
| 164 | compat_size_t len); | ||
| 165 | asmlinkage long | ||
| 166 | compat_sys_get_robust_list(int pid, compat_uptr_t *head_ptr, | ||
| 167 | compat_size_t __user *len_ptr); | ||
| 150 | 168 | ||
| 151 | long compat_sys_semctl(int first, int second, int third, void __user *uptr); | 169 | long compat_sys_semctl(int first, int second, int third, void __user *uptr); |
| 152 | long compat_sys_msgsnd(int first, int second, int third, void __user *uptr); | 170 | long compat_sys_msgsnd(int first, int second, int third, void __user *uptr); |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index efb518f16bb3..89ab677cb993 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
| @@ -140,6 +140,7 @@ COMPATIBLE_IOCTL(DM_TABLE_DEPS_32) | |||
| 140 | COMPATIBLE_IOCTL(DM_TABLE_STATUS_32) | 140 | COMPATIBLE_IOCTL(DM_TABLE_STATUS_32) |
| 141 | COMPATIBLE_IOCTL(DM_LIST_VERSIONS_32) | 141 | COMPATIBLE_IOCTL(DM_LIST_VERSIONS_32) |
| 142 | COMPATIBLE_IOCTL(DM_TARGET_MSG_32) | 142 | COMPATIBLE_IOCTL(DM_TARGET_MSG_32) |
| 143 | COMPATIBLE_IOCTL(DM_DEV_SET_GEOMETRY_32) | ||
| 143 | COMPATIBLE_IOCTL(DM_VERSION) | 144 | COMPATIBLE_IOCTL(DM_VERSION) |
| 144 | COMPATIBLE_IOCTL(DM_REMOVE_ALL) | 145 | COMPATIBLE_IOCTL(DM_REMOVE_ALL) |
| 145 | COMPATIBLE_IOCTL(DM_LIST_DEVICES) | 146 | COMPATIBLE_IOCTL(DM_LIST_DEVICES) |
| @@ -155,6 +156,7 @@ COMPATIBLE_IOCTL(DM_TABLE_DEPS) | |||
| 155 | COMPATIBLE_IOCTL(DM_TABLE_STATUS) | 156 | COMPATIBLE_IOCTL(DM_TABLE_STATUS) |
| 156 | COMPATIBLE_IOCTL(DM_LIST_VERSIONS) | 157 | COMPATIBLE_IOCTL(DM_LIST_VERSIONS) |
| 157 | COMPATIBLE_IOCTL(DM_TARGET_MSG) | 158 | COMPATIBLE_IOCTL(DM_TARGET_MSG) |
| 159 | COMPATIBLE_IOCTL(DM_DEV_SET_GEOMETRY) | ||
| 158 | /* Big K */ | 160 | /* Big K */ |
| 159 | COMPATIBLE_IOCTL(PIO_FONT) | 161 | COMPATIBLE_IOCTL(PIO_FONT) |
| 160 | COMPATIBLE_IOCTL(GIO_FONT) | 162 | COMPATIBLE_IOCTL(GIO_FONT) |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 99e6115d8e52..9cbb781d6f80 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | * | 67 | * |
| 68 | * int any_online_cpu(mask) First online cpu in mask | 68 | * int any_online_cpu(mask) First online cpu in mask |
| 69 | * | 69 | * |
| 70 | * for_each_cpu(cpu) for-loop cpu over cpu_possible_map | 70 | * for_each_possible_cpu(cpu) for-loop cpu over cpu_possible_map |
| 71 | * for_each_online_cpu(cpu) for-loop cpu over cpu_online_map | 71 | * for_each_online_cpu(cpu) for-loop cpu over cpu_online_map |
| 72 | * for_each_present_cpu(cpu) for-loop cpu over cpu_present_map | 72 | * for_each_present_cpu(cpu) for-loop cpu over cpu_present_map |
| 73 | * | 73 | * |
| @@ -405,7 +405,8 @@ int __any_online_cpu(const cpumask_t *mask); | |||
| 405 | #define any_online_cpu(mask) 0 | 405 | #define any_online_cpu(mask) 0 |
| 406 | #endif | 406 | #endif |
| 407 | 407 | ||
| 408 | #define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) | 408 | #define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) |
| 409 | #define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) | ||
| 409 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) | 410 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) |
| 410 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) | 411 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) |
| 411 | 412 | ||
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 534d750d922d..32503657f14f 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | extern unsigned long long elfcorehdr_addr; | 11 | extern unsigned long long elfcorehdr_addr; |
| 12 | extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, | 12 | extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, |
| 13 | unsigned long, int); | 13 | unsigned long, int); |
| 14 | extern struct file_operations proc_vmcore_operations; | 14 | extern const struct file_operations proc_vmcore_operations; |
| 15 | extern struct proc_dir_entry *proc_vmcore; | 15 | extern struct proc_dir_entry *proc_vmcore; |
| 16 | 16 | ||
| 17 | #endif /* CONFIG_CRASH_DUMP */ | 17 | #endif /* CONFIG_CRASH_DUMP */ |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 4b0428e335be..176e2d371577 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
| @@ -29,7 +29,7 @@ struct debugfs_blob_wrapper { | |||
| 29 | #if defined(CONFIG_DEBUG_FS) | 29 | #if defined(CONFIG_DEBUG_FS) |
| 30 | struct dentry *debugfs_create_file(const char *name, mode_t mode, | 30 | struct dentry *debugfs_create_file(const char *name, mode_t mode, |
| 31 | struct dentry *parent, void *data, | 31 | struct dentry *parent, void *data, |
| 32 | struct file_operations *fops); | 32 | const struct file_operations *fops); |
| 33 | 33 | ||
| 34 | struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); | 34 | struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); |
| 35 | 35 | ||
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 51e0e95a421a..aee10b2ea4c6 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -97,6 +97,7 @@ struct io_restrictions { | |||
| 97 | unsigned short hardsect_size; | 97 | unsigned short hardsect_size; |
| 98 | unsigned int max_segment_size; | 98 | unsigned int max_segment_size; |
| 99 | unsigned long seg_boundary_mask; | 99 | unsigned long seg_boundary_mask; |
| 100 | unsigned char no_cluster; /* inverted so that 0 is default */ | ||
| 100 | }; | 101 | }; |
| 101 | 102 | ||
| 102 | struct dm_target { | 103 | struct dm_target { |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index fa75ba0d635e..c67c6786612a 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
| @@ -80,6 +80,16 @@ | |||
| 80 | * | 80 | * |
| 81 | * DM_TARGET_MSG: | 81 | * DM_TARGET_MSG: |
| 82 | * Pass a message string to the target at a specific offset of a device. | 82 | * Pass a message string to the target at a specific offset of a device. |
| 83 | * | ||
| 84 | * DM_DEV_SET_GEOMETRY: | ||
| 85 | * Set the geometry of a device by passing in a string in this format: | ||
| 86 | * | ||
| 87 | * "cylinders heads sectors_per_track start_sector" | ||
| 88 | * | ||
| 89 | * Beware that CHS geometry is nearly obsolete and only provided | ||
| 90 | * for compatibility with dm devices that can be booted by a PC | ||
| 91 | * BIOS. See struct hd_geometry for range limits. Also note that | ||
| 92 | * the geometry is erased if the device size changes. | ||
| 83 | */ | 93 | */ |
| 84 | 94 | ||
| 85 | /* | 95 | /* |
| @@ -218,6 +228,7 @@ enum { | |||
| 218 | /* Added later */ | 228 | /* Added later */ |
| 219 | DM_LIST_VERSIONS_CMD, | 229 | DM_LIST_VERSIONS_CMD, |
| 220 | DM_TARGET_MSG_CMD, | 230 | DM_TARGET_MSG_CMD, |
| 231 | DM_DEV_SET_GEOMETRY_CMD | ||
| 221 | }; | 232 | }; |
| 222 | 233 | ||
| 223 | /* | 234 | /* |
| @@ -247,6 +258,7 @@ typedef char ioctl_struct[308]; | |||
| 247 | #define DM_TABLE_STATUS_32 _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, ioctl_struct) | 258 | #define DM_TABLE_STATUS_32 _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, ioctl_struct) |
| 248 | #define DM_LIST_VERSIONS_32 _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, ioctl_struct) | 259 | #define DM_LIST_VERSIONS_32 _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, ioctl_struct) |
| 249 | #define DM_TARGET_MSG_32 _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, ioctl_struct) | 260 | #define DM_TARGET_MSG_32 _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, ioctl_struct) |
| 261 | #define DM_DEV_SET_GEOMETRY_32 _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, ioctl_struct) | ||
| 250 | #endif | 262 | #endif |
| 251 | 263 | ||
| 252 | #define DM_IOCTL 0xfd | 264 | #define DM_IOCTL 0xfd |
| @@ -270,11 +282,12 @@ typedef char ioctl_struct[308]; | |||
| 270 | #define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl) | 282 | #define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl) |
| 271 | 283 | ||
| 272 | #define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) | 284 | #define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) |
| 285 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | ||
| 273 | 286 | ||
| 274 | #define DM_VERSION_MAJOR 4 | 287 | #define DM_VERSION_MAJOR 4 |
| 275 | #define DM_VERSION_MINOR 5 | 288 | #define DM_VERSION_MINOR 6 |
| 276 | #define DM_VERSION_PATCHLEVEL 0 | 289 | #define DM_VERSION_PATCHLEVEL 0 |
| 277 | #define DM_VERSION_EXTRA "-ioctl (2005-10-04)" | 290 | #define DM_VERSION_EXTRA "-ioctl (2006-02-17)" |
| 278 | 291 | ||
| 279 | /* Status bits */ | 292 | /* Status bits */ |
| 280 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 293 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index a8731062a74c..9b4751aecc23 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
| @@ -21,6 +21,7 @@ enum dma_data_direction { | |||
| 21 | #define DMA_30BIT_MASK 0x000000003fffffffULL | 21 | #define DMA_30BIT_MASK 0x000000003fffffffULL |
| 22 | #define DMA_29BIT_MASK 0x000000001fffffffULL | 22 | #define DMA_29BIT_MASK 0x000000001fffffffULL |
| 23 | #define DMA_28BIT_MASK 0x000000000fffffffULL | 23 | #define DMA_28BIT_MASK 0x000000000fffffffULL |
| 24 | #define DMA_24BIT_MASK 0x0000000000ffffffULL | ||
| 24 | 25 | ||
| 25 | #include <asm/dma-mapping.h> | 26 | #include <asm/dma-mapping.h> |
| 26 | 27 | ||
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h index 28f368c526fb..fbfa6b52e2fb 100644 --- a/include/linux/efs_fs.h +++ b/include/linux/efs_fs.h | |||
| @@ -37,7 +37,7 @@ static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb) | |||
| 37 | struct statfs; | 37 | struct statfs; |
| 38 | 38 | ||
| 39 | extern struct inode_operations efs_dir_inode_operations; | 39 | extern struct inode_operations efs_dir_inode_operations; |
| 40 | extern struct file_operations efs_dir_operations; | 40 | extern const struct file_operations efs_dir_operations; |
| 41 | extern struct address_space_operations efs_symlink_aops; | 41 | extern struct address_space_operations efs_symlink_aops; |
| 42 | 42 | ||
| 43 | extern void efs_read_inode(struct inode *); | 43 | extern void efs_read_inode(struct inode *); |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 8bb4f842cded..3ade6a4e3bdd 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -833,11 +833,11 @@ do { \ | |||
| 833 | */ | 833 | */ |
| 834 | 834 | ||
| 835 | /* dir.c */ | 835 | /* dir.c */ |
| 836 | extern struct file_operations ext3_dir_operations; | 836 | extern const struct file_operations ext3_dir_operations; |
| 837 | 837 | ||
| 838 | /* file.c */ | 838 | /* file.c */ |
| 839 | extern struct inode_operations ext3_file_inode_operations; | 839 | extern struct inode_operations ext3_file_inode_operations; |
| 840 | extern struct file_operations ext3_file_operations; | 840 | extern const struct file_operations ext3_file_operations; |
| 841 | 841 | ||
| 842 | /* namei.c */ | 842 | /* namei.c */ |
| 843 | extern struct inode_operations ext3_dir_inode_operations; | 843 | extern struct inode_operations ext3_dir_inode_operations; |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 2cb19e6503aa..d03fadfcafe3 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -734,7 +734,7 @@ struct fb_tile_ops { | |||
| 734 | 734 | ||
| 735 | /* A driver may set this flag to indicate that it does want a set_par to be | 735 | /* A driver may set this flag to indicate that it does want a set_par to be |
| 736 | * called every time when fbcon_switch is executed. The advantage is that with | 736 | * called every time when fbcon_switch is executed. The advantage is that with |
| 737 | * this flag set you can really be shure that set_par is always called before | 737 | * this flag set you can really be sure that set_par is always called before |
| 738 | * any of the functions dependant on the correct hardware state or altering | 738 | * any of the functions dependant on the correct hardware state or altering |
| 739 | * that state, even if you are using some broken X releases. The disadvantage | 739 | * that state, even if you are using some broken X releases. The disadvantage |
| 740 | * is that it introduces unwanted delays to every console switch if set_par | 740 | * is that it introduces unwanted delays to every console switch if set_par |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9d9674946956..408fe89498f4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -410,6 +410,9 @@ struct block_device { | |||
| 410 | struct list_head bd_inodes; | 410 | struct list_head bd_inodes; |
| 411 | void * bd_holder; | 411 | void * bd_holder; |
| 412 | int bd_holders; | 412 | int bd_holders; |
| 413 | #ifdef CONFIG_SYSFS | ||
| 414 | struct list_head bd_holder_list; | ||
| 415 | #endif | ||
| 413 | struct block_device * bd_contains; | 416 | struct block_device * bd_contains; |
| 414 | unsigned bd_block_size; | 417 | unsigned bd_block_size; |
| 415 | struct hd_struct * bd_part; | 418 | struct hd_struct * bd_part; |
| @@ -493,7 +496,7 @@ struct inode { | |||
| 493 | struct mutex i_mutex; | 496 | struct mutex i_mutex; |
| 494 | struct rw_semaphore i_alloc_sem; | 497 | struct rw_semaphore i_alloc_sem; |
| 495 | struct inode_operations *i_op; | 498 | struct inode_operations *i_op; |
| 496 | struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 499 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
| 497 | struct super_block *i_sb; | 500 | struct super_block *i_sb; |
| 498 | struct file_lock *i_flock; | 501 | struct file_lock *i_flock; |
| 499 | struct address_space *i_mapping; | 502 | struct address_space *i_mapping; |
| @@ -633,7 +636,7 @@ struct file { | |||
| 633 | } f_u; | 636 | } f_u; |
| 634 | struct dentry *f_dentry; | 637 | struct dentry *f_dentry; |
| 635 | struct vfsmount *f_vfsmnt; | 638 | struct vfsmount *f_vfsmnt; |
| 636 | struct file_operations *f_op; | 639 | const struct file_operations *f_op; |
| 637 | atomic_t f_count; | 640 | atomic_t f_count; |
| 638 | unsigned int f_flags; | 641 | unsigned int f_flags; |
| 639 | mode_t f_mode; | 642 | mode_t f_mode; |
| @@ -1387,11 +1390,11 @@ extern void bd_set_size(struct block_device *, loff_t size); | |||
| 1387 | extern void bd_forget(struct inode *inode); | 1390 | extern void bd_forget(struct inode *inode); |
| 1388 | extern void bdput(struct block_device *); | 1391 | extern void bdput(struct block_device *); |
| 1389 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1392 | extern struct block_device *open_by_devnum(dev_t, unsigned); |
| 1390 | extern struct file_operations def_blk_fops; | 1393 | extern const struct file_operations def_blk_fops; |
| 1391 | extern struct address_space_operations def_blk_aops; | 1394 | extern struct address_space_operations def_blk_aops; |
| 1392 | extern struct file_operations def_chr_fops; | 1395 | extern const struct file_operations def_chr_fops; |
| 1393 | extern struct file_operations bad_sock_fops; | 1396 | extern const struct file_operations bad_sock_fops; |
| 1394 | extern struct file_operations def_fifo_fops; | 1397 | extern const struct file_operations def_fifo_fops; |
| 1395 | extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); | 1398 | extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); |
| 1396 | extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); | 1399 | extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); |
| 1397 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); | 1400 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); |
| @@ -1399,12 +1402,19 @@ extern int blkdev_get(struct block_device *, mode_t, unsigned); | |||
| 1399 | extern int blkdev_put(struct block_device *); | 1402 | extern int blkdev_put(struct block_device *); |
| 1400 | extern int bd_claim(struct block_device *, void *); | 1403 | extern int bd_claim(struct block_device *, void *); |
| 1401 | extern void bd_release(struct block_device *); | 1404 | extern void bd_release(struct block_device *); |
| 1405 | #ifdef CONFIG_SYSFS | ||
| 1406 | extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *); | ||
| 1407 | extern void bd_release_from_disk(struct block_device *, struct gendisk *); | ||
| 1408 | #else | ||
| 1409 | #define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder) | ||
| 1410 | #define bd_release_from_disk(bdev, disk) bd_release(bdev) | ||
| 1411 | #endif | ||
| 1402 | 1412 | ||
| 1403 | /* fs/char_dev.c */ | 1413 | /* fs/char_dev.c */ |
| 1404 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); | 1414 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); |
| 1405 | extern int register_chrdev_region(dev_t, unsigned, const char *); | 1415 | extern int register_chrdev_region(dev_t, unsigned, const char *); |
| 1406 | extern int register_chrdev(unsigned int, const char *, | 1416 | extern int register_chrdev(unsigned int, const char *, |
| 1407 | struct file_operations *); | 1417 | const struct file_operations *); |
| 1408 | extern int unregister_chrdev(unsigned int, const char *); | 1418 | extern int unregister_chrdev(unsigned int, const char *); |
| 1409 | extern void unregister_chrdev_region(dev_t, unsigned); | 1419 | extern void unregister_chrdev_region(dev_t, unsigned); |
| 1410 | extern int chrdev_open(struct inode *, struct file *); | 1420 | extern int chrdev_open(struct inode *, struct file *); |
| @@ -1434,9 +1444,9 @@ extern void init_special_inode(struct inode *, umode_t, dev_t); | |||
| 1434 | extern void make_bad_inode(struct inode *); | 1444 | extern void make_bad_inode(struct inode *); |
| 1435 | extern int is_bad_inode(struct inode *); | 1445 | extern int is_bad_inode(struct inode *); |
| 1436 | 1446 | ||
| 1437 | extern struct file_operations read_fifo_fops; | 1447 | extern const struct file_operations read_fifo_fops; |
| 1438 | extern struct file_operations write_fifo_fops; | 1448 | extern const struct file_operations write_fifo_fops; |
| 1439 | extern struct file_operations rdwr_fifo_fops; | 1449 | extern const struct file_operations rdwr_fifo_fops; |
| 1440 | 1450 | ||
| 1441 | extern int fs_may_remount_ro(struct super_block *); | 1451 | extern int fs_may_remount_ro(struct super_block *); |
| 1442 | 1452 | ||
| @@ -1678,7 +1688,7 @@ static inline ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, | |||
| 1678 | nr_segs, get_block, end_io, DIO_OWN_LOCKING); | 1688 | nr_segs, get_block, end_io, DIO_OWN_LOCKING); |
| 1679 | } | 1689 | } |
| 1680 | 1690 | ||
| 1681 | extern struct file_operations generic_ro_fops; | 1691 | extern const struct file_operations generic_ro_fops; |
| 1682 | 1692 | ||
| 1683 | #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) | 1693 | #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) |
| 1684 | 1694 | ||
| @@ -1734,9 +1744,9 @@ extern int simple_commit_write(struct file *file, struct page *page, | |||
| 1734 | 1744 | ||
| 1735 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); | 1745 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); |
| 1736 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); | 1746 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); |
| 1737 | extern struct file_operations simple_dir_operations; | 1747 | extern const struct file_operations simple_dir_operations; |
| 1738 | extern struct inode_operations simple_dir_inode_operations; | 1748 | extern struct inode_operations simple_dir_inode_operations; |
| 1739 | struct tree_descr { char *name; struct file_operations *ops; int mode; }; | 1749 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
| 1740 | struct dentry *d_alloc_name(struct dentry *, const char *); | 1750 | struct dentry *d_alloc_name(struct dentry *, const char *); |
| 1741 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | 1751 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); |
| 1742 | extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); | 1752 | extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 10f96c31971e..966a5b3da439 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _LINUX_FUTEX_H | 1 | #ifndef _LINUX_FUTEX_H |
| 2 | #define _LINUX_FUTEX_H | 2 | #define _LINUX_FUTEX_H |
| 3 | 3 | ||
| 4 | #include <linux/sched.h> | ||
| 5 | |||
| 4 | /* Second argument to futex syscall */ | 6 | /* Second argument to futex syscall */ |
| 5 | 7 | ||
| 6 | 8 | ||
| @@ -11,10 +13,97 @@ | |||
| 11 | #define FUTEX_CMP_REQUEUE 4 | 13 | #define FUTEX_CMP_REQUEUE 4 |
| 12 | #define FUTEX_WAKE_OP 5 | 14 | #define FUTEX_WAKE_OP 5 |
| 13 | 15 | ||
| 16 | /* | ||
| 17 | * Support for robust futexes: the kernel cleans up held futexes at | ||
| 18 | * thread exit time. | ||
| 19 | */ | ||
| 20 | |||
| 21 | /* | ||
| 22 | * Per-lock list entry - embedded in user-space locks, somewhere close | ||
| 23 | * to the futex field. (Note: user-space uses a double-linked list to | ||
| 24 | * achieve O(1) list add and remove, but the kernel only needs to know | ||
| 25 | * about the forward link) | ||
| 26 | * | ||
| 27 | * NOTE: this structure is part of the syscall ABI, and must not be | ||
| 28 | * changed. | ||
| 29 | */ | ||
| 30 | struct robust_list { | ||
| 31 | struct robust_list __user *next; | ||
| 32 | }; | ||
| 33 | |||
| 34 | /* | ||
| 35 | * Per-thread list head: | ||
| 36 | * | ||
| 37 | * NOTE: this structure is part of the syscall ABI, and must only be | ||
| 38 | * changed if the change is first communicated with the glibc folks. | ||
| 39 | * (When an incompatible change is done, we'll increase the structure | ||
| 40 | * size, which glibc will detect) | ||
| 41 | */ | ||
| 42 | struct robust_list_head { | ||
| 43 | /* | ||
| 44 | * The head of the list. Points back to itself if empty: | ||
| 45 | */ | ||
| 46 | struct robust_list list; | ||
| 47 | |||
| 48 | /* | ||
| 49 | * This relative offset is set by user-space, it gives the kernel | ||
| 50 | * the relative position of the futex field to examine. This way | ||
| 51 | * we keep userspace flexible, to freely shape its data-structure, | ||
| 52 | * without hardcoding any particular offset into the kernel: | ||
| 53 | */ | ||
| 54 | long futex_offset; | ||
| 55 | |||
| 56 | /* | ||
| 57 | * The death of the thread may race with userspace setting | ||
| 58 | * up a lock's links. So to handle this race, userspace first | ||
| 59 | * sets this field to the address of the to-be-taken lock, | ||
| 60 | * then does the lock acquire, and then adds itself to the | ||
| 61 | * list, and then clears this field. Hence the kernel will | ||
| 62 | * always have full knowledge of all locks that the thread | ||
| 63 | * _might_ have taken. We check the owner TID in any case, | ||
| 64 | * so only truly owned locks will be handled. | ||
| 65 | */ | ||
| 66 | struct robust_list __user *list_op_pending; | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* | ||
| 70 | * Are there any waiters for this robust futex: | ||
| 71 | */ | ||
| 72 | #define FUTEX_WAITERS 0x80000000 | ||
| 73 | |||
| 74 | /* | ||
| 75 | * The kernel signals via this bit that a thread holding a futex | ||
| 76 | * has exited without unlocking the futex. The kernel also does | ||
| 77 | * a FUTEX_WAKE on such futexes, after setting the bit, to wake | ||
| 78 | * up any possible waiters: | ||
| 79 | */ | ||
| 80 | #define FUTEX_OWNER_DIED 0x40000000 | ||
| 81 | |||
| 82 | /* | ||
| 83 | * The rest of the robust-futex field is for the TID: | ||
| 84 | */ | ||
| 85 | #define FUTEX_TID_MASK 0x3fffffff | ||
| 86 | |||
| 87 | /* | ||
| 88 | * This limit protects against a deliberately circular list. | ||
| 89 | * (Not worth introducing an rlimit for it) | ||
| 90 | */ | ||
| 91 | #define ROBUST_LIST_LIMIT 2048 | ||
| 92 | |||
| 14 | long do_futex(unsigned long uaddr, int op, int val, | 93 | long do_futex(unsigned long uaddr, int op, int val, |
| 15 | unsigned long timeout, unsigned long uaddr2, int val2, | 94 | unsigned long timeout, unsigned long uaddr2, int val2, |
| 16 | int val3); | 95 | int val3); |
| 17 | 96 | ||
| 97 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); | ||
| 98 | |||
| 99 | #ifdef CONFIG_FUTEX | ||
| 100 | extern void exit_robust_list(struct task_struct *curr); | ||
| 101 | #else | ||
| 102 | static inline void exit_robust_list(struct task_struct *curr) | ||
| 103 | { | ||
| 104 | } | ||
| 105 | #endif | ||
| 106 | |||
| 18 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ | 107 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ |
| 19 | #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ | 108 | #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ |
| 20 | #define FUTEX_OP_OR 2 /* *(int *)UADDR2 |= OPARG; */ | 109 | #define FUTEX_OP_OR 2 /* *(int *)UADDR2 |= OPARG; */ |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index fd647fde5ec1..10a27f29d692 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -78,6 +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 | struct kobject *holder_dir; | ||
| 81 | unsigned ios[2], sectors[2]; /* READs and WRITEs */ | 82 | unsigned ios[2], sectors[2]; /* READs and WRITEs */ |
| 82 | int policy, partno; | 83 | int policy, partno; |
| 83 | }; | 84 | }; |
| @@ -89,12 +90,12 @@ struct hd_struct { | |||
| 89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 90 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
| 90 | 91 | ||
| 91 | struct disk_stats { | 92 | struct disk_stats { |
| 92 | unsigned sectors[2]; /* READs and WRITEs */ | 93 | unsigned long sectors[2]; /* READs and WRITEs */ |
| 93 | unsigned ios[2]; | 94 | unsigned long ios[2]; |
| 94 | unsigned merges[2]; | 95 | unsigned long merges[2]; |
| 95 | unsigned ticks[2]; | 96 | unsigned long ticks[2]; |
| 96 | unsigned io_ticks; | 97 | unsigned long io_ticks; |
| 97 | unsigned time_in_queue; | 98 | unsigned long time_in_queue; |
| 98 | }; | 99 | }; |
| 99 | 100 | ||
| 100 | struct gendisk { | 101 | struct gendisk { |
| @@ -114,6 +115,8 @@ struct gendisk { | |||
| 114 | int number; /* more of the same */ | 115 | int number; /* more of the same */ |
| 115 | struct device *driverfs_dev; | 116 | struct device *driverfs_dev; |
| 116 | struct kobject kobj; | 117 | struct kobject kobj; |
| 118 | struct kobject *holder_dir; | ||
| 119 | struct kobject *slave_dir; | ||
| 117 | 120 | ||
| 118 | struct timer_rand_state *random; | 121 | struct timer_rand_state *random; |
| 119 | int policy; | 122 | int policy; |
| @@ -149,14 +152,14 @@ struct disk_attribute { | |||
| 149 | ({ \ | 152 | ({ \ |
| 150 | typeof(gendiskp->dkstats->field) res = 0; \ | 153 | typeof(gendiskp->dkstats->field) res = 0; \ |
| 151 | int i; \ | 154 | int i; \ |
| 152 | for_each_cpu(i) \ | 155 | for_each_possible_cpu(i) \ |
| 153 | res += per_cpu_ptr(gendiskp->dkstats, i)->field; \ | 156 | res += per_cpu_ptr(gendiskp->dkstats, i)->field; \ |
| 154 | res; \ | 157 | res; \ |
| 155 | }) | 158 | }) |
| 156 | 159 | ||
| 157 | static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { | 160 | static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { |
| 158 | int i; | 161 | int i; |
| 159 | for_each_cpu(i) | 162 | for_each_possible_cpu(i) |
| 160 | memset(per_cpu_ptr(gendiskp->dkstats, i), value, | 163 | memset(per_cpu_ptr(gendiskp->dkstats, i), value, |
| 161 | sizeof (struct disk_stats)); | 164 | sizeof (struct disk_stats)); |
| 162 | } | 165 | } |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index d6f1019625af..4c5e610fe442 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -154,7 +154,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
| 154 | return sb->s_fs_info; | 154 | return sb->s_fs_info; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | extern struct file_operations hugetlbfs_file_operations; | 157 | extern const struct file_operations hugetlbfs_file_operations; |
| 158 | extern struct vm_operations_struct hugetlb_vm_ops; | 158 | extern struct vm_operations_struct hugetlb_vm_ops; |
| 159 | struct file *hugetlb_zero_setup(size_t); | 159 | struct file *hugetlb_zero_setup(size_t); |
| 160 | int hugetlb_extend_reservation(struct hugetlbfs_inode_info *info, | 160 | int hugetlb_extend_reservation(struct hugetlbfs_inode_info *info, |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 679b46a6a565..c8b81f419fd8 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
| @@ -108,6 +108,10 @@ | |||
| 108 | #define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */ | 108 | #define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */ |
| 109 | #define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */ | 109 | #define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */ |
| 110 | #define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */ | 110 | #define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */ |
| 111 | #define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */ | ||
| 112 | #define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */ | ||
| 113 | #define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */ | ||
| 114 | #define I2C_DRIVERID_RS5C372 84 /* Ricoh RS5C372 RTC */ | ||
| 111 | 115 | ||
| 112 | #define I2C_DRIVERID_I2CDEV 900 | 116 | #define I2C_DRIVERID_I2CDEV 900 |
| 113 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 117 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
diff --git a/include/linux/input.h b/include/linux/input.h index 6d4cc3c110d6..1d4e341b72e6 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -957,7 +957,7 @@ struct input_handler { | |||
| 957 | struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); | 957 | struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); |
| 958 | void (*disconnect)(struct input_handle *handle); | 958 | void (*disconnect)(struct input_handle *handle); |
| 959 | 959 | ||
| 960 | struct file_operations *fops; | 960 | const struct file_operations *fops; |
| 961 | int minor; | 961 | int minor; |
| 962 | char *name; | 962 | char *name; |
| 963 | 963 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 03d6cfaa5b8a..a3720f973ea5 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -87,7 +87,7 @@ extern int cond_resched(void); | |||
| 87 | (__x < 0) ? -__x : __x; \ | 87 | (__x < 0) ? -__x : __x; \ |
| 88 | }) | 88 | }) |
| 89 | 89 | ||
| 90 | extern struct notifier_block *panic_notifier_list; | 90 | extern struct atomic_notifier_head panic_notifier_list; |
| 91 | extern long (*panic_blink)(long time); | 91 | extern long (*panic_blink)(long time); |
| 92 | NORET_TYPE void panic(const char * fmt, ...) | 92 | NORET_TYPE void panic(const char * fmt, ...) |
| 93 | __attribute__ ((NORET_AND format (printf, 1, 2))); | 93 | __attribute__ ((NORET_AND format (printf, 1, 2))); |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index a484572c302e..b46249082cca 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -46,7 +46,7 @@ static inline int kstat_irqs(int irq) | |||
| 46 | { | 46 | { |
| 47 | int cpu, sum = 0; | 47 | int cpu, sum = 0; |
| 48 | 48 | ||
| 49 | for_each_cpu(cpu) | 49 | for_each_possible_cpu(cpu) |
| 50 | sum += kstat_cpu(cpu).irqs[irq]; | 50 | sum += kstat_cpu(cpu).irqs[irq]; |
| 51 | 51 | ||
| 52 | return sum; | 52 | return sum; |
diff --git a/include/linux/m48t86.h b/include/linux/m48t86.h new file mode 100644 index 000000000000..9065199319d0 --- /dev/null +++ b/include/linux/m48t86.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* | ||
| 2 | * ST M48T86 / Dallas DS12887 RTC driver | ||
| 3 | * Copyright (c) 2006 Tower Technologies | ||
| 4 | * | ||
| 5 | * Author: Alessandro Zummo <a.zummo@towertech.it> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | struct m48t86_ops | ||
| 13 | { | ||
| 14 | void (*writeb)(unsigned char value, unsigned long addr); | ||
| 15 | unsigned char (*readb)(unsigned long addr); | ||
| 16 | }; | ||
diff --git a/include/linux/memory.h b/include/linux/memory.h index e251dc43d0f5..8f04143ca363 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -77,7 +77,6 @@ extern int remove_memory_block(unsigned long, struct mem_section *, int); | |||
| 77 | 77 | ||
| 78 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) | 78 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) |
| 79 | 79 | ||
| 80 | struct notifier_block; | ||
| 81 | 80 | ||
| 82 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 81 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
| 83 | 82 | ||
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 14ceebfc1efa..5b584dafb5a6 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
| @@ -36,7 +36,7 @@ struct class_device; | |||
| 36 | struct miscdevice { | 36 | struct miscdevice { |
| 37 | int minor; | 37 | int minor; |
| 38 | const char *name; | 38 | const char *name; |
| 39 | struct file_operations *fops; | 39 | const struct file_operations *fops; |
| 40 | struct list_head list; | 40 | struct list_head list; |
| 41 | struct device *dev; | 41 | struct device *dev; |
| 42 | struct class_device *class; | 42 | struct class_device *class; |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index ebfc238cc243..b5c21122c299 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/numa.h> | 13 | #include <linux/numa.h> |
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/seqlock.h> | 15 | #include <linux/seqlock.h> |
| 16 | #include <linux/nodemask.h> | ||
| 16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
| 17 | 18 | ||
| 18 | /* Free memory management - zoned buddy allocator. */ | 19 | /* Free memory management - zoned buddy allocator. */ |
| @@ -225,7 +226,6 @@ struct zone { | |||
| 225 | * Discontig memory support fields. | 226 | * Discontig memory support fields. |
| 226 | */ | 227 | */ |
| 227 | struct pglist_data *zone_pgdat; | 228 | struct pglist_data *zone_pgdat; |
| 228 | struct page *zone_mem_map; | ||
| 229 | /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */ | 229 | /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */ |
| 230 | unsigned long zone_start_pfn; | 230 | unsigned long zone_start_pfn; |
| 231 | 231 | ||
| @@ -307,7 +307,6 @@ typedef struct pglist_data { | |||
| 307 | unsigned long node_spanned_pages; /* total size of physical page | 307 | unsigned long node_spanned_pages; /* total size of physical page |
| 308 | range, including holes */ | 308 | range, including holes */ |
| 309 | int node_id; | 309 | int node_id; |
| 310 | struct pglist_data *pgdat_next; | ||
| 311 | wait_queue_head_t kswapd_wait; | 310 | wait_queue_head_t kswapd_wait; |
| 312 | struct task_struct *kswapd; | 311 | struct task_struct *kswapd; |
| 313 | int kswapd_max_order; | 312 | int kswapd_max_order; |
| @@ -324,8 +323,6 @@ typedef struct pglist_data { | |||
| 324 | 323 | ||
| 325 | #include <linux/memory_hotplug.h> | 324 | #include <linux/memory_hotplug.h> |
| 326 | 325 | ||
| 327 | extern struct pglist_data *pgdat_list; | ||
| 328 | |||
| 329 | void __get_zone_counts(unsigned long *active, unsigned long *inactive, | 326 | void __get_zone_counts(unsigned long *active, unsigned long *inactive, |
| 330 | unsigned long *free, struct pglist_data *pgdat); | 327 | unsigned long *free, struct pglist_data *pgdat); |
| 331 | void get_zone_counts(unsigned long *active, unsigned long *inactive, | 328 | void get_zone_counts(unsigned long *active, unsigned long *inactive, |
| @@ -350,57 +347,6 @@ unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long); | |||
| 350 | */ | 347 | */ |
| 351 | #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) | 348 | #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) |
| 352 | 349 | ||
| 353 | /** | ||
| 354 | * for_each_pgdat - helper macro to iterate over all nodes | ||
| 355 | * @pgdat - pointer to a pg_data_t variable | ||
| 356 | * | ||
| 357 | * Meant to help with common loops of the form | ||
| 358 | * pgdat = pgdat_list; | ||
| 359 | * while(pgdat) { | ||
| 360 | * ... | ||
| 361 | * pgdat = pgdat->pgdat_next; | ||
| 362 | * } | ||
| 363 | */ | ||
| 364 | #define for_each_pgdat(pgdat) \ | ||
| 365 | for (pgdat = pgdat_list; pgdat; pgdat = pgdat->pgdat_next) | ||
| 366 | |||
| 367 | /* | ||
| 368 | * next_zone - helper magic for for_each_zone() | ||
| 369 | * Thanks to William Lee Irwin III for this piece of ingenuity. | ||
| 370 | */ | ||
| 371 | static inline struct zone *next_zone(struct zone *zone) | ||
| 372 | { | ||
| 373 | pg_data_t *pgdat = zone->zone_pgdat; | ||
| 374 | |||
| 375 | if (zone < pgdat->node_zones + MAX_NR_ZONES - 1) | ||
| 376 | zone++; | ||
| 377 | else if (pgdat->pgdat_next) { | ||
| 378 | pgdat = pgdat->pgdat_next; | ||
| 379 | zone = pgdat->node_zones; | ||
| 380 | } else | ||
| 381 | zone = NULL; | ||
| 382 | |||
| 383 | return zone; | ||
| 384 | } | ||
| 385 | |||
| 386 | /** | ||
| 387 | * for_each_zone - helper macro to iterate over all memory zones | ||
| 388 | * @zone - pointer to struct zone variable | ||
| 389 | * | ||
| 390 | * The user only needs to declare the zone variable, for_each_zone | ||
| 391 | * fills it in. This basically means for_each_zone() is an | ||
| 392 | * easier to read version of this piece of code: | ||
| 393 | * | ||
| 394 | * for (pgdat = pgdat_list; pgdat; pgdat = pgdat->node_next) | ||
| 395 | * for (i = 0; i < MAX_NR_ZONES; ++i) { | ||
| 396 | * struct zone * z = pgdat->node_zones + i; | ||
| 397 | * ... | ||
| 398 | * } | ||
| 399 | * } | ||
| 400 | */ | ||
| 401 | #define for_each_zone(zone) \ | ||
| 402 | for (zone = pgdat_list->node_zones; zone; zone = next_zone(zone)) | ||
| 403 | |||
| 404 | static inline int populated_zone(struct zone *zone) | 350 | static inline int populated_zone(struct zone *zone) |
| 405 | { | 351 | { |
| 406 | return (!!zone->present_pages); | 352 | return (!!zone->present_pages); |
| @@ -472,6 +418,30 @@ extern struct pglist_data contig_page_data; | |||
| 472 | 418 | ||
| 473 | #endif /* !CONFIG_NEED_MULTIPLE_NODES */ | 419 | #endif /* !CONFIG_NEED_MULTIPLE_NODES */ |
| 474 | 420 | ||
| 421 | extern struct pglist_data *first_online_pgdat(void); | ||
| 422 | extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); | ||
| 423 | extern struct zone *next_zone(struct zone *zone); | ||
| 424 | |||
| 425 | /** | ||
| 426 | * for_each_pgdat - helper macro to iterate over all nodes | ||
| 427 | * @pgdat - pointer to a pg_data_t variable | ||
| 428 | */ | ||
| 429 | #define for_each_online_pgdat(pgdat) \ | ||
| 430 | for (pgdat = first_online_pgdat(); \ | ||
| 431 | pgdat; \ | ||
| 432 | pgdat = next_online_pgdat(pgdat)) | ||
| 433 | /** | ||
| 434 | * for_each_zone - helper macro to iterate over all memory zones | ||
| 435 | * @zone - pointer to struct zone variable | ||
| 436 | * | ||
| 437 | * The user only needs to declare the zone variable, for_each_zone | ||
| 438 | * fills it in. | ||
| 439 | */ | ||
| 440 | #define for_each_zone(zone) \ | ||
| 441 | for (zone = (first_online_pgdat())->node_zones; \ | ||
| 442 | zone; \ | ||
| 443 | zone = next_zone(zone)) | ||
| 444 | |||
| 475 | #ifdef CONFIG_SPARSEMEM | 445 | #ifdef CONFIG_SPARSEMEM |
| 476 | #include <asm/sparsemem.h> | 446 | #include <asm/sparsemem.h> |
| 477 | #endif | 447 | #endif |
| @@ -602,17 +572,6 @@ static inline struct mem_section *__pfn_to_section(unsigned long pfn) | |||
| 602 | return __nr_to_section(pfn_to_section_nr(pfn)); | 572 | return __nr_to_section(pfn_to_section_nr(pfn)); |
| 603 | } | 573 | } |
| 604 | 574 | ||
| 605 | #define pfn_to_page(pfn) \ | ||
| 606 | ({ \ | ||
| 607 | unsigned long __pfn = (pfn); \ | ||
| 608 | __section_mem_map_addr(__pfn_to_section(__pfn)) + __pfn; \ | ||
| 609 | }) | ||
| 610 | #define page_to_pfn(page) \ | ||
| 611 | ({ \ | ||
| 612 | page - __section_mem_map_addr(__nr_to_section( \ | ||
| 613 | page_to_section(page))); \ | ||
| 614 | }) | ||
| 615 | |||
| 616 | static inline int pfn_valid(unsigned long pfn) | 575 | static inline int pfn_valid(unsigned long pfn) |
| 617 | { | 576 | { |
| 618 | if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS) | 577 | if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS) |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 779e6a5744c7..d9035c73e5d1 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
| @@ -334,7 +334,7 @@ extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, | |||
| 334 | unsigned long *mapped_blocks); | 334 | unsigned long *mapped_blocks); |
| 335 | 335 | ||
| 336 | /* fat/dir.c */ | 336 | /* fat/dir.c */ |
| 337 | extern struct file_operations fat_dir_operations; | 337 | extern const struct file_operations fat_dir_operations; |
| 338 | extern int fat_search_long(struct inode *inode, const unsigned char *name, | 338 | extern int fat_search_long(struct inode *inode, const unsigned char *name, |
| 339 | int name_len, struct fat_slot_info *sinfo); | 339 | int name_len, struct fat_slot_info *sinfo); |
| 340 | extern int fat_dir_empty(struct inode *dir); | 340 | extern int fat_dir_empty(struct inode *dir); |
| @@ -397,7 +397,7 @@ extern int fat_count_free_clusters(struct super_block *sb); | |||
| 397 | /* fat/file.c */ | 397 | /* fat/file.c */ |
| 398 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, | 398 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, |
| 399 | unsigned int cmd, unsigned long arg); | 399 | unsigned int cmd, unsigned long arg); |
| 400 | extern struct file_operations fat_file_operations; | 400 | extern const struct file_operations fat_file_operations; |
| 401 | extern struct inode_operations fat_file_inode_operations; | 401 | extern struct inode_operations fat_file_inode_operations; |
| 402 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); | 402 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); |
| 403 | extern void fat_truncate(struct inode *inode); | 403 | extern void fat_truncate(struct inode *inode); |
| @@ -420,6 +420,9 @@ extern int date_dos2unix(unsigned short time, unsigned short date); | |||
| 420 | extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date); | 420 | extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date); |
| 421 | extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); | 421 | extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); |
| 422 | 422 | ||
| 423 | int fat_cache_init(void); | ||
| 424 | void fat_cache_destroy(void); | ||
| 425 | |||
| 423 | #endif /* __KERNEL__ */ | 426 | #endif /* __KERNEL__ */ |
| 424 | 427 | ||
| 425 | #endif | 428 | #endif |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index e01342568530..96dc237b8f03 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
| @@ -209,7 +209,7 @@ void ncp_update_inode2(struct inode *, struct ncp_entry_info *); | |||
| 209 | 209 | ||
| 210 | /* linux/fs/ncpfs/dir.c */ | 210 | /* linux/fs/ncpfs/dir.c */ |
| 211 | extern struct inode_operations ncp_dir_inode_operations; | 211 | extern struct inode_operations ncp_dir_inode_operations; |
| 212 | extern struct file_operations ncp_dir_operations; | 212 | extern const struct file_operations ncp_dir_operations; |
| 213 | int ncp_conn_logged_in(struct super_block *); | 213 | int ncp_conn_logged_in(struct super_block *); |
| 214 | int ncp_date_dos2unix(__le16 time, __le16 date); | 214 | int ncp_date_dos2unix(__le16 time, __le16 date); |
| 215 | void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); | 215 | void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); |
| @@ -230,7 +230,7 @@ void ncp_unlock_server(struct ncp_server *server); | |||
| 230 | 230 | ||
| 231 | /* linux/fs/ncpfs/file.c */ | 231 | /* linux/fs/ncpfs/file.c */ |
| 232 | extern struct inode_operations ncp_file_inode_operations; | 232 | extern struct inode_operations ncp_file_inode_operations; |
| 233 | extern struct file_operations ncp_file_operations; | 233 | extern const struct file_operations ncp_file_operations; |
| 234 | int ncp_make_open(struct inode *, int); | 234 | int ncp_make_open(struct inode *, int); |
| 235 | 235 | ||
| 236 | /* linux/fs/ncpfs/mmap.c */ | 236 | /* linux/fs/ncpfs/mmap.c */ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index f32d75c4f4cf..d54d7b278e96 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
| @@ -308,29 +308,30 @@ DECLARE_PER_CPU(struct ip_conntrack_ecache, ip_conntrack_ecache); | |||
| 308 | 308 | ||
| 309 | #define CONNTRACK_ECACHE(x) (__get_cpu_var(ip_conntrack_ecache).x) | 309 | #define CONNTRACK_ECACHE(x) (__get_cpu_var(ip_conntrack_ecache).x) |
| 310 | 310 | ||
| 311 | extern struct notifier_block *ip_conntrack_chain; | 311 | extern struct atomic_notifier_head ip_conntrack_chain; |
| 312 | extern struct notifier_block *ip_conntrack_expect_chain; | 312 | extern struct atomic_notifier_head ip_conntrack_expect_chain; |
| 313 | 313 | ||
| 314 | static inline int ip_conntrack_register_notifier(struct notifier_block *nb) | 314 | static inline int ip_conntrack_register_notifier(struct notifier_block *nb) |
| 315 | { | 315 | { |
| 316 | return notifier_chain_register(&ip_conntrack_chain, nb); | 316 | return atomic_notifier_chain_register(&ip_conntrack_chain, nb); |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | static inline int ip_conntrack_unregister_notifier(struct notifier_block *nb) | 319 | static inline int ip_conntrack_unregister_notifier(struct notifier_block *nb) |
| 320 | { | 320 | { |
| 321 | return notifier_chain_unregister(&ip_conntrack_chain, nb); | 321 | return atomic_notifier_chain_unregister(&ip_conntrack_chain, nb); |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | static inline int | 324 | static inline int |
| 325 | ip_conntrack_expect_register_notifier(struct notifier_block *nb) | 325 | ip_conntrack_expect_register_notifier(struct notifier_block *nb) |
| 326 | { | 326 | { |
| 327 | return notifier_chain_register(&ip_conntrack_expect_chain, nb); | 327 | return atomic_notifier_chain_register(&ip_conntrack_expect_chain, nb); |
| 328 | } | 328 | } |
| 329 | 329 | ||
| 330 | static inline int | 330 | static inline int |
| 331 | ip_conntrack_expect_unregister_notifier(struct notifier_block *nb) | 331 | ip_conntrack_expect_unregister_notifier(struct notifier_block *nb) |
| 332 | { | 332 | { |
| 333 | return notifier_chain_unregister(&ip_conntrack_expect_chain, nb); | 333 | return atomic_notifier_chain_unregister(&ip_conntrack_expect_chain, |
| 334 | nb); | ||
| 334 | } | 335 | } |
| 335 | 336 | ||
| 336 | extern void ip_ct_deliver_cached_events(const struct ip_conntrack *ct); | 337 | extern void ip_ct_deliver_cached_events(const struct ip_conntrack *ct); |
| @@ -355,14 +356,14 @@ static inline void ip_conntrack_event(enum ip_conntrack_events event, | |||
| 355 | struct ip_conntrack *ct) | 356 | struct ip_conntrack *ct) |
| 356 | { | 357 | { |
| 357 | if (is_confirmed(ct) && !is_dying(ct)) | 358 | if (is_confirmed(ct) && !is_dying(ct)) |
| 358 | notifier_call_chain(&ip_conntrack_chain, event, ct); | 359 | atomic_notifier_call_chain(&ip_conntrack_chain, event, ct); |
| 359 | } | 360 | } |
| 360 | 361 | ||
| 361 | static inline void | 362 | static inline void |
| 362 | ip_conntrack_expect_event(enum ip_conntrack_expect_events event, | 363 | ip_conntrack_expect_event(enum ip_conntrack_expect_events event, |
| 363 | struct ip_conntrack_expect *exp) | 364 | struct ip_conntrack_expect *exp) |
| 364 | { | 365 | { |
| 365 | notifier_call_chain(&ip_conntrack_expect_chain, event, exp); | 366 | atomic_notifier_call_chain(&ip_conntrack_expect_chain, event, exp); |
| 366 | } | 367 | } |
| 367 | #else /* CONFIG_IP_NF_CONNTRACK_EVENTS */ | 368 | #else /* CONFIG_IP_NF_CONNTRACK_EVENTS */ |
| 368 | static inline void ip_conntrack_event_cache(enum ip_conntrack_events event, | 369 | static inline void ip_conntrack_event_cache(enum ip_conntrack_events event, |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index cbebd7d1b9e8..c71227dd4389 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -324,7 +324,7 @@ extern struct inode_operations nfs_file_inode_operations; | |||
| 324 | #ifdef CONFIG_NFS_V3 | 324 | #ifdef CONFIG_NFS_V3 |
| 325 | extern struct inode_operations nfs3_file_inode_operations; | 325 | extern struct inode_operations nfs3_file_inode_operations; |
| 326 | #endif /* CONFIG_NFS_V3 */ | 326 | #endif /* CONFIG_NFS_V3 */ |
| 327 | extern struct file_operations nfs_file_operations; | 327 | extern const struct file_operations nfs_file_operations; |
| 328 | extern struct address_space_operations nfs_file_aops; | 328 | extern struct address_space_operations nfs_file_aops; |
| 329 | 329 | ||
| 330 | static inline struct rpc_cred *nfs_file_cred(struct file *file) | 330 | static inline struct rpc_cred *nfs_file_cred(struct file *file) |
| @@ -371,7 +371,7 @@ extern struct inode_operations nfs_dir_inode_operations; | |||
| 371 | #ifdef CONFIG_NFS_V3 | 371 | #ifdef CONFIG_NFS_V3 |
| 372 | extern struct inode_operations nfs3_dir_inode_operations; | 372 | extern struct inode_operations nfs3_dir_inode_operations; |
| 373 | #endif /* CONFIG_NFS_V3 */ | 373 | #endif /* CONFIG_NFS_V3 */ |
| 374 | extern struct file_operations nfs_dir_operations; | 374 | extern const struct file_operations nfs_dir_operations; |
| 375 | extern struct dentry_operations nfs_dentry_operations; | 375 | extern struct dentry_operations nfs_dentry_operations; |
| 376 | 376 | ||
| 377 | extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr); | 377 | extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr); |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 6bad4766d3d9..d2a8abb5011a 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
| @@ -67,7 +67,8 @@ struct svc_expkey { | |||
| 67 | int ek_fsidtype; | 67 | int ek_fsidtype; |
| 68 | u32 ek_fsid[3]; | 68 | u32 ek_fsid[3]; |
| 69 | 69 | ||
| 70 | struct svc_export * ek_export; | 70 | struct vfsmount * ek_mnt; |
| 71 | struct dentry * ek_dentry; | ||
| 71 | }; | 72 | }; |
| 72 | 73 | ||
| 73 | #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) | 74 | #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) |
| @@ -85,9 +86,6 @@ void nfsd_export_shutdown(void); | |||
| 85 | void nfsd_export_flush(void); | 86 | void nfsd_export_flush(void); |
| 86 | void exp_readlock(void); | 87 | void exp_readlock(void); |
| 87 | void exp_readunlock(void); | 88 | void exp_readunlock(void); |
| 88 | struct svc_expkey * exp_find_key(struct auth_domain *clp, | ||
| 89 | int fsid_type, u32 *fsidv, | ||
| 90 | struct cache_req *reqp); | ||
| 91 | struct svc_export * exp_get_by_name(struct auth_domain *clp, | 89 | struct svc_export * exp_get_by_name(struct auth_domain *clp, |
| 92 | struct vfsmount *mnt, | 90 | struct vfsmount *mnt, |
| 93 | struct dentry *dentry, | 91 | struct dentry *dentry, |
| @@ -101,35 +99,20 @@ int exp_rootfh(struct auth_domain *, | |||
| 101 | int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); | 99 | int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); |
| 102 | int nfserrno(int errno); | 100 | int nfserrno(int errno); |
| 103 | 101 | ||
| 104 | extern void expkey_put(struct cache_head *item, struct cache_detail *cd); | 102 | extern struct cache_detail svc_export_cache; |
| 105 | extern void svc_export_put(struct cache_head *item, struct cache_detail *cd); | ||
| 106 | extern struct cache_detail svc_export_cache, svc_expkey_cache; | ||
| 107 | 103 | ||
| 108 | static inline void exp_put(struct svc_export *exp) | 104 | static inline void exp_put(struct svc_export *exp) |
| 109 | { | 105 | { |
| 110 | svc_export_put(&exp->h, &svc_export_cache); | 106 | cache_put(&exp->h, &svc_export_cache); |
| 111 | } | 107 | } |
| 112 | 108 | ||
| 113 | static inline void exp_get(struct svc_export *exp) | 109 | static inline void exp_get(struct svc_export *exp) |
| 114 | { | 110 | { |
| 115 | cache_get(&exp->h); | 111 | cache_get(&exp->h); |
| 116 | } | 112 | } |
| 117 | static inline struct svc_export * | 113 | extern struct svc_export * |
| 118 | exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, | 114 | exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, |
| 119 | struct cache_req *reqp) | 115 | struct cache_req *reqp); |
| 120 | { | ||
| 121 | struct svc_expkey *ek = exp_find_key(clp, fsid_type, fsidv, reqp); | ||
| 122 | if (ek && !IS_ERR(ek)) { | ||
| 123 | struct svc_export *exp = ek->ek_export; | ||
| 124 | int err; | ||
| 125 | exp_get(exp); | ||
| 126 | expkey_put(&ek->h, &svc_expkey_cache); | ||
| 127 | if ((err = cache_check(&svc_export_cache, &exp->h, reqp))) | ||
| 128 | exp = ERR_PTR(err); | ||
| 129 | return exp; | ||
| 130 | } else | ||
| 131 | return ERR_PTR(PTR_ERR(ek)); | ||
| 132 | } | ||
| 133 | 116 | ||
| 134 | #endif /* __KERNEL__ */ | 117 | #endif /* __KERNEL__ */ |
| 135 | 118 | ||
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index b959a4525cbd..1a9ef3e627d1 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
| @@ -350,11 +350,15 @@ extern nodemask_t node_possible_map; | |||
| 350 | #define num_possible_nodes() nodes_weight(node_possible_map) | 350 | #define num_possible_nodes() nodes_weight(node_possible_map) |
| 351 | #define node_online(node) node_isset((node), node_online_map) | 351 | #define node_online(node) node_isset((node), node_online_map) |
| 352 | #define node_possible(node) node_isset((node), node_possible_map) | 352 | #define node_possible(node) node_isset((node), node_possible_map) |
| 353 | #define first_online_node first_node(node_online_map) | ||
| 354 | #define next_online_node(nid) next_node((nid), node_online_map) | ||
| 353 | #else | 355 | #else |
| 354 | #define num_online_nodes() 1 | 356 | #define num_online_nodes() 1 |
| 355 | #define num_possible_nodes() 1 | 357 | #define num_possible_nodes() 1 |
| 356 | #define node_online(node) ((node) == 0) | 358 | #define node_online(node) ((node) == 0) |
| 357 | #define node_possible(node) ((node) == 0) | 359 | #define node_possible(node) ((node) == 0) |
| 360 | #define first_online_node 0 | ||
| 361 | #define next_online_node(nid) (MAX_NUMNODES) | ||
| 358 | #endif | 362 | #endif |
| 359 | 363 | ||
| 360 | #define any_online_node(mask) \ | 364 | #define any_online_node(mask) \ |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 5937dd6053c3..51dbab9710c7 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
| @@ -10,25 +10,107 @@ | |||
| 10 | #ifndef _LINUX_NOTIFIER_H | 10 | #ifndef _LINUX_NOTIFIER_H |
| 11 | #define _LINUX_NOTIFIER_H | 11 | #define _LINUX_NOTIFIER_H |
| 12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
| 13 | #include <linux/mutex.h> | ||
| 14 | #include <linux/rwsem.h> | ||
| 13 | 15 | ||
| 14 | struct notifier_block | 16 | /* |
| 15 | { | 17 | * Notifier chains are of three types: |
| 16 | int (*notifier_call)(struct notifier_block *self, unsigned long, void *); | 18 | * |
| 19 | * Atomic notifier chains: Chain callbacks run in interrupt/atomic | ||
| 20 | * context. Callouts are not allowed to block. | ||
| 21 | * Blocking notifier chains: Chain callbacks run in process context. | ||
| 22 | * Callouts are allowed to block. | ||
| 23 | * Raw notifier chains: There are no restrictions on callbacks, | ||
| 24 | * registration, or unregistration. All locking and protection | ||
| 25 | * must be provided by the caller. | ||
| 26 | * | ||
| 27 | * atomic_notifier_chain_register() may be called from an atomic context, | ||
| 28 | * but blocking_notifier_chain_register() must be called from a process | ||
| 29 | * context. Ditto for the corresponding _unregister() routines. | ||
| 30 | * | ||
| 31 | * atomic_notifier_chain_unregister() and blocking_notifier_chain_unregister() | ||
| 32 | * _must not_ be called from within the call chain. | ||
| 33 | */ | ||
| 34 | |||
| 35 | struct notifier_block { | ||
| 36 | int (*notifier_call)(struct notifier_block *, unsigned long, void *); | ||
| 17 | struct notifier_block *next; | 37 | struct notifier_block *next; |
| 18 | int priority; | 38 | int priority; |
| 19 | }; | 39 | }; |
| 20 | 40 | ||
| 41 | struct atomic_notifier_head { | ||
| 42 | spinlock_t lock; | ||
| 43 | struct notifier_block *head; | ||
| 44 | }; | ||
| 45 | |||
| 46 | struct blocking_notifier_head { | ||
| 47 | struct rw_semaphore rwsem; | ||
| 48 | struct notifier_block *head; | ||
| 49 | }; | ||
| 50 | |||
| 51 | struct raw_notifier_head { | ||
| 52 | struct notifier_block *head; | ||
| 53 | }; | ||
| 54 | |||
| 55 | #define ATOMIC_INIT_NOTIFIER_HEAD(name) do { \ | ||
| 56 | spin_lock_init(&(name)->lock); \ | ||
| 57 | (name)->head = NULL; \ | ||
| 58 | } while (0) | ||
| 59 | #define BLOCKING_INIT_NOTIFIER_HEAD(name) do { \ | ||
| 60 | init_rwsem(&(name)->rwsem); \ | ||
| 61 | (name)->head = NULL; \ | ||
| 62 | } while (0) | ||
| 63 | #define RAW_INIT_NOTIFIER_HEAD(name) do { \ | ||
| 64 | (name)->head = NULL; \ | ||
| 65 | } while (0) | ||
| 66 | |||
| 67 | #define ATOMIC_NOTIFIER_INIT(name) { \ | ||
| 68 | .lock = SPIN_LOCK_UNLOCKED, \ | ||
| 69 | .head = NULL } | ||
| 70 | #define BLOCKING_NOTIFIER_INIT(name) { \ | ||
| 71 | .rwsem = __RWSEM_INITIALIZER((name).rwsem), \ | ||
| 72 | .head = NULL } | ||
| 73 | #define RAW_NOTIFIER_INIT(name) { \ | ||
| 74 | .head = NULL } | ||
| 75 | |||
| 76 | #define ATOMIC_NOTIFIER_HEAD(name) \ | ||
| 77 | struct atomic_notifier_head name = \ | ||
| 78 | ATOMIC_NOTIFIER_INIT(name) | ||
| 79 | #define BLOCKING_NOTIFIER_HEAD(name) \ | ||
| 80 | struct blocking_notifier_head name = \ | ||
| 81 | BLOCKING_NOTIFIER_INIT(name) | ||
| 82 | #define RAW_NOTIFIER_HEAD(name) \ | ||
| 83 | struct raw_notifier_head name = \ | ||
| 84 | RAW_NOTIFIER_INIT(name) | ||
| 21 | 85 | ||
| 22 | #ifdef __KERNEL__ | 86 | #ifdef __KERNEL__ |
| 23 | 87 | ||
| 24 | extern int notifier_chain_register(struct notifier_block **list, struct notifier_block *n); | 88 | extern int atomic_notifier_chain_register(struct atomic_notifier_head *, |
| 25 | extern int notifier_chain_unregister(struct notifier_block **nl, struct notifier_block *n); | 89 | struct notifier_block *); |
| 26 | extern int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v); | 90 | extern int blocking_notifier_chain_register(struct blocking_notifier_head *, |
| 91 | struct notifier_block *); | ||
| 92 | extern int raw_notifier_chain_register(struct raw_notifier_head *, | ||
| 93 | struct notifier_block *); | ||
| 94 | |||
| 95 | extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *, | ||
| 96 | struct notifier_block *); | ||
| 97 | extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *, | ||
| 98 | struct notifier_block *); | ||
| 99 | extern int raw_notifier_chain_unregister(struct raw_notifier_head *, | ||
| 100 | struct notifier_block *); | ||
| 101 | |||
| 102 | extern int atomic_notifier_call_chain(struct atomic_notifier_head *, | ||
| 103 | unsigned long val, void *v); | ||
| 104 | extern int blocking_notifier_call_chain(struct blocking_notifier_head *, | ||
| 105 | unsigned long val, void *v); | ||
| 106 | extern int raw_notifier_call_chain(struct raw_notifier_head *, | ||
| 107 | unsigned long val, void *v); | ||
| 27 | 108 | ||
| 28 | #define NOTIFY_DONE 0x0000 /* Don't care */ | 109 | #define NOTIFY_DONE 0x0000 /* Don't care */ |
| 29 | #define NOTIFY_OK 0x0001 /* Suits me */ | 110 | #define NOTIFY_OK 0x0001 /* Suits me */ |
| 30 | #define NOTIFY_STOP_MASK 0x8000 /* Don't call further */ | 111 | #define NOTIFY_STOP_MASK 0x8000 /* Don't call further */ |
| 31 | #define NOTIFY_BAD (NOTIFY_STOP_MASK|0x0002) /* Bad/Veto action */ | 112 | #define NOTIFY_BAD (NOTIFY_STOP_MASK|0x0002) |
| 113 | /* Bad/Veto action */ | ||
| 32 | /* | 114 | /* |
| 33 | * Clean way to return from the notifier and stop further calls. | 115 | * Clean way to return from the notifier and stop further calls. |
| 34 | */ | 116 | */ |
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 559c4c38a9c7..0d514b252454 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
| @@ -61,6 +61,16 @@ void oprofile_arch_exit(void); | |||
| 61 | */ | 61 | */ |
| 62 | void oprofile_add_sample(struct pt_regs * const regs, unsigned long event); | 62 | void oprofile_add_sample(struct pt_regs * const regs, unsigned long event); |
| 63 | 63 | ||
| 64 | /** | ||
| 65 | * Add an extended sample. Use this when the PC is not from the regs, and | ||
| 66 | * we cannot determine if we're in kernel mode from the regs. | ||
| 67 | * | ||
| 68 | * This function does perform a backtrace. | ||
| 69 | * | ||
| 70 | */ | ||
| 71 | void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, | ||
| 72 | unsigned long event, int is_kernel); | ||
| 73 | |||
| 64 | /* Use this instead when the PC value is not from the regs. Doesn't | 74 | /* Use this instead when the PC value is not from the regs. Doesn't |
| 65 | * backtrace. */ | 75 | * backtrace. */ |
| 66 | void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event); | 76 | void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event); |
| @@ -74,10 +84,10 @@ void oprofile_add_trace(unsigned long eip); | |||
| 74 | * the specified file operations. | 84 | * the specified file operations. |
| 75 | */ | 85 | */ |
| 76 | int oprofilefs_create_file(struct super_block * sb, struct dentry * root, | 86 | int oprofilefs_create_file(struct super_block * sb, struct dentry * root, |
| 77 | char const * name, struct file_operations * fops); | 87 | char const * name, const struct file_operations * fops); |
| 78 | 88 | ||
| 79 | int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root, | 89 | int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root, |
| 80 | char const * name, struct file_operations * fops, int perm); | 90 | char const * name, const struct file_operations * fops, int perm); |
| 81 | 91 | ||
| 82 | /** Create a file for read/write access to an unsigned long. */ | 92 | /** Create a file for read/write access to an unsigned long. */ |
| 83 | int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root, | 93 | int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root, |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 6f080ae59286..e2ab2ac18d6b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -642,6 +642,7 @@ | |||
| 642 | #define PCI_DEVICE_ID_SI_965 0x0965 | 642 | #define PCI_DEVICE_ID_SI_965 0x0965 |
| 643 | #define PCI_DEVICE_ID_SI_5511 0x5511 | 643 | #define PCI_DEVICE_ID_SI_5511 0x5511 |
| 644 | #define PCI_DEVICE_ID_SI_5513 0x5513 | 644 | #define PCI_DEVICE_ID_SI_5513 0x5513 |
| 645 | #define PCI_DEVICE_ID_SI_5517 0x5517 | ||
| 645 | #define PCI_DEVICE_ID_SI_5518 0x5518 | 646 | #define PCI_DEVICE_ID_SI_5518 0x5518 |
| 646 | #define PCI_DEVICE_ID_SI_5571 0x5571 | 647 | #define PCI_DEVICE_ID_SI_5571 0x5571 |
| 647 | #define PCI_DEVICE_ID_SI_5581 0x5581 | 648 | #define PCI_DEVICE_ID_SI_5581 0x5581 |
| @@ -1052,6 +1053,7 @@ | |||
| 1052 | #define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6600_ALT2 0x00f2 | 1053 | #define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6600_ALT2 0x00f2 |
| 1053 | #define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6200_ALT1 0x00f3 | 1054 | #define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6200_ALT1 0x00f3 |
| 1054 | #define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_GT 0x00f9 | 1055 | #define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_GT 0x00f9 |
| 1056 | #define PCIE_DEVICE_ID_NVIDIA_QUADRO_NVS280 0x00fd | ||
| 1055 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 | 1057 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 |
| 1056 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 | 1058 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 |
| 1057 | #define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103 | 1059 | #define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103 |
diff --git a/include/linux/pfn.h b/include/linux/pfn.h new file mode 100644 index 000000000000..bb01f8b92b56 --- /dev/null +++ b/include/linux/pfn.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #ifndef _LINUX_PFN_H_ | ||
| 2 | #define _LINUX_PFN_H_ | ||
| 3 | |||
| 4 | #define PFN_ALIGN(x) (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK) | ||
| 5 | #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) | ||
| 6 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) | ||
| 7 | #define PFN_PHYS(x) ((x) << PAGE_SHIFT) | ||
| 8 | |||
| 9 | #endif | ||
diff --git a/include/linux/poll.h b/include/linux/poll.h index 8e8f6098508a..51e1b56741fb 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
| @@ -11,6 +11,15 @@ | |||
| 11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
| 12 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
| 13 | 13 | ||
| 14 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating | ||
| 15 | additional memory. */ | ||
| 16 | #define MAX_STACK_ALLOC 832 | ||
| 17 | #define FRONTEND_STACK_ALLOC 256 | ||
| 18 | #define SELECT_STACK_ALLOC FRONTEND_STACK_ALLOC | ||
| 19 | #define POLL_STACK_ALLOC FRONTEND_STACK_ALLOC | ||
| 20 | #define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) | ||
| 21 | #define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) | ||
| 22 | |||
| 14 | struct poll_table_struct; | 23 | struct poll_table_struct; |
| 15 | 24 | ||
| 16 | /* | 25 | /* |
| @@ -33,6 +42,12 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) | |||
| 33 | pt->qproc = qproc; | 42 | pt->qproc = qproc; |
| 34 | } | 43 | } |
| 35 | 44 | ||
| 45 | struct poll_table_entry { | ||
| 46 | struct file * filp; | ||
| 47 | wait_queue_t wait; | ||
| 48 | wait_queue_head_t * wait_address; | ||
| 49 | }; | ||
| 50 | |||
| 36 | /* | 51 | /* |
| 37 | * Structures and helpers for sys_poll/sys_poll | 52 | * Structures and helpers for sys_poll/sys_poll |
| 38 | */ | 53 | */ |
| @@ -40,6 +55,8 @@ struct poll_wqueues { | |||
| 40 | poll_table pt; | 55 | poll_table pt; |
| 41 | struct poll_table_page * table; | 56 | struct poll_table_page * table; |
| 42 | int error; | 57 | int error; |
| 58 | int inline_index; | ||
| 59 | struct poll_table_entry inline_entries[N_INLINE_POLL_ENTRIES]; | ||
| 43 | }; | 60 | }; |
| 44 | 61 | ||
| 45 | extern void poll_initwait(struct poll_wqueues *pwq); | 62 | extern void poll_initwait(struct poll_wqueues *pwq); |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index cb224cf653b1..135871df9911 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
| @@ -58,7 +58,7 @@ struct proc_dir_entry { | |||
| 58 | gid_t gid; | 58 | gid_t gid; |
| 59 | loff_t size; | 59 | loff_t size; |
| 60 | struct inode_operations * proc_iops; | 60 | struct inode_operations * proc_iops; |
| 61 | struct file_operations * proc_fops; | 61 | const struct file_operations * proc_fops; |
| 62 | get_info_t *get_info; | 62 | get_info_t *get_info; |
| 63 | struct module *owner; | 63 | struct module *owner; |
| 64 | struct proc_dir_entry *next, *parent, *subdir; | 64 | struct proc_dir_entry *next, *parent, *subdir; |
| @@ -128,9 +128,9 @@ extern int proc_match(int, const char *,struct proc_dir_entry *); | |||
| 128 | extern int proc_readdir(struct file *, void *, filldir_t); | 128 | extern int proc_readdir(struct file *, void *, filldir_t); |
| 129 | extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); | 129 | extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); |
| 130 | 130 | ||
| 131 | extern struct file_operations proc_kcore_operations; | 131 | extern const struct file_operations proc_kcore_operations; |
| 132 | extern struct file_operations proc_kmsg_operations; | 132 | extern const struct file_operations proc_kmsg_operations; |
| 133 | extern struct file_operations ppc_htab_operations; | 133 | extern const struct file_operations ppc_htab_operations; |
| 134 | 134 | ||
| 135 | /* | 135 | /* |
| 136 | * proc_tty.c | 136 | * proc_tty.c |
| @@ -189,7 +189,7 @@ static inline struct proc_dir_entry *proc_net_create(const char *name, | |||
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | static inline struct proc_dir_entry *proc_net_fops_create(const char *name, | 191 | static inline struct proc_dir_entry *proc_net_fops_create(const char *name, |
| 192 | mode_t mode, struct file_operations *fops) | 192 | mode_t mode, const struct file_operations *fops) |
| 193 | { | 193 | { |
| 194 | struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net); | 194 | struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net); |
| 195 | if (res) | 195 | if (res) |
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h index fc610bb0f733..27f49c85d5d6 100644 --- a/include/linux/qnx4_fs.h +++ b/include/linux/qnx4_fs.h | |||
| @@ -118,8 +118,8 @@ extern struct buffer_head *qnx4_bread(struct inode *, int, int); | |||
| 118 | 118 | ||
| 119 | extern struct inode_operations qnx4_file_inode_operations; | 119 | extern struct inode_operations qnx4_file_inode_operations; |
| 120 | extern struct inode_operations qnx4_dir_inode_operations; | 120 | extern struct inode_operations qnx4_dir_inode_operations; |
| 121 | extern struct file_operations qnx4_file_operations; | 121 | extern const struct file_operations qnx4_file_operations; |
| 122 | extern struct file_operations qnx4_dir_operations; | 122 | extern const struct file_operations qnx4_dir_operations; |
| 123 | extern int qnx4_is_free(struct super_block *sb, long block); | 123 | extern int qnx4_is_free(struct super_block *sb, long block); |
| 124 | extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy); | 124 | extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy); |
| 125 | extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd); | 125 | extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd); |
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index b6e0bcad84e1..66b44e5e0d6e 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
| @@ -92,7 +92,10 @@ extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | |||
| 92 | extern void md_super_wait(mddev_t *mddev); | 92 | extern void md_super_wait(mddev_t *mddev); |
| 93 | extern int sync_page_io(struct block_device *bdev, sector_t sector, int size, | 93 | extern int sync_page_io(struct block_device *bdev, sector_t sector, int size, |
| 94 | struct page *page, int rw); | 94 | struct page *page, int rw); |
| 95 | extern void md_do_sync(mddev_t *mddev); | ||
| 96 | extern void md_new_event(mddev_t *mddev); | ||
| 95 | 97 | ||
| 98 | extern void md_update_sb(mddev_t * mddev); | ||
| 96 | 99 | ||
| 97 | #define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } | 100 | #define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } |
| 98 | 101 | ||
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 617b9506c760..e2df61f5b09a 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
| @@ -132,6 +132,14 @@ struct mddev_s | |||
| 132 | 132 | ||
| 133 | char uuid[16]; | 133 | char uuid[16]; |
| 134 | 134 | ||
| 135 | /* If the array is being reshaped, we need to record the | ||
| 136 | * new shape and an indication of where we are up to. | ||
| 137 | * This is written to the superblock. | ||
| 138 | * If reshape_position is MaxSector, then no reshape is happening (yet). | ||
| 139 | */ | ||
| 140 | sector_t reshape_position; | ||
| 141 | int delta_disks, new_level, new_layout, new_chunk; | ||
| 142 | |||
| 135 | struct mdk_thread_s *thread; /* management thread */ | 143 | struct mdk_thread_s *thread; /* management thread */ |
| 136 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ | 144 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ |
| 137 | sector_t curr_resync; /* blocks scheduled */ | 145 | sector_t curr_resync; /* blocks scheduled */ |
| @@ -143,6 +151,10 @@ struct mddev_s | |||
| 143 | sector_t resync_mismatches; /* count of sectors where | 151 | sector_t resync_mismatches; /* count of sectors where |
| 144 | * parity/replica mismatch found | 152 | * parity/replica mismatch found |
| 145 | */ | 153 | */ |
| 154 | |||
| 155 | /* allow user-space to request suspension of IO to regions of the array */ | ||
| 156 | sector_t suspend_lo; | ||
| 157 | sector_t suspend_hi; | ||
| 146 | /* if zero, use the system-wide default */ | 158 | /* if zero, use the system-wide default */ |
| 147 | int sync_speed_min; | 159 | int sync_speed_min; |
| 148 | int sync_speed_max; | 160 | int sync_speed_max; |
| @@ -157,6 +169,9 @@ struct mddev_s | |||
| 157 | * DONE: thread is done and is waiting to be reaped | 169 | * DONE: thread is done and is waiting to be reaped |
| 158 | * REQUEST: user-space has requested a sync (used with SYNC) | 170 | * REQUEST: user-space has requested a sync (used with SYNC) |
| 159 | * CHECK: user-space request for for check-only, no repair | 171 | * CHECK: user-space request for for check-only, no repair |
| 172 | * RESHAPE: A reshape is happening | ||
| 173 | * | ||
| 174 | * If neither SYNC or RESHAPE are set, then it is a recovery. | ||
| 160 | */ | 175 | */ |
| 161 | #define MD_RECOVERY_RUNNING 0 | 176 | #define MD_RECOVERY_RUNNING 0 |
| 162 | #define MD_RECOVERY_SYNC 1 | 177 | #define MD_RECOVERY_SYNC 1 |
| @@ -166,10 +181,11 @@ struct mddev_s | |||
| 166 | #define MD_RECOVERY_NEEDED 5 | 181 | #define MD_RECOVERY_NEEDED 5 |
| 167 | #define MD_RECOVERY_REQUESTED 6 | 182 | #define MD_RECOVERY_REQUESTED 6 |
| 168 | #define MD_RECOVERY_CHECK 7 | 183 | #define MD_RECOVERY_CHECK 7 |
| 184 | #define MD_RECOVERY_RESHAPE 8 | ||
| 169 | unsigned long recovery; | 185 | unsigned long recovery; |
| 170 | 186 | ||
| 171 | int in_sync; /* know to not need resync */ | 187 | int in_sync; /* know to not need resync */ |
| 172 | struct semaphore reconfig_sem; | 188 | struct mutex reconfig_mutex; |
| 173 | atomic_t active; | 189 | atomic_t active; |
| 174 | 190 | ||
| 175 | int changed; /* true if we might need to reread partition info */ | 191 | int changed; /* true if we might need to reread partition info */ |
| @@ -249,7 +265,8 @@ struct mdk_personality | |||
| 249 | int (*spare_active) (mddev_t *mddev); | 265 | int (*spare_active) (mddev_t *mddev); |
| 250 | sector_t (*sync_request)(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster); | 266 | sector_t (*sync_request)(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster); |
| 251 | int (*resize) (mddev_t *mddev, sector_t sectors); | 267 | int (*resize) (mddev_t *mddev, sector_t sectors); |
| 252 | int (*reshape) (mddev_t *mddev, int raid_disks); | 268 | int (*check_reshape) (mddev_t *mddev); |
| 269 | int (*start_reshape) (mddev_t *mddev); | ||
| 253 | int (*reconfig) (mddev_t *mddev, int layout, int chunk_size); | 270 | int (*reconfig) (mddev_t *mddev, int layout, int chunk_size); |
| 254 | /* quiesce moves between quiescence states | 271 | /* quiesce moves between quiescence states |
| 255 | * 0 - fully active | 272 | * 0 - fully active |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index c100fa5d4bfa..774e1acfb8c4 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
| @@ -102,6 +102,18 @@ typedef struct mdp_device_descriptor_s { | |||
| 102 | #define MD_SB_ERRORS 1 | 102 | #define MD_SB_ERRORS 1 |
| 103 | 103 | ||
| 104 | #define MD_SB_BITMAP_PRESENT 8 /* bitmap may be present nearby */ | 104 | #define MD_SB_BITMAP_PRESENT 8 /* bitmap may be present nearby */ |
| 105 | |||
| 106 | /* | ||
| 107 | * Notes: | ||
| 108 | * - if an array is being reshaped (restriped) in order to change the | ||
| 109 | * the number of active devices in the array, 'raid_disks' will be | ||
| 110 | * the larger of the old and new numbers. 'delta_disks' will | ||
| 111 | * be the "new - old". So if +ve, raid_disks is the new value, and | ||
| 112 | * "raid_disks-delta_disks" is the old. If -ve, raid_disks is the | ||
| 113 | * old value and "raid_disks+delta_disks" is the new (smaller) value. | ||
| 114 | */ | ||
| 115 | |||
| 116 | |||
| 105 | typedef struct mdp_superblock_s { | 117 | typedef struct mdp_superblock_s { |
| 106 | /* | 118 | /* |
| 107 | * Constant generic information | 119 | * Constant generic information |
| @@ -146,7 +158,13 @@ typedef struct mdp_superblock_s { | |||
| 146 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ | 158 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ |
| 147 | #endif | 159 | #endif |
| 148 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ | 160 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ |
| 149 | __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 12]; | 161 | /* There are only valid for minor_version > 90 */ |
| 162 | __u64 reshape_position; /* 12,13 next address in array-space for reshape */ | ||
| 163 | __u32 new_level; /* 14 new level we are reshaping to */ | ||
| 164 | __u32 delta_disks; /* 15 change in number of raid_disks */ | ||
| 165 | __u32 new_layout; /* 16 new layout */ | ||
| 166 | __u32 new_chunk; /* 17 new chunk size (bytes) */ | ||
| 167 | __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 18]; | ||
| 150 | 168 | ||
| 151 | /* | 169 | /* |
| 152 | * Personality information | 170 | * Personality information |
| @@ -207,7 +225,14 @@ struct mdp_superblock_1 { | |||
| 207 | * NOTE: signed, so bitmap can be before superblock | 225 | * NOTE: signed, so bitmap can be before superblock |
| 208 | * only meaningful of feature_map[0] is set. | 226 | * only meaningful of feature_map[0] is set. |
| 209 | */ | 227 | */ |
| 210 | __u8 pad1[128-100]; /* set to 0 when written */ | 228 | |
| 229 | /* These are only valid with feature bit '4' */ | ||
| 230 | __u64 reshape_position; /* next address in array-space for reshape */ | ||
| 231 | __u32 new_level; /* new level we are reshaping to */ | ||
| 232 | __u32 delta_disks; /* change in number of raid_disks */ | ||
| 233 | __u32 new_layout; /* new layout */ | ||
| 234 | __u32 new_chunk; /* new chunk size (bytes) */ | ||
| 235 | __u8 pad1[128-124]; /* set to 0 when written */ | ||
| 211 | 236 | ||
| 212 | /* constant this-device information - 64 bytes */ | 237 | /* constant this-device information - 64 bytes */ |
| 213 | __u64 data_offset; /* sector start of data, often 0 */ | 238 | __u64 data_offset; /* sector start of data, often 0 */ |
| @@ -240,8 +265,9 @@ struct mdp_superblock_1 { | |||
| 240 | 265 | ||
| 241 | /* feature_map bits */ | 266 | /* feature_map bits */ |
| 242 | #define MD_FEATURE_BITMAP_OFFSET 1 | 267 | #define MD_FEATURE_BITMAP_OFFSET 1 |
| 268 | #define MD_FEATURE_RESHAPE_ACTIVE 4 | ||
| 243 | 269 | ||
| 244 | #define MD_FEATURE_ALL 1 | 270 | #define MD_FEATURE_ALL 5 |
| 245 | 271 | ||
| 246 | #endif | 272 | #endif |
| 247 | 273 | ||
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index 394da8207b34..914af667044f 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
| @@ -135,6 +135,7 @@ struct stripe_head { | |||
| 135 | atomic_t count; /* nr of active thread/requests */ | 135 | atomic_t count; /* nr of active thread/requests */ |
| 136 | spinlock_t lock; | 136 | spinlock_t lock; |
| 137 | int bm_seq; /* sequence number for bitmap flushes */ | 137 | int bm_seq; /* sequence number for bitmap flushes */ |
| 138 | int disks; /* disks in stripe */ | ||
| 138 | struct r5dev { | 139 | struct r5dev { |
| 139 | struct bio req; | 140 | struct bio req; |
| 140 | struct bio_vec vec; | 141 | struct bio_vec vec; |
| @@ -156,6 +157,7 @@ struct stripe_head { | |||
| 156 | #define R5_ReadError 8 /* seen a read error here recently */ | 157 | #define R5_ReadError 8 /* seen a read error here recently */ |
| 157 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ | 158 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ |
| 158 | 159 | ||
| 160 | #define R5_Expanded 10 /* This block now has post-expand data */ | ||
| 159 | /* | 161 | /* |
| 160 | * Write method | 162 | * Write method |
| 161 | */ | 163 | */ |
| @@ -174,7 +176,9 @@ struct stripe_head { | |||
| 174 | #define STRIPE_DELAYED 6 | 176 | #define STRIPE_DELAYED 6 |
| 175 | #define STRIPE_DEGRADED 7 | 177 | #define STRIPE_DEGRADED 7 |
| 176 | #define STRIPE_BIT_DELAY 8 | 178 | #define STRIPE_BIT_DELAY 8 |
| 177 | 179 | #define STRIPE_EXPANDING 9 | |
| 180 | #define STRIPE_EXPAND_SOURCE 10 | ||
| 181 | #define STRIPE_EXPAND_READY 11 | ||
| 178 | /* | 182 | /* |
| 179 | * Plugging: | 183 | * Plugging: |
| 180 | * | 184 | * |
| @@ -211,12 +215,24 @@ struct raid5_private_data { | |||
| 211 | int raid_disks, working_disks, failed_disks; | 215 | int raid_disks, working_disks, failed_disks; |
| 212 | int max_nr_stripes; | 216 | int max_nr_stripes; |
| 213 | 217 | ||
| 218 | /* used during an expand */ | ||
| 219 | sector_t expand_progress; /* MaxSector when no expand happening */ | ||
| 220 | sector_t expand_lo; /* from here up to expand_progress it out-of-bounds | ||
| 221 | * as we haven't flushed the metadata yet | ||
| 222 | */ | ||
| 223 | int previous_raid_disks; | ||
| 224 | |||
| 214 | struct list_head handle_list; /* stripes needing handling */ | 225 | struct list_head handle_list; /* stripes needing handling */ |
| 215 | struct list_head delayed_list; /* stripes that have plugged requests */ | 226 | struct list_head delayed_list; /* stripes that have plugged requests */ |
| 216 | struct list_head bitmap_list; /* stripes delaying awaiting bitmap update */ | 227 | struct list_head bitmap_list; /* stripes delaying awaiting bitmap update */ |
| 217 | atomic_t preread_active_stripes; /* stripes with scheduled io */ | 228 | atomic_t preread_active_stripes; /* stripes with scheduled io */ |
| 218 | 229 | ||
| 219 | char cache_name[20]; | 230 | atomic_t reshape_stripes; /* stripes with pending writes for reshape */ |
| 231 | /* unfortunately we need two cache names as we temporarily have | ||
| 232 | * two caches. | ||
| 233 | */ | ||
| 234 | int active_name; | ||
| 235 | char cache_name[2][20]; | ||
| 220 | kmem_cache_t *slab_cache; /* for allocating stripes */ | 236 | kmem_cache_t *slab_cache; /* for allocating stripes */ |
| 221 | 237 | ||
| 222 | int seq_flush, seq_write; | 238 | int seq_flush, seq_write; |
| @@ -238,9 +254,10 @@ struct raid5_private_data { | |||
| 238 | wait_queue_head_t wait_for_overlap; | 254 | wait_queue_head_t wait_for_overlap; |
| 239 | int inactive_blocked; /* release of inactive stripes blocked, | 255 | int inactive_blocked; /* release of inactive stripes blocked, |
| 240 | * waiting for 25% to be free | 256 | * waiting for 25% to be free |
| 241 | */ | 257 | */ |
| 258 | int pool_size; /* number of disks in stripeheads in pool */ | ||
| 242 | spinlock_t device_lock; | 259 | spinlock_t device_lock; |
| 243 | struct disk_info disks[0]; | 260 | struct disk_info *disks; |
| 244 | }; | 261 | }; |
| 245 | 262 | ||
| 246 | typedef struct raid5_private_data raid5_conf_t; | 263 | typedef struct raid5_private_data raid5_conf_t; |
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index 953b6df5d037..78ecfa28b1c2 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
| @@ -15,7 +15,7 @@ extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, | |||
| 15 | extern int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma); | 15 | extern int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma); |
| 16 | #endif | 16 | #endif |
| 17 | 17 | ||
| 18 | extern struct file_operations ramfs_file_operations; | 18 | extern const struct file_operations ramfs_file_operations; |
| 19 | extern struct vm_operations_struct generic_file_vm_ops; | 19 | extern struct vm_operations_struct generic_file_vm_ops; |
| 20 | 20 | ||
| 21 | #endif | 21 | #endif |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 912f1b7cb18f..5676c4210e2c 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
| @@ -1960,7 +1960,7 @@ int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset, | |||
| 1960 | extern struct inode_operations reiserfs_dir_inode_operations; | 1960 | extern struct inode_operations reiserfs_dir_inode_operations; |
| 1961 | extern struct inode_operations reiserfs_symlink_inode_operations; | 1961 | extern struct inode_operations reiserfs_symlink_inode_operations; |
| 1962 | extern struct inode_operations reiserfs_special_inode_operations; | 1962 | extern struct inode_operations reiserfs_special_inode_operations; |
| 1963 | extern struct file_operations reiserfs_dir_operations; | 1963 | extern const struct file_operations reiserfs_dir_operations; |
| 1964 | 1964 | ||
| 1965 | /* tail_conversion.c */ | 1965 | /* tail_conversion.c */ |
| 1966 | int direct2indirect(struct reiserfs_transaction_handle *, struct inode *, | 1966 | int direct2indirect(struct reiserfs_transaction_handle *, struct inode *, |
| @@ -1972,7 +1972,7 @@ void reiserfs_unmap_buffer(struct buffer_head *); | |||
| 1972 | 1972 | ||
| 1973 | /* file.c */ | 1973 | /* file.c */ |
| 1974 | extern struct inode_operations reiserfs_file_inode_operations; | 1974 | extern struct inode_operations reiserfs_file_inode_operations; |
| 1975 | extern struct file_operations reiserfs_file_operations; | 1975 | extern const struct file_operations reiserfs_file_operations; |
| 1976 | extern struct address_space_operations reiserfs_address_space_operations; | 1976 | extern struct address_space_operations reiserfs_address_space_operations; |
| 1977 | 1977 | ||
| 1978 | /* fix_nodes.c */ | 1978 | /* fix_nodes.c */ |
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h deleted file mode 100644 index 7342e66247fb..000000000000 --- a/include/linux/relayfs_fs.h +++ /dev/null | |||
| @@ -1,287 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/linux/relayfs_fs.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002, 2003 - Tom Zanussi (zanussi@us.ibm.com), IBM Corp | ||
| 5 | * Copyright (C) 1999, 2000, 2001, 2002 - Karim Yaghmour (karim@opersys.com) | ||
| 6 | * | ||
| 7 | * RelayFS definitions and declarations | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _LINUX_RELAYFS_FS_H | ||
| 11 | #define _LINUX_RELAYFS_FS_H | ||
| 12 | |||
| 13 | #include <linux/config.h> | ||
| 14 | #include <linux/types.h> | ||
| 15 | #include <linux/sched.h> | ||
| 16 | #include <linux/wait.h> | ||
| 17 | #include <linux/list.h> | ||
| 18 | #include <linux/fs.h> | ||
| 19 | #include <linux/poll.h> | ||
| 20 | #include <linux/kref.h> | ||
| 21 | |||
| 22 | /* | ||
| 23 | * Tracks changes to rchan/rchan_buf structs | ||
| 24 | */ | ||
| 25 | #define RELAYFS_CHANNEL_VERSION 6 | ||
| 26 | |||
| 27 | /* | ||
| 28 | * Per-cpu relay channel buffer | ||
| 29 | */ | ||
| 30 | struct rchan_buf | ||
| 31 | { | ||
| 32 | void *start; /* start of channel buffer */ | ||
| 33 | void *data; /* start of current sub-buffer */ | ||
| 34 | size_t offset; /* current offset into sub-buffer */ | ||
| 35 | size_t subbufs_produced; /* count of sub-buffers produced */ | ||
| 36 | size_t subbufs_consumed; /* count of sub-buffers consumed */ | ||
| 37 | struct rchan *chan; /* associated channel */ | ||
| 38 | wait_queue_head_t read_wait; /* reader wait queue */ | ||
| 39 | struct work_struct wake_readers; /* reader wake-up work struct */ | ||
| 40 | struct dentry *dentry; /* channel file dentry */ | ||
| 41 | struct kref kref; /* channel buffer refcount */ | ||
| 42 | struct page **page_array; /* array of current buffer pages */ | ||
| 43 | unsigned int page_count; /* number of current buffer pages */ | ||
| 44 | unsigned int finalized; /* buffer has been finalized */ | ||
| 45 | size_t *padding; /* padding counts per sub-buffer */ | ||
| 46 | size_t prev_padding; /* temporary variable */ | ||
| 47 | size_t bytes_consumed; /* bytes consumed in cur read subbuf */ | ||
| 48 | unsigned int cpu; /* this buf's cpu */ | ||
| 49 | } ____cacheline_aligned; | ||
| 50 | |||
| 51 | /* | ||
| 52 | * Relay channel data structure | ||
| 53 | */ | ||
| 54 | struct rchan | ||
| 55 | { | ||
| 56 | u32 version; /* the version of this struct */ | ||
| 57 | size_t subbuf_size; /* sub-buffer size */ | ||
| 58 | size_t n_subbufs; /* number of sub-buffers per buffer */ | ||
| 59 | size_t alloc_size; /* total buffer size allocated */ | ||
| 60 | struct rchan_callbacks *cb; /* client callbacks */ | ||
| 61 | struct kref kref; /* channel refcount */ | ||
| 62 | void *private_data; /* for user-defined data */ | ||
| 63 | size_t last_toobig; /* tried to log event > subbuf size */ | ||
| 64 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* | ||
| 68 | * Relay channel client callbacks | ||
| 69 | */ | ||
| 70 | struct rchan_callbacks | ||
| 71 | { | ||
| 72 | /* | ||
| 73 | * subbuf_start - called on buffer-switch to a new sub-buffer | ||
| 74 | * @buf: the channel buffer containing the new sub-buffer | ||
| 75 | * @subbuf: the start of the new sub-buffer | ||
| 76 | * @prev_subbuf: the start of the previous sub-buffer | ||
| 77 | * @prev_padding: unused space at the end of previous sub-buffer | ||
| 78 | * | ||
| 79 | * The client should return 1 to continue logging, 0 to stop | ||
| 80 | * logging. | ||
| 81 | * | ||
| 82 | * NOTE: subbuf_start will also be invoked when the buffer is | ||
| 83 | * created, so that the first sub-buffer can be initialized | ||
| 84 | * if necessary. In this case, prev_subbuf will be NULL. | ||
| 85 | * | ||
| 86 | * NOTE: the client can reserve bytes at the beginning of the new | ||
| 87 | * sub-buffer by calling subbuf_start_reserve() in this callback. | ||
| 88 | */ | ||
| 89 | int (*subbuf_start) (struct rchan_buf *buf, | ||
| 90 | void *subbuf, | ||
| 91 | void *prev_subbuf, | ||
| 92 | size_t prev_padding); | ||
| 93 | |||
| 94 | /* | ||
| 95 | * buf_mapped - relayfs buffer mmap notification | ||
| 96 | * @buf: the channel buffer | ||
| 97 | * @filp: relayfs file pointer | ||
| 98 | * | ||
| 99 | * Called when a relayfs file is successfully mmapped | ||
| 100 | */ | ||
| 101 | void (*buf_mapped)(struct rchan_buf *buf, | ||
| 102 | struct file *filp); | ||
| 103 | |||
| 104 | /* | ||
| 105 | * buf_unmapped - relayfs buffer unmap notification | ||
| 106 | * @buf: the channel buffer | ||
| 107 | * @filp: relayfs file pointer | ||
| 108 | * | ||
| 109 | * Called when a relayfs file is successfully unmapped | ||
| 110 | */ | ||
| 111 | void (*buf_unmapped)(struct rchan_buf *buf, | ||
| 112 | struct file *filp); | ||
| 113 | /* | ||
| 114 | * create_buf_file - create file to represent a relayfs channel buffer | ||
| 115 | * @filename: the name of the file to create | ||
| 116 | * @parent: the parent of the file to create | ||
| 117 | * @mode: the mode of the file to create | ||
| 118 | * @buf: the channel buffer | ||
| 119 | * @is_global: outparam - set non-zero if the buffer should be global | ||
| 120 | * | ||
| 121 | * Called during relay_open(), once for each per-cpu buffer, | ||
| 122 | * to allow the client to create a file to be used to | ||
| 123 | * represent the corresponding channel buffer. If the file is | ||
| 124 | * created outside of relayfs, the parent must also exist in | ||
| 125 | * that filesystem. | ||
| 126 | * | ||
| 127 | * The callback should return the dentry of the file created | ||
| 128 | * to represent the relay buffer. | ||
| 129 | * | ||
| 130 | * Setting the is_global outparam to a non-zero value will | ||
| 131 | * cause relay_open() to create a single global buffer rather | ||
| 132 | * than the default set of per-cpu buffers. | ||
| 133 | * | ||
| 134 | * See Documentation/filesystems/relayfs.txt for more info. | ||
| 135 | */ | ||
| 136 | struct dentry *(*create_buf_file)(const char *filename, | ||
| 137 | struct dentry *parent, | ||
| 138 | int mode, | ||
| 139 | struct rchan_buf *buf, | ||
| 140 | int *is_global); | ||
| 141 | |||
| 142 | /* | ||
| 143 | * remove_buf_file - remove file representing a relayfs channel buffer | ||
| 144 | * @dentry: the dentry of the file to remove | ||
| 145 | * | ||
| 146 | * Called during relay_close(), once for each per-cpu buffer, | ||
| 147 | * to allow the client to remove a file used to represent a | ||
| 148 | * channel buffer. | ||
| 149 | * | ||
| 150 | * The callback should return 0 if successful, negative if not. | ||
| 151 | */ | ||
| 152 | int (*remove_buf_file)(struct dentry *dentry); | ||
| 153 | }; | ||
| 154 | |||
| 155 | /* | ||
| 156 | * relayfs kernel API, fs/relayfs/relay.c | ||
| 157 | */ | ||
| 158 | |||
| 159 | struct rchan *relay_open(const char *base_filename, | ||
| 160 | struct dentry *parent, | ||
| 161 | size_t subbuf_size, | ||
| 162 | size_t n_subbufs, | ||
| 163 | struct rchan_callbacks *cb); | ||
| 164 | extern void relay_close(struct rchan *chan); | ||
| 165 | extern void relay_flush(struct rchan *chan); | ||
| 166 | extern void relay_subbufs_consumed(struct rchan *chan, | ||
| 167 | unsigned int cpu, | ||
| 168 | size_t consumed); | ||
| 169 | extern void relay_reset(struct rchan *chan); | ||
| 170 | extern int relay_buf_full(struct rchan_buf *buf); | ||
| 171 | |||
| 172 | extern size_t relay_switch_subbuf(struct rchan_buf *buf, | ||
| 173 | size_t length); | ||
| 174 | extern struct dentry *relayfs_create_dir(const char *name, | ||
| 175 | struct dentry *parent); | ||
| 176 | extern int relayfs_remove_dir(struct dentry *dentry); | ||
| 177 | extern struct dentry *relayfs_create_file(const char *name, | ||
| 178 | struct dentry *parent, | ||
| 179 | int mode, | ||
| 180 | struct file_operations *fops, | ||
| 181 | void *data); | ||
| 182 | extern int relayfs_remove_file(struct dentry *dentry); | ||
| 183 | |||
| 184 | /** | ||
| 185 | * relay_write - write data into the channel | ||
| 186 | * @chan: relay channel | ||
| 187 | * @data: data to be written | ||
| 188 | * @length: number of bytes to write | ||
| 189 | * | ||
| 190 | * Writes data into the current cpu's channel buffer. | ||
| 191 | * | ||
| 192 | * Protects the buffer by disabling interrupts. Use this | ||
| 193 | * if you might be logging from interrupt context. Try | ||
| 194 | * __relay_write() if you know you won't be logging from | ||
| 195 | * interrupt context. | ||
| 196 | */ | ||
| 197 | static inline void relay_write(struct rchan *chan, | ||
| 198 | const void *data, | ||
| 199 | size_t length) | ||
| 200 | { | ||
| 201 | unsigned long flags; | ||
| 202 | struct rchan_buf *buf; | ||
| 203 | |||
| 204 | local_irq_save(flags); | ||
| 205 | buf = chan->buf[smp_processor_id()]; | ||
| 206 | if (unlikely(buf->offset + length > chan->subbuf_size)) | ||
| 207 | length = relay_switch_subbuf(buf, length); | ||
| 208 | memcpy(buf->data + buf->offset, data, length); | ||
| 209 | buf->offset += length; | ||
| 210 | local_irq_restore(flags); | ||
| 211 | } | ||
| 212 | |||
| 213 | /** | ||
| 214 | * __relay_write - write data into the channel | ||
| 215 | * @chan: relay channel | ||
| 216 | * @data: data to be written | ||
| 217 | * @length: number of bytes to write | ||
| 218 | * | ||
| 219 | * Writes data into the current cpu's channel buffer. | ||
| 220 | * | ||
| 221 | * Protects the buffer by disabling preemption. Use | ||
| 222 | * relay_write() if you might be logging from interrupt | ||
| 223 | * context. | ||
| 224 | */ | ||
| 225 | static inline void __relay_write(struct rchan *chan, | ||
| 226 | const void *data, | ||
| 227 | size_t length) | ||
| 228 | { | ||
| 229 | struct rchan_buf *buf; | ||
| 230 | |||
| 231 | buf = chan->buf[get_cpu()]; | ||
| 232 | if (unlikely(buf->offset + length > buf->chan->subbuf_size)) | ||
| 233 | length = relay_switch_subbuf(buf, length); | ||
| 234 | memcpy(buf->data + buf->offset, data, length); | ||
| 235 | buf->offset += length; | ||
| 236 | put_cpu(); | ||
| 237 | } | ||
| 238 | |||
| 239 | /** | ||
| 240 | * relay_reserve - reserve slot in channel buffer | ||
| 241 | * @chan: relay channel | ||
| 242 | * @length: number of bytes to reserve | ||
| 243 | * | ||
| 244 | * Returns pointer to reserved slot, NULL if full. | ||
| 245 | * | ||
| 246 | * Reserves a slot in the current cpu's channel buffer. | ||
| 247 | * Does not protect the buffer at all - caller must provide | ||
| 248 | * appropriate synchronization. | ||
| 249 | */ | ||
| 250 | static inline void *relay_reserve(struct rchan *chan, size_t length) | ||
| 251 | { | ||
| 252 | void *reserved; | ||
| 253 | struct rchan_buf *buf = chan->buf[smp_processor_id()]; | ||
| 254 | |||
| 255 | if (unlikely(buf->offset + length > buf->chan->subbuf_size)) { | ||
| 256 | length = relay_switch_subbuf(buf, length); | ||
| 257 | if (!length) | ||
| 258 | return NULL; | ||
| 259 | } | ||
| 260 | reserved = buf->data + buf->offset; | ||
| 261 | buf->offset += length; | ||
| 262 | |||
| 263 | return reserved; | ||
| 264 | } | ||
| 265 | |||
| 266 | /** | ||
| 267 | * subbuf_start_reserve - reserve bytes at the start of a sub-buffer | ||
| 268 | * @buf: relay channel buffer | ||
| 269 | * @length: number of bytes to reserve | ||
| 270 | * | ||
| 271 | * Helper function used to reserve bytes at the beginning of | ||
| 272 | * a sub-buffer in the subbuf_start() callback. | ||
| 273 | */ | ||
| 274 | static inline void subbuf_start_reserve(struct rchan_buf *buf, | ||
| 275 | size_t length) | ||
| 276 | { | ||
| 277 | BUG_ON(length >= buf->chan->subbuf_size - 1); | ||
| 278 | buf->offset = length; | ||
| 279 | } | ||
| 280 | |||
| 281 | /* | ||
| 282 | * exported relay file operations, fs/relayfs/inode.c | ||
| 283 | */ | ||
| 284 | extern struct file_operations relay_file_operations; | ||
| 285 | |||
| 286 | #endif /* _LINUX_RELAYFS_FS_H */ | ||
| 287 | |||
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index b739ac1f7ca0..ab61cd1199f2 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -91,10 +91,102 @@ struct rtc_pll_info { | |||
| 91 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ | 91 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ |
| 92 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ | 92 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ |
| 93 | 93 | ||
| 94 | /* interrupt flags */ | ||
| 95 | #define RTC_IRQF 0x80 /* any of the following is active */ | ||
| 96 | #define RTC_PF 0x40 | ||
| 97 | #define RTC_AF 0x20 | ||
| 98 | #define RTC_UF 0x10 | ||
| 99 | |||
| 94 | #ifdef __KERNEL__ | 100 | #ifdef __KERNEL__ |
| 95 | 101 | ||
| 96 | #include <linux/interrupt.h> | 102 | #include <linux/interrupt.h> |
| 97 | 103 | ||
| 104 | extern int rtc_month_days(unsigned int month, unsigned int year); | ||
| 105 | extern int rtc_valid_tm(struct rtc_time *tm); | ||
| 106 | extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); | ||
| 107 | extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); | ||
| 108 | |||
| 109 | #include <linux/device.h> | ||
| 110 | #include <linux/seq_file.h> | ||
| 111 | #include <linux/cdev.h> | ||
| 112 | #include <linux/poll.h> | ||
| 113 | #include <linux/mutex.h> | ||
| 114 | |||
| 115 | extern struct class *rtc_class; | ||
| 116 | |||
| 117 | struct rtc_class_ops { | ||
| 118 | int (*open)(struct device *); | ||
| 119 | void (*release)(struct device *); | ||
| 120 | int (*ioctl)(struct device *, unsigned int, unsigned long); | ||
| 121 | int (*read_time)(struct device *, struct rtc_time *); | ||
| 122 | int (*set_time)(struct device *, struct rtc_time *); | ||
| 123 | int (*read_alarm)(struct device *, struct rtc_wkalrm *); | ||
| 124 | int (*set_alarm)(struct device *, struct rtc_wkalrm *); | ||
| 125 | int (*proc)(struct device *, struct seq_file *); | ||
| 126 | int (*set_mmss)(struct device *, unsigned long secs); | ||
| 127 | int (*irq_set_state)(struct device *, int enabled); | ||
| 128 | int (*irq_set_freq)(struct device *, int freq); | ||
| 129 | int (*read_callback)(struct device *, int data); | ||
| 130 | }; | ||
| 131 | |||
| 132 | #define RTC_DEVICE_NAME_SIZE 20 | ||
| 133 | struct rtc_task; | ||
| 134 | |||
| 135 | struct rtc_device | ||
| 136 | { | ||
| 137 | struct class_device class_dev; | ||
| 138 | struct module *owner; | ||
| 139 | |||
| 140 | int id; | ||
| 141 | char name[RTC_DEVICE_NAME_SIZE]; | ||
| 142 | |||
| 143 | struct rtc_class_ops *ops; | ||
| 144 | struct mutex ops_lock; | ||
| 145 | |||
| 146 | struct class_device *rtc_dev; | ||
| 147 | struct cdev char_dev; | ||
| 148 | struct mutex char_lock; | ||
| 149 | |||
| 150 | unsigned long irq_data; | ||
| 151 | spinlock_t irq_lock; | ||
| 152 | wait_queue_head_t irq_queue; | ||
| 153 | struct fasync_struct *async_queue; | ||
| 154 | |||
| 155 | struct rtc_task *irq_task; | ||
| 156 | spinlock_t irq_task_lock; | ||
| 157 | int irq_freq; | ||
| 158 | }; | ||
| 159 | #define to_rtc_device(d) container_of(d, struct rtc_device, class_dev) | ||
| 160 | |||
| 161 | extern struct rtc_device *rtc_device_register(const char *name, | ||
| 162 | struct device *dev, | ||
| 163 | struct rtc_class_ops *ops, | ||
| 164 | struct module *owner); | ||
| 165 | extern void rtc_device_unregister(struct rtc_device *rdev); | ||
| 166 | extern int rtc_interface_register(struct class_interface *intf); | ||
| 167 | |||
| 168 | extern int rtc_read_time(struct class_device *class_dev, struct rtc_time *tm); | ||
| 169 | extern int rtc_set_time(struct class_device *class_dev, struct rtc_time *tm); | ||
| 170 | extern int rtc_set_mmss(struct class_device *class_dev, unsigned long secs); | ||
| 171 | extern int rtc_read_alarm(struct class_device *class_dev, | ||
| 172 | struct rtc_wkalrm *alrm); | ||
| 173 | extern int rtc_set_alarm(struct class_device *class_dev, | ||
| 174 | struct rtc_wkalrm *alrm); | ||
| 175 | extern void rtc_update_irq(struct class_device *class_dev, | ||
| 176 | unsigned long num, unsigned long events); | ||
| 177 | |||
| 178 | extern struct class_device *rtc_class_open(char *name); | ||
| 179 | extern void rtc_class_close(struct class_device *class_dev); | ||
| 180 | |||
| 181 | extern int rtc_irq_register(struct class_device *class_dev, | ||
| 182 | struct rtc_task *task); | ||
| 183 | extern void rtc_irq_unregister(struct class_device *class_dev, | ||
| 184 | struct rtc_task *task); | ||
| 185 | extern int rtc_irq_set_state(struct class_device *class_dev, | ||
| 186 | struct rtc_task *task, int enabled); | ||
| 187 | extern int rtc_irq_set_freq(struct class_device *class_dev, | ||
| 188 | struct rtc_task *task, int freq); | ||
| 189 | |||
| 98 | typedef struct rtc_task { | 190 | typedef struct rtc_task { |
| 99 | void (*func)(void *private_data); | 191 | void (*func)(void *private_data); |
| 100 | void *private_data; | 192 | void *private_data; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 036d14d2bf90..20b4f0372e44 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/topology.h> | 35 | #include <linux/topology.h> |
| 36 | #include <linux/seccomp.h> | 36 | #include <linux/seccomp.h> |
| 37 | #include <linux/rcupdate.h> | 37 | #include <linux/rcupdate.h> |
| 38 | #include <linux/futex.h> | ||
| 38 | 39 | ||
| 39 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ | 40 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ |
| 40 | 41 | ||
| @@ -872,6 +873,11 @@ struct task_struct { | |||
| 872 | int cpuset_mems_generation; | 873 | int cpuset_mems_generation; |
| 873 | int cpuset_mem_spread_rotor; | 874 | int cpuset_mem_spread_rotor; |
| 874 | #endif | 875 | #endif |
| 876 | struct robust_list_head __user *robust_list; | ||
| 877 | #ifdef CONFIG_COMPAT | ||
| 878 | struct compat_robust_list_head __user *compat_robust_list; | ||
| 879 | #endif | ||
| 880 | |||
| 875 | atomic_t fs_excl; /* holding fs exclusive resources */ | 881 | atomic_t fs_excl; /* holding fs exclusive resources */ |
| 876 | struct rcu_head rcu; | 882 | struct rcu_head rcu; |
| 877 | }; | 883 | }; |
diff --git a/include/linux/sound.h b/include/linux/sound.h index 72b9af4c3fd4..f63d8342ffa3 100644 --- a/include/linux/sound.h +++ b/include/linux/sound.h | |||
| @@ -30,12 +30,12 @@ | |||
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | struct device; | 32 | struct device; |
| 33 | extern int register_sound_special(struct file_operations *fops, int unit); | 33 | extern int register_sound_special(const struct file_operations *fops, int unit); |
| 34 | extern int register_sound_special_device(struct file_operations *fops, int unit, struct device *dev); | 34 | extern int register_sound_special_device(const struct file_operations *fops, int unit, struct device *dev); |
| 35 | extern int register_sound_mixer(struct file_operations *fops, int dev); | 35 | extern int register_sound_mixer(const struct file_operations *fops, int dev); |
| 36 | extern int register_sound_midi(struct file_operations *fops, int dev); | 36 | extern int register_sound_midi(const struct file_operations *fops, int dev); |
| 37 | extern int register_sound_dsp(struct file_operations *fops, int dev); | 37 | extern int register_sound_dsp(const struct file_operations *fops, int dev); |
| 38 | extern int register_sound_synth(struct file_operations *fops, int dev); | 38 | extern int register_sound_synth(const struct file_operations *fops, int dev); |
| 39 | 39 | ||
| 40 | extern void unregister_sound_special(int unit); | 40 | extern void unregister_sound_special(int unit); |
| 41 | extern void unregister_sound_mixer(int unit); | 41 | extern void unregister_sound_mixer(int unit); |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index c4e3ea7cf154..b5612c958cce 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
| @@ -50,7 +50,7 @@ struct cache_head { | |||
| 50 | time_t last_refresh; /* If CACHE_PENDING, this is when upcall | 50 | time_t last_refresh; /* If CACHE_PENDING, this is when upcall |
| 51 | * was sent, else this is when update was received | 51 | * was sent, else this is when update was received |
| 52 | */ | 52 | */ |
| 53 | atomic_t refcnt; | 53 | struct kref ref; |
| 54 | unsigned long flags; | 54 | unsigned long flags; |
| 55 | }; | 55 | }; |
| 56 | #define CACHE_VALID 0 /* Entry contains valid data */ | 56 | #define CACHE_VALID 0 /* Entry contains valid data */ |
| @@ -68,8 +68,7 @@ struct cache_detail { | |||
| 68 | atomic_t inuse; /* active user-space update or lookup */ | 68 | atomic_t inuse; /* active user-space update or lookup */ |
| 69 | 69 | ||
| 70 | char *name; | 70 | char *name; |
| 71 | void (*cache_put)(struct cache_head *, | 71 | void (*cache_put)(struct kref *); |
| 72 | struct cache_detail*); | ||
| 73 | 72 | ||
| 74 | void (*cache_request)(struct cache_detail *cd, | 73 | void (*cache_request)(struct cache_detail *cd, |
| 75 | struct cache_head *h, | 74 | struct cache_head *h, |
| @@ -81,6 +80,11 @@ struct cache_detail { | |||
| 81 | struct cache_detail *cd, | 80 | struct cache_detail *cd, |
| 82 | struct cache_head *h); | 81 | struct cache_head *h); |
| 83 | 82 | ||
| 83 | struct cache_head * (*alloc)(void); | ||
| 84 | int (*match)(struct cache_head *orig, struct cache_head *new); | ||
| 85 | void (*init)(struct cache_head *orig, struct cache_head *new); | ||
| 86 | void (*update)(struct cache_head *orig, struct cache_head *new); | ||
| 87 | |||
| 84 | /* fields below this comment are for internal use | 88 | /* fields below this comment are for internal use |
| 85 | * and should not be touched by cache owners | 89 | * and should not be touched by cache owners |
| 86 | */ | 90 | */ |
| @@ -123,126 +127,14 @@ struct cache_deferred_req { | |||
| 123 | int too_many); | 127 | int too_many); |
| 124 | }; | 128 | }; |
| 125 | 129 | ||
| 126 | /* | ||
| 127 | * just like a template in C++, this macro does cache lookup | ||
| 128 | * for us. | ||
| 129 | * The function is passed some sort of HANDLE from which a cache_detail | ||
| 130 | * structure can be determined (via SETUP, DETAIL), a template | ||
| 131 | * cache entry (type RTN*), and a "set" flag. Using the HASHFN and the | ||
| 132 | * TEST, the function will try to find a matching cache entry in the cache. | ||
| 133 | * If "set" == 0 : | ||
| 134 | * If an entry is found, it is returned | ||
| 135 | * If no entry is found, a new non-VALID entry is created. | ||
| 136 | * If "set" == 1 and INPLACE == 0 : | ||
| 137 | * If no entry is found a new one is inserted with data from "template" | ||
| 138 | * If a non-CACHE_VALID entry is found, it is updated from template using UPDATE | ||
| 139 | * If a CACHE_VALID entry is found, a new entry is swapped in with data | ||
| 140 | * from "template" | ||
| 141 | * If set == 1, and INPLACE == 1 : | ||
| 142 | * As above, except that if a CACHE_VALID entry is found, we UPDATE in place | ||
| 143 | * instead of swapping in a new entry. | ||
| 144 | * | ||
| 145 | * If the passed handle has the CACHE_NEGATIVE flag set, then UPDATE is not | ||
| 146 | * run but insteead CACHE_NEGATIVE is set in any new item. | ||
| 147 | 130 | ||
| 148 | * In any case, the new entry is returned with a reference count. | 131 | extern struct cache_head * |
| 149 | * | 132 | sunrpc_cache_lookup(struct cache_detail *detail, |
| 150 | * | 133 | struct cache_head *key, int hash); |
| 151 | * RTN is a struct type for a cache entry | 134 | extern struct cache_head * |
| 152 | * MEMBER is the member of the cache which is cache_head, which must be first | 135 | sunrpc_cache_update(struct cache_detail *detail, |
| 153 | * FNAME is the name for the function | 136 | struct cache_head *new, struct cache_head *old, int hash); |
| 154 | * ARGS are arguments to function and must contain RTN *item, int set. May | ||
| 155 | * also contain something to be usedby SETUP or DETAIL to find cache_detail. | ||
| 156 | * SETUP locates the cache detail and makes it available as... | ||
| 157 | * DETAIL identifies the cache detail, possibly set up by SETUP | ||
| 158 | * HASHFN returns a hash value of the cache entry "item" | ||
| 159 | * TEST tests if "tmp" matches "item" | ||
| 160 | * INIT copies key information from "item" to "new" | ||
| 161 | * UPDATE copies content information from "item" to "tmp" | ||
| 162 | * INPLACE is true if updates can happen inplace rather than allocating a new structure | ||
| 163 | * | ||
| 164 | * WARNING: any substantial changes to this must be reflected in | ||
| 165 | * net/sunrpc/svcauth.c(auth_domain_lookup) | ||
| 166 | * which is a similar routine that is open-coded. | ||
| 167 | */ | ||
| 168 | #define DefineCacheLookup(RTN,MEMBER,FNAME,ARGS,SETUP,DETAIL,HASHFN,TEST,INIT,UPDATE,INPLACE) \ | ||
| 169 | RTN *FNAME ARGS \ | ||
| 170 | { \ | ||
| 171 | RTN *tmp, *new=NULL; \ | ||
| 172 | struct cache_head **hp, **head; \ | ||
| 173 | SETUP; \ | ||
| 174 | head = &(DETAIL)->hash_table[HASHFN]; \ | ||
| 175 | retry: \ | ||
| 176 | if (set||new) write_lock(&(DETAIL)->hash_lock); \ | ||
| 177 | else read_lock(&(DETAIL)->hash_lock); \ | ||
| 178 | for(hp=head; *hp != NULL; hp = &tmp->MEMBER.next) { \ | ||
| 179 | tmp = container_of(*hp, RTN, MEMBER); \ | ||
| 180 | if (TEST) { /* found a match */ \ | ||
| 181 | \ | ||
| 182 | if (set && !INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags) && !new) \ | ||
| 183 | break; \ | ||
| 184 | \ | ||
| 185 | if (new) \ | ||
| 186 | {INIT;} \ | ||
| 187 | if (set) { \ | ||
| 188 | if (!INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags))\ | ||
| 189 | { /* need to swap in new */ \ | ||
| 190 | RTN *t2; \ | ||
| 191 | \ | ||
| 192 | new->MEMBER.next = tmp->MEMBER.next; \ | ||
| 193 | *hp = &new->MEMBER; \ | ||
| 194 | tmp->MEMBER.next = NULL; \ | ||
| 195 | t2 = tmp; tmp = new; new = t2; \ | ||
| 196 | } \ | ||
| 197 | if (test_bit(CACHE_NEGATIVE, &item->MEMBER.flags)) \ | ||
| 198 | set_bit(CACHE_NEGATIVE, &tmp->MEMBER.flags); \ | ||
| 199 | else { \ | ||
| 200 | UPDATE; \ | ||
| 201 | clear_bit(CACHE_NEGATIVE, &tmp->MEMBER.flags); \ | ||
| 202 | } \ | ||
| 203 | } \ | ||
| 204 | cache_get(&tmp->MEMBER); \ | ||
| 205 | if (set||new) write_unlock(&(DETAIL)->hash_lock); \ | ||
| 206 | else read_unlock(&(DETAIL)->hash_lock); \ | ||
| 207 | if (set) \ | ||
| 208 | cache_fresh(DETAIL, &tmp->MEMBER, item->MEMBER.expiry_time); \ | ||
| 209 | if (set && !INPLACE && new) cache_fresh(DETAIL, &new->MEMBER, 0); \ | ||
| 210 | if (new) (DETAIL)->cache_put(&new->MEMBER, DETAIL); \ | ||
| 211 | return tmp; \ | ||
| 212 | } \ | ||
| 213 | } \ | ||
| 214 | /* Didn't find anything */ \ | ||
| 215 | if (new) { \ | ||
| 216 | INIT; \ | ||
| 217 | new->MEMBER.next = *head; \ | ||
| 218 | *head = &new->MEMBER; \ | ||
| 219 | (DETAIL)->entries ++; \ | ||
| 220 | cache_get(&new->MEMBER); \ | ||
| 221 | if (set) { \ | ||
| 222 | tmp = new; \ | ||
| 223 | if (test_bit(CACHE_NEGATIVE, &item->MEMBER.flags)) \ | ||
| 224 | set_bit(CACHE_NEGATIVE, &tmp->MEMBER.flags); \ | ||
| 225 | else {UPDATE;} \ | ||
| 226 | } \ | ||
| 227 | } \ | ||
| 228 | if (set||new) write_unlock(&(DETAIL)->hash_lock); \ | ||
| 229 | else read_unlock(&(DETAIL)->hash_lock); \ | ||
| 230 | if (new && set) \ | ||
| 231 | cache_fresh(DETAIL, &new->MEMBER, item->MEMBER.expiry_time); \ | ||
| 232 | if (new) \ | ||
| 233 | return new; \ | ||
| 234 | new = kmalloc(sizeof(*new), GFP_KERNEL); \ | ||
| 235 | if (new) { \ | ||
| 236 | cache_init(&new->MEMBER); \ | ||
| 237 | goto retry; \ | ||
| 238 | } \ | ||
| 239 | return NULL; \ | ||
| 240 | } | ||
| 241 | 137 | ||
| 242 | #define DefineSimpleCacheLookup(STRUCT,INPLACE) \ | ||
| 243 | DefineCacheLookup(struct STRUCT, h, STRUCT##_lookup, (struct STRUCT *item, int set), /*no setup */, \ | ||
| 244 | & STRUCT##_cache, STRUCT##_hash(item), STRUCT##_match(item, tmp),\ | ||
| 245 | STRUCT##_init(new, item), STRUCT##_update(tmp, item),INPLACE) | ||
| 246 | 138 | ||
| 247 | #define cache_for_each(pos, detail, index, member) \ | 139 | #define cache_for_each(pos, detail, index, member) \ |
| 248 | for (({read_lock(&(detail)->hash_lock); index = (detail)->hash_size;}) ; \ | 140 | for (({read_lock(&(detail)->hash_lock); index = (detail)->hash_size;}) ; \ |
| @@ -258,22 +150,19 @@ extern void cache_clean_deferred(void *owner); | |||
| 258 | 150 | ||
| 259 | static inline struct cache_head *cache_get(struct cache_head *h) | 151 | static inline struct cache_head *cache_get(struct cache_head *h) |
| 260 | { | 152 | { |
| 261 | atomic_inc(&h->refcnt); | 153 | kref_get(&h->ref); |
| 262 | return h; | 154 | return h; |
| 263 | } | 155 | } |
| 264 | 156 | ||
| 265 | 157 | ||
| 266 | static inline int cache_put(struct cache_head *h, struct cache_detail *cd) | 158 | static inline void cache_put(struct cache_head *h, struct cache_detail *cd) |
| 267 | { | 159 | { |
| 268 | if (atomic_read(&h->refcnt) <= 2 && | 160 | if (atomic_read(&h->ref.refcount) <= 2 && |
| 269 | h->expiry_time < cd->nextcheck) | 161 | h->expiry_time < cd->nextcheck) |
| 270 | cd->nextcheck = h->expiry_time; | 162 | cd->nextcheck = h->expiry_time; |
| 271 | return atomic_dec_and_test(&h->refcnt); | 163 | kref_put(&h->ref, cd->cache_put); |
| 272 | } | 164 | } |
| 273 | 165 | ||
| 274 | extern void cache_init(struct cache_head *h); | ||
| 275 | extern void cache_fresh(struct cache_detail *detail, | ||
| 276 | struct cache_head *head, time_t expiry); | ||
| 277 | extern int cache_check(struct cache_detail *detail, | 166 | extern int cache_check(struct cache_detail *detail, |
| 278 | struct cache_head *h, struct cache_req *rqstp); | 167 | struct cache_head *h, struct cache_req *rqstp); |
| 279 | extern void cache_flush(void); | 168 | extern void cache_flush(void); |
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index 0d6ed3c8bdc4..d93c24b47f3f 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h | |||
| @@ -50,7 +50,7 @@ struct proc_dir_entry * rpc_proc_register(struct rpc_stat *); | |||
| 50 | void rpc_proc_unregister(const char *); | 50 | void rpc_proc_unregister(const char *); |
| 51 | void rpc_proc_zero(struct rpc_program *); | 51 | void rpc_proc_zero(struct rpc_program *); |
| 52 | struct proc_dir_entry * svc_proc_register(struct svc_stat *, | 52 | struct proc_dir_entry * svc_proc_register(struct svc_stat *, |
| 53 | struct file_operations *); | 53 | const struct file_operations *); |
| 54 | void svc_proc_unregister(const char *); | 54 | void svc_proc_unregister(const char *); |
| 55 | 55 | ||
| 56 | void svc_seq_show(struct seq_file *, | 56 | void svc_seq_show(struct seq_file *, |
| @@ -65,7 +65,7 @@ static inline void rpc_proc_unregister(const char *p) {} | |||
| 65 | static inline void rpc_proc_zero(struct rpc_program *p) {} | 65 | static inline void rpc_proc_zero(struct rpc_program *p) {} |
| 66 | 66 | ||
| 67 | static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s, | 67 | static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s, |
| 68 | struct file_operations *f) { return NULL; } | 68 | const struct file_operations *f) { return NULL; } |
| 69 | static inline void svc_proc_unregister(const char *p) {} | 69 | static inline void svc_proc_unregister(const char *p) {} |
| 70 | 70 | ||
| 71 | static inline void svc_seq_show(struct seq_file *seq, | 71 | static inline void svc_seq_show(struct seq_file *seq, |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index c119ce7cbd22..2fe2087edd66 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
| @@ -45,9 +45,10 @@ struct svc_rqst; /* forward decl */ | |||
| 45 | * of ip addresses to the given client. | 45 | * of ip addresses to the given client. |
| 46 | */ | 46 | */ |
| 47 | struct auth_domain { | 47 | struct auth_domain { |
| 48 | struct cache_head h; | 48 | struct kref ref; |
| 49 | struct hlist_node hash; | ||
| 49 | char *name; | 50 | char *name; |
| 50 | int flavour; | 51 | struct auth_ops *flavour; |
| 51 | }; | 52 | }; |
| 52 | 53 | ||
| 53 | /* | 54 | /* |
| @@ -86,6 +87,9 @@ struct auth_domain { | |||
| 86 | * | 87 | * |
| 87 | * domain_release() | 88 | * domain_release() |
| 88 | * This call releases a domain. | 89 | * This call releases a domain. |
| 90 | * set_client() | ||
| 91 | * Givens a pending request (struct svc_rqst), finds and assigns | ||
| 92 | * an appropriate 'auth_domain' as the client. | ||
| 89 | */ | 93 | */ |
| 90 | struct auth_ops { | 94 | struct auth_ops { |
| 91 | char * name; | 95 | char * name; |
| @@ -117,7 +121,7 @@ extern void svc_auth_unregister(rpc_authflavor_t flavor); | |||
| 117 | extern struct auth_domain *unix_domain_find(char *name); | 121 | extern struct auth_domain *unix_domain_find(char *name); |
| 118 | extern void auth_domain_put(struct auth_domain *item); | 122 | extern void auth_domain_put(struct auth_domain *item); |
| 119 | extern int auth_unix_add_addr(struct in_addr addr, struct auth_domain *dom); | 123 | extern int auth_unix_add_addr(struct in_addr addr, struct auth_domain *dom); |
| 120 | extern struct auth_domain *auth_domain_lookup(struct auth_domain *item, int set); | 124 | extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *new); |
| 121 | extern struct auth_domain *auth_domain_find(char *name); | 125 | extern struct auth_domain *auth_domain_find(char *name); |
| 122 | extern struct auth_domain *auth_unix_lookup(struct in_addr addr); | 126 | extern struct auth_domain *auth_unix_lookup(struct in_addr addr); |
| 123 | extern int auth_unix_forget_old(struct auth_domain *dom); | 127 | extern int auth_unix_forget_old(struct auth_domain *dom); |
| @@ -160,8 +164,6 @@ static inline unsigned long hash_mem(char *buf, int length, int bits) | |||
| 160 | return hash >> (BITS_PER_LONG - bits); | 164 | return hash >> (BITS_PER_LONG - bits); |
| 161 | } | 165 | } |
| 162 | 166 | ||
| 163 | extern struct cache_detail auth_domain_cache, ip_map_cache; | ||
| 164 | |||
| 165 | #endif /* __KERNEL__ */ | 167 | #endif /* __KERNEL__ */ |
| 166 | 168 | ||
| 167 | #endif /* _LINUX_SUNRPC_SVCAUTH_H_ */ | 169 | #endif /* _LINUX_SUNRPC_SVCAUTH_H_ */ |
diff --git a/include/linux/synclink.h b/include/linux/synclink.h index 1b7cd8d1a71b..2993302f7923 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * SyncLink Multiprotocol Serial Adapter Driver | 2 | * SyncLink Multiprotocol Serial Adapter Driver |
| 3 | * | 3 | * |
| 4 | * $Id: synclink.h,v 3.10 2005/11/08 19:50:54 paulkf Exp $ | 4 | * $Id: synclink.h,v 3.11 2006/02/06 21:20:29 paulkf Exp $ |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 1998-2000 by Microgate Corporation | 6 | * Copyright (C) 1998-2000 by Microgate Corporation |
| 7 | * | 7 | * |
| @@ -221,6 +221,12 @@ struct mgsl_icount { | |||
| 221 | __u32 rxidle; | 221 | __u32 rxidle; |
| 222 | }; | 222 | }; |
| 223 | 223 | ||
| 224 | struct gpio_desc { | ||
| 225 | __u32 state; | ||
| 226 | __u32 smask; | ||
| 227 | __u32 dir; | ||
| 228 | __u32 dmask; | ||
| 229 | }; | ||
| 224 | 230 | ||
| 225 | #define DEBUG_LEVEL_DATA 1 | 231 | #define DEBUG_LEVEL_DATA 1 |
| 226 | #define DEBUG_LEVEL_ERROR 2 | 232 | #define DEBUG_LEVEL_ERROR 2 |
| @@ -276,5 +282,8 @@ struct mgsl_icount { | |||
| 276 | #define MGSL_IOCLOOPTXDONE _IO(MGSL_MAGIC_IOC,9) | 282 | #define MGSL_IOCLOOPTXDONE _IO(MGSL_MAGIC_IOC,9) |
| 277 | #define MGSL_IOCSIF _IO(MGSL_MAGIC_IOC,10) | 283 | #define MGSL_IOCSIF _IO(MGSL_MAGIC_IOC,10) |
| 278 | #define MGSL_IOCGIF _IO(MGSL_MAGIC_IOC,11) | 284 | #define MGSL_IOCGIF _IO(MGSL_MAGIC_IOC,11) |
| 285 | #define MGSL_IOCSGPIO _IOW(MGSL_MAGIC_IOC,16,struct gpio_desc) | ||
| 286 | #define MGSL_IOCGGPIO _IOR(MGSL_MAGIC_IOC,17,struct gpio_desc) | ||
| 287 | #define MGSL_IOCWAITGPIO _IOWR(MGSL_MAGIC_IOC,18,struct gpio_desc) | ||
| 279 | 288 | ||
| 280 | #endif /* _SYNCLINK_H_ */ | 289 | #endif /* _SYNCLINK_H_ */ |
diff --git a/include/linux/threads.h b/include/linux/threads.h index b59738ac6197..e646bcdf2614 100644 --- a/include/linux/threads.h +++ b/include/linux/threads.h | |||
| @@ -28,7 +28,8 @@ | |||
| 28 | #define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000) | 28 | #define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000) |
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * A maximum of 4 million PIDs should be enough for a while: | 31 | * A maximum of 4 million PIDs should be enough for a while. |
| 32 | * [NOTE: PID/TIDs are limited to 2^29 ~= 500+ million, see futex.h.] | ||
| 32 | */ | 33 | */ |
| 33 | #define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \ | 34 | #define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \ |
| 34 | (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT)) | 35 | (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT)) |
diff --git a/include/linux/topology.h b/include/linux/topology.h index e8eb0040ce3a..a305ae2e44b6 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
| @@ -164,6 +164,15 @@ | |||
| 164 | .nr_balance_failed = 0, \ | 164 | .nr_balance_failed = 0, \ |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | #ifdef CONFIG_SCHED_MC | ||
| 168 | #ifndef SD_MC_INIT | ||
| 169 | /* for now its same as SD_CPU_INIT. | ||
| 170 | * TBD: Tune Domain parameters! | ||
| 171 | */ | ||
| 172 | #define SD_MC_INIT SD_CPU_INIT | ||
| 173 | #endif | ||
| 174 | #endif | ||
| 175 | |||
| 167 | #ifdef CONFIG_NUMA | 176 | #ifdef CONFIG_NUMA |
| 168 | #ifndef SD_NODE_INIT | 177 | #ifndef SD_NODE_INIT |
| 169 | #error Please define an appropriate SD_NODE_INIT in include/asm/topology.h!!! | 178 | #error Please define an appropriate SD_NODE_INIT in include/asm/topology.h!!! |
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index b0ffe4356e5a..843aeaaa79d4 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
| @@ -895,7 +895,7 @@ extern void ufs_set_link(struct inode *, struct ufs_dir_entry *, struct buffer_h | |||
| 895 | 895 | ||
| 896 | /* file.c */ | 896 | /* file.c */ |
| 897 | extern struct inode_operations ufs_file_inode_operations; | 897 | extern struct inode_operations ufs_file_inode_operations; |
| 898 | extern struct file_operations ufs_file_operations; | 898 | extern const struct file_operations ufs_file_operations; |
| 899 | 899 | ||
| 900 | extern struct address_space_operations ufs_aops; | 900 | extern struct address_space_operations ufs_aops; |
| 901 | 901 | ||
| @@ -915,7 +915,7 @@ extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); | |||
| 915 | extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create); | 915 | extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create); |
| 916 | 916 | ||
| 917 | /* namei.c */ | 917 | /* namei.c */ |
| 918 | extern struct file_operations ufs_dir_operations; | 918 | extern const struct file_operations ufs_dir_operations; |
| 919 | 919 | ||
| 920 | /* super.c */ | 920 | /* super.c */ |
| 921 | extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); | 921 | extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 130d125fda12..e34e5e3dce52 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -615,7 +615,7 @@ extern struct bus_type usb_bus_type; | |||
| 615 | */ | 615 | */ |
| 616 | struct usb_class_driver { | 616 | struct usb_class_driver { |
| 617 | char *name; | 617 | char *name; |
| 618 | struct file_operations *fops; | 618 | const struct file_operations *fops; |
| 619 | int minor_base; | 619 | int minor_base; |
| 620 | }; | 620 | }; |
| 621 | 621 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 2275bfec5b68..af2d6155d3fe 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -75,7 +75,7 @@ struct video_device | |||
| 75 | int minor; | 75 | int minor; |
| 76 | 76 | ||
| 77 | /* device ops + callbacks */ | 77 | /* device ops + callbacks */ |
| 78 | struct file_operations *fops; | 78 | const struct file_operations *fops; |
| 79 | void (*release)(struct video_device *vfd); | 79 | void (*release)(struct video_device *vfd); |
| 80 | 80 | ||
| 81 | 81 | ||
diff --git a/include/linux/x1205.h b/include/linux/x1205.h deleted file mode 100644 index 64fd3af894a5..000000000000 --- a/include/linux/x1205.h +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * x1205.h - defines for drivers/i2c/chips/x1205.c | ||
| 3 | * Copyright 2004 Karen Spearel | ||
| 4 | * Copyright 2005 Alessandro Zummo | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_X1205_H__ | ||
| 13 | #define __LINUX_X1205_H__ | ||
| 14 | |||
| 15 | /* commands */ | ||
| 16 | |||
| 17 | #define X1205_CMD_GETDATETIME 0 | ||
| 18 | #define X1205_CMD_SETTIME 1 | ||
| 19 | #define X1205_CMD_SETDATETIME 2 | ||
| 20 | #define X1205_CMD_GETALARM 3 | ||
| 21 | #define X1205_CMD_SETALARM 4 | ||
| 22 | #define X1205_CMD_GETDTRIM 5 | ||
| 23 | #define X1205_CMD_SETDTRIM 6 | ||
| 24 | #define X1205_CMD_GETATRIM 7 | ||
| 25 | #define X1205_CMD_SETATRIM 8 | ||
| 26 | |||
| 27 | extern int x1205_do_command(unsigned int cmd, void *arg); | ||
| 28 | extern int x1205_direct_attach(int adapter_id, | ||
| 29 | struct i2c_client_address_data *address_data); | ||
| 30 | |||
| 31 | #endif /* __LINUX_X1205_H__ */ | ||
