diff options
author | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
commit | 64e47488c913ac704d465a6af86a26786d1412a5 (patch) | |
tree | d3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /include/linux | |
parent | 4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'include/linux')
74 files changed, 1279 insertions, 716 deletions
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index af1010b6dab7..93bfb0beb62a 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h | |||
@@ -11,10 +11,12 @@ | |||
11 | 11 | ||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/klist.h> | ||
15 | #include <linux/spinlock.h> | ||
14 | 16 | ||
15 | struct attribute_container { | 17 | struct attribute_container { |
16 | struct list_head node; | 18 | struct list_head node; |
17 | struct list_head containers; | 19 | struct klist containers; |
18 | struct class *class; | 20 | struct class *class; |
19 | struct class_device_attribute **attrs; | 21 | struct class_device_attribute **attrs; |
20 | int (*match)(struct attribute_container *, struct device *); | 22 | int (*match)(struct attribute_container *, struct device *); |
@@ -62,12 +64,8 @@ int attribute_container_add_class_device_adapter(struct attribute_container *con | |||
62 | struct class_device *classdev); | 64 | struct class_device *classdev); |
63 | void attribute_container_remove_attrs(struct class_device *classdev); | 65 | void attribute_container_remove_attrs(struct class_device *classdev); |
64 | void attribute_container_class_device_del(struct class_device *classdev); | 66 | void attribute_container_class_device_del(struct class_device *classdev); |
65 | 67 | struct attribute_container *attribute_container_classdev_to_container(struct class_device *); | |
66 | 68 | struct class_device *attribute_container_find_class_device(struct attribute_container *, struct device *); | |
67 | |||
68 | |||
69 | |||
70 | |||
71 | struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev); | 69 | struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev); |
72 | 70 | ||
73 | #endif | 71 | #endif |
diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h new file mode 100644 index 000000000000..9a7b374c9fb4 --- /dev/null +++ b/include/linux/auxvec.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _LINUX_AUXVEC_H | ||
2 | #define _LINUX_AUXVEC_H | ||
3 | |||
4 | #include <asm/auxvec.h> | ||
5 | |||
6 | /* Symbolic values for the entries in the auxiliary table | ||
7 | put on the initial stack */ | ||
8 | #define AT_NULL 0 /* end of vector */ | ||
9 | #define AT_IGNORE 1 /* entry should be ignored */ | ||
10 | #define AT_EXECFD 2 /* file descriptor of program */ | ||
11 | #define AT_PHDR 3 /* program headers for program */ | ||
12 | #define AT_PHENT 4 /* size of program header entry */ | ||
13 | #define AT_PHNUM 5 /* number of program headers */ | ||
14 | #define AT_PAGESZ 6 /* system page size */ | ||
15 | #define AT_BASE 7 /* base address of interpreter */ | ||
16 | #define AT_FLAGS 8 /* flags */ | ||
17 | #define AT_ENTRY 9 /* entry point of program */ | ||
18 | #define AT_NOTELF 10 /* program is not ELF */ | ||
19 | #define AT_UID 11 /* real uid */ | ||
20 | #define AT_EUID 12 /* effective uid */ | ||
21 | #define AT_GID 13 /* real gid */ | ||
22 | #define AT_EGID 14 /* effective gid */ | ||
23 | #define AT_PLATFORM 15 /* string identifying CPU for optimizations */ | ||
24 | #define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ | ||
25 | #define AT_CLKTCK 17 /* frequency at which times() increments */ | ||
26 | |||
27 | #define AT_SECURE 23 /* secure mode boolean */ | ||
28 | |||
29 | #define AT_VECTOR_SIZE 42 /* Size of auxiliary table. */ | ||
30 | |||
31 | #endif /* _LINUX_AUXVEC_H */ | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index 36ef29fa0d8b..cdaf03a14a51 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -111,7 +111,6 @@ struct bio { | |||
111 | void *bi_private; | 111 | void *bi_private; |
112 | 112 | ||
113 | bio_destructor_t *bi_destructor; /* destructor */ | 113 | bio_destructor_t *bi_destructor; /* destructor */ |
114 | struct bio_set *bi_set; /* memory pools set */ | ||
115 | }; | 114 | }; |
116 | 115 | ||
117 | /* | 116 | /* |
@@ -280,6 +279,7 @@ extern void bioset_free(struct bio_set *); | |||
280 | extern struct bio *bio_alloc(unsigned int __nocast, int); | 279 | extern struct bio *bio_alloc(unsigned int __nocast, int); |
281 | extern struct bio *bio_alloc_bioset(unsigned int __nocast, int, struct bio_set *); | 280 | extern struct bio *bio_alloc_bioset(unsigned int __nocast, int, struct bio_set *); |
282 | extern void bio_put(struct bio *); | 281 | extern void bio_put(struct bio *); |
282 | extern void bio_free(struct bio *, struct bio_set *); | ||
283 | 283 | ||
284 | extern void bio_endio(struct bio *, unsigned int, int); | 284 | extern void bio_endio(struct bio *, unsigned int, int); |
285 | struct request_queue; | 285 | struct request_queue; |
@@ -295,7 +295,13 @@ extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int); | |||
295 | extern int bio_get_nr_vecs(struct block_device *); | 295 | extern int bio_get_nr_vecs(struct block_device *); |
296 | extern struct bio *bio_map_user(struct request_queue *, struct block_device *, | 296 | extern struct bio *bio_map_user(struct request_queue *, struct block_device *, |
297 | unsigned long, unsigned int, int); | 297 | unsigned long, unsigned int, int); |
298 | struct sg_iovec; | ||
299 | extern struct bio *bio_map_user_iov(struct request_queue *, | ||
300 | struct block_device *, | ||
301 | struct sg_iovec *, int, int); | ||
298 | extern void bio_unmap_user(struct bio *); | 302 | extern void bio_unmap_user(struct bio *); |
303 | extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, | ||
304 | unsigned int); | ||
299 | extern void bio_set_pages_dirty(struct bio *bio); | 305 | extern void bio_set_pages_dirty(struct bio *bio); |
300 | extern void bio_check_pages_dirty(struct bio *bio); | 306 | extern void bio_check_pages_dirty(struct bio *bio); |
301 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); | 307 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 19bd8e7e11bf..aefa26fbae8a 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -563,10 +563,12 @@ extern void blk_sync_queue(struct request_queue *q); | |||
563 | extern void __blk_stop_queue(request_queue_t *q); | 563 | extern void __blk_stop_queue(request_queue_t *q); |
564 | extern void blk_run_queue(request_queue_t *); | 564 | extern void blk_run_queue(request_queue_t *); |
565 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); | 565 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); |
566 | extern struct request *blk_rq_map_user(request_queue_t *, int, void __user *, unsigned int); | 566 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int); |
567 | extern int blk_rq_unmap_user(struct request *, struct bio *, unsigned int); | 567 | extern int blk_rq_unmap_user(struct bio *, unsigned int); |
568 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, struct request *); | 568 | extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, unsigned int); |
569 | 569 | extern int blk_rq_map_user_iov(request_queue_t *, struct request *, struct sg_iovec *, int); | |
570 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, | ||
571 | struct request *, int); | ||
570 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) | 572 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) |
571 | { | 573 | { |
572 | return bdev->bd_disk->queue; | 574 | return bdev->bd_disk->queue; |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 8d139f4acf23..6b4618902d3d 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -233,6 +233,7 @@ typedef __u32 kernel_cap_t; | |||
233 | /* Allow enabling/disabling tagged queuing on SCSI controllers and sending | 233 | /* Allow enabling/disabling tagged queuing on SCSI controllers and sending |
234 | arbitrary SCSI commands */ | 234 | arbitrary SCSI commands */ |
235 | /* Allow setting encryption key on loopback filesystem */ | 235 | /* Allow setting encryption key on loopback filesystem */ |
236 | /* Allow setting zone reclaim policy */ | ||
236 | 237 | ||
237 | #define CAP_SYS_ADMIN 21 | 238 | #define CAP_SYS_ADMIN 21 |
238 | 239 | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index b58b7d6f2fdb..f9ca534787e2 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -18,6 +18,9 @@ | |||
18 | #define compat_jiffies_to_clock_t(x) \ | 18 | #define compat_jiffies_to_clock_t(x) \ |
19 | (((unsigned long)(x) * COMPAT_USER_HZ) / HZ) | 19 | (((unsigned long)(x) * COMPAT_USER_HZ) / HZ) |
20 | 20 | ||
21 | typedef __compat_uid32_t compat_uid_t; | ||
22 | typedef __compat_gid32_t compat_gid_t; | ||
23 | |||
21 | struct rusage; | 24 | struct rusage; |
22 | 25 | ||
23 | struct compat_itimerspec { | 26 | struct compat_itimerspec { |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 3438233305a3..24062a1dbf61 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -23,7 +23,8 @@ void cpuset_init_current_mems_allowed(void); | |||
23 | void cpuset_update_current_mems_allowed(void); | 23 | void cpuset_update_current_mems_allowed(void); |
24 | void cpuset_restrict_to_mems_allowed(unsigned long *nodes); | 24 | void cpuset_restrict_to_mems_allowed(unsigned long *nodes); |
25 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); | 25 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); |
26 | int cpuset_zone_allowed(struct zone *z); | 26 | extern int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask); |
27 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | ||
27 | extern struct file_operations proc_cpuset_operations; | 28 | extern struct file_operations proc_cpuset_operations; |
28 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | 29 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); |
29 | 30 | ||
@@ -48,7 +49,13 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) | |||
48 | return 1; | 49 | return 1; |
49 | } | 50 | } |
50 | 51 | ||
51 | static inline int cpuset_zone_allowed(struct zone *z) | 52 | static inline int cpuset_zone_allowed(struct zone *z, |
53 | unsigned int __nocast gfp_mask) | ||
54 | { | ||
55 | return 1; | ||
56 | } | ||
57 | |||
58 | static inline int cpuset_excl_nodes_overlap(const struct task_struct *p) | ||
52 | { | 59 | { |
53 | return 1; | 60 | return 1; |
54 | } | 61 | } |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 5e2bcc636a02..3c89df6e7768 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -45,6 +45,7 @@ | |||
45 | #define CRYPTO_TFM_MODE_CTR 0x00000008 | 45 | #define CRYPTO_TFM_MODE_CTR 0x00000008 |
46 | 46 | ||
47 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 | 47 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 |
48 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 | ||
48 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 | 49 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 |
49 | #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000 | 50 | #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000 |
50 | #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x00400000 | 51 | #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x00400000 |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 50be290d24d2..ab04b4f9b0db 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -88,8 +88,9 @@ struct dentry { | |||
88 | * negative */ | 88 | * negative */ |
89 | /* | 89 | /* |
90 | * The next three fields are touched by __d_lookup. Place them here | 90 | * The next three fields are touched by __d_lookup. Place them here |
91 | * so they all fit in a 16-byte range, with 16-byte alignment. | 91 | * so they all fit in a cache line. |
92 | */ | 92 | */ |
93 | struct hlist_node d_hash; /* lookup hash list */ | ||
93 | struct dentry *d_parent; /* parent directory */ | 94 | struct dentry *d_parent; /* parent directory */ |
94 | struct qstr d_name; | 95 | struct qstr d_name; |
95 | 96 | ||
@@ -103,7 +104,6 @@ struct dentry { | |||
103 | void *d_fsdata; /* fs-specific data */ | 104 | void *d_fsdata; /* fs-specific data */ |
104 | struct rcu_head d_rcu; | 105 | struct rcu_head d_rcu; |
105 | struct dcookie_struct *d_cookie; /* cookie, if any */ | 106 | struct dcookie_struct *d_cookie; /* cookie, if any */ |
106 | struct hlist_node d_hash; /* lookup hash list */ | ||
107 | int d_mounted; | 107 | int d_mounted; |
108 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ | 108 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ |
109 | }; | 109 | }; |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 5e93e6dce9a4..c30175e8dec6 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __DMI_H__ | 1 | #ifndef __DMI_H__ |
2 | #define __DMI_H__ | 2 | #define __DMI_H__ |
3 | 3 | ||
4 | #include <linux/list.h> | ||
5 | |||
4 | enum dmi_field { | 6 | enum dmi_field { |
5 | DMI_NONE, | 7 | DMI_NONE, |
6 | DMI_BIOS_VENDOR, | 8 | DMI_BIOS_VENDOR, |
@@ -16,6 +18,24 @@ enum dmi_field { | |||
16 | DMI_STRING_MAX, | 18 | DMI_STRING_MAX, |
17 | }; | 19 | }; |
18 | 20 | ||
21 | enum dmi_device_type { | ||
22 | DMI_DEV_TYPE_ANY = 0, | ||
23 | DMI_DEV_TYPE_OTHER, | ||
24 | DMI_DEV_TYPE_UNKNOWN, | ||
25 | DMI_DEV_TYPE_VIDEO, | ||
26 | DMI_DEV_TYPE_SCSI, | ||
27 | DMI_DEV_TYPE_ETHERNET, | ||
28 | DMI_DEV_TYPE_TOKENRING, | ||
29 | DMI_DEV_TYPE_SOUND, | ||
30 | DMI_DEV_TYPE_IPMI = -1 | ||
31 | }; | ||
32 | |||
33 | struct dmi_header { | ||
34 | u8 type; | ||
35 | u8 length; | ||
36 | u16 handle; | ||
37 | }; | ||
38 | |||
19 | /* | 39 | /* |
20 | * DMI callbacks for problem boards | 40 | * DMI callbacks for problem boards |
21 | */ | 41 | */ |
@@ -26,22 +46,32 @@ struct dmi_strmatch { | |||
26 | 46 | ||
27 | struct dmi_system_id { | 47 | struct dmi_system_id { |
28 | int (*callback)(struct dmi_system_id *); | 48 | int (*callback)(struct dmi_system_id *); |
29 | char *ident; | 49 | const char *ident; |
30 | struct dmi_strmatch matches[4]; | 50 | struct dmi_strmatch matches[4]; |
31 | void *driver_data; | 51 | void *driver_data; |
32 | }; | 52 | }; |
33 | 53 | ||
34 | #define DMI_MATCH(a,b) { a, b } | 54 | #define DMI_MATCH(a, b) { a, b } |
55 | |||
56 | struct dmi_device { | ||
57 | struct list_head list; | ||
58 | int type; | ||
59 | const char *name; | ||
60 | void *device_data; /* Type specific data */ | ||
61 | }; | ||
35 | 62 | ||
36 | #if defined(CONFIG_X86) && !defined(CONFIG_X86_64) | 63 | #if defined(CONFIG_X86) && !defined(CONFIG_X86_64) |
37 | 64 | ||
38 | extern int dmi_check_system(struct dmi_system_id *list); | 65 | extern int dmi_check_system(struct dmi_system_id *list); |
39 | extern char * dmi_get_system_info(int field); | 66 | extern char * dmi_get_system_info(int field); |
40 | 67 | extern struct dmi_device * dmi_find_device(int type, const char *name, | |
68 | struct dmi_device *from); | ||
41 | #else | 69 | #else |
42 | 70 | ||
43 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } | 71 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } |
44 | static inline char * dmi_get_system_info(int field) { return NULL; } | 72 | static inline char * dmi_get_system_info(int field) { return NULL; } |
73 | static struct dmi_device * dmi_find_device(int type, const char *name, | ||
74 | struct dmi_device *from) { return NULL; } | ||
45 | 75 | ||
46 | #endif | 76 | #endif |
47 | 77 | ||
diff --git a/include/linux/efi.h b/include/linux/efi.h index 73781ec165b4..c7c5dd316182 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -91,11 +91,6 @@ typedef struct { | |||
91 | 91 | ||
92 | #define EFI_PAGE_SHIFT 12 | 92 | #define EFI_PAGE_SHIFT 12 |
93 | 93 | ||
94 | /* | ||
95 | * For current x86 implementations of EFI, there is | ||
96 | * additional padding in the mem descriptors. This is not | ||
97 | * the case in ia64. Need to have this fixed in the f/w. | ||
98 | */ | ||
99 | typedef struct { | 94 | typedef struct { |
100 | u32 type; | 95 | u32 type; |
101 | u32 pad; | 96 | u32 pad; |
@@ -103,9 +98,6 @@ typedef struct { | |||
103 | u64 virt_addr; | 98 | u64 virt_addr; |
104 | u64 num_pages; | 99 | u64 num_pages; |
105 | u64 attribute; | 100 | u64 attribute; |
106 | #if defined (__i386__) | ||
107 | u64 pad1; | ||
108 | #endif | ||
109 | } efi_memory_desc_t; | 101 | } efi_memory_desc_t; |
110 | 102 | ||
111 | typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg); | 103 | typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg); |
@@ -240,10 +232,12 @@ typedef struct { | |||
240 | } efi_system_table_t; | 232 | } efi_system_table_t; |
241 | 233 | ||
242 | struct efi_memory_map { | 234 | struct efi_memory_map { |
243 | efi_memory_desc_t *phys_map; | 235 | void *phys_map; |
244 | efi_memory_desc_t *map; | 236 | void *map; |
237 | void *map_end; | ||
245 | int nr_map; | 238 | int nr_map; |
246 | unsigned long desc_version; | 239 | unsigned long desc_version; |
240 | unsigned long desc_size; | ||
247 | }; | 241 | }; |
248 | 242 | ||
249 | /* | 243 | /* |
diff --git a/include/linux/elf.h b/include/linux/elf.h index f5b3ba5a317d..ff955dbf510d 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_ELF_H | 2 | #define _LINUX_ELF_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/auxvec.h> | ||
5 | #include <asm/elf.h> | 6 | #include <asm/elf.h> |
6 | 7 | ||
7 | #ifndef elf_read_implies_exec | 8 | #ifndef elf_read_implies_exec |
@@ -158,29 +159,6 @@ typedef __s64 Elf64_Sxword; | |||
158 | #define ELF64_ST_BIND(x) ELF_ST_BIND(x) | 159 | #define ELF64_ST_BIND(x) ELF_ST_BIND(x) |
159 | #define ELF64_ST_TYPE(x) ELF_ST_TYPE(x) | 160 | #define ELF64_ST_TYPE(x) ELF_ST_TYPE(x) |
160 | 161 | ||
161 | /* Symbolic values for the entries in the auxiliary table | ||
162 | put on the initial stack */ | ||
163 | #define AT_NULL 0 /* end of vector */ | ||
164 | #define AT_IGNORE 1 /* entry should be ignored */ | ||
165 | #define AT_EXECFD 2 /* file descriptor of program */ | ||
166 | #define AT_PHDR 3 /* program headers for program */ | ||
167 | #define AT_PHENT 4 /* size of program header entry */ | ||
168 | #define AT_PHNUM 5 /* number of program headers */ | ||
169 | #define AT_PAGESZ 6 /* system page size */ | ||
170 | #define AT_BASE 7 /* base address of interpreter */ | ||
171 | #define AT_FLAGS 8 /* flags */ | ||
172 | #define AT_ENTRY 9 /* entry point of program */ | ||
173 | #define AT_NOTELF 10 /* program is not ELF */ | ||
174 | #define AT_UID 11 /* real uid */ | ||
175 | #define AT_EUID 12 /* effective uid */ | ||
176 | #define AT_GID 13 /* real gid */ | ||
177 | #define AT_EGID 14 /* effective gid */ | ||
178 | #define AT_PLATFORM 15 /* string identifying CPU for optimizations */ | ||
179 | #define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ | ||
180 | #define AT_CLKTCK 17 /* frequency at which times() increments */ | ||
181 | |||
182 | #define AT_SECURE 23 /* secure mode boolean */ | ||
183 | |||
184 | typedef struct dynamic{ | 162 | typedef struct dynamic{ |
185 | Elf32_Sword d_tag; | 163 | Elf32_Sword d_tag; |
186 | union{ | 164 | union{ |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index a657130ba03a..f7bd1c7ebefb 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -313,6 +313,9 @@ struct ext2_inode { | |||
313 | #define EXT2_MOUNT_XATTR_USER 0x004000 /* Extended user attributes */ | 313 | #define EXT2_MOUNT_XATTR_USER 0x004000 /* Extended user attributes */ |
314 | #define EXT2_MOUNT_POSIX_ACL 0x008000 /* POSIX Access Control Lists */ | 314 | #define EXT2_MOUNT_POSIX_ACL 0x008000 /* POSIX Access Control Lists */ |
315 | #define EXT2_MOUNT_XIP 0x010000 /* Execute in place */ | 315 | #define EXT2_MOUNT_XIP 0x010000 /* Execute in place */ |
316 | #define EXT2_MOUNT_USRQUOTA 0x020000 /* user quota */ | ||
317 | #define EXT2_MOUNT_GRPQUOTA 0x040000 /* group quota */ | ||
318 | |||
316 | 319 | ||
317 | #define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt | 320 | #define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt |
318 | #define set_opt(o, opt) o |= EXT2_MOUNT_##opt | 321 | #define set_opt(o, opt) o |= EXT2_MOUNT_##opt |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index c16662836c58..c0272d73ab20 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -373,6 +373,8 @@ struct ext3_inode { | |||
373 | #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ | 373 | #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ |
374 | #define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */ | 374 | #define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */ |
375 | #define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ | 375 | #define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ |
376 | #define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ | ||
377 | #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ | ||
376 | 378 | ||
377 | /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ | 379 | /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ |
378 | #ifndef _LINUX_EXT2_FS_H | 380 | #ifndef _LINUX_EXT2_FS_H |
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index 886255b69bb9..2063c0839d4f 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
@@ -3,6 +3,9 @@ | |||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #define FIRMWARE_NAME_MAX 30 | 5 | #define FIRMWARE_NAME_MAX 30 |
6 | #define FW_ACTION_NOHOTPLUG 0 | ||
7 | #define FW_ACTION_HOTPLUG 1 | ||
8 | |||
6 | struct firmware { | 9 | struct firmware { |
7 | size_t size; | 10 | size_t size; |
8 | u8 *data; | 11 | u8 *data; |
@@ -11,7 +14,7 @@ struct device; | |||
11 | int request_firmware(const struct firmware **fw, const char *name, | 14 | int request_firmware(const struct firmware **fw, const char *name, |
12 | struct device *device); | 15 | struct device *device); |
13 | int request_firmware_nowait( | 16 | int request_firmware_nowait( |
14 | struct module *module, | 17 | struct module *module, int hotplug, |
15 | const char *name, struct device *device, void *context, | 18 | const char *name, struct device *device, void *context, |
16 | void (*cont)(const struct firmware *fw, void *context)); | 19 | void (*cont)(const struct firmware *fw, void *context)); |
17 | 20 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 67e6732d4fdc..fd93ab7da905 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -69,6 +69,7 @@ extern int dir_notify_enable; | |||
69 | #define READ 0 | 69 | #define READ 0 |
70 | #define WRITE 1 | 70 | #define WRITE 1 |
71 | #define READA 2 /* read-ahead - don't block if no resources */ | 71 | #define READA 2 /* read-ahead - don't block if no resources */ |
72 | #define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ | ||
72 | #define SPECIAL 4 /* For non-blockdevice requests in request queue */ | 73 | #define SPECIAL 4 /* For non-blockdevice requests in request queue */ |
73 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) | 74 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) |
74 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) | 75 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) |
@@ -281,19 +282,9 @@ struct iattr { | |||
281 | struct timespec ia_atime; | 282 | struct timespec ia_atime; |
282 | struct timespec ia_mtime; | 283 | struct timespec ia_mtime; |
283 | struct timespec ia_ctime; | 284 | struct timespec ia_ctime; |
284 | unsigned int ia_attr_flags; | ||
285 | }; | 285 | }; |
286 | 286 | ||
287 | /* | 287 | /* |
288 | * This is the inode attributes flag definitions | ||
289 | */ | ||
290 | #define ATTR_FLAG_SYNCRONOUS 1 /* Syncronous write */ | ||
291 | #define ATTR_FLAG_NOATIME 2 /* Don't update atime */ | ||
292 | #define ATTR_FLAG_APPEND 4 /* Append-only file */ | ||
293 | #define ATTR_FLAG_IMMUTABLE 8 /* Immutable file */ | ||
294 | #define ATTR_FLAG_NODIRATIME 16 /* Don't update atime for directory */ | ||
295 | |||
296 | /* | ||
297 | * Includes for diskquotas. | 288 | * Includes for diskquotas. |
298 | */ | 289 | */ |
299 | #include <linux/quota.h> | 290 | #include <linux/quota.h> |
@@ -594,7 +585,6 @@ struct file { | |||
594 | unsigned int f_uid, f_gid; | 585 | unsigned int f_uid, f_gid; |
595 | struct file_ra_state f_ra; | 586 | struct file_ra_state f_ra; |
596 | 587 | ||
597 | size_t f_maxcount; | ||
598 | unsigned long f_version; | 588 | unsigned long f_version; |
599 | void *f_security; | 589 | void *f_security; |
600 | 590 | ||
@@ -1291,6 +1281,7 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1291 | /* fs/open.c */ | 1281 | /* fs/open.c */ |
1292 | 1282 | ||
1293 | extern int do_truncate(struct dentry *, loff_t start); | 1283 | extern int do_truncate(struct dentry *, loff_t start); |
1284 | extern long do_sys_open(const char __user *filename, int flags, int mode); | ||
1294 | extern struct file *filp_open(const char *, int, int); | 1285 | extern struct file *filp_open(const char *, int, int); |
1295 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); | 1286 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); |
1296 | extern int filp_close(struct file *, fl_owner_t id); | 1287 | extern int filp_close(struct file *, fl_owner_t id); |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 65d6cfdb6d39..10f96c31971e 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -4,14 +4,40 @@ | |||
4 | /* Second argument to futex syscall */ | 4 | /* Second argument to futex syscall */ |
5 | 5 | ||
6 | 6 | ||
7 | #define FUTEX_WAIT (0) | 7 | #define FUTEX_WAIT 0 |
8 | #define FUTEX_WAKE (1) | 8 | #define FUTEX_WAKE 1 |
9 | #define FUTEX_FD (2) | 9 | #define FUTEX_FD 2 |
10 | #define FUTEX_REQUEUE (3) | 10 | #define FUTEX_REQUEUE 3 |
11 | #define FUTEX_CMP_REQUEUE (4) | 11 | #define FUTEX_CMP_REQUEUE 4 |
12 | #define FUTEX_WAKE_OP 5 | ||
12 | 13 | ||
13 | long do_futex(unsigned long uaddr, int op, int val, | 14 | long do_futex(unsigned long uaddr, int op, int val, |
14 | unsigned long timeout, unsigned long uaddr2, int val2, | 15 | unsigned long timeout, unsigned long uaddr2, int val2, |
15 | int val3); | 16 | int val3); |
16 | 17 | ||
18 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ | ||
19 | #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ | ||
20 | #define FUTEX_OP_OR 2 /* *(int *)UADDR2 |= OPARG; */ | ||
21 | #define FUTEX_OP_ANDN 3 /* *(int *)UADDR2 &= ~OPARG; */ | ||
22 | #define FUTEX_OP_XOR 4 /* *(int *)UADDR2 ^= OPARG; */ | ||
23 | |||
24 | #define FUTEX_OP_OPARG_SHIFT 8 /* Use (1 << OPARG) instead of OPARG. */ | ||
25 | |||
26 | #define FUTEX_OP_CMP_EQ 0 /* if (oldval == CMPARG) wake */ | ||
27 | #define FUTEX_OP_CMP_NE 1 /* if (oldval != CMPARG) wake */ | ||
28 | #define FUTEX_OP_CMP_LT 2 /* if (oldval < CMPARG) wake */ | ||
29 | #define FUTEX_OP_CMP_LE 3 /* if (oldval <= CMPARG) wake */ | ||
30 | #define FUTEX_OP_CMP_GT 4 /* if (oldval > CMPARG) wake */ | ||
31 | #define FUTEX_OP_CMP_GE 5 /* if (oldval >= CMPARG) wake */ | ||
32 | |||
33 | /* FUTEX_WAKE_OP will perform atomically | ||
34 | int oldval = *(int *)UADDR2; | ||
35 | *(int *)UADDR2 = oldval OP OPARG; | ||
36 | if (oldval CMP CMPARG) | ||
37 | wake UADDR2; */ | ||
38 | |||
39 | #define FUTEX_OP(op, oparg, cmp, cmparg) \ | ||
40 | (((op & 0xf) << 28) | ((cmp & 0xf) << 24) \ | ||
41 | | ((oparg & 0xfff) << 12) | (cmparg & 0xfff)) | ||
42 | |||
17 | #endif | 43 | #endif |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 7c7400137e97..4dc990f3b5cc 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -40,6 +40,7 @@ struct vm_area_struct; | |||
40 | #define __GFP_ZERO 0x8000u /* Return zeroed page on success */ | 40 | #define __GFP_ZERO 0x8000u /* Return zeroed page on success */ |
41 | #define __GFP_NOMEMALLOC 0x10000u /* Don't use emergency reserves */ | 41 | #define __GFP_NOMEMALLOC 0x10000u /* Don't use emergency reserves */ |
42 | #define __GFP_NORECLAIM 0x20000u /* No realy zone reclaim during allocation */ | 42 | #define __GFP_NORECLAIM 0x20000u /* No realy zone reclaim during allocation */ |
43 | #define __GFP_HARDWALL 0x40000u /* Enforce hardwall cpuset memory allocs */ | ||
43 | 44 | ||
44 | #define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ | 45 | #define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ |
45 | #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) | 46 | #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) |
@@ -48,14 +49,15 @@ struct vm_area_struct; | |||
48 | #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ | 49 | #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ |
49 | __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ | 50 | __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ |
50 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ | 51 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ |
51 | __GFP_NOMEMALLOC|__GFP_NORECLAIM) | 52 | __GFP_NOMEMALLOC|__GFP_NORECLAIM|__GFP_HARDWALL) |
52 | 53 | ||
53 | #define GFP_ATOMIC (__GFP_HIGH) | 54 | #define GFP_ATOMIC (__GFP_HIGH) |
54 | #define GFP_NOIO (__GFP_WAIT) | 55 | #define GFP_NOIO (__GFP_WAIT) |
55 | #define GFP_NOFS (__GFP_WAIT | __GFP_IO) | 56 | #define GFP_NOFS (__GFP_WAIT | __GFP_IO) |
56 | #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) | 57 | #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) |
57 | #define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS) | 58 | #define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL) |
58 | #define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HIGHMEM) | 59 | #define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \ |
60 | __GFP_HIGHMEM) | ||
59 | 61 | ||
60 | /* Flag - indicates that the buffer will be suitable for DMA. Ignored on some | 62 | /* Flag - indicates that the buffer will be suitable for DMA. Ignored on some |
61 | platforms, used as appropriate on others */ | 63 | platforms, used as appropriate on others */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f529d1442815..e670b0d13fe0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -70,12 +70,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
70 | void hugetlb_prefault_arch_hook(struct mm_struct *mm); | 70 | void hugetlb_prefault_arch_hook(struct mm_struct *mm); |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #ifndef ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
74 | #define hugetlb_clean_stale_pgtable(pte) BUG() | ||
75 | #else | ||
76 | void hugetlb_clean_stale_pgtable(pte_t *pte); | ||
77 | #endif | ||
78 | |||
79 | #else /* !CONFIG_HUGETLB_PAGE */ | 73 | #else /* !CONFIG_HUGETLB_PAGE */ |
80 | 74 | ||
81 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | 75 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) |
diff --git a/include/linux/hwmon-sysfs.h b/include/linux/hwmon-sysfs.h index 1b5018a965f5..7eb4004b3601 100644 --- a/include/linux/hwmon-sysfs.h +++ b/include/linux/hwmon-sysfs.h | |||
@@ -33,4 +33,19 @@ struct sensor_device_attribute sensor_dev_attr_##_name = { \ | |||
33 | .index = _index, \ | 33 | .index = _index, \ |
34 | } | 34 | } |
35 | 35 | ||
36 | struct sensor_device_attribute_2 { | ||
37 | struct device_attribute dev_attr; | ||
38 | u8 index; | ||
39 | u8 nr; | ||
40 | }; | ||
41 | #define to_sensor_dev_attr_2(_dev_attr) \ | ||
42 | container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr) | ||
43 | |||
44 | #define SENSOR_DEVICE_ATTR_2(_name,_mode,_show,_store,_nr,_index) \ | ||
45 | struct sensor_device_attribute_2 sensor_dev_attr_##_name = { \ | ||
46 | .dev_attr = __ATTR(_name,_mode,_show,_store), \ | ||
47 | .index = _index, \ | ||
48 | .nr = _nr, \ | ||
49 | } | ||
50 | |||
36 | #endif /* _LINUX_HWMON_SYSFS_H */ | 51 | #endif /* _LINUX_HWMON_SYSFS_H */ |
diff --git a/include/linux/hwmon-vid.h b/include/linux/hwmon-vid.h new file mode 100644 index 000000000000..cd4b7a042b86 --- /dev/null +++ b/include/linux/hwmon-vid.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | hwmon-vid.h - VID/VRM/VRD voltage conversions | ||
3 | |||
4 | Originally part of lm_sensors | ||
5 | Copyright (c) 2002 Mark D. Studebaker <mdsxyz123@yahoo.com> | ||
6 | With assistance from Trent Piepho <xyzzy@speakeasy.org> | ||
7 | |||
8 | This program is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; either version 2 of the License, or | ||
11 | (at your option) any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program; if not, write to the Free Software | ||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef _LINUX_HWMON_VID_H | ||
24 | #define _LINUX_HWMON_VID_H | ||
25 | |||
26 | int vid_from_reg(int val, int vrm); | ||
27 | int vid_which_vrm(void); | ||
28 | |||
29 | /* vrm is the VRM/VRD document version multiplied by 10. | ||
30 | val is in mV to avoid floating point in the kernel. | ||
31 | Returned value is the 4-, 5- or 6-bit VID code. | ||
32 | Note that only VRM 9.x is supported for now. */ | ||
33 | static inline int vid_to_reg(int val, int vrm) | ||
34 | { | ||
35 | switch (vrm) { | ||
36 | case 91: /* VRM 9.1 */ | ||
37 | case 90: /* VRM 9.0 */ | ||
38 | return ((val >= 1100) && (val <= 1850) ? | ||
39 | ((18499 - val * 10) / 25 + 5) / 10 : -1); | ||
40 | default: | ||
41 | return -1; | ||
42 | } | ||
43 | } | ||
44 | |||
45 | #endif /* _LINUX_HWMON_VID_H */ | ||
diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h new file mode 100644 index 000000000000..0efd994c37f1 --- /dev/null +++ b/include/linux/hwmon.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | hwmon.h - part of lm_sensors, Linux kernel modules for hardware monitoring | ||
3 | |||
4 | This file declares helper functions for the sysfs class "hwmon", | ||
5 | for use by sensors drivers. | ||
6 | |||
7 | Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com> | ||
8 | |||
9 | This program is free software; you can redistribute it and/or modify | ||
10 | it under the terms of the GNU General Public License as published by | ||
11 | the Free Software Foundation; version 2 of the License. | ||
12 | */ | ||
13 | |||
14 | #ifndef _HWMON_H_ | ||
15 | #define _HWMON_H_ | ||
16 | |||
17 | #include <linux/device.h> | ||
18 | |||
19 | struct class_device *hwmon_device_register(struct device *dev); | ||
20 | |||
21 | void hwmon_device_unregister(struct class_device *cdev); | ||
22 | |||
23 | /* Scale user input to sensible values */ | ||
24 | static inline int SENSORS_LIMIT(long value, long low, long high) | ||
25 | { | ||
26 | if (value < low) | ||
27 | return low; | ||
28 | else if (value > high) | ||
29 | return high; | ||
30 | else | ||
31 | return value; | ||
32 | } | ||
33 | |||
34 | #endif | ||
35 | |||
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 33f08258f22b..44f30876a1c9 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* ------------------------------------------------------------------------- */ | 1 | /* ------------------------------------------------------------------------- */ |
2 | /* */ | 2 | /* */ |
3 | /* i2c.h - definitions for the i2c-bus interface */ | 3 | /* i2c-id.h - identifier values for i2c drivers and adapters */ |
4 | /* */ | 4 | /* */ |
5 | /* ------------------------------------------------------------------------- */ | 5 | /* ------------------------------------------------------------------------- */ |
6 | /* Copyright (C) 1995-1999 Simon G. Vogl | 6 | /* Copyright (C) 1995-1999 Simon G. Vogl |
@@ -24,16 +24,6 @@ | |||
24 | #define LINUX_I2C_ID_H | 24 | #define LINUX_I2C_ID_H |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * This file is part of the i2c-bus package and contains the identifier | ||
28 | * values for drivers, adapters and other folk populating these serial | ||
29 | * worlds. | ||
30 | * | ||
31 | * These will change often (i.e. additions) , therefore this has been | ||
32 | * separated from the functional interface definitions of the i2c api. | ||
33 | * | ||
34 | */ | ||
35 | |||
36 | /* | ||
37 | * ---- Driver types ----------------------------------------------------- | 27 | * ---- Driver types ----------------------------------------------------- |
38 | * device id name + number function description, i2c address(es) | 28 | * device id name + number function description, i2c address(es) |
39 | * | 29 | * |
@@ -170,151 +160,113 @@ | |||
170 | 160 | ||
171 | /* | 161 | /* |
172 | * ---- Adapter types ---------------------------------------------------- | 162 | * ---- Adapter types ---------------------------------------------------- |
173 | * | ||
174 | * First, we distinguish between several algorithms to access the hardware | ||
175 | * interface types, as a PCF 8584 needs other care than a bit adapter. | ||
176 | */ | ||
177 | |||
178 | #define I2C_ALGO_NONE 0x000000 | ||
179 | #define I2C_ALGO_BIT 0x010000 /* bit style adapters */ | ||
180 | #define I2C_ALGO_PCF 0x020000 /* PCF 8584 style adapters */ | ||
181 | #define I2C_ALGO_ATI 0x030000 /* ATI video card */ | ||
182 | #define I2C_ALGO_SMBUS 0x040000 | ||
183 | #define I2C_ALGO_ISA 0x050000 /* lm_sensors ISA pseudo-adapter */ | ||
184 | #define I2C_ALGO_SAA7146 0x060000 /* SAA 7146 video decoder bus */ | ||
185 | #define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */ | ||
186 | #define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */ | ||
187 | #define I2C_ALGO_SAA7134 0x090000 | ||
188 | #define I2C_ALGO_MPC824X 0x0a0000 /* Motorola 8240 / 8245 */ | ||
189 | #define I2C_ALGO_IPMI 0x0b0000 /* IPMI dummy adapter */ | ||
190 | #define I2C_ALGO_IPMB 0x0c0000 /* IPMB adapter */ | ||
191 | #define I2C_ALGO_MPC107 0x0d0000 | ||
192 | #define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */ | ||
193 | |||
194 | #define I2C_ALGO_MPC8XX 0x110000 /* MPC8xx PowerPC I2C algorithm */ | ||
195 | #define I2C_ALGO_OCP 0x120000 /* IBM or otherwise On-chip I2C algorithm */ | ||
196 | #define I2C_ALGO_BITHS 0x130000 /* enhanced bit style adapters */ | ||
197 | #define I2C_ALGO_IOP3XX 0x140000 /* XSCALE IOP3XX On-chip I2C alg */ | ||
198 | #define I2C_ALGO_SIBYTE 0x150000 /* Broadcom SiByte SOCs */ | ||
199 | #define I2C_ALGO_SGI 0x160000 /* SGI algorithm */ | ||
200 | |||
201 | #define I2C_ALGO_USB 0x170000 /* USB algorithm */ | ||
202 | #define I2C_ALGO_VIRT 0x180000 /* Virtual bus adapter */ | ||
203 | |||
204 | #define I2C_ALGO_MV64XXX 0x190000 /* Marvell mv64xxx i2c ctlr */ | ||
205 | #define I2C_ALGO_PCA 0x1a0000 /* PCA 9564 style adapters */ | ||
206 | #define I2C_ALGO_AU1550 0x1b0000 /* Au1550 PSC algorithm */ | ||
207 | |||
208 | #define I2C_ALGO_EXP 0x800000 /* experimental */ | ||
209 | |||
210 | #define I2C_ALGO_MASK 0xff0000 /* Mask for algorithms */ | ||
211 | #define I2C_ALGO_SHIFT 0x10 /* right shift to get index values */ | ||
212 | |||
213 | #define I2C_HW_ADAPS 0x10000 /* # adapter types */ | ||
214 | #define I2C_HW_MASK 0xffff | ||
215 | |||
216 | |||
217 | /* hw specific modules that are defined per algorithm layer | ||
218 | */ | 163 | */ |
219 | 164 | ||
220 | /* --- Bit algorithm adapters */ | 165 | /* --- Bit algorithm adapters */ |
221 | #define I2C_HW_B_LP 0x00 /* Parallel port Philips style adapter */ | 166 | #define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ |
222 | #define I2C_HW_B_LPC 0x01 /* Parallel port, over control reg. */ | 167 | #define I2C_HW_B_LPC 0x010001 /* Parallel port control reg. */ |
223 | #define I2C_HW_B_SER 0x02 /* Serial line interface */ | 168 | #define I2C_HW_B_SER 0x010002 /* Serial line interface */ |
224 | #define I2C_HW_B_ELV 0x03 /* ELV Card */ | 169 | #define I2C_HW_B_ELV 0x010003 /* ELV Card */ |
225 | #define I2C_HW_B_VELLE 0x04 /* Vellemann K8000 */ | 170 | #define I2C_HW_B_VELLE 0x010004 /* Vellemann K8000 */ |
226 | #define I2C_HW_B_BT848 0x05 /* BT848 video boards */ | 171 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ |
227 | #define I2C_HW_B_WNV 0x06 /* Winnov Videums */ | 172 | #define I2C_HW_B_WNV 0x010006 /* Winnov Videums */ |
228 | #define I2C_HW_B_VIA 0x07 /* Via vt82c586b */ | 173 | #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ |
229 | #define I2C_HW_B_HYDRA 0x08 /* Apple Hydra Mac I/O */ | 174 | #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ |
230 | #define I2C_HW_B_G400 0x09 /* Matrox G400 */ | 175 | #define I2C_HW_B_G400 0x010009 /* Matrox G400 */ |
231 | #define I2C_HW_B_I810 0x0a /* Intel I810 */ | 176 | #define I2C_HW_B_I810 0x01000a /* Intel I810 */ |
232 | #define I2C_HW_B_VOO 0x0b /* 3dfx Voodoo 3 / Banshee */ | 177 | #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ |
233 | #define I2C_HW_B_PPORT 0x0c /* Primitive parallel port adapter */ | 178 | #define I2C_HW_B_PPORT 0x01000c /* Primitive parallel port adapter */ |
234 | #define I2C_HW_B_SAVG 0x0d /* Savage 4 */ | 179 | #define I2C_HW_B_SAVG 0x01000d /* Savage 4 */ |
235 | #define I2C_HW_B_SCX200 0x0e /* Nat'l Semi SCx200 I2C */ | 180 | #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ |
236 | #define I2C_HW_B_RIVA 0x10 /* Riva based graphics cards */ | 181 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ |
237 | #define I2C_HW_B_IOC 0x11 /* IOC bit-wiggling */ | 182 | #define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */ |
238 | #define I2C_HW_B_TSUNA 0x12 /* DEC Tsunami chipset */ | 183 | #define I2C_HW_B_TSUNA 0x010012 /* DEC Tsunami chipset */ |
239 | #define I2C_HW_B_FRODO 0x13 /* 2d3D, Inc. SA-1110 Development Board */ | 184 | #define I2C_HW_B_FRODO 0x010013 /* 2d3D SA-1110 Development Board */ |
240 | #define I2C_HW_B_OMAHA 0x14 /* Omaha I2C interface (ARM) */ | 185 | #define I2C_HW_B_OMAHA 0x010014 /* Omaha I2C interface (ARM) */ |
241 | #define I2C_HW_B_GUIDE 0x15 /* Guide bit-basher */ | 186 | #define I2C_HW_B_GUIDE 0x010015 /* Guide bit-basher */ |
242 | #define I2C_HW_B_IXP2000 0x16 /* GPIO on IXP2000 systems */ | 187 | #define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */ |
243 | #define I2C_HW_B_IXP4XX 0x17 /* GPIO on IXP4XX systems */ | 188 | #define I2C_HW_B_IXP4XX 0x010017 /* GPIO on IXP4XX systems */ |
244 | #define I2C_HW_B_S3VIA 0x18 /* S3Via ProSavage adapter */ | 189 | #define I2C_HW_B_S3VIA 0x010018 /* S3Via ProSavage adapter */ |
245 | #define I2C_HW_B_ZR36067 0x19 /* Zoran-36057/36067 based boards */ | 190 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ |
246 | #define I2C_HW_B_PCILYNX 0x1a /* TI PCILynx I2C adapter */ | 191 | #define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */ |
247 | #define I2C_HW_B_CX2388x 0x1b /* connexant 2388x based tv cards */ | 192 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ |
193 | #define I2C_HW_B_NVIDIA 0x01001c /* nvidia framebuffer driver */ | ||
194 | #define I2C_HW_B_SAVAGE 0x01001d /* savage framebuffer driver */ | ||
195 | #define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */ | ||
248 | 196 | ||
249 | /* --- PCF 8584 based algorithms */ | 197 | /* --- PCF 8584 based algorithms */ |
250 | #define I2C_HW_P_LP 0x00 /* Parallel port interface */ | 198 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ |
251 | #define I2C_HW_P_ISA 0x01 /* generic ISA Bus inteface card */ | 199 | #define I2C_HW_P_ISA 0x020001 /* generic ISA Bus inteface card */ |
252 | #define I2C_HW_P_ELEK 0x02 /* Elektor ISA Bus inteface card */ | 200 | #define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */ |
253 | 201 | ||
254 | /* --- PCA 9564 based algorithms */ | 202 | /* --- PCA 9564 based algorithms */ |
255 | #define I2C_HW_A_ISA 0x00 /* generic ISA Bus interface card */ | 203 | #define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */ |
256 | 204 | ||
257 | /* --- ACPI Embedded controller algorithms */ | 205 | /* --- ACPI Embedded controller algorithms */ |
258 | #define I2C_HW_ACPI_EC 0x00 | 206 | #define I2C_HW_ACPI_EC 0x1f0000 |
259 | 207 | ||
260 | /* --- MPC824x PowerPC adapters */ | 208 | /* --- MPC824x PowerPC adapters */ |
261 | #define I2C_HW_MPC824X 0x00 /* Motorola 8240 / 8245 */ | 209 | #define I2C_HW_MPC824X 0x100001 /* Motorola 8240 / 8245 */ |
262 | 210 | ||
263 | /* --- MPC8xx PowerPC adapters */ | 211 | /* --- MPC8xx PowerPC adapters */ |
264 | #define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */ | 212 | #define I2C_HW_MPC8XX_EPON 0x110000 /* Eponymous MPC8xx I2C adapter */ |
265 | 213 | ||
266 | /* --- ITE based algorithms */ | 214 | /* --- ITE based algorithms */ |
267 | #define I2C_HW_I_IIC 0x00 /* controller on the ITE */ | 215 | #define I2C_HW_I_IIC 0x080000 /* controller on the ITE */ |
268 | 216 | ||
269 | /* --- PowerPC on-chip adapters */ | 217 | /* --- PowerPC on-chip adapters */ |
270 | #define I2C_HW_OCP 0x00 /* IBM on-chip I2C adapter */ | 218 | #define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */ |
271 | 219 | ||
272 | /* --- Broadcom SiByte adapters */ | 220 | /* --- Broadcom SiByte adapters */ |
273 | #define I2C_HW_SIBYTE 0x00 | 221 | #define I2C_HW_SIBYTE 0x150000 |
274 | 222 | ||
275 | /* --- SGI adapters */ | 223 | /* --- SGI adapters */ |
276 | #define I2C_HW_SGI_VINO 0x00 | 224 | #define I2C_HW_SGI_VINO 0x160000 |
277 | #define I2C_HW_SGI_MACE 0x01 | 225 | #define I2C_HW_SGI_MACE 0x160001 |
278 | 226 | ||
279 | /* --- XSCALE on-chip adapters */ | 227 | /* --- XSCALE on-chip adapters */ |
280 | #define I2C_HW_IOP3XX 0x00 | 228 | #define I2C_HW_IOP3XX 0x140000 |
281 | 229 | ||
282 | /* --- Au1550 PSC adapters adapters */ | 230 | /* --- Au1550 PSC adapters adapters */ |
283 | #define I2C_HW_AU1550_PSC 0x00 | 231 | #define I2C_HW_AU1550_PSC 0x1b0000 |
284 | 232 | ||
285 | /* --- SMBus only adapters */ | 233 | /* --- SMBus only adapters */ |
286 | #define I2C_HW_SMBUS_PIIX4 0x00 | 234 | #define I2C_HW_SMBUS_PIIX4 0x040000 |
287 | #define I2C_HW_SMBUS_ALI15X3 0x01 | 235 | #define I2C_HW_SMBUS_ALI15X3 0x040001 |
288 | #define I2C_HW_SMBUS_VIA2 0x02 | 236 | #define I2C_HW_SMBUS_VIA2 0x040002 |
289 | #define I2C_HW_SMBUS_VOODOO3 0x03 | 237 | #define I2C_HW_SMBUS_VOODOO3 0x040003 |
290 | #define I2C_HW_SMBUS_I801 0x04 | 238 | #define I2C_HW_SMBUS_I801 0x040004 |
291 | #define I2C_HW_SMBUS_AMD756 0x05 | 239 | #define I2C_HW_SMBUS_AMD756 0x040005 |
292 | #define I2C_HW_SMBUS_SIS5595 0x06 | 240 | #define I2C_HW_SMBUS_SIS5595 0x040006 |
293 | #define I2C_HW_SMBUS_ALI1535 0x07 | 241 | #define I2C_HW_SMBUS_ALI1535 0x040007 |
294 | #define I2C_HW_SMBUS_SIS630 0x08 | 242 | #define I2C_HW_SMBUS_SIS630 0x040008 |
295 | #define I2C_HW_SMBUS_SIS96X 0x09 | 243 | #define I2C_HW_SMBUS_SIS96X 0x040009 |
296 | #define I2C_HW_SMBUS_AMD8111 0x0a | 244 | #define I2C_HW_SMBUS_AMD8111 0x04000a |
297 | #define I2C_HW_SMBUS_SCX200 0x0b | 245 | #define I2C_HW_SMBUS_SCX200 0x04000b |
298 | #define I2C_HW_SMBUS_NFORCE2 0x0c | 246 | #define I2C_HW_SMBUS_NFORCE2 0x04000c |
299 | #define I2C_HW_SMBUS_W9968CF 0x0d | 247 | #define I2C_HW_SMBUS_W9968CF 0x04000d |
300 | #define I2C_HW_SMBUS_OV511 0x0e /* OV511(+) USB 1.1 webcam ICs */ | 248 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ |
301 | #define I2C_HW_SMBUS_OV518 0x0f /* OV518(+) USB 1.1 webcam ICs */ | 249 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ |
302 | #define I2C_HW_SMBUS_OV519 0x10 /* OV519 USB 1.1 webcam IC */ | 250 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ |
303 | #define I2C_HW_SMBUS_OVFX2 0x11 /* Cypress/OmniVision FX2 webcam */ | 251 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ |
304 | 252 | ||
305 | /* --- ISA pseudo-adapter */ | 253 | /* --- ISA pseudo-adapter */ |
306 | #define I2C_HW_ISA 0x00 | 254 | #define I2C_HW_ISA 0x050000 |
307 | 255 | ||
308 | /* --- IPMI pseudo-adapter */ | 256 | /* --- IPMI pseudo-adapter */ |
309 | #define I2C_HW_IPMI 0x00 | 257 | #define I2C_HW_IPMI 0x0b0000 |
310 | 258 | ||
311 | /* --- IPMB adapter */ | 259 | /* --- IPMB adapter */ |
312 | #define I2C_HW_IPMB 0x00 | 260 | #define I2C_HW_IPMB 0x0c0000 |
313 | 261 | ||
314 | /* --- MCP107 adapter */ | 262 | /* --- MCP107 adapter */ |
315 | #define I2C_HW_MPC107 0x00 | 263 | #define I2C_HW_MPC107 0x0d0000 |
316 | 264 | ||
317 | /* --- Marvell mv64xxx i2c adapter */ | 265 | /* --- Marvell mv64xxx i2c adapter */ |
318 | #define I2C_HW_MV64XXX 0x00 | 266 | #define I2C_HW_MV64XXX 0x190000 |
267 | |||
268 | /* --- Miscellaneous adapters */ | ||
269 | #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ | ||
270 | #define I2C_HW_SAA7134 0x090000 /* SAA7134 video decoder bus */ | ||
319 | 271 | ||
320 | #endif /* LINUX_I2C_ID_H */ | 272 | #endif /* LINUX_I2C_ID_H */ |
diff --git a/include/linux/i2c-isa.h b/include/linux/i2c-isa.h new file mode 100644 index 000000000000..67e3598c4cec --- /dev/null +++ b/include/linux/i2c-isa.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * i2c-isa.h - definitions for the i2c-isa pseudo-i2c-adapter interface | ||
3 | * | ||
4 | * Copyright (C) 2005 Jean Delvare <khali@linux-fr.org> | ||
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 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _LINUX_I2C_ISA_H | ||
22 | #define _LINUX_I2C_ISA_H | ||
23 | |||
24 | #include <linux/i2c.h> | ||
25 | |||
26 | extern int i2c_isa_add_driver(struct i2c_driver *driver); | ||
27 | extern int i2c_isa_del_driver(struct i2c_driver *driver); | ||
28 | |||
29 | /* Detect whether we are on the isa bus. This is only useful to hybrid | ||
30 | (i2c+isa) drivers. */ | ||
31 | #define i2c_is_isa_adapter(adapptr) \ | ||
32 | ((adapptr)->id == I2C_HW_ISA) | ||
33 | #define i2c_is_isa_client(clientptr) \ | ||
34 | i2c_is_isa_adapter((clientptr)->adapter) | ||
35 | |||
36 | #endif /* _LINUX_I2C_ISA_H */ | ||
diff --git a/include/linux/i2c-sensor.h b/include/linux/i2c-sensor.h deleted file mode 100644 index 21b625204956..000000000000 --- a/include/linux/i2c-sensor.h +++ /dev/null | |||
@@ -1,263 +0,0 @@ | |||
1 | /* | ||
2 | i2c-sensor.h - Part of the i2c package | ||
3 | was originally sensors.h - Part of lm_sensors, Linux kernel modules | ||
4 | for hardware monitoring | ||
5 | Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl> | ||
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 as published by | ||
9 | the Free Software Foundation; either version 2 of the License, or | ||
10 | (at your option) any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program; if not, write to the Free Software | ||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef _LINUX_I2C_SENSOR_H | ||
23 | #define _LINUX_I2C_SENSOR_H | ||
24 | |||
25 | /* A structure containing detect information. | ||
26 | Force variables overrule all other variables; they force a detection on | ||
27 | that place. If a specific chip is given, the module blindly assumes this | ||
28 | chip type is present; if a general force (kind == 0) is given, the module | ||
29 | will still try to figure out what type of chip is present. This is useful | ||
30 | if for some reasons the detect for SMBus or ISA address space filled | ||
31 | fails. | ||
32 | probe: insmod parameter. Initialize this list with I2C_CLIENT_ISA_END values. | ||
33 | A list of pairs. The first value is a bus number (ANY_I2C_ISA_BUS for | ||
34 | the ISA bus, -1 for any I2C bus), the second is the address. | ||
35 | kind: The kind of chip. 0 equals any chip. | ||
36 | */ | ||
37 | struct i2c_force_data { | ||
38 | unsigned short *force; | ||
39 | unsigned short kind; | ||
40 | }; | ||
41 | |||
42 | /* A structure containing the detect information. | ||
43 | normal_i2c: filled in by the module writer. Terminated by I2C_CLIENT_ISA_END. | ||
44 | A list of I2C addresses which should normally be examined. | ||
45 | normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END. | ||
46 | A list of ISA addresses which should normally be examined. | ||
47 | probe: insmod parameter. Initialize this list with I2C_CLIENT_ISA_END values. | ||
48 | A list of pairs. The first value is a bus number (ANY_I2C_ISA_BUS for | ||
49 | the ISA bus, -1 for any I2C bus), the second is the address. These | ||
50 | addresses are also probed, as if they were in the 'normal' list. | ||
51 | ignore: insmod parameter. Initialize this list with I2C_CLIENT_ISA_END values. | ||
52 | A list of pairs. The first value is a bus number (ANY_I2C_ISA_BUS for | ||
53 | the ISA bus, -1 for any I2C bus), the second is the I2C address. These | ||
54 | addresses are never probed. This parameter overrules 'normal' and | ||
55 | 'probe', but not the 'force' lists. | ||
56 | force_data: insmod parameters. A list, ending with an element of which | ||
57 | the force field is NULL. | ||
58 | */ | ||
59 | struct i2c_address_data { | ||
60 | unsigned short *normal_i2c; | ||
61 | unsigned int *normal_isa; | ||
62 | unsigned short *probe; | ||
63 | unsigned short *ignore; | ||
64 | struct i2c_force_data *forces; | ||
65 | }; | ||
66 | |||
67 | #define SENSORS_MODULE_PARM_FORCE(name) \ | ||
68 | I2C_CLIENT_MODULE_PARM(force_ ## name, \ | ||
69 | "List of adapter,address pairs which are unquestionably" \ | ||
70 | " assumed to contain a `" # name "' chip") | ||
71 | |||
72 | |||
73 | /* This defines several insmod variables, and the addr_data structure */ | ||
74 | #define SENSORS_INSMOD \ | ||
75 | I2C_CLIENT_MODULE_PARM(probe, \ | ||
76 | "List of adapter,address pairs to scan additionally"); \ | ||
77 | I2C_CLIENT_MODULE_PARM(ignore, \ | ||
78 | "List of adapter,address pairs not to scan"); \ | ||
79 | static struct i2c_address_data addr_data = { \ | ||
80 | .normal_i2c = normal_i2c, \ | ||
81 | .normal_isa = normal_isa, \ | ||
82 | .probe = probe, \ | ||
83 | .ignore = ignore, \ | ||
84 | .forces = forces, \ | ||
85 | } | ||
86 | |||
87 | /* The following functions create an enum with the chip names as elements. | ||
88 | The first element of the enum is any_chip. These are the only macros | ||
89 | a module will want to use. */ | ||
90 | |||
91 | #define SENSORS_INSMOD_0 \ | ||
92 | enum chips { any_chip }; \ | ||
93 | I2C_CLIENT_MODULE_PARM(force, \ | ||
94 | "List of adapter,address pairs to boldly assume " \ | ||
95 | "to be present"); \ | ||
96 | static struct i2c_force_data forces[] = {{force,any_chip},{NULL}}; \ | ||
97 | SENSORS_INSMOD | ||
98 | |||
99 | #define SENSORS_INSMOD_1(chip1) \ | ||
100 | enum chips { any_chip, chip1 }; \ | ||
101 | I2C_CLIENT_MODULE_PARM(force, \ | ||
102 | "List of adapter,address pairs to boldly assume " \ | ||
103 | "to be present"); \ | ||
104 | SENSORS_MODULE_PARM_FORCE(chip1); \ | ||
105 | static struct i2c_force_data forces[] = {{force,any_chip},\ | ||
106 | {force_ ## chip1,chip1}, \ | ||
107 | {NULL}}; \ | ||
108 | SENSORS_INSMOD | ||
109 | |||
110 | #define SENSORS_INSMOD_2(chip1,chip2) \ | ||
111 | enum chips { any_chip, chip1, chip2 }; \ | ||
112 | I2C_CLIENT_MODULE_PARM(force, \ | ||
113 | "List of adapter,address pairs to boldly assume " \ | ||
114 | "to be present"); \ | ||
115 | SENSORS_MODULE_PARM_FORCE(chip1); \ | ||
116 | SENSORS_MODULE_PARM_FORCE(chip2); \ | ||
117 | static struct i2c_force_data forces[] = {{force,any_chip}, \ | ||
118 | {force_ ## chip1,chip1}, \ | ||
119 | {force_ ## chip2,chip2}, \ | ||
120 | {NULL}}; \ | ||
121 | SENSORS_INSMOD | ||
122 | |||
123 | #define SENSORS_INSMOD_3(chip1,chip2,chip3) \ | ||
124 | enum chips { any_chip, chip1, chip2, chip3 }; \ | ||
125 | I2C_CLIENT_MODULE_PARM(force, \ | ||
126 | "List of adapter,address pairs to boldly assume " \ | ||
127 | "to be present"); \ | ||
128 | SENSORS_MODULE_PARM_FORCE(chip1); \ | ||
129 | SENSORS_MODULE_PARM_FORCE(chip2); \ | ||
130 | SENSORS_MODULE_PARM_FORCE(chip3); \ | ||
131 | static struct i2c_force_data forces[] = {{force,any_chip}, \ | ||
132 | {force_ ## chip1,chip1}, \ | ||
133 | {force_ ## chip2,chip2}, \ | ||
134 | {force_ ## chip3,chip3}, \ | ||
135 | {NULL}}; \ | ||
136 | SENSORS_INSMOD | ||
137 | |||
138 | #define SENSORS_INSMOD_4(chip1,chip2,chip3,chip4) \ | ||
139 | enum chips { any_chip, chip1, chip2, chip3, chip4 }; \ | ||
140 | I2C_CLIENT_MODULE_PARM(force, \ | ||
141 | "List of adapter,address pairs to boldly assume " \ | ||
142 | "to be present"); \ | ||
143 | SENSORS_MODULE_PARM_FORCE(chip1); \ | ||
144 | SENSORS_MODULE_PARM_FORCE(chip2); \ | ||
145 | SENSORS_MODULE_PARM_FORCE(chip3); \ | ||
146 | SENSORS_MODULE_PARM_FORCE(chip4); \ | ||
147 | static struct i2c_force_data forces[] = {{force,any_chip}, \ | ||
148 | {force_ ## chip1,chip1}, \ | ||
149 | {force_ ## chip2,chip2}, \ | ||
150 | {force_ ## chip3,chip3}, \ | ||
151 | {force_ ## chip4,chip4}, \ | ||
152 | {NULL}}; \ | ||
153 | SENSORS_INSMOD | ||
154 | |||
155 | #define SENSORS_INSMOD_5(chip1,chip2,chip3,chip4,chip5) \ | ||
156 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \ | ||
157 | I2C_CLIENT_MODULE_PARM(force, \ | ||
158 | "List of adapter,address pairs to boldly assume " \ | ||
159 | "to be present"); \ | ||
160 | SENSORS_MODULE_PARM_FORCE(chip1); \ | ||
161 | SENSORS_MODULE_PARM_FORCE(chip2); \ | ||
162 | SENSORS_MODULE_PARM_FORCE(chip3); \ | ||
163 | SENSORS_MODULE_PARM_FORCE(chip4); \ | ||
164 | SENSORS_MODULE_PARM_FORCE(chip5); \ | ||
165 | static struct i2c_force_data forces[] = {{force,any_chip}, \ | ||
166 | {force_ ## chip1,chip1}, \ | ||
167 | {force_ ## chip2,chip2}, \ | ||
168 | {force_ ## chip3,chip3}, \ | ||
169 | {force_ ## chip4,chip4}, \ | ||
170 | {force_ ## chip5,chip5}, \ | ||
171 | {NULL}}; \ | ||
172 | SENSORS_INSMOD | ||
173 | |||
174 | #define SENSORS_INSMOD_6(chip1,chip2,chip3,chip4,chip5,chip6) \ | ||
175 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \ | ||
176 | I2C_CLIENT_MODULE_PARM(force, \ | ||
177 | "List of adapter,address pairs to boldly assume " \ | ||
178 | "to be present"); \ | ||
179 | SENSORS_MODULE_PARM_FORCE(chip1); \ | ||
180 | SENSORS_MODULE_PARM_FORCE(chip2); \ | ||
181 | SENSORS_MODULE_PARM_FORCE(chip3); \ | ||
182 | SENSORS_MODULE_PARM_FORCE(chip4); \ | ||
183 | SENSORS_MODULE_PARM_FORCE(chip5); \ | ||
184 | SENSORS_MODULE_PARM_FORCE(chip6); \ | ||
185 | static struct i2c_force_data forces[] = {{force,any_chip}, \ | ||
186 | {force_ ## chip1,chip1}, \ | ||
187 | {force_ ## chip2,chip2}, \ | ||
188 | {force_ ## chip3,chip3}, \ | ||
189 | {force_ ## chip4,chip4}, \ | ||
190 | {force_ ## chip5,chip5}, \ | ||
191 | {force_ ## chip6,chip6}, \ | ||
192 | {NULL}}; \ | ||
193 | SENSORS_INSMOD | ||
194 | |||
195 | #define SENSORS_INSMOD_7(chip1,chip2,chip3,chip4,chip5,chip6,chip7) \ | ||
196 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, chip7 }; \ | ||
197 | I2C_CLIENT_MODULE_PARM(force, \ | ||
198 | "List of adapter,address pairs to boldly assume " \ | ||
199 | "to be present"); \ | ||
200 | SENSORS_MODULE_PARM_FORCE(chip1); \ | ||
201 | SENSORS_MODULE_PARM_FORCE(chip2); \ | ||
202 | SENSORS_MODULE_PARM_FORCE(chip3); \ | ||
203 | SENSORS_MODULE_PARM_FORCE(chip4); \ | ||
204 | SENSORS_MODULE_PARM_FORCE(chip5); \ | ||
205 | SENSORS_MODULE_PARM_FORCE(chip6); \ | ||
206 | SENSORS_MODULE_PARM_FORCE(chip7); \ | ||
207 | static struct i2c_force_data forces[] = {{force,any_chip}, \ | ||
208 | {force_ ## chip1,chip1}, \ | ||
209 | {force_ ## chip2,chip2}, \ | ||
210 | {force_ ## chip3,chip3}, \ | ||
211 | {force_ ## chip4,chip4}, \ | ||
212 | {force_ ## chip5,chip5}, \ | ||
213 | {force_ ## chip6,chip6}, \ | ||
214 | {force_ ## chip7,chip7}, \ | ||
215 | {NULL}}; \ | ||
216 | SENSORS_INSMOD | ||
217 | |||
218 | #define SENSORS_INSMOD_8(chip1,chip2,chip3,chip4,chip5,chip6,chip7,chip8) \ | ||
219 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8 }; \ | ||
220 | I2C_CLIENT_MODULE_PARM(force, \ | ||
221 | "List of adapter,address pairs to boldly assume " \ | ||
222 | "to be present"); \ | ||
223 | SENSORS_MODULE_PARM_FORCE(chip1); \ | ||
224 | SENSORS_MODULE_PARM_FORCE(chip2); \ | ||
225 | SENSORS_MODULE_PARM_FORCE(chip3); \ | ||
226 | SENSORS_MODULE_PARM_FORCE(chip4); \ | ||
227 | SENSORS_MODULE_PARM_FORCE(chip5); \ | ||
228 | SENSORS_MODULE_PARM_FORCE(chip6); \ | ||
229 | SENSORS_MODULE_PARM_FORCE(chip7); \ | ||
230 | SENSORS_MODULE_PARM_FORCE(chip8); \ | ||
231 | static struct i2c_force_data forces[] = {{force,any_chip}, \ | ||
232 | {force_ ## chip1,chip1}, \ | ||
233 | {force_ ## chip2,chip2}, \ | ||
234 | {force_ ## chip3,chip3}, \ | ||
235 | {force_ ## chip4,chip4}, \ | ||
236 | {force_ ## chip5,chip5}, \ | ||
237 | {force_ ## chip6,chip6}, \ | ||
238 | {force_ ## chip7,chip7}, \ | ||
239 | {force_ ## chip8,chip8}, \ | ||
240 | {NULL}}; \ | ||
241 | SENSORS_INSMOD | ||
242 | |||
243 | /* Detect function. It iterates over all possible addresses itself. For | ||
244 | SMBus addresses, it will only call found_proc if some client is connected | ||
245 | to the SMBus (unless a 'force' matched); for ISA detections, this is not | ||
246 | done. */ | ||
247 | extern int i2c_detect(struct i2c_adapter *adapter, | ||
248 | struct i2c_address_data *address_data, | ||
249 | int (*found_proc) (struct i2c_adapter *, int, int)); | ||
250 | |||
251 | |||
252 | /* This macro is used to scale user-input to sensible values in almost all | ||
253 | chip drivers. */ | ||
254 | static inline int SENSORS_LIMIT(long value, long low, long high) | ||
255 | { | ||
256 | if (value < low) | ||
257 | return low; | ||
258 | else if (value > high) | ||
259 | return high; | ||
260 | else | ||
261 | return value; | ||
262 | } | ||
263 | #endif /* def _LINUX_I2C_SENSOR_H */ | ||
diff --git a/include/linux/i2c-vid.h b/include/linux/i2c-vid.h deleted file mode 100644 index 41d0635e0ba9..000000000000 --- a/include/linux/i2c-vid.h +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | /* | ||
2 | i2c-vid.h - Part of lm_sensors, Linux kernel modules for hardware | ||
3 | monitoring | ||
4 | Copyright (c) 2002 Mark D. Studebaker <mdsxyz123@yahoo.com> | ||
5 | With assistance from Trent Piepho <xyzzy@speakeasy.org> | ||
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 as published by | ||
9 | the Free Software Foundation; either version 2 of the License, or | ||
10 | (at your option) any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program; if not, write to the Free Software | ||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | ||
21 | |||
22 | /* | ||
23 | This file contains common code for decoding VID pins. | ||
24 | This file is #included in various chip drivers in this directory. | ||
25 | As the user is unlikely to load more than one driver which | ||
26 | includes this code we don't worry about the wasted space. | ||
27 | Reference: VRM x.y DC-DC Converter Design Guidelines, | ||
28 | available at http://developer.intel.com | ||
29 | */ | ||
30 | |||
31 | /* | ||
32 | AMD Opteron processors don't follow the Intel VRM spec. | ||
33 | I'm going to "make up" 2.4 as the VRM spec for the Opterons. | ||
34 | No good reason just a mnemonic for the 24x Opteron processor | ||
35 | series | ||
36 | |||
37 | Opteron VID encoding is: | ||
38 | |||
39 | 00000 = 1.550 V | ||
40 | 00001 = 1.525 V | ||
41 | . . . . | ||
42 | 11110 = 0.800 V | ||
43 | 11111 = 0.000 V (off) | ||
44 | */ | ||
45 | |||
46 | /* | ||
47 | Legal val values 0x00 - 0x1f; except for VRD 10.0, 0x00 - 0x3f. | ||
48 | vrm is the Intel VRM document version. | ||
49 | Note: vrm version is scaled by 10 and the return value is scaled by 1000 | ||
50 | to avoid floating point in the kernel. | ||
51 | */ | ||
52 | |||
53 | int i2c_which_vrm(void); | ||
54 | |||
55 | #define DEFAULT_VRM 82 | ||
56 | |||
57 | static inline int vid_from_reg(int val, int vrm) | ||
58 | { | ||
59 | int vid; | ||
60 | |||
61 | switch(vrm) { | ||
62 | |||
63 | case 0: | ||
64 | return 0; | ||
65 | |||
66 | case 100: /* VRD 10.0 */ | ||
67 | if((val & 0x1f) == 0x1f) | ||
68 | return 0; | ||
69 | if((val & 0x1f) <= 0x09 || val == 0x0a) | ||
70 | vid = 10875 - (val & 0x1f) * 250; | ||
71 | else | ||
72 | vid = 18625 - (val & 0x1f) * 250; | ||
73 | if(val & 0x20) | ||
74 | vid -= 125; | ||
75 | vid /= 10; /* only return 3 dec. places for now */ | ||
76 | return vid; | ||
77 | |||
78 | case 24: /* Opteron processor */ | ||
79 | return(val == 0x1f ? 0 : 1550 - val * 25); | ||
80 | |||
81 | case 91: /* VRM 9.1 */ | ||
82 | case 90: /* VRM 9.0 */ | ||
83 | return(val == 0x1f ? 0 : | ||
84 | 1850 - val * 25); | ||
85 | |||
86 | case 85: /* VRM 8.5 */ | ||
87 | return((val & 0x10 ? 25 : 0) + | ||
88 | ((val & 0x0f) > 0x04 ? 2050 : 1250) - | ||
89 | ((val & 0x0f) * 50)); | ||
90 | |||
91 | case 84: /* VRM 8.4 */ | ||
92 | val &= 0x0f; | ||
93 | /* fall through */ | ||
94 | default: /* VRM 8.2 */ | ||
95 | return(val == 0x1f ? 0 : | ||
96 | val & 0x10 ? 5100 - (val) * 100 : | ||
97 | 2050 - (val) * 50); | ||
98 | } | ||
99 | } | ||
100 | |||
101 | static inline int vid_to_reg(int val, int vrm) | ||
102 | { | ||
103 | switch (vrm) { | ||
104 | case 91: /* VRM 9.1 */ | ||
105 | case 90: /* VRM 9.0 */ | ||
106 | return ((val >= 1100) && (val <= 1850) ? | ||
107 | ((18499 - val * 10) / 25 + 5) / 10 : -1); | ||
108 | default: | ||
109 | return -1; | ||
110 | } | ||
111 | } | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index be837b13f297..be35332b67e6 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -34,6 +34,13 @@ | |||
34 | #include <linux/device.h> /* for struct device */ | 34 | #include <linux/device.h> /* for struct device */ |
35 | #include <asm/semaphore.h> | 35 | #include <asm/semaphore.h> |
36 | 36 | ||
37 | /* --- For i2c-isa ---------------------------------------------------- */ | ||
38 | |||
39 | extern void i2c_adapter_dev_release(struct device *dev); | ||
40 | extern struct device_driver i2c_adapter_driver; | ||
41 | extern struct class i2c_adapter_class; | ||
42 | extern struct bus_type i2c_bus_type; | ||
43 | |||
37 | /* --- General options ------------------------------------------------ */ | 44 | /* --- General options ------------------------------------------------ */ |
38 | 45 | ||
39 | struct i2c_msg; | 46 | struct i2c_msg; |
@@ -41,7 +48,6 @@ struct i2c_algorithm; | |||
41 | struct i2c_adapter; | 48 | struct i2c_adapter; |
42 | struct i2c_client; | 49 | struct i2c_client; |
43 | struct i2c_driver; | 50 | struct i2c_driver; |
44 | struct i2c_client_address_data; | ||
45 | union i2c_smbus_data; | 51 | union i2c_smbus_data; |
46 | 52 | ||
47 | /* | 53 | /* |
@@ -143,12 +149,9 @@ struct i2c_driver { | |||
143 | */ | 149 | */ |
144 | struct i2c_client { | 150 | struct i2c_client { |
145 | unsigned int flags; /* div., see below */ | 151 | unsigned int flags; /* div., see below */ |
146 | unsigned int addr; /* chip address - NOTE: 7bit */ | 152 | unsigned short addr; /* chip address - NOTE: 7bit */ |
147 | /* addresses are stored in the */ | 153 | /* addresses are stored in the */ |
148 | /* _LOWER_ 7 bits of this char */ | 154 | /* _LOWER_ 7 bits */ |
149 | /* addr: unsigned int to make lm_sensors i2c-isa adapter work | ||
150 | more cleanly. It does not take any more memory space, due to | ||
151 | alignment considerations */ | ||
152 | struct i2c_adapter *adapter; /* the adapter we sit on */ | 155 | struct i2c_adapter *adapter; /* the adapter we sit on */ |
153 | struct i2c_driver *driver; /* and our access routines */ | 156 | struct i2c_driver *driver; /* and our access routines */ |
154 | int usage_count; /* How many accesses currently */ | 157 | int usage_count; /* How many accesses currently */ |
@@ -160,6 +163,11 @@ struct i2c_client { | |||
160 | }; | 163 | }; |
161 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) | 164 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) |
162 | 165 | ||
166 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) | ||
167 | { | ||
168 | return to_i2c_client(container_of(kobj, struct device, kobj)); | ||
169 | } | ||
170 | |||
163 | static inline void *i2c_get_clientdata (struct i2c_client *dev) | 171 | static inline void *i2c_get_clientdata (struct i2c_client *dev) |
164 | { | 172 | { |
165 | return dev_get_drvdata (&dev->dev); | 173 | return dev_get_drvdata (&dev->dev); |
@@ -170,13 +178,6 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
170 | dev_set_drvdata (&dev->dev, data); | 178 | dev_set_drvdata (&dev->dev, data); |
171 | } | 179 | } |
172 | 180 | ||
173 | #define I2C_DEVNAME(str) .name = str | ||
174 | |||
175 | static inline char *i2c_clientname(struct i2c_client *c) | ||
176 | { | ||
177 | return &c->name[0]; | ||
178 | } | ||
179 | |||
180 | /* | 181 | /* |
181 | * The following structs are for those who like to implement new bus drivers: | 182 | * The following structs are for those who like to implement new bus drivers: |
182 | * i2c_algorithm is the interface to a class of hardware solutions which can | 183 | * i2c_algorithm is the interface to a class of hardware solutions which can |
@@ -184,9 +185,6 @@ static inline char *i2c_clientname(struct i2c_client *c) | |||
184 | * to name two of the most common. | 185 | * to name two of the most common. |
185 | */ | 186 | */ |
186 | struct i2c_algorithm { | 187 | struct i2c_algorithm { |
187 | char name[32]; /* textual description */ | ||
188 | unsigned int id; | ||
189 | |||
190 | /* If an adapter algorithm can't do I2C-level access, set master_xfer | 188 | /* If an adapter algorithm can't do I2C-level access, set master_xfer |
191 | to NULL. If an adapter algorithm can do SMBus access, set | 189 | to NULL. If an adapter algorithm can do SMBus access, set |
192 | smbus_xfer. If set to NULL, the SMBus protocol is simulated | 190 | smbus_xfer. If set to NULL, the SMBus protocol is simulated |
@@ -214,8 +212,7 @@ struct i2c_algorithm { | |||
214 | */ | 212 | */ |
215 | struct i2c_adapter { | 213 | struct i2c_adapter { |
216 | struct module *owner; | 214 | struct module *owner; |
217 | unsigned int id;/* == is algo->id | hwdep.struct->id, */ | 215 | unsigned int id; |
218 | /* for registered values see below */ | ||
219 | unsigned int class; | 216 | unsigned int class; |
220 | struct i2c_algorithm *algo;/* the algorithm to access the bus */ | 217 | struct i2c_algorithm *algo;/* the algorithm to access the bus */ |
221 | void *algo_data; | 218 | void *algo_data; |
@@ -292,12 +289,11 @@ struct i2c_client_address_data { | |||
292 | unsigned short *normal_i2c; | 289 | unsigned short *normal_i2c; |
293 | unsigned short *probe; | 290 | unsigned short *probe; |
294 | unsigned short *ignore; | 291 | unsigned short *ignore; |
295 | unsigned short *force; | 292 | unsigned short **forces; |
296 | }; | 293 | }; |
297 | 294 | ||
298 | /* Internal numbers to terminate lists */ | 295 | /* Internal numbers to terminate lists */ |
299 | #define I2C_CLIENT_END 0xfffeU | 296 | #define I2C_CLIENT_END 0xfffeU |
300 | #define I2C_CLIENT_ISA_END 0xfffefffeU | ||
301 | 297 | ||
302 | /* The numbers to use to set I2C bus address */ | 298 | /* The numbers to use to set I2C bus address */ |
303 | #define ANY_I2C_BUS 0xffff | 299 | #define ANY_I2C_BUS 0xffff |
@@ -356,10 +352,6 @@ extern int i2c_probe(struct i2c_adapter *adapter, | |||
356 | */ | 352 | */ |
357 | extern int i2c_control(struct i2c_client *,unsigned int, unsigned long); | 353 | extern int i2c_control(struct i2c_client *,unsigned int, unsigned long); |
358 | 354 | ||
359 | /* This call returns a unique low identifier for each registered adapter, | ||
360 | * or -1 if the adapter was not registered. | ||
361 | */ | ||
362 | extern int i2c_adapter_id(struct i2c_adapter *adap); | ||
363 | extern struct i2c_adapter* i2c_get_adapter(int id); | 355 | extern struct i2c_adapter* i2c_get_adapter(int id); |
364 | extern void i2c_put_adapter(struct i2c_adapter *adap); | 356 | extern void i2c_put_adapter(struct i2c_adapter *adap); |
365 | 357 | ||
@@ -376,6 +368,12 @@ static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func) | |||
376 | return (func & i2c_get_functionality(adap)) == func; | 368 | return (func & i2c_get_functionality(adap)) == func; |
377 | } | 369 | } |
378 | 370 | ||
371 | /* Return id number for a specific adapter */ | ||
372 | static inline int i2c_adapter_id(struct i2c_adapter *adap) | ||
373 | { | ||
374 | return adap->nr; | ||
375 | } | ||
376 | |||
379 | /* | 377 | /* |
380 | * I2C Message - used for pure i2c transaction, also from /dev interface | 378 | * I2C Message - used for pure i2c transaction, also from /dev interface |
381 | */ | 379 | */ |
@@ -510,9 +508,6 @@ union i2c_smbus_data { | |||
510 | #define I2C_FUNCS 0x0705 /* Get the adapter functionality */ | 508 | #define I2C_FUNCS 0x0705 /* Get the adapter functionality */ |
511 | #define I2C_RDWR 0x0707 /* Combined R/W transfer (one stop only)*/ | 509 | #define I2C_RDWR 0x0707 /* Combined R/W transfer (one stop only)*/ |
512 | #define I2C_PEC 0x0708 /* != 0 for SMBus PEC */ | 510 | #define I2C_PEC 0x0708 /* != 0 for SMBus PEC */ |
513 | #if 0 | ||
514 | #define I2C_ACK_TEST 0x0710 /* See if a slave is at a specific address */ | ||
515 | #endif | ||
516 | 511 | ||
517 | #define I2C_SMBUS 0x0720 /* SMBus-level access */ | 512 | #define I2C_SMBUS 0x0720 /* SMBus-level access */ |
518 | 513 | ||
@@ -556,27 +551,148 @@ union i2c_smbus_data { | |||
556 | module_param_array(var, short, &var##_num, 0); \ | 551 | module_param_array(var, short, &var##_num, 0); \ |
557 | MODULE_PARM_DESC(var,desc) | 552 | MODULE_PARM_DESC(var,desc) |
558 | 553 | ||
559 | /* This is the one you want to use in your own modules */ | 554 | #define I2C_CLIENT_MODULE_PARM_FORCE(name) \ |
555 | I2C_CLIENT_MODULE_PARM(force_##name, \ | ||
556 | "List of adapter,address pairs which are " \ | ||
557 | "unquestionably assumed to contain a `" \ | ||
558 | # name "' chip") | ||
559 | |||
560 | |||
561 | #define I2C_CLIENT_INSMOD_COMMON \ | ||
562 | I2C_CLIENT_MODULE_PARM(probe, "List of adapter,address pairs to scan " \ | ||
563 | "additionally"); \ | ||
564 | I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \ | ||
565 | "scan"); \ | ||
566 | static struct i2c_client_address_data addr_data = { \ | ||
567 | .normal_i2c = normal_i2c, \ | ||
568 | .probe = probe, \ | ||
569 | .ignore = ignore, \ | ||
570 | .forces = forces, \ | ||
571 | } | ||
572 | |||
573 | /* These are the ones you want to use in your own drivers. Pick the one | ||
574 | which matches the number of devices the driver differenciates between. */ | ||
560 | #define I2C_CLIENT_INSMOD \ | 575 | #define I2C_CLIENT_INSMOD \ |
561 | I2C_CLIENT_MODULE_PARM(probe, \ | ||
562 | "List of adapter,address pairs to scan additionally"); \ | ||
563 | I2C_CLIENT_MODULE_PARM(ignore, \ | ||
564 | "List of adapter,address pairs not to scan"); \ | ||
565 | I2C_CLIENT_MODULE_PARM(force, \ | 576 | I2C_CLIENT_MODULE_PARM(force, \ |
566 | "List of adapter,address pairs to boldly assume " \ | 577 | "List of adapter,address pairs to boldly assume " \ |
567 | "to be present"); \ | 578 | "to be present"); \ |
568 | static struct i2c_client_address_data addr_data = { \ | 579 | static unsigned short *forces[] = { \ |
569 | .normal_i2c = normal_i2c, \ | 580 | force, \ |
570 | .probe = probe, \ | 581 | NULL \ |
571 | .ignore = ignore, \ | 582 | }; \ |
572 | .force = force, \ | 583 | I2C_CLIENT_INSMOD_COMMON |
573 | } | 584 | |
574 | 585 | #define I2C_CLIENT_INSMOD_1(chip1) \ | |
575 | /* Detect whether we are on the isa bus. If this returns true, all i2c | 586 | enum chips { any_chip, chip1 }; \ |
576 | access will fail! */ | 587 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ |
577 | #define i2c_is_isa_client(clientptr) \ | 588 | "boldly assume to be present"); \ |
578 | ((clientptr)->adapter->algo->id == I2C_ALGO_ISA) | 589 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
579 | #define i2c_is_isa_adapter(adapptr) \ | 590 | static unsigned short *forces[] = { force, force_##chip1, NULL }; \ |
580 | ((adapptr)->algo->id == I2C_ALGO_ISA) | 591 | I2C_CLIENT_INSMOD_COMMON |
592 | |||
593 | #define I2C_CLIENT_INSMOD_2(chip1, chip2) \ | ||
594 | enum chips { any_chip, chip1, chip2 }; \ | ||
595 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | ||
596 | "boldly assume to be present"); \ | ||
597 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | ||
598 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | ||
599 | static unsigned short *forces[] = { force, force_##chip1, \ | ||
600 | force_##chip2, NULL }; \ | ||
601 | I2C_CLIENT_INSMOD_COMMON | ||
602 | |||
603 | #define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3) \ | ||
604 | enum chips { any_chip, chip1, chip2, chip3 }; \ | ||
605 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | ||
606 | "boldly assume to be present"); \ | ||
607 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | ||
608 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | ||
609 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | ||
610 | static unsigned short *forces[] = { force, force_##chip1, \ | ||
611 | force_##chip2, force_##chip3, \ | ||
612 | NULL }; \ | ||
613 | I2C_CLIENT_INSMOD_COMMON | ||
614 | |||
615 | #define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4) \ | ||
616 | enum chips { any_chip, chip1, chip2, chip3, chip4 }; \ | ||
617 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | ||
618 | "boldly assume to be present"); \ | ||
619 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | ||
620 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | ||
621 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | ||
622 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | ||
623 | static unsigned short *forces[] = { force, force_##chip1, \ | ||
624 | force_##chip2, force_##chip3, \ | ||
625 | force_##chip4, NULL}; \ | ||
626 | I2C_CLIENT_INSMOD_COMMON | ||
627 | |||
628 | #define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5) \ | ||
629 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \ | ||
630 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | ||
631 | "boldly assume to be present"); \ | ||
632 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | ||
633 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | ||
634 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | ||
635 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | ||
636 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | ||
637 | static unsigned short *forces[] = { force, force_##chip1, \ | ||
638 | force_##chip2, force_##chip3, \ | ||
639 | force_##chip4, force_##chip5, \ | ||
640 | NULL }; \ | ||
641 | I2C_CLIENT_INSMOD_COMMON | ||
642 | |||
643 | #define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6) \ | ||
644 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \ | ||
645 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | ||
646 | "boldly assume to be present"); \ | ||
647 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | ||
648 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | ||
649 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | ||
650 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | ||
651 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | ||
652 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | ||
653 | static unsigned short *forces[] = { force, force_##chip1, \ | ||
654 | force_##chip2, force_##chip3, \ | ||
655 | force_##chip4, force_##chip5, \ | ||
656 | force_##chip6, NULL }; \ | ||
657 | I2C_CLIENT_INSMOD_COMMON | ||
658 | |||
659 | #define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7) \ | ||
660 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ | ||
661 | chip7 }; \ | ||
662 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | ||
663 | "boldly assume to be present"); \ | ||
664 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | ||
665 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | ||
666 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | ||
667 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | ||
668 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | ||
669 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | ||
670 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ | ||
671 | static unsigned short *forces[] = { force, force_##chip1, \ | ||
672 | force_##chip2, force_##chip3, \ | ||
673 | force_##chip4, force_##chip5, \ | ||
674 | force_##chip6, force_##chip7, \ | ||
675 | NULL }; \ | ||
676 | I2C_CLIENT_INSMOD_COMMON | ||
677 | |||
678 | #define I2C_CLIENT_INSMOD_8(chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8) \ | ||
679 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ | ||
680 | chip7, chip8 }; \ | ||
681 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | ||
682 | "boldly assume to be present"); \ | ||
683 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | ||
684 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | ||
685 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | ||
686 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | ||
687 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | ||
688 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | ||
689 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ | ||
690 | I2C_CLIENT_MODULE_PARM_FORCE(chip8); \ | ||
691 | static unsigned short *forces[] = { force, force_##chip1, \ | ||
692 | force_##chip2, force_##chip3, \ | ||
693 | force_##chip4, force_##chip5, \ | ||
694 | force_##chip6, force_##chip7, \ | ||
695 | force_##chip8, NULL }; \ | ||
696 | I2C_CLIENT_INSMOD_COMMON | ||
581 | 697 | ||
582 | #endif /* _LINUX_I2C_H */ | 698 | #endif /* _LINUX_I2C_H */ |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 096a85a58ae5..88aef7b86ef4 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -77,6 +77,7 @@ struct tun_struct { | |||
77 | #define TUNSETIFF _IOW('T', 202, int) | 77 | #define TUNSETIFF _IOW('T', 202, int) |
78 | #define TUNSETPERSIST _IOW('T', 203, int) | 78 | #define TUNSETPERSIST _IOW('T', 203, int) |
79 | #define TUNSETOWNER _IOW('T', 204, int) | 79 | #define TUNSETOWNER _IOW('T', 204, int) |
80 | #define TUNSETLINK _IOW('T', 205, int) | ||
80 | 81 | ||
81 | /* TUNSETIFF ifr flags */ | 82 | /* TUNSETIFF ifr flags */ |
82 | #define IFF_TUN 0x0001 | 83 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index 93bb3afe646b..ee5b239092ed 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
@@ -47,6 +47,7 @@ struct inotify_event { | |||
47 | #define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */ | 47 | #define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */ |
48 | 48 | ||
49 | /* special flags */ | 49 | /* special flags */ |
50 | #define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */ | ||
50 | #define IN_ISDIR 0x40000000 /* event occurred against dir */ | 51 | #define IN_ISDIR 0x40000000 /* event occurred against dir */ |
51 | #define IN_ONESHOT 0x80000000 /* only send event once */ | 52 | #define IN_ONESHOT 0x80000000 /* only send event once */ |
52 | 53 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index bdc53c6cc962..4767e5429534 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -66,6 +66,7 @@ struct input_absinfo { | |||
66 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global keystate */ | 66 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global keystate */ |
67 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ | 67 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
68 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ | 68 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ |
69 | #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ | ||
69 | 70 | ||
70 | #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ | 71 | #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ |
71 | #define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ | 72 | #define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ |
@@ -86,6 +87,7 @@ struct input_absinfo { | |||
86 | #define EV_REL 0x02 | 87 | #define EV_REL 0x02 |
87 | #define EV_ABS 0x03 | 88 | #define EV_ABS 0x03 |
88 | #define EV_MSC 0x04 | 89 | #define EV_MSC 0x04 |
90 | #define EV_SW 0x05 | ||
89 | #define EV_LED 0x11 | 91 | #define EV_LED 0x11 |
90 | #define EV_SND 0x12 | 92 | #define EV_SND 0x12 |
91 | #define EV_REP 0x14 | 93 | #define EV_REP 0x14 |
@@ -551,6 +553,20 @@ struct input_absinfo { | |||
551 | #define ABS_MAX 0x3f | 553 | #define ABS_MAX 0x3f |
552 | 554 | ||
553 | /* | 555 | /* |
556 | * Switch events | ||
557 | */ | ||
558 | |||
559 | #define SW_0 0x00 | ||
560 | #define SW_1 0x01 | ||
561 | #define SW_2 0x02 | ||
562 | #define SW_3 0x03 | ||
563 | #define SW_4 0x04 | ||
564 | #define SW_5 0x05 | ||
565 | #define SW_6 0x06 | ||
566 | #define SW_7 0x07 | ||
567 | #define SW_MAX 0x0f | ||
568 | |||
569 | /* | ||
554 | * Misc events | 570 | * Misc events |
555 | */ | 571 | */ |
556 | 572 | ||
@@ -824,6 +840,7 @@ struct input_dev { | |||
824 | unsigned long ledbit[NBITS(LED_MAX)]; | 840 | unsigned long ledbit[NBITS(LED_MAX)]; |
825 | unsigned long sndbit[NBITS(SND_MAX)]; | 841 | unsigned long sndbit[NBITS(SND_MAX)]; |
826 | unsigned long ffbit[NBITS(FF_MAX)]; | 842 | unsigned long ffbit[NBITS(FF_MAX)]; |
843 | unsigned long swbit[NBITS(SW_MAX)]; | ||
827 | int ff_effects_max; | 844 | int ff_effects_max; |
828 | 845 | ||
829 | unsigned int keycodemax; | 846 | unsigned int keycodemax; |
@@ -844,6 +861,7 @@ struct input_dev { | |||
844 | unsigned long key[NBITS(KEY_MAX)]; | 861 | unsigned long key[NBITS(KEY_MAX)]; |
845 | unsigned long led[NBITS(LED_MAX)]; | 862 | unsigned long led[NBITS(LED_MAX)]; |
846 | unsigned long snd[NBITS(SND_MAX)]; | 863 | unsigned long snd[NBITS(SND_MAX)]; |
864 | unsigned long sw[NBITS(SW_MAX)]; | ||
847 | 865 | ||
848 | int absmax[ABS_MAX + 1]; | 866 | int absmax[ABS_MAX + 1]; |
849 | int absmin[ABS_MAX + 1]; | 867 | int absmin[ABS_MAX + 1]; |
@@ -886,6 +904,7 @@ struct input_dev { | |||
886 | #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x200 | 904 | #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x200 |
887 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x400 | 905 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x400 |
888 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x800 | 906 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x800 |
907 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 | ||
889 | 908 | ||
890 | #define INPUT_DEVICE_ID_MATCH_DEVICE\ | 909 | #define INPUT_DEVICE_ID_MATCH_DEVICE\ |
891 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) | 910 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) |
@@ -906,6 +925,7 @@ struct input_device_id { | |||
906 | unsigned long ledbit[NBITS(LED_MAX)]; | 925 | unsigned long ledbit[NBITS(LED_MAX)]; |
907 | unsigned long sndbit[NBITS(SND_MAX)]; | 926 | unsigned long sndbit[NBITS(SND_MAX)]; |
908 | unsigned long ffbit[NBITS(FF_MAX)]; | 927 | unsigned long ffbit[NBITS(FF_MAX)]; |
928 | unsigned long swbit[NBITS(SW_MAX)]; | ||
909 | 929 | ||
910 | unsigned long driver_info; | 930 | unsigned long driver_info; |
911 | }; | 931 | }; |
@@ -998,6 +1018,11 @@ static inline void input_report_ff_status(struct input_dev *dev, unsigned int co | |||
998 | input_event(dev, EV_FF_STATUS, code, value); | 1018 | input_event(dev, EV_FF_STATUS, code, value); |
999 | } | 1019 | } |
1000 | 1020 | ||
1021 | static inline void input_report_switch(struct input_dev *dev, unsigned int code, int value) | ||
1022 | { | ||
1023 | input_event(dev, EV_SW, code, !!value); | ||
1024 | } | ||
1025 | |||
1001 | static inline void input_regs(struct input_dev *dev, struct pt_regs *regs) | 1026 | static inline void input_regs(struct input_dev *dev, struct pt_regs *regs) |
1002 | { | 1027 | { |
1003 | dev->regs = regs; | 1028 | dev->regs = regs; |
diff --git a/include/linux/ioctl32.h b/include/linux/ioctl32.h index e8c4af32b3bb..948809d99917 100644 --- a/include/linux/ioctl32.h +++ b/include/linux/ioctl32.h | |||
@@ -14,26 +14,4 @@ struct ioctl_trans { | |||
14 | struct ioctl_trans *next; | 14 | struct ioctl_trans *next; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | /* | ||
18 | * Register an 32bit ioctl translation handler for ioctl cmd. | ||
19 | * | ||
20 | * handler == NULL: use 64bit ioctl handler. | ||
21 | * arguments to handler: fd: file descriptor | ||
22 | * cmd: ioctl command. | ||
23 | * arg: ioctl argument | ||
24 | * struct file *file: file descriptor pointer. | ||
25 | */ | ||
26 | |||
27 | #ifdef CONFIG_COMPAT | ||
28 | extern int __deprecated register_ioctl32_conversion(unsigned int cmd, | ||
29 | ioctl_trans_handler_t handler); | ||
30 | extern int __deprecated unregister_ioctl32_conversion(unsigned int cmd); | ||
31 | |||
32 | #else | ||
33 | |||
34 | #define register_ioctl32_conversion(cmd, handler) ({ 0; }) | ||
35 | #define unregister_ioctl32_conversion(cmd) ({ 0; }) | ||
36 | |||
37 | #endif | ||
38 | |||
39 | #endif | 17 | #endif |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 596ca6130159..938d55b813a5 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #define __LINUX_IPMI_H | 35 | #define __LINUX_IPMI_H |
36 | 36 | ||
37 | #include <linux/ipmi_msgdefs.h> | 37 | #include <linux/ipmi_msgdefs.h> |
38 | #include <linux/compiler.h> | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * This file describes an interface to an IPMI driver. You have to | 41 | * This file describes an interface to an IPMI driver. You have to |
@@ -241,7 +242,8 @@ struct ipmi_recv_msg | |||
241 | /* The user_msg_data is the data supplied when a message was | 242 | /* The user_msg_data is the data supplied when a message was |
242 | sent, if this is a response to a sent message. If this is | 243 | sent, if this is a response to a sent message. If this is |
243 | not a response to a sent message, then user_msg_data will | 244 | not a response to a sent message, then user_msg_data will |
244 | be NULL. */ | 245 | be NULL. If the user above is NULL, then this will be the |
246 | intf. */ | ||
245 | void *user_msg_data; | 247 | void *user_msg_data; |
246 | 248 | ||
247 | /* Call this when done with the message. It will presumably free | 249 | /* Call this when done with the message. It will presumably free |
@@ -298,13 +300,19 @@ void ipmi_get_version(ipmi_user_t user, | |||
298 | this user, so it will affect all users of this interface. This is | 300 | this user, so it will affect all users of this interface. This is |
299 | so some initialization code can come in and do the OEM-specific | 301 | so some initialization code can come in and do the OEM-specific |
300 | things it takes to determine your address (if not the BMC) and set | 302 | things it takes to determine your address (if not the BMC) and set |
301 | it for everyone else. */ | 303 | it for everyone else. Note that each channel can have its own address. */ |
302 | void ipmi_set_my_address(ipmi_user_t user, | 304 | int ipmi_set_my_address(ipmi_user_t user, |
303 | unsigned char address); | 305 | unsigned int channel, |
304 | unsigned char ipmi_get_my_address(ipmi_user_t user); | 306 | unsigned char address); |
305 | void ipmi_set_my_LUN(ipmi_user_t user, | 307 | int ipmi_get_my_address(ipmi_user_t user, |
306 | unsigned char LUN); | 308 | unsigned int channel, |
307 | unsigned char ipmi_get_my_LUN(ipmi_user_t user); | 309 | unsigned char *address); |
310 | int ipmi_set_my_LUN(ipmi_user_t user, | ||
311 | unsigned int channel, | ||
312 | unsigned char LUN); | ||
313 | int ipmi_get_my_LUN(ipmi_user_t user, | ||
314 | unsigned int channel, | ||
315 | unsigned char *LUN); | ||
308 | 316 | ||
309 | /* | 317 | /* |
310 | * Like ipmi_request, but lets you specify the number of retries and | 318 | * Like ipmi_request, but lets you specify the number of retries and |
@@ -585,6 +593,16 @@ struct ipmi_cmdspec | |||
585 | * things it takes to determine your address (if not the BMC) and set | 593 | * things it takes to determine your address (if not the BMC) and set |
586 | * it for everyone else. You should probably leave the LUN alone. | 594 | * it for everyone else. You should probably leave the LUN alone. |
587 | */ | 595 | */ |
596 | struct ipmi_channel_lun_address_set | ||
597 | { | ||
598 | unsigned short channel; | ||
599 | unsigned char value; | ||
600 | }; | ||
601 | #define IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 24, struct ipmi_channel_lun_address_set) | ||
602 | #define IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set) | ||
603 | #define IPMICTL_SET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 26, struct ipmi_channel_lun_address_set) | ||
604 | #define IPMICTL_GET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 27, struct ipmi_channel_lun_address_set) | ||
605 | /* Legacy interfaces, these only set IPMB 0. */ | ||
588 | #define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int) | 606 | #define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int) |
589 | #define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int) | 607 | #define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int) |
590 | #define IPMICTL_SET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC, 19, unsigned int) | 608 | #define IPMICTL_SET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC, 19, unsigned int) |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 069d3b84d311..69681c3b1f05 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -32,7 +32,12 @@ | |||
32 | #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ | 32 | #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ |
33 | #define IRQ_LEVEL 64 /* IRQ level triggered */ | 33 | #define IRQ_LEVEL 64 /* IRQ level triggered */ |
34 | #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ | 34 | #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ |
35 | #define IRQ_PER_CPU 256 /* IRQ is per CPU */ | 35 | #if defined(ARCH_HAS_IRQ_PER_CPU) |
36 | # define IRQ_PER_CPU 256 /* IRQ is per CPU */ | ||
37 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | ||
38 | #else | ||
39 | # define CHECK_IRQ_PER_CPU(var) 0 | ||
40 | #endif | ||
36 | 41 | ||
37 | /* | 42 | /* |
38 | * Interrupt controller descriptor. This is all we need | 43 | * Interrupt controller descriptor. This is all we need |
@@ -71,16 +76,139 @@ typedef struct irq_desc { | |||
71 | unsigned int irq_count; /* For detecting broken interrupts */ | 76 | unsigned int irq_count; /* For detecting broken interrupts */ |
72 | unsigned int irqs_unhandled; | 77 | unsigned int irqs_unhandled; |
73 | spinlock_t lock; | 78 | spinlock_t lock; |
79 | #if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) | ||
80 | unsigned int move_irq; /* Flag need to re-target intr dest*/ | ||
81 | #endif | ||
74 | } ____cacheline_aligned irq_desc_t; | 82 | } ____cacheline_aligned irq_desc_t; |
75 | 83 | ||
76 | extern irq_desc_t irq_desc [NR_IRQS]; | 84 | extern irq_desc_t irq_desc [NR_IRQS]; |
77 | 85 | ||
86 | /* Return a pointer to the irq descriptor for IRQ. */ | ||
87 | static inline irq_desc_t * | ||
88 | irq_descp (int irq) | ||
89 | { | ||
90 | return irq_desc + irq; | ||
91 | } | ||
92 | |||
78 | #include <asm/hw_irq.h> /* the arch dependent stuff */ | 93 | #include <asm/hw_irq.h> /* the arch dependent stuff */ |
79 | 94 | ||
80 | extern int setup_irq(unsigned int irq, struct irqaction * new); | 95 | extern int setup_irq(unsigned int irq, struct irqaction * new); |
81 | 96 | ||
82 | #ifdef CONFIG_GENERIC_HARDIRQS | 97 | #ifdef CONFIG_GENERIC_HARDIRQS |
83 | extern cpumask_t irq_affinity[NR_IRQS]; | 98 | extern cpumask_t irq_affinity[NR_IRQS]; |
99 | |||
100 | #ifdef CONFIG_SMP | ||
101 | static inline void set_native_irq_info(int irq, cpumask_t mask) | ||
102 | { | ||
103 | irq_affinity[irq] = mask; | ||
104 | } | ||
105 | #else | ||
106 | static inline void set_native_irq_info(int irq, cpumask_t mask) | ||
107 | { | ||
108 | } | ||
109 | #endif | ||
110 | |||
111 | #ifdef CONFIG_SMP | ||
112 | |||
113 | #if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) | ||
114 | extern cpumask_t pending_irq_cpumask[NR_IRQS]; | ||
115 | |||
116 | static inline void set_pending_irq(unsigned int irq, cpumask_t mask) | ||
117 | { | ||
118 | irq_desc_t *desc = irq_desc + irq; | ||
119 | unsigned long flags; | ||
120 | |||
121 | spin_lock_irqsave(&desc->lock, flags); | ||
122 | desc->move_irq = 1; | ||
123 | pending_irq_cpumask[irq] = mask; | ||
124 | spin_unlock_irqrestore(&desc->lock, flags); | ||
125 | } | ||
126 | |||
127 | static inline void | ||
128 | move_native_irq(int irq) | ||
129 | { | ||
130 | cpumask_t tmp; | ||
131 | irq_desc_t *desc = irq_descp(irq); | ||
132 | |||
133 | if (likely (!desc->move_irq)) | ||
134 | return; | ||
135 | |||
136 | desc->move_irq = 0; | ||
137 | |||
138 | if (likely(cpus_empty(pending_irq_cpumask[irq]))) | ||
139 | return; | ||
140 | |||
141 | if (!desc->handler->set_affinity) | ||
142 | return; | ||
143 | |||
144 | /* note - we hold the desc->lock */ | ||
145 | cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map); | ||
146 | |||
147 | /* | ||
148 | * If there was a valid mask to work with, please | ||
149 | * do the disable, re-program, enable sequence. | ||
150 | * This is *not* particularly important for level triggered | ||
151 | * but in a edge trigger case, we might be setting rte | ||
152 | * when an active trigger is comming in. This could | ||
153 | * cause some ioapics to mal-function. | ||
154 | * Being paranoid i guess! | ||
155 | */ | ||
156 | if (unlikely(!cpus_empty(tmp))) { | ||
157 | desc->handler->disable(irq); | ||
158 | desc->handler->set_affinity(irq,tmp); | ||
159 | desc->handler->enable(irq); | ||
160 | } | ||
161 | cpus_clear(pending_irq_cpumask[irq]); | ||
162 | } | ||
163 | |||
164 | #ifdef CONFIG_PCI_MSI | ||
165 | /* | ||
166 | * Wonder why these are dummies? | ||
167 | * For e.g the set_ioapic_affinity_vector() calls the set_ioapic_affinity_irq() | ||
168 | * counter part after translating the vector to irq info. We need to perform | ||
169 | * this operation on the real irq, when we dont use vector, i.e when | ||
170 | * pci_use_vector() is false. | ||
171 | */ | ||
172 | static inline void move_irq(int irq) | ||
173 | { | ||
174 | } | ||
175 | |||
176 | static inline void set_irq_info(int irq, cpumask_t mask) | ||
177 | { | ||
178 | } | ||
179 | |||
180 | #else // CONFIG_PCI_MSI | ||
181 | |||
182 | static inline void move_irq(int irq) | ||
183 | { | ||
184 | move_native_irq(irq); | ||
185 | } | ||
186 | |||
187 | static inline void set_irq_info(int irq, cpumask_t mask) | ||
188 | { | ||
189 | set_native_irq_info(irq, mask); | ||
190 | } | ||
191 | #endif // CONFIG_PCI_MSI | ||
192 | |||
193 | #else // CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE | ||
194 | |||
195 | #define move_irq(x) | ||
196 | #define move_native_irq(x) | ||
197 | #define set_pending_irq(x,y) | ||
198 | static inline void set_irq_info(int irq, cpumask_t mask) | ||
199 | { | ||
200 | set_native_irq_info(irq, mask); | ||
201 | } | ||
202 | |||
203 | #endif // CONFIG_GENERIC_PENDING_IRQ | ||
204 | |||
205 | #else // CONFIG_SMP | ||
206 | |||
207 | #define move_irq(x) | ||
208 | #define move_native_irq(x) | ||
209 | |||
210 | #endif // CONFIG_SMP | ||
211 | |||
84 | extern int no_irq_affinity; | 212 | extern int no_irq_affinity; |
85 | extern int noirqdebug_setup(char *str); | 213 | extern int noirqdebug_setup(char *str); |
86 | 214 | ||
diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 862083eb58ab..53eaee96065b 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h | |||
@@ -150,7 +150,6 @@ typedef struct { | |||
150 | #include <linux/errno.h> | 150 | #include <linux/errno.h> |
151 | #include <linux/fs.h> | 151 | #include <linux/fs.h> |
152 | #include <linux/major.h> | 152 | #include <linux/major.h> |
153 | #include <asm/segment.h> | ||
154 | #include <asm/io.h> | 153 | #include <asm/io.h> |
155 | #include <linux/kernel.h> | 154 | #include <linux/kernel.h> |
156 | #include <linux/signal.h> | 155 | #include <linux/signal.h> |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 593407e865b1..84321a4cac93 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -914,7 +914,6 @@ extern int journal_wipe (journal_t *, int); | |||
914 | extern int journal_skip_recovery (journal_t *); | 914 | extern int journal_skip_recovery (journal_t *); |
915 | extern void journal_update_superblock (journal_t *, int); | 915 | extern void journal_update_superblock (journal_t *, int); |
916 | extern void __journal_abort_hard (journal_t *); | 916 | extern void __journal_abort_hard (journal_t *); |
917 | extern void __journal_abort_soft (journal_t *, int); | ||
918 | extern void journal_abort (journal_t *, int); | 917 | extern void journal_abort (journal_t *, int); |
919 | extern int journal_errno (journal_t *); | 918 | extern int journal_errno (journal_t *); |
920 | extern void journal_ack_err (journal_t *); | 919 | extern void journal_ack_err (journal_t *); |
diff --git a/include/linux/klist.h b/include/linux/klist.h index eebf5e5696ec..74071254c9d3 100644 --- a/include/linux/klist.h +++ b/include/linux/klist.h | |||
@@ -9,20 +9,25 @@ | |||
9 | * This file is rleased under the GPL v2. | 9 | * This file is rleased under the GPL v2. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef _LINUX_KLIST_H | ||
13 | #define _LINUX_KLIST_H | ||
14 | |||
12 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
13 | #include <linux/completion.h> | 16 | #include <linux/completion.h> |
14 | #include <linux/kref.h> | 17 | #include <linux/kref.h> |
15 | #include <linux/list.h> | 18 | #include <linux/list.h> |
16 | 19 | ||
17 | 20 | struct klist_node; | |
18 | struct klist { | 21 | struct klist { |
19 | spinlock_t k_lock; | 22 | spinlock_t k_lock; |
20 | struct list_head k_list; | 23 | struct list_head k_list; |
24 | void (*get)(struct klist_node *); | ||
25 | void (*put)(struct klist_node *); | ||
21 | }; | 26 | }; |
22 | 27 | ||
23 | 28 | ||
24 | extern void klist_init(struct klist * k); | 29 | extern void klist_init(struct klist * k, void (*get)(struct klist_node *), |
25 | 30 | void (*put)(struct klist_node *)); | |
26 | 31 | ||
27 | struct klist_node { | 32 | struct klist_node { |
28 | struct klist * n_klist; | 33 | struct klist * n_klist; |
@@ -31,8 +36,8 @@ struct klist_node { | |||
31 | struct completion n_removed; | 36 | struct completion n_removed; |
32 | }; | 37 | }; |
33 | 38 | ||
34 | extern void klist_add_tail(struct klist * k, struct klist_node * n); | 39 | extern void klist_add_tail(struct klist_node * n, struct klist * k); |
35 | extern void klist_add_head(struct klist * k, struct klist_node * n); | 40 | extern void klist_add_head(struct klist_node * n, struct klist * k); |
36 | 41 | ||
37 | extern void klist_del(struct klist_node * n); | 42 | extern void klist_del(struct klist_node * n); |
38 | extern void klist_remove(struct klist_node * n); | 43 | extern void klist_remove(struct klist_node * n); |
@@ -53,3 +58,4 @@ extern void klist_iter_init_node(struct klist * k, struct klist_iter * i, | |||
53 | extern void klist_iter_exit(struct klist_iter * i); | 58 | extern void klist_iter_exit(struct klist_iter * i); |
54 | extern struct klist_node * klist_next(struct klist_iter * i); | 59 | extern struct klist_node * klist_next(struct klist_iter * i); |
55 | 60 | ||
61 | #endif | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index e050fc2d4c26..e30afdca7917 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -42,6 +42,9 @@ | |||
42 | #define KPROBE_REENTER 0x00000004 | 42 | #define KPROBE_REENTER 0x00000004 |
43 | #define KPROBE_HIT_SSDONE 0x00000008 | 43 | #define KPROBE_HIT_SSDONE 0x00000008 |
44 | 44 | ||
45 | /* Attach to insert probes on any functions which should be ignored*/ | ||
46 | #define __kprobes __attribute__((__section__(".kprobes.text"))) | ||
47 | |||
45 | struct kprobe; | 48 | struct kprobe; |
46 | struct pt_regs; | 49 | struct pt_regs; |
47 | struct kretprobe; | 50 | struct kretprobe; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index fc05a9899288..022105c745fc 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 40 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
41 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 41 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
42 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 42 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
43 | #undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */ | ||
44 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some | 43 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some |
45 | * low-level drivers */ | 44 | * low-level drivers */ |
46 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ | 45 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ |
@@ -450,6 +449,7 @@ struct pci_bits { | |||
450 | unsigned long val; | 449 | unsigned long val; |
451 | }; | 450 | }; |
452 | 451 | ||
452 | extern void ata_pci_host_stop (struct ata_host_set *host_set); | ||
453 | extern struct ata_probe_ent * | 453 | extern struct ata_probe_ent * |
454 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); | 454 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); |
455 | extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); | 455 | extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 338f7795d8a0..147eb01e0d4b 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -33,6 +33,13 @@ | |||
33 | ALIGN; \ | 33 | ALIGN; \ |
34 | name: | 34 | name: |
35 | 35 | ||
36 | #define KPROBE_ENTRY(name) \ | ||
37 | .section .kprobes.text, "ax"; \ | ||
38 | .globl name; \ | ||
39 | ALIGN; \ | ||
40 | name: | ||
41 | |||
42 | |||
36 | #endif | 43 | #endif |
37 | 44 | ||
38 | #define NORET_TYPE /**/ | 45 | #define NORET_TYPE /**/ |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 8480aef10e62..94a46f38c532 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -150,6 +150,9 @@ void mpol_free_shared_policy(struct shared_policy *p); | |||
150 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, | 150 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, |
151 | unsigned long idx); | 151 | unsigned long idx); |
152 | 152 | ||
153 | struct mempolicy *get_vma_policy(struct task_struct *task, | ||
154 | struct vm_area_struct *vma, unsigned long addr); | ||
155 | |||
153 | extern void numa_default_policy(void); | 156 | extern void numa_default_policy(void); |
154 | extern void numa_policy_init(void); | 157 | extern void numa_policy_init(void); |
155 | 158 | ||
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index aefedf04b9bb..18fc77f682de 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -33,6 +33,13 @@ struct mmc_csd { | |||
33 | unsigned int capacity; | 33 | unsigned int capacity; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | struct sd_scr { | ||
37 | unsigned char sda_vsn; | ||
38 | unsigned char bus_widths; | ||
39 | #define SD_SCR_BUS_WIDTH_1 (1<<0) | ||
40 | #define SD_SCR_BUS_WIDTH_4 (1<<2) | ||
41 | }; | ||
42 | |||
36 | struct mmc_host; | 43 | struct mmc_host; |
37 | 44 | ||
38 | /* | 45 | /* |
@@ -47,19 +54,27 @@ struct mmc_card { | |||
47 | #define MMC_STATE_PRESENT (1<<0) /* present in sysfs */ | 54 | #define MMC_STATE_PRESENT (1<<0) /* present in sysfs */ |
48 | #define MMC_STATE_DEAD (1<<1) /* device no longer in stack */ | 55 | #define MMC_STATE_DEAD (1<<1) /* device no longer in stack */ |
49 | #define MMC_STATE_BAD (1<<2) /* unrecognised device */ | 56 | #define MMC_STATE_BAD (1<<2) /* unrecognised device */ |
57 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ | ||
58 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ | ||
50 | u32 raw_cid[4]; /* raw card CID */ | 59 | u32 raw_cid[4]; /* raw card CID */ |
51 | u32 raw_csd[4]; /* raw card CSD */ | 60 | u32 raw_csd[4]; /* raw card CSD */ |
61 | u32 raw_scr[2]; /* raw card SCR */ | ||
52 | struct mmc_cid cid; /* card identification */ | 62 | struct mmc_cid cid; /* card identification */ |
53 | struct mmc_csd csd; /* card specific */ | 63 | struct mmc_csd csd; /* card specific */ |
64 | struct sd_scr scr; /* extra SD information */ | ||
54 | }; | 65 | }; |
55 | 66 | ||
56 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) | 67 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) |
57 | #define mmc_card_dead(c) ((c)->state & MMC_STATE_DEAD) | 68 | #define mmc_card_dead(c) ((c)->state & MMC_STATE_DEAD) |
58 | #define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD) | 69 | #define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD) |
70 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) | ||
71 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | ||
59 | 72 | ||
60 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 73 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
61 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) | 74 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) |
62 | #define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD) | 75 | #define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD) |
76 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) | ||
77 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | ||
63 | 78 | ||
64 | #define mmc_card_name(c) ((c)->cid.prod_name) | 79 | #define mmc_card_name(c) ((c)->cid.prod_name) |
65 | #define mmc_card_id(c) ((c)->dev.bus_id) | 80 | #define mmc_card_id(c) ((c)->dev.bus_id) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 9a0893f3249e..6014160d9c06 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -46,16 +46,28 @@ struct mmc_ios { | |||
46 | #define MMC_BUSMODE_OPENDRAIN 1 | 46 | #define MMC_BUSMODE_OPENDRAIN 1 |
47 | #define MMC_BUSMODE_PUSHPULL 2 | 47 | #define MMC_BUSMODE_PUSHPULL 2 |
48 | 48 | ||
49 | unsigned char chip_select; /* SPI chip select */ | ||
50 | |||
51 | #define MMC_CS_DONTCARE 0 | ||
52 | #define MMC_CS_HIGH 1 | ||
53 | #define MMC_CS_LOW 2 | ||
54 | |||
49 | unsigned char power_mode; /* power supply mode */ | 55 | unsigned char power_mode; /* power supply mode */ |
50 | 56 | ||
51 | #define MMC_POWER_OFF 0 | 57 | #define MMC_POWER_OFF 0 |
52 | #define MMC_POWER_UP 1 | 58 | #define MMC_POWER_UP 1 |
53 | #define MMC_POWER_ON 2 | 59 | #define MMC_POWER_ON 2 |
60 | |||
61 | unsigned char bus_width; /* data bus width */ | ||
62 | |||
63 | #define MMC_BUS_WIDTH_1 0 | ||
64 | #define MMC_BUS_WIDTH_4 2 | ||
54 | }; | 65 | }; |
55 | 66 | ||
56 | struct mmc_host_ops { | 67 | struct mmc_host_ops { |
57 | void (*request)(struct mmc_host *host, struct mmc_request *req); | 68 | void (*request)(struct mmc_host *host, struct mmc_request *req); |
58 | void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios); | 69 | void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios); |
70 | int (*get_ro)(struct mmc_host *host); | ||
59 | }; | 71 | }; |
60 | 72 | ||
61 | struct mmc_card; | 73 | struct mmc_card; |
@@ -70,6 +82,10 @@ struct mmc_host { | |||
70 | unsigned int f_max; | 82 | unsigned int f_max; |
71 | u32 ocr_avail; | 83 | u32 ocr_avail; |
72 | 84 | ||
85 | unsigned long caps; /* Host capabilities */ | ||
86 | |||
87 | #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ | ||
88 | |||
73 | /* host specific block data */ | 89 | /* host specific block data */ |
74 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 90 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
75 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ | 91 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ |
@@ -81,6 +97,10 @@ struct mmc_host { | |||
81 | struct mmc_ios ios; /* current io bus settings */ | 97 | struct mmc_ios ios; /* current io bus settings */ |
82 | u32 ocr; /* the current OCR setting */ | 98 | u32 ocr; /* the current OCR setting */ |
83 | 99 | ||
100 | unsigned int mode; /* current card mode of host */ | ||
101 | #define MMC_MODE_MMC 0 | ||
102 | #define MMC_MODE_SD 1 | ||
103 | |||
84 | struct list_head cards; /* devices attached to this host */ | 104 | struct list_head cards; /* devices attached to this host */ |
85 | 105 | ||
86 | wait_queue_head_t wq; | 106 | wait_queue_head_t wq; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 0d35d4ffb360..1ab78e8d6c53 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -88,6 +88,8 @@ struct mmc_card; | |||
88 | 88 | ||
89 | extern int mmc_wait_for_req(struct mmc_host *, struct mmc_request *); | 89 | extern int mmc_wait_for_req(struct mmc_host *, struct mmc_request *); |
90 | extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); | 90 | extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); |
91 | extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, | ||
92 | struct mmc_command *, int); | ||
91 | 93 | ||
92 | extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); | 94 | extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); |
93 | 95 | ||
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index 896342817b97..f819cae92266 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -236,5 +236,12 @@ struct _mmc_csd { | |||
236 | #define CSD_SPEC_VER_2 2 /* Implements system specification 2.0 - 2.2 */ | 236 | #define CSD_SPEC_VER_2 2 /* Implements system specification 2.0 - 2.2 */ |
237 | #define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 */ | 237 | #define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 */ |
238 | 238 | ||
239 | |||
240 | /* | ||
241 | * SD bus widths | ||
242 | */ | ||
243 | #define SD_BUS_WIDTH_1 0 | ||
244 | #define SD_BUS_WIDTH_4 2 | ||
245 | |||
239 | #endif /* MMC_MMC_PROTOCOL_H */ | 246 | #endif /* MMC_MMC_PROTOCOL_H */ |
240 | 247 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 6c90461ed99f..5ed471b58f4f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -487,11 +487,27 @@ struct mem_section { | |||
487 | unsigned long section_mem_map; | 487 | unsigned long section_mem_map; |
488 | }; | 488 | }; |
489 | 489 | ||
490 | extern struct mem_section mem_section[NR_MEM_SECTIONS]; | 490 | #ifdef CONFIG_SPARSEMEM_EXTREME |
491 | #define SECTIONS_PER_ROOT (PAGE_SIZE / sizeof (struct mem_section)) | ||
492 | #else | ||
493 | #define SECTIONS_PER_ROOT 1 | ||
494 | #endif | ||
495 | |||
496 | #define SECTION_NR_TO_ROOT(sec) ((sec) / SECTIONS_PER_ROOT) | ||
497 | #define NR_SECTION_ROOTS (NR_MEM_SECTIONS / SECTIONS_PER_ROOT) | ||
498 | #define SECTION_ROOT_MASK (SECTIONS_PER_ROOT - 1) | ||
499 | |||
500 | #ifdef CONFIG_SPARSEMEM_EXTREME | ||
501 | extern struct mem_section *mem_section[NR_SECTION_ROOTS]; | ||
502 | #else | ||
503 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT]; | ||
504 | #endif | ||
491 | 505 | ||
492 | static inline struct mem_section *__nr_to_section(unsigned long nr) | 506 | static inline struct mem_section *__nr_to_section(unsigned long nr) |
493 | { | 507 | { |
494 | return &mem_section[nr]; | 508 | if (!mem_section[SECTION_NR_TO_ROOT(nr)]) |
509 | return NULL; | ||
510 | return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK]; | ||
495 | } | 511 | } |
496 | 512 | ||
497 | /* | 513 | /* |
@@ -513,12 +529,12 @@ static inline struct page *__section_mem_map_addr(struct mem_section *section) | |||
513 | 529 | ||
514 | static inline int valid_section(struct mem_section *section) | 530 | static inline int valid_section(struct mem_section *section) |
515 | { | 531 | { |
516 | return (section->section_mem_map & SECTION_MARKED_PRESENT); | 532 | return (section && (section->section_mem_map & SECTION_MARKED_PRESENT)); |
517 | } | 533 | } |
518 | 534 | ||
519 | static inline int section_has_mem_map(struct mem_section *section) | 535 | static inline int section_has_mem_map(struct mem_section *section) |
520 | { | 536 | { |
521 | return (section->section_mem_map & SECTION_HAS_MEM_MAP); | 537 | return (section && (section->section_mem_map & SECTION_HAS_MEM_MAP)); |
522 | } | 538 | } |
523 | 539 | ||
524 | static inline int valid_section_nr(unsigned long nr) | 540 | static inline int valid_section_nr(unsigned long nr) |
@@ -572,6 +588,7 @@ static inline int pfn_valid(unsigned long pfn) | |||
572 | void sparse_init(void); | 588 | void sparse_init(void); |
573 | #else | 589 | #else |
574 | #define sparse_init() do {} while (0) | 590 | #define sparse_init() do {} while (0) |
591 | #define sparse_index_init(_sec, _nid) do {} while (0) | ||
575 | #endif /* CONFIG_SPARSEMEM */ | 592 | #endif /* CONFIG_SPARSEMEM */ |
576 | 593 | ||
577 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES | 594 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 2c4c6aa643ff..903e0ab8101f 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -77,6 +77,7 @@ struct msg_msg { | |||
77 | /* one msq_queue structure for each present queue on the system */ | 77 | /* one msq_queue structure for each present queue on the system */ |
78 | struct msg_queue { | 78 | struct msg_queue { |
79 | struct kern_ipc_perm q_perm; | 79 | struct kern_ipc_perm q_perm; |
80 | int q_id; | ||
80 | time_t q_stime; /* last msgsnd time */ | 81 | time_t q_stime; /* last msgsnd time */ |
81 | time_t q_rtime; /* last msgrcv time */ | 82 | time_t q_rtime; /* last msgrcv time */ |
82 | time_t q_ctime; /* last change time */ | 83 | time_t q_ctime; /* last change time */ |
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index 5773ea42f6e4..0b08cd692201 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -980,7 +980,7 @@ | |||
980 | /* I2C Registers */ | 980 | /* I2C Registers */ |
981 | /****************************************/ | 981 | /****************************************/ |
982 | 982 | ||
983 | #define MV64XXX_I2C_CTLR_NAME "mv64xxx i2c" | 983 | #define MV64XXX_I2C_CTLR_NAME "mv64xxx_i2c" |
984 | #define MV64XXX_I2C_OFFSET 0xc000 | 984 | #define MV64XXX_I2C_OFFSET 0xc000 |
985 | #define MV64XXX_I2C_REG_BLOCK_SIZE 0x0020 | 985 | #define MV64XXX_I2C_REG_BLOCK_SIZE 0x0020 |
986 | 986 | ||
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 088742befe49..7e033e9271a8 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -263,6 +263,9 @@ struct ip_conntrack_expect | |||
263 | /* Unique ID */ | 263 | /* Unique ID */ |
264 | unsigned int id; | 264 | unsigned int id; |
265 | 265 | ||
266 | /* Flags */ | ||
267 | unsigned int flags; | ||
268 | |||
266 | #ifdef CONFIG_IP_NF_NAT_NEEDED | 269 | #ifdef CONFIG_IP_NF_NAT_NEEDED |
267 | /* This is the original per-proto part, used to map the | 270 | /* This is the original per-proto part, used to map the |
268 | * expected connection the way the recipient expects. */ | 271 | * expected connection the way the recipient expects. */ |
@@ -272,6 +275,8 @@ struct ip_conntrack_expect | |||
272 | #endif | 275 | #endif |
273 | }; | 276 | }; |
274 | 277 | ||
278 | #define IP_CT_EXPECT_PERMANENT 0x1 | ||
279 | |||
275 | static inline struct ip_conntrack * | 280 | static inline struct ip_conntrack * |
276 | tuplehash_to_ctrack(const struct ip_conntrack_tuple_hash *hash) | 281 | tuplehash_to_ctrack(const struct ip_conntrack_tuple_hash *hash) |
277 | { | 282 | { |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_core.h b/include/linux/netfilter_ipv4/ip_conntrack_core.h index dc4d2a0575de..907d4f5ca5dc 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_core.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_core.h | |||
@@ -52,7 +52,7 @@ static inline int ip_conntrack_confirm(struct sk_buff **pskb) | |||
52 | return ret; | 52 | return ret; |
53 | } | 53 | } |
54 | 54 | ||
55 | extern void __ip_ct_expect_unlink_destroy(struct ip_conntrack_expect *exp); | 55 | extern void ip_ct_unlink_expect(struct ip_conntrack_expect *exp); |
56 | 56 | ||
57 | extern struct list_head *ip_conntrack_hash; | 57 | extern struct list_head *ip_conntrack_hash; |
58 | extern struct list_head ip_conntrack_expect_list; | 58 | extern struct list_head ip_conntrack_expect_list; |
diff --git a/include/linux/netfilter_ipv4/ip_nat_rule.h b/include/linux/netfilter_ipv4/ip_nat_rule.h index fecd2a06dcd8..73b9552e6a89 100644 --- a/include/linux/netfilter_ipv4/ip_nat_rule.h +++ b/include/linux/netfilter_ipv4/ip_nat_rule.h | |||
@@ -19,5 +19,10 @@ extern unsigned int | |||
19 | alloc_null_binding(struct ip_conntrack *conntrack, | 19 | alloc_null_binding(struct ip_conntrack *conntrack, |
20 | struct ip_nat_info *info, | 20 | struct ip_nat_info *info, |
21 | unsigned int hooknum); | 21 | unsigned int hooknum); |
22 | |||
23 | extern unsigned int | ||
24 | alloc_null_binding_confirmed(struct ip_conntrack *conntrack, | ||
25 | struct ip_nat_info *info, | ||
26 | unsigned int hooknum); | ||
22 | #endif | 27 | #endif |
23 | #endif /* _IP_NAT_RULE_H */ | 28 | #endif /* _IP_NAT_RULE_H */ |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f5a6695d4d21..f34767c5fc79 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -134,6 +134,7 @@ struct page_state { | |||
134 | }; | 134 | }; |
135 | 135 | ||
136 | extern void get_page_state(struct page_state *ret); | 136 | extern void get_page_state(struct page_state *ret); |
137 | extern void get_page_state_node(struct page_state *ret, int node); | ||
137 | extern void get_full_page_state(struct page_state *ret); | 138 | extern void get_full_page_state(struct page_state *ret); |
138 | extern unsigned long __read_page_state(unsigned long offset); | 139 | extern unsigned long __read_page_state(unsigned long offset); |
139 | extern void __mod_page_state(unsigned long offset, unsigned long delta); | 140 | extern void __mod_page_state(unsigned long offset, unsigned long delta); |
@@ -194,6 +195,7 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta); | |||
194 | #define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags) | 195 | #define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags) |
195 | #define TestSetPageDirty(page) test_and_set_bit(PG_dirty, &(page)->flags) | 196 | #define TestSetPageDirty(page) test_and_set_bit(PG_dirty, &(page)->flags) |
196 | #define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags) | 197 | #define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags) |
198 | #define __ClearPageDirty(page) __clear_bit(PG_dirty, &(page)->flags) | ||
197 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) | 199 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) |
198 | 200 | ||
199 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) | 201 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d513c1634006..ee0ab7a5f91b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1612,6 +1612,7 @@ | |||
1612 | #define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 | 1612 | #define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 |
1613 | #define PCI_DEVICE_ID_TOSHIBA_TX4927 0x0180 | 1613 | #define PCI_DEVICE_ID_TOSHIBA_TX4927 0x0180 |
1614 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108 | 1614 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108 |
1615 | #define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3 | ||
1615 | 1616 | ||
1616 | #define PCI_VENDOR_ID_RICOH 0x1180 | 1617 | #define PCI_VENDOR_ID_RICOH 0x1180 |
1617 | #define PCI_DEVICE_ID_RICOH_RL5C465 0x0465 | 1618 | #define PCI_DEVICE_ID_RICOH_RL5C465 0x0465 |
@@ -2147,6 +2148,9 @@ | |||
2147 | #define PCI_DEVICE_ID_ENE_1420 0x1420 | 2148 | #define PCI_DEVICE_ID_ENE_1420 0x1420 |
2148 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 2149 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
2149 | 2150 | ||
2151 | #define PCI_VENDOR_ID_MIPS 0x153f | ||
2152 | #define PCI_DEVICE_ID_SOC_IT 0x0001 | ||
2153 | |||
2150 | #define PCI_VENDOR_ID_SYBA 0x1592 | 2154 | #define PCI_VENDOR_ID_SYBA 0x1592 |
2151 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 2155 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
2152 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 | 2156 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 36725e7c02c6..1767073df26f 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -39,9 +39,6 @@ struct pipe_inode_info { | |||
39 | 39 | ||
40 | #define PIPE_SEM(inode) (&(inode).i_sem) | 40 | #define PIPE_SEM(inode) (&(inode).i_sem) |
41 | #define PIPE_WAIT(inode) (&(inode).i_pipe->wait) | 41 | #define PIPE_WAIT(inode) (&(inode).i_pipe->wait) |
42 | #define PIPE_BASE(inode) ((inode).i_pipe->base) | ||
43 | #define PIPE_START(inode) ((inode).i_pipe->start) | ||
44 | #define PIPE_LEN(inode) ((inode).i_pipe->len) | ||
45 | #define PIPE_READERS(inode) ((inode).i_pipe->readers) | 42 | #define PIPE_READERS(inode) ((inode).i_pipe->readers) |
46 | #define PIPE_WRITERS(inode) ((inode).i_pipe->writers) | 43 | #define PIPE_WRITERS(inode) ((inode).i_pipe->writers) |
47 | #define PIPE_WAITING_WRITERS(inode) ((inode).i_pipe->waiting_writers) | 44 | #define PIPE_WAITING_WRITERS(inode) ((inode).i_pipe->waiting_writers) |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 7aeb208ed713..5cfb07648eca 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -186,7 +186,9 @@ extern int pm_suspend(suspend_state_t state); | |||
186 | 186 | ||
187 | struct device; | 187 | struct device; |
188 | 188 | ||
189 | typedef u32 __bitwise pm_message_t; | 189 | typedef struct pm_message { |
190 | int event; | ||
191 | } pm_message_t; | ||
190 | 192 | ||
191 | /* | 193 | /* |
192 | * There are 4 important states driver can be in: | 194 | * There are 4 important states driver can be in: |
@@ -207,9 +209,13 @@ typedef u32 __bitwise pm_message_t; | |||
207 | * or something similar soon. | 209 | * or something similar soon. |
208 | */ | 210 | */ |
209 | 211 | ||
210 | #define PMSG_FREEZE ((__force pm_message_t) 3) | 212 | #define PM_EVENT_ON 0 |
211 | #define PMSG_SUSPEND ((__force pm_message_t) 3) | 213 | #define PM_EVENT_FREEZE 1 |
212 | #define PMSG_ON ((__force pm_message_t) 0) | 214 | #define PM_EVENT_SUSPEND 2 |
215 | |||
216 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) | ||
217 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) | ||
218 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | ||
213 | 219 | ||
214 | struct dev_pm_info { | 220 | struct dev_pm_info { |
215 | pm_message_t power_state; | 221 | pm_message_t power_state; |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 5ec2bd0c2848..aadbac29103c 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -443,7 +443,7 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { ; } | |||
443 | #define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg) | 443 | #define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg) |
444 | #define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg) | 444 | #define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg) |
445 | 445 | ||
446 | #ifdef DEBUG | 446 | #ifdef CONFIG_PNP_DEBUG |
447 | #define pnp_dbg(format, arg...) printk(KERN_DEBUG "pnp: " format "\n" , ## arg) | 447 | #define pnp_dbg(format, arg...) printk(KERN_DEBUG "pnp: " format "\n" , ## arg) |
448 | #else | 448 | #else |
449 | #define pnp_dbg(format, arg...) do {} while (0) | 449 | #define pnp_dbg(format, arg...) do {} while (0) |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index a373fc254df2..dc6f3647bfbc 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #define PTRACE_DETACH 0x11 | 20 | #define PTRACE_DETACH 0x11 |
21 | 21 | ||
22 | #define PTRACE_SYSCALL 24 | 22 | #define PTRACE_SYSCALL 24 |
23 | #define PTRACE_SYSEMU 31 | ||
24 | #define PTRACE_SYSEMU_SINGLESTEP 32 | ||
23 | 25 | ||
24 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ | 26 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ |
25 | #define PTRACE_SETOPTIONS 0x4200 | 27 | #define PTRACE_SETOPTIONS 0x4200 |
@@ -88,6 +90,7 @@ extern void __ptrace_link(struct task_struct *child, | |||
88 | struct task_struct *new_parent); | 90 | struct task_struct *new_parent); |
89 | extern void __ptrace_unlink(struct task_struct *child); | 91 | extern void __ptrace_unlink(struct task_struct *child); |
90 | extern void ptrace_untrace(struct task_struct *child); | 92 | extern void ptrace_untrace(struct task_struct *child); |
93 | extern int ptrace_may_attach(struct task_struct *task); | ||
91 | 94 | ||
92 | static inline void ptrace_link(struct task_struct *child, | 95 | static inline void ptrace_link(struct task_struct *child, |
93 | struct task_struct *new_parent) | 96 | struct task_struct *new_parent) |
diff --git a/include/linux/raid_class.h b/include/linux/raid_class.h new file mode 100644 index 000000000000..a71123c28272 --- /dev/null +++ b/include/linux/raid_class.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | */ | ||
3 | #include <linux/transport_class.h> | ||
4 | |||
5 | struct raid_template { | ||
6 | struct transport_container raid_attrs; | ||
7 | }; | ||
8 | |||
9 | struct raid_function_template { | ||
10 | void *cookie; | ||
11 | int (*is_raid)(struct device *); | ||
12 | void (*get_resync)(struct device *); | ||
13 | void (*get_state)(struct device *); | ||
14 | }; | ||
15 | |||
16 | enum raid_state { | ||
17 | RAID_ACTIVE = 1, | ||
18 | RAID_DEGRADED, | ||
19 | RAID_RESYNCING, | ||
20 | RAID_OFFLINE, | ||
21 | }; | ||
22 | |||
23 | struct raid_data { | ||
24 | struct list_head component_list; | ||
25 | int component_count; | ||
26 | int level; | ||
27 | enum raid_state state; | ||
28 | int resync; | ||
29 | }; | ||
30 | |||
31 | #define DEFINE_RAID_ATTRIBUTE(type, attr) \ | ||
32 | static inline void \ | ||
33 | raid_set_##attr(struct raid_template *r, struct device *dev, type value) { \ | ||
34 | struct class_device *cdev = \ | ||
35 | attribute_container_find_class_device(&r->raid_attrs.ac, dev);\ | ||
36 | struct raid_data *rd; \ | ||
37 | BUG_ON(!cdev); \ | ||
38 | rd = class_get_devdata(cdev); \ | ||
39 | rd->attr = value; \ | ||
40 | } \ | ||
41 | static inline type \ | ||
42 | raid_get_##attr(struct raid_template *r, struct device *dev) { \ | ||
43 | struct class_device *cdev = \ | ||
44 | attribute_container_find_class_device(&r->raid_attrs.ac, dev);\ | ||
45 | struct raid_data *rd; \ | ||
46 | BUG_ON(!cdev); \ | ||
47 | rd = class_get_devdata(cdev); \ | ||
48 | return rd->attr; \ | ||
49 | } | ||
50 | |||
51 | DEFINE_RAID_ATTRIBUTE(int, level) | ||
52 | DEFINE_RAID_ATTRIBUTE(int, resync) | ||
53 | DEFINE_RAID_ATTRIBUTE(enum raid_state, state) | ||
54 | |||
55 | struct raid_template *raid_class_attach(struct raid_function_template *); | ||
56 | void raid_class_release(struct raid_template *); | ||
57 | |||
58 | void raid_component_add(struct raid_template *, struct device *, | ||
59 | struct device *); | ||
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h new file mode 100644 index 000000000000..cfafc3e76bc2 --- /dev/null +++ b/include/linux/relayfs_fs.h | |||
@@ -0,0 +1,255 @@ | |||
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_buf struct | ||
24 | */ | ||
25 | #define RELAYFS_CHANNEL_VERSION 5 | ||
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 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * Relayfs inode | ||
68 | */ | ||
69 | struct relayfs_inode_info | ||
70 | { | ||
71 | struct inode vfs_inode; | ||
72 | struct rchan_buf *buf; | ||
73 | }; | ||
74 | |||
75 | static inline struct relayfs_inode_info *RELAYFS_I(struct inode *inode) | ||
76 | { | ||
77 | return container_of(inode, struct relayfs_inode_info, vfs_inode); | ||
78 | } | ||
79 | |||
80 | /* | ||
81 | * Relay channel client callbacks | ||
82 | */ | ||
83 | struct rchan_callbacks | ||
84 | { | ||
85 | /* | ||
86 | * subbuf_start - called on buffer-switch to a new sub-buffer | ||
87 | * @buf: the channel buffer containing the new sub-buffer | ||
88 | * @subbuf: the start of the new sub-buffer | ||
89 | * @prev_subbuf: the start of the previous sub-buffer | ||
90 | * @prev_padding: unused space at the end of previous sub-buffer | ||
91 | * | ||
92 | * The client should return 1 to continue logging, 0 to stop | ||
93 | * logging. | ||
94 | * | ||
95 | * NOTE: subbuf_start will also be invoked when the buffer is | ||
96 | * created, so that the first sub-buffer can be initialized | ||
97 | * if necessary. In this case, prev_subbuf will be NULL. | ||
98 | * | ||
99 | * NOTE: the client can reserve bytes at the beginning of the new | ||
100 | * sub-buffer by calling subbuf_start_reserve() in this callback. | ||
101 | */ | ||
102 | int (*subbuf_start) (struct rchan_buf *buf, | ||
103 | void *subbuf, | ||
104 | void *prev_subbuf, | ||
105 | size_t prev_padding); | ||
106 | |||
107 | /* | ||
108 | * buf_mapped - relayfs buffer mmap notification | ||
109 | * @buf: the channel buffer | ||
110 | * @filp: relayfs file pointer | ||
111 | * | ||
112 | * Called when a relayfs file is successfully mmapped | ||
113 | */ | ||
114 | void (*buf_mapped)(struct rchan_buf *buf, | ||
115 | struct file *filp); | ||
116 | |||
117 | /* | ||
118 | * buf_unmapped - relayfs buffer unmap notification | ||
119 | * @buf: the channel buffer | ||
120 | * @filp: relayfs file pointer | ||
121 | * | ||
122 | * Called when a relayfs file is successfully unmapped | ||
123 | */ | ||
124 | void (*buf_unmapped)(struct rchan_buf *buf, | ||
125 | struct file *filp); | ||
126 | }; | ||
127 | |||
128 | /* | ||
129 | * relayfs kernel API, fs/relayfs/relay.c | ||
130 | */ | ||
131 | |||
132 | struct rchan *relay_open(const char *base_filename, | ||
133 | struct dentry *parent, | ||
134 | size_t subbuf_size, | ||
135 | size_t n_subbufs, | ||
136 | struct rchan_callbacks *cb); | ||
137 | extern void relay_close(struct rchan *chan); | ||
138 | extern void relay_flush(struct rchan *chan); | ||
139 | extern void relay_subbufs_consumed(struct rchan *chan, | ||
140 | unsigned int cpu, | ||
141 | size_t consumed); | ||
142 | extern void relay_reset(struct rchan *chan); | ||
143 | extern int relay_buf_full(struct rchan_buf *buf); | ||
144 | |||
145 | extern size_t relay_switch_subbuf(struct rchan_buf *buf, | ||
146 | size_t length); | ||
147 | extern struct dentry *relayfs_create_dir(const char *name, | ||
148 | struct dentry *parent); | ||
149 | extern int relayfs_remove_dir(struct dentry *dentry); | ||
150 | |||
151 | /** | ||
152 | * relay_write - write data into the channel | ||
153 | * @chan: relay channel | ||
154 | * @data: data to be written | ||
155 | * @length: number of bytes to write | ||
156 | * | ||
157 | * Writes data into the current cpu's channel buffer. | ||
158 | * | ||
159 | * Protects the buffer by disabling interrupts. Use this | ||
160 | * if you might be logging from interrupt context. Try | ||
161 | * __relay_write() if you know you won't be logging from | ||
162 | * interrupt context. | ||
163 | */ | ||
164 | static inline void relay_write(struct rchan *chan, | ||
165 | const void *data, | ||
166 | size_t length) | ||
167 | { | ||
168 | unsigned long flags; | ||
169 | struct rchan_buf *buf; | ||
170 | |||
171 | local_irq_save(flags); | ||
172 | buf = chan->buf[smp_processor_id()]; | ||
173 | if (unlikely(buf->offset + length > chan->subbuf_size)) | ||
174 | length = relay_switch_subbuf(buf, length); | ||
175 | memcpy(buf->data + buf->offset, data, length); | ||
176 | buf->offset += length; | ||
177 | local_irq_restore(flags); | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * __relay_write - write data into the channel | ||
182 | * @chan: relay channel | ||
183 | * @data: data to be written | ||
184 | * @length: number of bytes to write | ||
185 | * | ||
186 | * Writes data into the current cpu's channel buffer. | ||
187 | * | ||
188 | * Protects the buffer by disabling preemption. Use | ||
189 | * relay_write() if you might be logging from interrupt | ||
190 | * context. | ||
191 | */ | ||
192 | static inline void __relay_write(struct rchan *chan, | ||
193 | const void *data, | ||
194 | size_t length) | ||
195 | { | ||
196 | struct rchan_buf *buf; | ||
197 | |||
198 | buf = chan->buf[get_cpu()]; | ||
199 | if (unlikely(buf->offset + length > buf->chan->subbuf_size)) | ||
200 | length = relay_switch_subbuf(buf, length); | ||
201 | memcpy(buf->data + buf->offset, data, length); | ||
202 | buf->offset += length; | ||
203 | put_cpu(); | ||
204 | } | ||
205 | |||
206 | /** | ||
207 | * relay_reserve - reserve slot in channel buffer | ||
208 | * @chan: relay channel | ||
209 | * @length: number of bytes to reserve | ||
210 | * | ||
211 | * Returns pointer to reserved slot, NULL if full. | ||
212 | * | ||
213 | * Reserves a slot in the current cpu's channel buffer. | ||
214 | * Does not protect the buffer at all - caller must provide | ||
215 | * appropriate synchronization. | ||
216 | */ | ||
217 | static inline void *relay_reserve(struct rchan *chan, size_t length) | ||
218 | { | ||
219 | void *reserved; | ||
220 | struct rchan_buf *buf = chan->buf[smp_processor_id()]; | ||
221 | |||
222 | if (unlikely(buf->offset + length > buf->chan->subbuf_size)) { | ||
223 | length = relay_switch_subbuf(buf, length); | ||
224 | if (!length) | ||
225 | return NULL; | ||
226 | } | ||
227 | reserved = buf->data + buf->offset; | ||
228 | buf->offset += length; | ||
229 | |||
230 | return reserved; | ||
231 | } | ||
232 | |||
233 | /** | ||
234 | * subbuf_start_reserve - reserve bytes at the start of a sub-buffer | ||
235 | * @buf: relay channel buffer | ||
236 | * @length: number of bytes to reserve | ||
237 | * | ||
238 | * Helper function used to reserve bytes at the beginning of | ||
239 | * a sub-buffer in the subbuf_start() callback. | ||
240 | */ | ||
241 | static inline void subbuf_start_reserve(struct rchan_buf *buf, | ||
242 | size_t length) | ||
243 | { | ||
244 | BUG_ON(length >= buf->chan->subbuf_size - 1); | ||
245 | buf->offset = length; | ||
246 | } | ||
247 | |||
248 | /* | ||
249 | * exported relayfs file operations, fs/relayfs/inode.c | ||
250 | */ | ||
251 | |||
252 | extern struct file_operations relayfs_file_operations; | ||
253 | |||
254 | #endif /* _LINUX_RELAYFS_FS_H */ | ||
255 | |||
diff --git a/include/linux/sched.h b/include/linux/sched.h index dec5827c7742..ea1b5f32ec5c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <linux/topology.h> | 35 | #include <linux/topology.h> |
36 | #include <linux/seccomp.h> | 36 | #include <linux/seccomp.h> |
37 | 37 | ||
38 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ | ||
39 | |||
38 | struct exec_domain; | 40 | struct exec_domain; |
39 | 41 | ||
40 | /* | 42 | /* |
@@ -176,6 +178,23 @@ extern void trap_init(void); | |||
176 | extern void update_process_times(int user); | 178 | extern void update_process_times(int user); |
177 | extern void scheduler_tick(void); | 179 | extern void scheduler_tick(void); |
178 | 180 | ||
181 | #ifdef CONFIG_DETECT_SOFTLOCKUP | ||
182 | extern void softlockup_tick(struct pt_regs *regs); | ||
183 | extern void spawn_softlockup_task(void); | ||
184 | extern void touch_softlockup_watchdog(void); | ||
185 | #else | ||
186 | static inline void softlockup_tick(struct pt_regs *regs) | ||
187 | { | ||
188 | } | ||
189 | static inline void spawn_softlockup_task(void) | ||
190 | { | ||
191 | } | ||
192 | static inline void touch_softlockup_watchdog(void) | ||
193 | { | ||
194 | } | ||
195 | #endif | ||
196 | |||
197 | |||
179 | /* Attach to any functions which should be ignored in wchan output. */ | 198 | /* Attach to any functions which should be ignored in wchan output. */ |
180 | #define __sched __attribute__((__section__(".sched.text"))) | 199 | #define __sched __attribute__((__section__(".sched.text"))) |
181 | /* Is this address in the __sched functions? */ | 200 | /* Is this address in the __sched functions? */ |
@@ -244,7 +263,7 @@ struct mm_struct { | |||
244 | mm_counter_t _rss; | 263 | mm_counter_t _rss; |
245 | mm_counter_t _anon_rss; | 264 | mm_counter_t _anon_rss; |
246 | 265 | ||
247 | unsigned long saved_auxv[42]; /* for /proc/PID/auxv */ | 266 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ |
248 | 267 | ||
249 | unsigned dumpable:2; | 268 | unsigned dumpable:2; |
250 | cpumask_t cpu_vm_mask; | 269 | cpumask_t cpu_vm_mask; |
@@ -545,13 +564,6 @@ struct sched_domain { | |||
545 | 564 | ||
546 | extern void partition_sched_domains(cpumask_t *partition1, | 565 | extern void partition_sched_domains(cpumask_t *partition1, |
547 | cpumask_t *partition2); | 566 | cpumask_t *partition2); |
548 | #ifdef ARCH_HAS_SCHED_DOMAIN | ||
549 | /* Useful helpers that arch setup code may use. Defined in kernel/sched.c */ | ||
550 | extern cpumask_t cpu_isolated_map; | ||
551 | extern void init_sched_build_groups(struct sched_group groups[], | ||
552 | cpumask_t span, int (*group_fn)(int cpu)); | ||
553 | extern void cpu_attach_domain(struct sched_domain *sd, int cpu); | ||
554 | #endif /* ARCH_HAS_SCHED_DOMAIN */ | ||
555 | #endif /* CONFIG_SMP */ | 567 | #endif /* CONFIG_SMP */ |
556 | 568 | ||
557 | 569 | ||
diff --git a/include/linux/sem.h b/include/linux/sem.h index 2d8516be9fd7..106f9757339a 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -88,6 +88,7 @@ struct sem { | |||
88 | /* One sem_array data structure for each set of semaphores in the system. */ | 88 | /* One sem_array data structure for each set of semaphores in the system. */ |
89 | struct sem_array { | 89 | struct sem_array { |
90 | struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */ | 90 | struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */ |
91 | int sem_id; | ||
91 | time_t sem_otime; /* last semop time */ | 92 | time_t sem_otime; /* last semop time */ |
92 | time_t sem_ctime; /* last change time */ | 93 | time_t sem_ctime; /* last change time */ |
93 | struct sem *sem_base; /* ptr to first semaphore in array */ | 94 | struct sem *sem_base; /* ptr to first semaphore in array */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index cf0f64ea2bc0..9b12fe731612 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -385,11 +385,11 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port); | |||
385 | /* | 385 | /* |
386 | * The following are helper functions for the low level drivers. | 386 | * The following are helper functions for the low level drivers. |
387 | */ | 387 | */ |
388 | #ifdef SUPPORT_SYSRQ | ||
389 | static inline int | 388 | static inline int |
390 | uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, | 389 | uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, |
391 | struct pt_regs *regs) | 390 | struct pt_regs *regs) |
392 | { | 391 | { |
392 | #ifdef SUPPORT_SYSRQ | ||
393 | if (port->sysrq) { | 393 | if (port->sysrq) { |
394 | if (ch && time_before(jiffies, port->sysrq)) { | 394 | if (ch && time_before(jiffies, port->sysrq)) { |
395 | handle_sysrq(ch, regs, NULL); | 395 | handle_sysrq(ch, regs, NULL); |
@@ -398,11 +398,9 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, | |||
398 | } | 398 | } |
399 | port->sysrq = 0; | 399 | port->sysrq = 0; |
400 | } | 400 | } |
401 | #endif | ||
401 | return 0; | 402 | return 0; |
402 | } | 403 | } |
403 | #else | ||
404 | #define uart_handle_sysrq_char(port,ch,regs) (0) | ||
405 | #endif | ||
406 | 404 | ||
407 | /* | 405 | /* |
408 | * We do the SysRQ and SAK checking like this... | 406 | * We do the SysRQ and SAK checking like this... |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 42edce6abe23..da7da9c0ed1b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1251,7 +1251,7 @@ extern void skb_add_mtu(int mtu); | |||
1251 | * This function converts the offset back to a struct timeval and stores | 1251 | * This function converts the offset back to a struct timeval and stores |
1252 | * it in stamp. | 1252 | * it in stamp. |
1253 | */ | 1253 | */ |
1254 | static inline void skb_get_timestamp(struct sk_buff *skb, struct timeval *stamp) | 1254 | static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval *stamp) |
1255 | { | 1255 | { |
1256 | stamp->tv_sec = skb->tstamp.off_sec; | 1256 | stamp->tv_sec = skb->tstamp.off_sec; |
1257 | stamp->tv_usec = skb->tstamp.off_usec; | 1257 | stamp->tv_usec = skb->tstamp.off_usec; |
@@ -1270,7 +1270,7 @@ static inline void skb_get_timestamp(struct sk_buff *skb, struct timeval *stamp) | |||
1270 | * This function converts a struct timeval to an offset and stores | 1270 | * This function converts a struct timeval to an offset and stores |
1271 | * it in the skb. | 1271 | * it in the skb. |
1272 | */ | 1272 | */ |
1273 | static inline void skb_set_timestamp(struct sk_buff *skb, struct timeval *stamp) | 1273 | static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval *stamp) |
1274 | { | 1274 | { |
1275 | skb->tstamp.off_sec = stamp->tv_sec - skb_tv_base.tv_sec; | 1275 | skb->tstamp.off_sec = stamp->tv_sec - skb_tv_base.tv_sec; |
1276 | skb->tstamp.off_usec = stamp->tv_usec - skb_tv_base.tv_usec; | 1276 | skb->tstamp.off_usec = stamp->tv_usec - skb_tv_base.tv_usec; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 80b2dfde2e80..42a6bea58af3 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -99,7 +99,21 @@ found: | |||
99 | return __kmalloc(size, flags); | 99 | return __kmalloc(size, flags); |
100 | } | 100 | } |
101 | 101 | ||
102 | extern void *kcalloc(size_t, size_t, unsigned int __nocast); | 102 | extern void *kzalloc(size_t, unsigned int __nocast); |
103 | |||
104 | /** | ||
105 | * kcalloc - allocate memory for an array. The memory is set to zero. | ||
106 | * @n: number of elements. | ||
107 | * @size: element size. | ||
108 | * @flags: the type of memory to allocate. | ||
109 | */ | ||
110 | static inline void *kcalloc(size_t n, size_t size, unsigned int __nocast flags) | ||
111 | { | ||
112 | if (n != 0 && size > INT_MAX / n) | ||
113 | return NULL; | ||
114 | return kzalloc(n * size, flags); | ||
115 | } | ||
116 | |||
103 | extern void kfree(const void *); | 117 | extern void kfree(const void *); |
104 | extern unsigned int ksize(const void *); | 118 | extern unsigned int ksize(const void *); |
105 | 119 | ||
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 768cbba617d0..f56d24734950 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -99,6 +99,8 @@ | |||
99 | #define SONYPI_EVENT_BATTERY_INSERT 57 | 99 | #define SONYPI_EVENT_BATTERY_INSERT 57 |
100 | #define SONYPI_EVENT_BATTERY_REMOVE 58 | 100 | #define SONYPI_EVENT_BATTERY_REMOVE 58 |
101 | #define SONYPI_EVENT_FNKEY_RELEASED 59 | 101 | #define SONYPI_EVENT_FNKEY_RELEASED 59 |
102 | #define SONYPI_EVENT_WIRELESS_ON 60 | ||
103 | #define SONYPI_EVENT_WIRELESS_OFF 61 | ||
102 | 104 | ||
103 | /* get/set brightness */ | 105 | /* get/set brightness */ |
104 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) | 106 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 6864063d1b9f..c4e3ea7cf154 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -60,6 +60,7 @@ struct cache_head { | |||
60 | #define CACHE_NEW_EXPIRY 120 /* keep new things pending confirmation for 120 seconds */ | 60 | #define CACHE_NEW_EXPIRY 120 /* keep new things pending confirmation for 120 seconds */ |
61 | 61 | ||
62 | struct cache_detail { | 62 | struct cache_detail { |
63 | struct module * owner; | ||
63 | int hash_size; | 64 | int hash_size; |
64 | struct cache_head ** hash_table; | 65 | struct cache_head ** hash_table; |
65 | rwlock_t hash_lock; | 66 | rwlock_t hash_lock; |
diff --git a/include/linux/swap.h b/include/linux/swap.h index bfe3e763ccf2..3c9ff0048153 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -107,6 +107,8 @@ enum { | |||
107 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ | 107 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ |
108 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ | 108 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ |
109 | SWP_ACTIVE = (SWP_USED | SWP_WRITEOK), | 109 | SWP_ACTIVE = (SWP_USED | SWP_WRITEOK), |
110 | /* add others here before... */ | ||
111 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ | ||
110 | }; | 112 | }; |
111 | 113 | ||
112 | #define SWAP_CLUSTER_MAX 32 | 114 | #define SWAP_CLUSTER_MAX 32 |
@@ -116,16 +118,13 @@ enum { | |||
116 | 118 | ||
117 | /* | 119 | /* |
118 | * The in-memory structure used to track swap areas. | 120 | * The in-memory structure used to track swap areas. |
119 | * extent_list.prev points at the lowest-index extent. That list is | ||
120 | * sorted. | ||
121 | */ | 121 | */ |
122 | struct swap_info_struct { | 122 | struct swap_info_struct { |
123 | unsigned int flags; | 123 | unsigned int flags; |
124 | spinlock_t sdev_lock; | 124 | int prio; /* swap priority */ |
125 | struct file *swap_file; | 125 | struct file *swap_file; |
126 | struct block_device *bdev; | 126 | struct block_device *bdev; |
127 | struct list_head extent_list; | 127 | struct list_head extent_list; |
128 | int nr_extents; | ||
129 | struct swap_extent *curr_swap_extent; | 128 | struct swap_extent *curr_swap_extent; |
130 | unsigned old_block_size; | 129 | unsigned old_block_size; |
131 | unsigned short * swap_map; | 130 | unsigned short * swap_map; |
@@ -133,10 +132,9 @@ struct swap_info_struct { | |||
133 | unsigned int highest_bit; | 132 | unsigned int highest_bit; |
134 | unsigned int cluster_next; | 133 | unsigned int cluster_next; |
135 | unsigned int cluster_nr; | 134 | unsigned int cluster_nr; |
136 | int prio; /* swap priority */ | 135 | unsigned int pages; |
137 | int pages; | 136 | unsigned int max; |
138 | unsigned long max; | 137 | unsigned int inuse_pages; |
139 | unsigned long inuse_pages; | ||
140 | int next; /* next entry on swap list */ | 138 | int next; /* next entry on swap list */ |
141 | }; | 139 | }; |
142 | 140 | ||
@@ -222,13 +220,7 @@ extern int can_share_swap_page(struct page *); | |||
222 | extern int remove_exclusive_swap_page(struct page *); | 220 | extern int remove_exclusive_swap_page(struct page *); |
223 | struct backing_dev_info; | 221 | struct backing_dev_info; |
224 | 222 | ||
225 | extern struct swap_list_t swap_list; | 223 | extern spinlock_t swap_lock; |
226 | extern spinlock_t swaplock; | ||
227 | |||
228 | #define swap_list_lock() spin_lock(&swaplock) | ||
229 | #define swap_list_unlock() spin_unlock(&swaplock) | ||
230 | #define swap_device_lock(p) spin_lock(&p->sdev_lock) | ||
231 | #define swap_device_unlock(p) spin_unlock(&p->sdev_lock) | ||
232 | 224 | ||
233 | /* linux/mm/thrash.c */ | 225 | /* linux/mm/thrash.c */ |
234 | extern struct mm_struct * swap_token_mm; | 226 | extern struct mm_struct * swap_token_mm; |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index d4c7db35e708..87b9d14c710d 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * the low-order bits. | 4 | * the low-order bits. |
5 | * | 5 | * |
6 | * We arrange the `type' and `offset' fields so that `type' is at the five | 6 | * We arrange the `type' and `offset' fields so that `type' is at the five |
7 | * high-order bits of the smp_entry_t and `offset' is right-aligned in the | 7 | * high-order bits of the swp_entry_t and `offset' is right-aligned in the |
8 | * remaining bits. | 8 | * remaining bits. |
9 | * | 9 | * |
10 | * swp_entry_t's are *never* stored anywhere in their arch-dependent format. | 10 | * swp_entry_t's are *never* stored anywhere in their arch-dependent format. |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index e82be96d4906..532a6c5c24e9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -711,6 +711,7 @@ enum { | |||
711 | DEV_RAID=4, | 711 | DEV_RAID=4, |
712 | DEV_MAC_HID=5, | 712 | DEV_MAC_HID=5, |
713 | DEV_SCSI=6, | 713 | DEV_SCSI=6, |
714 | DEV_IPMI=7, | ||
714 | }; | 715 | }; |
715 | 716 | ||
716 | /* /proc/sys/dev/cdrom */ | 717 | /* /proc/sys/dev/cdrom */ |
@@ -776,6 +777,11 @@ enum { | |||
776 | DEV_SCSI_LOGGING_LEVEL=1, | 777 | DEV_SCSI_LOGGING_LEVEL=1, |
777 | }; | 778 | }; |
778 | 779 | ||
780 | /* /proc/sys/dev/ipmi */ | ||
781 | enum { | ||
782 | DEV_IPMI_POWEROFF_POWERCYCLE=1, | ||
783 | }; | ||
784 | |||
779 | /* /proc/sys/abi */ | 785 | /* /proc/sys/abi */ |
780 | enum | 786 | enum |
781 | { | 787 | { |
diff --git a/include/linux/time.h b/include/linux/time.h index 5634497ff5df..c10d4c21c183 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -97,7 +97,6 @@ extern int do_settimeofday(struct timespec *tv); | |||
97 | extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); | 97 | extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); |
98 | extern void clock_was_set(void); // call when ever the clock is set | 98 | extern void clock_was_set(void); // call when ever the clock is set |
99 | extern int do_posix_clock_monotonic_gettime(struct timespec *tp); | 99 | extern int do_posix_clock_monotonic_gettime(struct timespec *tp); |
100 | extern long do_nanosleep(struct timespec *t); | ||
101 | extern long do_utimes(char __user * filename, struct timeval * times); | 100 | extern long do_utimes(char __user * filename, struct timeval * times); |
102 | struct itimerval; | 101 | struct itimerval; |
103 | extern int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue); | 102 | extern int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue); |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 74fdd07d3792..7e050a2cc35b 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -260,6 +260,29 @@ extern long pps_calcnt; /* calibration intervals */ | |||
260 | extern long pps_errcnt; /* calibration errors */ | 260 | extern long pps_errcnt; /* calibration errors */ |
261 | extern long pps_stbcnt; /* stability limit exceeded */ | 261 | extern long pps_stbcnt; /* stability limit exceeded */ |
262 | 262 | ||
263 | /** | ||
264 | * ntp_clear - Clears the NTP state variables | ||
265 | * | ||
266 | * Must be called while holding a write on the xtime_lock | ||
267 | */ | ||
268 | static inline void ntp_clear(void) | ||
269 | { | ||
270 | time_adjust = 0; /* stop active adjtime() */ | ||
271 | time_status |= STA_UNSYNC; | ||
272 | time_maxerror = NTP_PHASE_LIMIT; | ||
273 | time_esterror = NTP_PHASE_LIMIT; | ||
274 | } | ||
275 | |||
276 | /** | ||
277 | * ntp_synced - Returns 1 if the NTP status is not UNSYNC | ||
278 | * | ||
279 | */ | ||
280 | static inline int ntp_synced(void) | ||
281 | { | ||
282 | return !(time_status & STA_UNSYNC); | ||
283 | } | ||
284 | |||
285 | |||
263 | #ifdef CONFIG_TIME_INTERPOLATION | 286 | #ifdef CONFIG_TIME_INTERPOLATION |
264 | 287 | ||
265 | #define TIME_SOURCE_CPU 0 | 288 | #define TIME_SOURCE_CPU 0 |
diff --git a/include/linux/topology.h b/include/linux/topology.h index 0320225e96da..3df1d474e5c5 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -135,6 +135,29 @@ | |||
135 | } | 135 | } |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | /* sched_domains SD_ALLNODES_INIT for NUMA machines */ | ||
139 | #define SD_ALLNODES_INIT (struct sched_domain) { \ | ||
140 | .span = CPU_MASK_NONE, \ | ||
141 | .parent = NULL, \ | ||
142 | .groups = NULL, \ | ||
143 | .min_interval = 64, \ | ||
144 | .max_interval = 64*num_online_cpus(), \ | ||
145 | .busy_factor = 128, \ | ||
146 | .imbalance_pct = 133, \ | ||
147 | .cache_hot_time = (10*1000000), \ | ||
148 | .cache_nice_tries = 1, \ | ||
149 | .busy_idx = 3, \ | ||
150 | .idle_idx = 3, \ | ||
151 | .newidle_idx = 0, /* unused */ \ | ||
152 | .wake_idx = 0, /* unused */ \ | ||
153 | .forkexec_idx = 0, /* unused */ \ | ||
154 | .per_cpu_gain = 100, \ | ||
155 | .flags = SD_LOAD_BALANCE, \ | ||
156 | .last_balance = jiffies, \ | ||
157 | .balance_interval = 64, \ | ||
158 | .nr_balance_failed = 0, \ | ||
159 | } | ||
160 | |||
138 | #ifdef CONFIG_NUMA | 161 | #ifdef CONFIG_NUMA |
139 | #ifndef SD_NODE_INIT | 162 | #ifndef SD_NODE_INIT |
140 | #error Please define an appropriate SD_NODE_INIT in include/asm/topology.h!!! | 163 | #error Please define an appropriate SD_NODE_INIT in include/asm/topology.h!!! |
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h index 87d98d1faefb..1d6cc22e5f42 100644 --- a/include/linux/transport_class.h +++ b/include/linux/transport_class.h | |||
@@ -12,11 +12,16 @@ | |||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/attribute_container.h> | 13 | #include <linux/attribute_container.h> |
14 | 14 | ||
15 | struct transport_container; | ||
16 | |||
15 | struct transport_class { | 17 | struct transport_class { |
16 | struct class class; | 18 | struct class class; |
17 | int (*setup)(struct device *); | 19 | int (*setup)(struct transport_container *, struct device *, |
18 | int (*configure)(struct device *); | 20 | struct class_device *); |
19 | int (*remove)(struct device *); | 21 | int (*configure)(struct transport_container *, struct device *, |
22 | struct class_device *); | ||
23 | int (*remove)(struct transport_container *, struct device *, | ||
24 | struct class_device *); | ||
20 | }; | 25 | }; |
21 | 26 | ||
22 | #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) \ | 27 | #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) \ |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 6409d9cf5965..b244f69ef682 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -10,6 +10,14 @@ | |||
10 | #define VM_MAP 0x00000004 /* vmap()ed pages */ | 10 | #define VM_MAP 0x00000004 /* vmap()ed pages */ |
11 | /* bits [20..32] reserved for arch specific ioremap internals */ | 11 | /* bits [20..32] reserved for arch specific ioremap internals */ |
12 | 12 | ||
13 | /* | ||
14 | * Maximum alignment for ioremap() regions. | ||
15 | * Can be overriden by arch-specific value. | ||
16 | */ | ||
17 | #ifndef IOREMAP_MAX_ORDER | ||
18 | #define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */ | ||
19 | #endif | ||
20 | |||
13 | struct vm_struct { | 21 | struct vm_struct { |
14 | void *addr; | 22 | void *addr; |
15 | unsigned long size; | 23 | unsigned long size; |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index ae485f9c916e..a555a0f7a7b4 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * This file define a set of standard wireless extensions | 2 | * This file define a set of standard wireless extensions |
3 | * | 3 | * |
4 | * Version : 18 12.3.05 | 4 | * Version : 19 18.3.05 |
5 | * | 5 | * |
6 | * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com> | 6 | * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com> |
7 | * Copyright (c) 1997-2005 Jean Tourrilhes, All Rights Reserved. | 7 | * Copyright (c) 1997-2005 Jean Tourrilhes, All Rights Reserved. |
@@ -69,8 +69,6 @@ | |||
69 | 69 | ||
70 | /***************************** INCLUDES *****************************/ | 70 | /***************************** INCLUDES *****************************/ |
71 | 71 | ||
72 | /* To minimise problems in user space, I might remove those headers | ||
73 | * at some point. Jean II */ | ||
74 | #include <linux/types.h> /* for "caddr_t" et al */ | 72 | #include <linux/types.h> /* for "caddr_t" et al */ |
75 | #include <linux/socket.h> /* for "struct sockaddr" et al */ | 73 | #include <linux/socket.h> /* for "struct sockaddr" et al */ |
76 | #include <linux/if.h> /* for IFNAMSIZ and co... */ | 74 | #include <linux/if.h> /* for IFNAMSIZ and co... */ |
@@ -82,7 +80,7 @@ | |||
82 | * (there is some stuff that will be added in the future...) | 80 | * (there is some stuff that will be added in the future...) |
83 | * I just plan to increment with each new version. | 81 | * I just plan to increment with each new version. |
84 | */ | 82 | */ |
85 | #define WIRELESS_EXT 18 | 83 | #define WIRELESS_EXT 19 |
86 | 84 | ||
87 | /* | 85 | /* |
88 | * Changes : | 86 | * Changes : |
@@ -197,6 +195,15 @@ | |||
197 | * related parameters (extensible up to 4096 parameter values) | 195 | * related parameters (extensible up to 4096 parameter values) |
198 | * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE, | 196 | * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE, |
199 | * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND | 197 | * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND |
198 | * | ||
199 | * V18 to V19 | ||
200 | * ---------- | ||
201 | * - Remove (struct iw_point *)->pointer from events and streams | ||
202 | * - Remove header includes to help user space | ||
203 | * - Increase IW_ENCODING_TOKEN_MAX from 32 to 64 | ||
204 | * - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros | ||
205 | * - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM | ||
206 | * - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros | ||
200 | */ | 207 | */ |
201 | 208 | ||
202 | /**************************** CONSTANTS ****************************/ | 209 | /**************************** CONSTANTS ****************************/ |
@@ -322,6 +329,7 @@ | |||
322 | /* The first and the last (range) */ | 329 | /* The first and the last (range) */ |
323 | #define SIOCIWFIRST 0x8B00 | 330 | #define SIOCIWFIRST 0x8B00 |
324 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ | 331 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ |
332 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) | ||
325 | 333 | ||
326 | /* Even : get (world access), odd : set (root access) */ | 334 | /* Even : get (world access), odd : set (root access) */ |
327 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) | 335 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) |
@@ -366,6 +374,7 @@ | |||
366 | * (struct iw_pmkid_cand) */ | 374 | * (struct iw_pmkid_cand) */ |
367 | 375 | ||
368 | #define IWEVFIRST 0x8C00 | 376 | #define IWEVFIRST 0x8C00 |
377 | #define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST) | ||
369 | 378 | ||
370 | /* ------------------------- PRIVATE INFO ------------------------- */ | 379 | /* ------------------------- PRIVATE INFO ------------------------- */ |
371 | /* | 380 | /* |
@@ -427,12 +436,15 @@ | |||
427 | #define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */ | 436 | #define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */ |
428 | 437 | ||
429 | /* Statistics flags (bitmask in updated) */ | 438 | /* Statistics flags (bitmask in updated) */ |
430 | #define IW_QUAL_QUAL_UPDATED 0x1 /* Value was updated since last read */ | 439 | #define IW_QUAL_QUAL_UPDATED 0x01 /* Value was updated since last read */ |
431 | #define IW_QUAL_LEVEL_UPDATED 0x2 | 440 | #define IW_QUAL_LEVEL_UPDATED 0x02 |
432 | #define IW_QUAL_NOISE_UPDATED 0x4 | 441 | #define IW_QUAL_NOISE_UPDATED 0x04 |
442 | #define IW_QUAL_ALL_UPDATED 0x07 | ||
443 | #define IW_QUAL_DBM 0x08 /* Level + Noise are dBm */ | ||
433 | #define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */ | 444 | #define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */ |
434 | #define IW_QUAL_LEVEL_INVALID 0x20 | 445 | #define IW_QUAL_LEVEL_INVALID 0x20 |
435 | #define IW_QUAL_NOISE_INVALID 0x40 | 446 | #define IW_QUAL_NOISE_INVALID 0x40 |
447 | #define IW_QUAL_ALL_INVALID 0x70 | ||
436 | 448 | ||
437 | /* Frequency flags */ | 449 | /* Frequency flags */ |
438 | #define IW_FREQ_AUTO 0x00 /* Let the driver decides */ | 450 | #define IW_FREQ_AUTO 0x00 /* Let the driver decides */ |
@@ -443,7 +455,7 @@ | |||
443 | #define IW_MAX_ENCODING_SIZES 8 | 455 | #define IW_MAX_ENCODING_SIZES 8 |
444 | 456 | ||
445 | /* Maximum size of the encoding token in bytes */ | 457 | /* Maximum size of the encoding token in bytes */ |
446 | #define IW_ENCODING_TOKEN_MAX 32 /* 256 bits (for now) */ | 458 | #define IW_ENCODING_TOKEN_MAX 64 /* 512 bits (for now) */ |
447 | 459 | ||
448 | /* Flags for encoding (along with the token) */ | 460 | /* Flags for encoding (along with the token) */ |
449 | #define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */ | 461 | #define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */ |
@@ -1039,12 +1051,16 @@ struct iw_event | |||
1039 | #define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ) | 1051 | #define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ) |
1040 | #define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32)) | 1052 | #define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32)) |
1041 | #define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq)) | 1053 | #define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq)) |
1042 | #define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point)) | ||
1043 | #define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param)) | 1054 | #define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param)) |
1044 | #define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr)) | 1055 | #define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr)) |
1045 | #define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality)) | 1056 | #define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality)) |
1046 | 1057 | ||
1047 | /* Note : in the case of iw_point, the extra data will come at the | 1058 | /* iw_point events are special. First, the payload (extra data) come at |
1048 | * end of the event */ | 1059 | * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second, |
1060 | * we omit the pointer, so start at an offset. */ | ||
1061 | #define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \ | ||
1062 | (char *) NULL) | ||
1063 | #define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \ | ||
1064 | IW_EV_POINT_OFF) | ||
1049 | 1065 | ||
1050 | #endif /* _LINUX_WIRELESS_H */ | 1066 | #endif /* _LINUX_WIRELESS_H */ |