diff options
Diffstat (limited to 'include/linux')
64 files changed, 851 insertions, 720 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 49fd37629ee4..00c8efa95cc3 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -94,26 +94,27 @@ struct kiocb { | |||
94 | ssize_t (*ki_retry)(struct kiocb *); | 94 | ssize_t (*ki_retry)(struct kiocb *); |
95 | void (*ki_dtor)(struct kiocb *); | 95 | void (*ki_dtor)(struct kiocb *); |
96 | 96 | ||
97 | struct list_head ki_list; /* the aio core uses this | ||
98 | * for cancellation */ | ||
99 | |||
100 | union { | 97 | union { |
101 | void __user *user; | 98 | void __user *user; |
102 | struct task_struct *tsk; | 99 | struct task_struct *tsk; |
103 | } ki_obj; | 100 | } ki_obj; |
101 | |||
104 | __u64 ki_user_data; /* user's data for completion */ | 102 | __u64 ki_user_data; /* user's data for completion */ |
103 | wait_queue_t ki_wait; | ||
105 | loff_t ki_pos; | 104 | loff_t ki_pos; |
105 | |||
106 | void *private; | ||
106 | /* State that we remember to be able to restart/retry */ | 107 | /* State that we remember to be able to restart/retry */ |
107 | unsigned short ki_opcode; | 108 | unsigned short ki_opcode; |
108 | size_t ki_nbytes; /* copy of iocb->aio_nbytes */ | 109 | size_t ki_nbytes; /* copy of iocb->aio_nbytes */ |
109 | char __user *ki_buf; /* remaining iocb->aio_buf */ | 110 | char __user *ki_buf; /* remaining iocb->aio_buf */ |
110 | size_t ki_left; /* remaining bytes */ | 111 | size_t ki_left; /* remaining bytes */ |
111 | wait_queue_t ki_wait; | ||
112 | long ki_retried; /* just for testing */ | 112 | long ki_retried; /* just for testing */ |
113 | long ki_kicked; /* just for testing */ | 113 | long ki_kicked; /* just for testing */ |
114 | long ki_queued; /* just for testing */ | 114 | long ki_queued; /* just for testing */ |
115 | 115 | ||
116 | void *private; | 116 | struct list_head ki_list; /* the aio core uses this |
117 | * for cancellation */ | ||
117 | }; | 118 | }; |
118 | 119 | ||
119 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) | 120 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) |
@@ -126,6 +127,7 @@ struct kiocb { | |||
126 | (x)->ki_filp = (filp); \ | 127 | (x)->ki_filp = (filp); \ |
127 | (x)->ki_ctx = NULL; \ | 128 | (x)->ki_ctx = NULL; \ |
128 | (x)->ki_cancel = NULL; \ | 129 | (x)->ki_cancel = NULL; \ |
130 | (x)->ki_retry = NULL; \ | ||
129 | (x)->ki_dtor = NULL; \ | 131 | (x)->ki_dtor = NULL; \ |
130 | (x)->ki_obj.tsk = tsk; \ | 132 | (x)->ki_obj.tsk = tsk; \ |
131 | (x)->ki_user_data = 0; \ | 133 | (x)->ki_user_data = 0; \ |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 911c09cb9bf9..6ba3aa8a81f4 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -155,15 +155,15 @@ struct elapaarp { | |||
155 | #define AARP_REQUEST 1 | 155 | #define AARP_REQUEST 1 |
156 | #define AARP_REPLY 2 | 156 | #define AARP_REPLY 2 |
157 | #define AARP_PROBE 3 | 157 | #define AARP_PROBE 3 |
158 | __u8 hw_src[ETH_ALEN] __attribute__ ((packed)); | 158 | __u8 hw_src[ETH_ALEN]; |
159 | __u8 pa_src_zero __attribute__ ((packed)); | 159 | __u8 pa_src_zero; |
160 | __be16 pa_src_net __attribute__ ((packed)); | 160 | __be16 pa_src_net; |
161 | __u8 pa_src_node __attribute__ ((packed)); | 161 | __u8 pa_src_node; |
162 | __u8 hw_dst[ETH_ALEN] __attribute__ ((packed)); | 162 | __u8 hw_dst[ETH_ALEN]; |
163 | __u8 pa_dst_zero __attribute__ ((packed)); | 163 | __u8 pa_dst_zero; |
164 | __be16 pa_dst_net __attribute__ ((packed)); | 164 | __be16 pa_dst_net; |
165 | __u8 pa_dst_node __attribute__ ((packed)); | 165 | __u8 pa_dst_node; |
166 | }; | 166 | } __attribute__ ((packed)); |
167 | 167 | ||
168 | static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb) | 168 | static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb) |
169 | { | 169 | { |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index fb0985377421..02a585faa62c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -118,9 +118,9 @@ struct request_list { | |||
118 | * try to put the fields that are referenced together in the same cacheline | 118 | * try to put the fields that are referenced together in the same cacheline |
119 | */ | 119 | */ |
120 | struct request { | 120 | struct request { |
121 | struct list_head queuelist; /* looking for ->queue? you must _not_ | 121 | struct list_head queuelist; |
122 | * access it directly, use | 122 | struct list_head donelist; |
123 | * blkdev_dequeue_request! */ | 123 | |
124 | unsigned long flags; /* see REQ_ bits below */ | 124 | unsigned long flags; /* see REQ_ bits below */ |
125 | 125 | ||
126 | /* Maintain bio traversal state for part by part I/O submission. | 126 | /* Maintain bio traversal state for part by part I/O submission. |
@@ -141,6 +141,7 @@ struct request { | |||
141 | struct bio *biotail; | 141 | struct bio *biotail; |
142 | 142 | ||
143 | void *elevator_private; | 143 | void *elevator_private; |
144 | void *completion_data; | ||
144 | 145 | ||
145 | unsigned short ioprio; | 146 | unsigned short ioprio; |
146 | 147 | ||
@@ -291,6 +292,7 @@ typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *); | |||
291 | typedef void (activity_fn) (void *data, int rw); | 292 | typedef void (activity_fn) (void *data, int rw); |
292 | typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *); | 293 | typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *); |
293 | typedef void (prepare_flush_fn) (request_queue_t *, struct request *); | 294 | typedef void (prepare_flush_fn) (request_queue_t *, struct request *); |
295 | typedef void (softirq_done_fn)(struct request *); | ||
294 | 296 | ||
295 | enum blk_queue_state { | 297 | enum blk_queue_state { |
296 | Queue_down, | 298 | Queue_down, |
@@ -332,6 +334,7 @@ struct request_queue | |||
332 | activity_fn *activity_fn; | 334 | activity_fn *activity_fn; |
333 | issue_flush_fn *issue_flush_fn; | 335 | issue_flush_fn *issue_flush_fn; |
334 | prepare_flush_fn *prepare_flush_fn; | 336 | prepare_flush_fn *prepare_flush_fn; |
337 | softirq_done_fn *softirq_done_fn; | ||
335 | 338 | ||
336 | /* | 339 | /* |
337 | * Dispatch queue sorting | 340 | * Dispatch queue sorting |
@@ -592,7 +595,6 @@ extern void generic_make_request(struct bio *bio); | |||
592 | extern void blk_put_request(struct request *); | 595 | extern void blk_put_request(struct request *); |
593 | extern void __blk_put_request(request_queue_t *, struct request *); | 596 | extern void __blk_put_request(request_queue_t *, struct request *); |
594 | extern void blk_end_sync_rq(struct request *rq, int error); | 597 | extern void blk_end_sync_rq(struct request *rq, int error); |
595 | extern void blk_attempt_remerge(request_queue_t *, struct request *); | ||
596 | extern struct request *blk_get_request(request_queue_t *, int, gfp_t); | 598 | extern struct request *blk_get_request(request_queue_t *, int, gfp_t); |
597 | extern void blk_insert_request(request_queue_t *, struct request *, int, void *); | 599 | extern void blk_insert_request(request_queue_t *, struct request *, int, void *); |
598 | extern void blk_requeue_request(request_queue_t *, struct request *); | 600 | extern void blk_requeue_request(request_queue_t *, struct request *); |
@@ -646,6 +648,17 @@ extern int end_that_request_first(struct request *, int, int); | |||
646 | extern int end_that_request_chunk(struct request *, int, int); | 648 | extern int end_that_request_chunk(struct request *, int, int); |
647 | extern void end_that_request_last(struct request *, int); | 649 | extern void end_that_request_last(struct request *, int); |
648 | extern void end_request(struct request *req, int uptodate); | 650 | extern void end_request(struct request *req, int uptodate); |
651 | extern void blk_complete_request(struct request *); | ||
652 | |||
653 | static inline int rq_all_done(struct request *rq, unsigned int nr_bytes) | ||
654 | { | ||
655 | if (blk_fs_request(rq)) | ||
656 | return (nr_bytes >= (rq->hard_nr_sectors << 9)); | ||
657 | else if (blk_pc_request(rq)) | ||
658 | return nr_bytes >= rq->data_len; | ||
659 | |||
660 | return 0; | ||
661 | } | ||
649 | 662 | ||
650 | /* | 663 | /* |
651 | * end_that_request_first/chunk() takes an uptodate argument. we account | 664 | * end_that_request_first/chunk() takes an uptodate argument. we account |
@@ -694,6 +707,7 @@ extern void blk_queue_segment_boundary(request_queue_t *, unsigned long); | |||
694 | extern void blk_queue_prep_rq(request_queue_t *, prep_rq_fn *pfn); | 707 | extern void blk_queue_prep_rq(request_queue_t *, prep_rq_fn *pfn); |
695 | extern void blk_queue_merge_bvec(request_queue_t *, merge_bvec_fn *); | 708 | extern void blk_queue_merge_bvec(request_queue_t *, merge_bvec_fn *); |
696 | extern void blk_queue_dma_alignment(request_queue_t *, int); | 709 | extern void blk_queue_dma_alignment(request_queue_t *, int); |
710 | extern void blk_queue_softirq_done(request_queue_t *, softirq_done_fn *); | ||
697 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 711 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
698 | extern int blk_queue_ordered(request_queue_t *, unsigned, prepare_flush_fn *); | 712 | extern int blk_queue_ordered(request_queue_t *, unsigned, prepare_flush_fn *); |
699 | extern void blk_queue_issue_flush_fn(request_queue_t *, issue_flush_fn *); | 713 | extern void blk_queue_issue_flush_fn(request_queue_t *, issue_flush_fn *); |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 1db061bb6b08..9f159baf153f 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -197,7 +197,8 @@ int block_read_full_page(struct page*, get_block_t*); | |||
197 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); | 197 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); |
198 | int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, | 198 | int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, |
199 | loff_t *); | 199 | loff_t *); |
200 | int generic_cont_expand(struct inode *inode, loff_t size) ; | 200 | int generic_cont_expand(struct inode *inode, loff_t size); |
201 | int generic_cont_expand_simple(struct inode *inode, loff_t size); | ||
201 | int block_commit_write(struct page *page, unsigned from, unsigned to); | 202 | int block_commit_write(struct page *page, unsigned from, unsigned to); |
202 | int block_sync_page(struct page *); | 203 | int block_sync_page(struct page *); |
203 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 204 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 04bd756efc67..e86e4a938373 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h | |||
@@ -156,7 +156,7 @@ extern __be32 htonl(__u32); | |||
156 | extern __u16 ntohs(__be16); | 156 | extern __u16 ntohs(__be16); |
157 | extern __be16 htons(__u16); | 157 | extern __be16 htons(__u16); |
158 | 158 | ||
159 | #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) | 159 | #if defined(__GNUC__) && defined(__OPTIMIZE__) |
160 | 160 | ||
161 | #define ___htonl(x) __cpu_to_be32(x) | 161 | #define ___htonl(x) __cpu_to_be32(x) |
162 | #define ___htons(x) __cpu_to_be16(x) | 162 | #define ___htons(x) __cpu_to_be16(x) |
diff --git a/include/linux/byteorder/swab.h b/include/linux/byteorder/swab.h index 2f1cb775125a..25f7f32883ec 100644 --- a/include/linux/byteorder/swab.h +++ b/include/linux/byteorder/swab.h | |||
@@ -110,7 +110,7 @@ | |||
110 | /* | 110 | /* |
111 | * Allow constant folding | 111 | * Allow constant folding |
112 | */ | 112 | */ |
113 | #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) | 113 | #if defined(__GNUC__) && defined(__OPTIMIZE__) |
114 | # define __swab16(x) \ | 114 | # define __swab16(x) \ |
115 | (__builtin_constant_p((__u16)(x)) ? \ | 115 | (__builtin_constant_p((__u16)(x)) ? \ |
116 | ___swab16((x)) : \ | 116 | ___swab16((x)) : \ |
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index d5f2a3205109..ae5e5f914bf4 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h | |||
@@ -77,7 +77,7 @@ | |||
77 | /* | 77 | /* |
78 | * Allow constant folding | 78 | * Allow constant folding |
79 | */ | 79 | */ |
80 | #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) | 80 | #if defined(__GNUC__) && defined(__OPTIMIZE__) |
81 | # define __swahw32(x) \ | 81 | # define __swahw32(x) \ |
82 | (__builtin_constant_p((__u32)(x)) ? \ | 82 | (__builtin_constant_p((__u32)(x)) ? \ |
83 | ___swahw32((x)) : \ | 83 | ___swahw32((x)) : \ |
diff --git a/include/linux/cache.h b/include/linux/cache.h index 0b7ecf3af78a..ffe52210fc4f 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
@@ -45,12 +45,21 @@ | |||
45 | #endif /* CONFIG_SMP */ | 45 | #endif /* CONFIG_SMP */ |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #if !defined(____cacheline_maxaligned_in_smp) | 48 | /* |
49 | * The maximum alignment needed for some critical structures | ||
50 | * These could be inter-node cacheline sizes/L3 cacheline | ||
51 | * size etc. Define this in asm/cache.h for your arch | ||
52 | */ | ||
53 | #ifndef INTERNODE_CACHE_SHIFT | ||
54 | #define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT | ||
55 | #endif | ||
56 | |||
57 | #if !defined(____cacheline_internodealigned_in_smp) | ||
49 | #if defined(CONFIG_SMP) | 58 | #if defined(CONFIG_SMP) |
50 | #define ____cacheline_maxaligned_in_smp \ | 59 | #define ____cacheline_internodealigned_in_smp \ |
51 | __attribute__((__aligned__(1 << (L1_CACHE_SHIFT_MAX)))) | 60 | __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) |
52 | #else | 61 | #else |
53 | #define ____cacheline_maxaligned_in_smp | 62 | #define ____cacheline_internodealigned_in_smp |
54 | #endif | 63 | #endif |
55 | #endif | 64 | #endif |
56 | 65 | ||
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 152734055403..2e05e1e6b0e6 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -15,3 +15,12 @@ | |||
15 | ({ unsigned long __ptr; \ | 15 | ({ unsigned long __ptr; \ |
16 | __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \ | 16 | __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \ |
17 | (typeof(ptr)) (__ptr + (off)); }) | 17 | (typeof(ptr)) (__ptr + (off)); }) |
18 | |||
19 | |||
20 | #define inline inline __attribute__((always_inline)) | ||
21 | #define __inline__ __inline__ __attribute__((always_inline)) | ||
22 | #define __inline __inline __attribute__((always_inline)) | ||
23 | #define __deprecated __attribute__((deprecated)) | ||
24 | #define noinline __attribute__((noinline)) | ||
25 | #define __attribute_pure__ __attribute__((pure)) | ||
26 | #define __attribute_const__ __attribute__((__const__)) | ||
diff --git a/include/linux/compiler-gcc2.h b/include/linux/compiler-gcc2.h deleted file mode 100644 index ebed17660c5f..000000000000 --- a/include/linux/compiler-gcc2.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* Never include this file directly. Include <linux/compiler.h> instead. */ | ||
2 | |||
3 | /* These definitions are for GCC v2.x. */ | ||
4 | |||
5 | /* Somewhere in the middle of the GCC 2.96 development cycle, we implemented | ||
6 | a mechanism by which the user can annotate likely branch directions and | ||
7 | expect the blocks to be reordered appropriately. Define __builtin_expect | ||
8 | to nothing for earlier compilers. */ | ||
9 | #include <linux/compiler-gcc.h> | ||
10 | |||
11 | #if __GNUC_MINOR__ < 96 | ||
12 | # define __builtin_expect(x, expected_value) (x) | ||
13 | #endif | ||
14 | |||
15 | #define __attribute_used__ __attribute__((__unused__)) | ||
16 | |||
17 | /* | ||
18 | * The attribute `pure' is not implemented in GCC versions earlier | ||
19 | * than 2.96. | ||
20 | */ | ||
21 | #if __GNUC_MINOR__ >= 96 | ||
22 | # define __attribute_pure__ __attribute__((pure)) | ||
23 | # define __attribute_const__ __attribute__((__const__)) | ||
24 | #endif | ||
25 | |||
26 | /* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's | ||
27 | * define both va_copy and __va_copy, but the latter may go away, so limit this | ||
28 | * to this header */ | ||
29 | #define va_copy __va_copy | ||
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index a6fa615afab5..4209082ee934 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -3,29 +3,12 @@ | |||
3 | /* These definitions are for GCC v3.x. */ | 3 | /* These definitions are for GCC v3.x. */ |
4 | #include <linux/compiler-gcc.h> | 4 | #include <linux/compiler-gcc.h> |
5 | 5 | ||
6 | #if __GNUC_MINOR__ >= 1 | ||
7 | # define inline inline __attribute__((always_inline)) | ||
8 | # define __inline__ __inline__ __attribute__((always_inline)) | ||
9 | # define __inline __inline __attribute__((always_inline)) | ||
10 | #endif | ||
11 | |||
12 | #if __GNUC_MINOR__ > 0 | ||
13 | # define __deprecated __attribute__((deprecated)) | ||
14 | #endif | ||
15 | |||
16 | #if __GNUC_MINOR__ >= 3 | 6 | #if __GNUC_MINOR__ >= 3 |
17 | # define __attribute_used__ __attribute__((__used__)) | 7 | # define __attribute_used__ __attribute__((__used__)) |
18 | #else | 8 | #else |
19 | # define __attribute_used__ __attribute__((__unused__)) | 9 | # define __attribute_used__ __attribute__((__unused__)) |
20 | #endif | 10 | #endif |
21 | 11 | ||
22 | #define __attribute_pure__ __attribute__((pure)) | ||
23 | #define __attribute_const__ __attribute__((__const__)) | ||
24 | |||
25 | #if __GNUC_MINOR__ >= 1 | ||
26 | #define noinline __attribute__((noinline)) | ||
27 | #endif | ||
28 | |||
29 | #if __GNUC_MINOR__ >= 4 | 12 | #if __GNUC_MINOR__ >= 4 |
30 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
31 | #endif | 14 | #endif |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 53686c037a06..e913e9beaf69 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -3,14 +3,7 @@ | |||
3 | /* These definitions are for GCC v4.x. */ | 3 | /* These definitions are for GCC v4.x. */ |
4 | #include <linux/compiler-gcc.h> | 4 | #include <linux/compiler-gcc.h> |
5 | 5 | ||
6 | #define inline inline __attribute__((always_inline)) | ||
7 | #define __inline__ __inline__ __attribute__((always_inline)) | ||
8 | #define __inline __inline __attribute__((always_inline)) | ||
9 | #define __deprecated __attribute__((deprecated)) | ||
10 | #define __attribute_used__ __attribute__((__used__)) | 6 | #define __attribute_used__ __attribute__((__used__)) |
11 | #define __attribute_pure__ __attribute__((pure)) | ||
12 | #define __attribute_const__ __attribute__((__const__)) | ||
13 | #define noinline __attribute__((noinline)) | ||
14 | #define __must_check __attribute__((warn_unused_result)) | 7 | #define __must_check __attribute__((warn_unused_result)) |
15 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 8 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
16 | 9 | ||
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index d7378215b851..f23d3c6fc2c0 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -42,8 +42,6 @@ extern void __chk_io_ptr(void __iomem *); | |||
42 | # include <linux/compiler-gcc4.h> | 42 | # include <linux/compiler-gcc4.h> |
43 | #elif __GNUC__ == 3 | 43 | #elif __GNUC__ == 3 |
44 | # include <linux/compiler-gcc3.h> | 44 | # include <linux/compiler-gcc3.h> |
45 | #elif __GNUC__ == 2 | ||
46 | # include <linux/compiler-gcc2.h> | ||
47 | #else | 45 | #else |
48 | # error Sorry, your compiler is too old/not recognized. | 46 | # error Sorry, your compiler is too old/not recognized. |
49 | #endif | 47 | #endif |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 6e2deef96b34..c472f972bd6d 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -14,22 +14,43 @@ | |||
14 | 14 | ||
15 | #ifdef CONFIG_CPUSETS | 15 | #ifdef CONFIG_CPUSETS |
16 | 16 | ||
17 | extern int number_of_cpusets; /* How many cpusets are defined in system? */ | ||
18 | |||
19 | extern int cpuset_init_early(void); | ||
17 | extern int cpuset_init(void); | 20 | extern int cpuset_init(void); |
18 | extern void cpuset_init_smp(void); | 21 | extern void cpuset_init_smp(void); |
19 | extern void cpuset_fork(struct task_struct *p); | 22 | extern void cpuset_fork(struct task_struct *p); |
20 | extern void cpuset_exit(struct task_struct *p); | 23 | extern void cpuset_exit(struct task_struct *p); |
21 | extern cpumask_t cpuset_cpus_allowed(const struct task_struct *p); | 24 | extern cpumask_t cpuset_cpus_allowed(struct task_struct *p); |
25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | ||
22 | void cpuset_init_current_mems_allowed(void); | 26 | void cpuset_init_current_mems_allowed(void); |
23 | void cpuset_update_current_mems_allowed(void); | 27 | void cpuset_update_task_memory_state(void); |
24 | void cpuset_restrict_to_mems_allowed(unsigned long *nodes); | 28 | #define cpuset_nodes_subset_current_mems_allowed(nodes) \ |
29 | nodes_subset((nodes), current->mems_allowed) | ||
25 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); | 30 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); |
26 | extern int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask); | 31 | |
32 | extern int __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask); | ||
33 | static int inline cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) | ||
34 | { | ||
35 | return number_of_cpusets <= 1 || __cpuset_zone_allowed(z, gfp_mask); | ||
36 | } | ||
37 | |||
27 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | 38 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); |
39 | |||
40 | #define cpuset_memory_pressure_bump() \ | ||
41 | do { \ | ||
42 | if (cpuset_memory_pressure_enabled) \ | ||
43 | __cpuset_memory_pressure_bump(); \ | ||
44 | } while (0) | ||
45 | extern int cpuset_memory_pressure_enabled; | ||
46 | extern void __cpuset_memory_pressure_bump(void); | ||
47 | |||
28 | extern struct file_operations proc_cpuset_operations; | 48 | extern struct file_operations proc_cpuset_operations; |
29 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | 49 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); |
30 | 50 | ||
31 | #else /* !CONFIG_CPUSETS */ | 51 | #else /* !CONFIG_CPUSETS */ |
32 | 52 | ||
53 | static inline int cpuset_init_early(void) { return 0; } | ||
33 | static inline int cpuset_init(void) { return 0; } | 54 | static inline int cpuset_init(void) { return 0; } |
34 | static inline void cpuset_init_smp(void) {} | 55 | static inline void cpuset_init_smp(void) {} |
35 | static inline void cpuset_fork(struct task_struct *p) {} | 56 | static inline void cpuset_fork(struct task_struct *p) {} |
@@ -40,9 +61,14 @@ static inline cpumask_t cpuset_cpus_allowed(struct task_struct *p) | |||
40 | return cpu_possible_map; | 61 | return cpu_possible_map; |
41 | } | 62 | } |
42 | 63 | ||
64 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | ||
65 | { | ||
66 | return node_possible_map; | ||
67 | } | ||
68 | |||
43 | static inline void cpuset_init_current_mems_allowed(void) {} | 69 | static inline void cpuset_init_current_mems_allowed(void) {} |
44 | static inline void cpuset_update_current_mems_allowed(void) {} | 70 | static inline void cpuset_update_task_memory_state(void) {} |
45 | static inline void cpuset_restrict_to_mems_allowed(unsigned long *nodes) {} | 71 | #define cpuset_nodes_subset_current_mems_allowed(nodes) (1) |
46 | 72 | ||
47 | static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) | 73 | static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) |
48 | { | 74 | { |
@@ -59,6 +85,8 @@ static inline int cpuset_excl_nodes_overlap(const struct task_struct *p) | |||
59 | return 1; | 85 | return 1; |
60 | } | 86 | } |
61 | 87 | ||
88 | static inline void cpuset_memory_pressure_bump(void) {} | ||
89 | |||
62 | static inline char *cpuset_task_status_allowed(struct task_struct *task, | 90 | static inline char *cpuset_task_status_allowed(struct task_struct *task, |
63 | char *buffer) | 91 | char *buffer) |
64 | { | 92 | { |
diff --git a/include/linux/cycx_x25.h b/include/linux/cycx_x25.h index b10a7f3a8cac..f7a906583463 100644 --- a/include/linux/cycx_x25.h +++ b/include/linux/cycx_x25.h | |||
@@ -38,11 +38,11 @@ extern unsigned int cycx_debug; | |||
38 | /* Data Structures */ | 38 | /* Data Structures */ |
39 | /* X.25 Command Block. */ | 39 | /* X.25 Command Block. */ |
40 | struct cycx_x25_cmd { | 40 | struct cycx_x25_cmd { |
41 | u16 command PACKED; | 41 | u16 command; |
42 | u16 link PACKED; /* values: 0 or 1 */ | 42 | u16 link; /* values: 0 or 1 */ |
43 | u16 len PACKED; /* values: 0 thru 0x205 (517) */ | 43 | u16 len; /* values: 0 thru 0x205 (517) */ |
44 | u32 buf PACKED; | 44 | u32 buf; |
45 | }; | 45 | } PACKED; |
46 | 46 | ||
47 | /* Defines for the 'command' field. */ | 47 | /* Defines for the 'command' field. */ |
48 | #define X25_CONNECT_REQUEST 0x4401 | 48 | #define X25_CONNECT_REQUEST 0x4401 |
@@ -92,34 +92,34 @@ struct cycx_x25_cmd { | |||
92 | * @flags - see dosx25.doc, in portuguese, for details | 92 | * @flags - see dosx25.doc, in portuguese, for details |
93 | */ | 93 | */ |
94 | struct cycx_x25_config { | 94 | struct cycx_x25_config { |
95 | u8 link PACKED; | 95 | u8 link; |
96 | u8 speed PACKED; | 96 | u8 speed; |
97 | u8 clock PACKED; | 97 | u8 clock; |
98 | u8 n2 PACKED; | 98 | u8 n2; |
99 | u8 n2win PACKED; | 99 | u8 n2win; |
100 | u8 n3win PACKED; | 100 | u8 n3win; |
101 | u8 nvc PACKED; | 101 | u8 nvc; |
102 | u8 pktlen PACKED; | 102 | u8 pktlen; |
103 | u8 locaddr PACKED; | 103 | u8 locaddr; |
104 | u8 remaddr PACKED; | 104 | u8 remaddr; |
105 | u16 t1 PACKED; | 105 | u16 t1; |
106 | u16 t2 PACKED; | 106 | u16 t2; |
107 | u8 t21 PACKED; | 107 | u8 t21; |
108 | u8 npvc PACKED; | 108 | u8 npvc; |
109 | u8 t23 PACKED; | 109 | u8 t23; |
110 | u8 flags PACKED; | 110 | u8 flags; |
111 | }; | 111 | } PACKED; |
112 | 112 | ||
113 | struct cycx_x25_stats { | 113 | struct cycx_x25_stats { |
114 | u16 rx_crc_errors PACKED; | 114 | u16 rx_crc_errors; |
115 | u16 rx_over_errors PACKED; | 115 | u16 rx_over_errors; |
116 | u16 n2_tx_frames PACKED; | 116 | u16 n2_tx_frames; |
117 | u16 n2_rx_frames PACKED; | 117 | u16 n2_rx_frames; |
118 | u16 tx_timeouts PACKED; | 118 | u16 tx_timeouts; |
119 | u16 rx_timeouts PACKED; | 119 | u16 rx_timeouts; |
120 | u16 n3_tx_packets PACKED; | 120 | u16 n3_tx_packets; |
121 | u16 n3_rx_packets PACKED; | 121 | u16 n3_rx_packets; |
122 | u16 tx_aborts PACKED; | 122 | u16 tx_aborts; |
123 | u16 rx_aborts PACKED; | 123 | u16 rx_aborts; |
124 | }; | 124 | } PACKED; |
125 | #endif /* _CYCX_X25_H */ | 125 | #endif /* _CYCX_X25_H */ |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 46a2ba617595..a3ed5e059d47 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -95,14 +95,19 @@ struct dentry { | |||
95 | struct qstr d_name; | 95 | struct qstr d_name; |
96 | 96 | ||
97 | struct list_head d_lru; /* LRU list */ | 97 | struct list_head d_lru; /* LRU list */ |
98 | struct list_head d_child; /* child of parent list */ | 98 | /* |
99 | * d_child and d_rcu can share memory | ||
100 | */ | ||
101 | union { | ||
102 | struct list_head d_child; /* child of parent list */ | ||
103 | struct rcu_head d_rcu; | ||
104 | } d_u; | ||
99 | struct list_head d_subdirs; /* our children */ | 105 | struct list_head d_subdirs; /* our children */ |
100 | struct list_head d_alias; /* inode alias list */ | 106 | struct list_head d_alias; /* inode alias list */ |
101 | unsigned long d_time; /* used by d_revalidate */ | 107 | unsigned long d_time; /* used by d_revalidate */ |
102 | struct dentry_operations *d_op; | 108 | struct dentry_operations *d_op; |
103 | struct super_block *d_sb; /* The root of the dentry tree */ | 109 | struct super_block *d_sb; /* The root of the dentry tree */ |
104 | void *d_fsdata; /* fs-specific data */ | 110 | void *d_fsdata; /* fs-specific data */ |
105 | struct rcu_head d_rcu; | ||
106 | struct dcookie_struct *d_cookie; /* cookie, if any */ | 111 | struct dcookie_struct *d_cookie; /* cookie, if any */ |
107 | int d_mounted; | 112 | int d_mounted; |
108 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ | 113 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index fb80fa44c4dd..4a6f50e31c73 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -114,8 +114,6 @@ extern ssize_t elv_iosched_store(request_queue_t *, const char *, size_t); | |||
114 | extern int elevator_init(request_queue_t *, char *); | 114 | extern int elevator_init(request_queue_t *, char *); |
115 | extern void elevator_exit(elevator_t *); | 115 | extern void elevator_exit(elevator_t *); |
116 | extern int elv_rq_merge_ok(struct request *, struct bio *); | 116 | extern int elv_rq_merge_ok(struct request *, struct bio *); |
117 | extern int elv_try_merge(struct request *, struct bio *); | ||
118 | extern int elv_try_last_merge(request_queue_t *, struct bio *); | ||
119 | 117 | ||
120 | /* | 118 | /* |
121 | * Return values from elevator merger | 119 | * Return values from elevator merger |
diff --git a/include/linux/elf.h b/include/linux/elf.h index ff955dbf510d..d3bfacb24496 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -151,6 +151,8 @@ typedef __s64 Elf64_Sxword; | |||
151 | #define STT_FUNC 2 | 151 | #define STT_FUNC 2 |
152 | #define STT_SECTION 3 | 152 | #define STT_SECTION 3 |
153 | #define STT_FILE 4 | 153 | #define STT_FILE 4 |
154 | #define STT_COMMON 5 | ||
155 | #define STT_TLS 6 | ||
154 | 156 | ||
155 | #define ELF_ST_BIND(x) ((x) >> 4) | 157 | #define ELF_ST_BIND(x) ((x) >> 4) |
156 | #define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf) | 158 | #define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2c9c48d65630..4c82219b0fae 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/config.h> | 9 | #include <linux/config.h> |
10 | #include <linux/limits.h> | 10 | #include <linux/limits.h> |
11 | #include <linux/ioctl.h> | 11 | #include <linux/ioctl.h> |
12 | #include <linux/rcuref.h> | ||
13 | 12 | ||
14 | /* | 13 | /* |
15 | * It's silly to have NR_OPEN bigger than NR_FILE, but you can change | 14 | * It's silly to have NR_OPEN bigger than NR_FILE, but you can change |
@@ -104,11 +103,11 @@ extern int dir_notify_enable; | |||
104 | #define MS_MOVE 8192 | 103 | #define MS_MOVE 8192 |
105 | #define MS_REC 16384 | 104 | #define MS_REC 16384 |
106 | #define MS_VERBOSE 32768 | 105 | #define MS_VERBOSE 32768 |
106 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ | ||
107 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ | 107 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ |
108 | #define MS_PRIVATE (1<<18) /* change to private */ | 108 | #define MS_PRIVATE (1<<18) /* change to private */ |
109 | #define MS_SLAVE (1<<19) /* change to slave */ | 109 | #define MS_SLAVE (1<<19) /* change to slave */ |
110 | #define MS_SHARED (1<<20) /* change to shared */ | 110 | #define MS_SHARED (1<<20) /* change to shared */ |
111 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ | ||
112 | #define MS_ACTIVE (1<<30) | 111 | #define MS_ACTIVE (1<<30) |
113 | #define MS_NOUSER (1<<31) | 112 | #define MS_NOUSER (1<<31) |
114 | 113 | ||
@@ -225,6 +224,7 @@ extern int dir_notify_enable; | |||
225 | #include <asm/semaphore.h> | 224 | #include <asm/semaphore.h> |
226 | #include <asm/byteorder.h> | 225 | #include <asm/byteorder.h> |
227 | 226 | ||
227 | struct hd_geometry; | ||
228 | struct iovec; | 228 | struct iovec; |
229 | struct nameidata; | 229 | struct nameidata; |
230 | struct kiocb; | 230 | struct kiocb; |
@@ -653,7 +653,7 @@ extern spinlock_t files_lock; | |||
653 | #define file_list_lock() spin_lock(&files_lock); | 653 | #define file_list_lock() spin_lock(&files_lock); |
654 | #define file_list_unlock() spin_unlock(&files_lock); | 654 | #define file_list_unlock() spin_unlock(&files_lock); |
655 | 655 | ||
656 | #define get_file(x) rcuref_inc(&(x)->f_count) | 656 | #define get_file(x) atomic_inc(&(x)->f_count) |
657 | #define file_count(x) atomic_read(&(x)->f_count) | 657 | #define file_count(x) atomic_read(&(x)->f_count) |
658 | 658 | ||
659 | #define MAX_NON_LFS ((1UL<<31) - 1) | 659 | #define MAX_NON_LFS ((1UL<<31) - 1) |
@@ -808,7 +808,6 @@ struct super_block { | |||
808 | struct list_head s_list; /* Keep this first */ | 808 | struct list_head s_list; /* Keep this first */ |
809 | dev_t s_dev; /* search index; _not_ kdev_t */ | 809 | dev_t s_dev; /* search index; _not_ kdev_t */ |
810 | unsigned long s_blocksize; | 810 | unsigned long s_blocksize; |
811 | unsigned long s_old_blocksize; | ||
812 | unsigned char s_blocksize_bits; | 811 | unsigned char s_blocksize_bits; |
813 | unsigned char s_dirt; | 812 | unsigned char s_dirt; |
814 | unsigned long long s_maxbytes; /* Max file size */ | 813 | unsigned long long s_maxbytes; /* Max file size */ |
@@ -963,6 +962,7 @@ struct block_device_operations { | |||
963 | int (*direct_access) (struct block_device *, sector_t, unsigned long *); | 962 | int (*direct_access) (struct block_device *, sector_t, unsigned long *); |
964 | int (*media_changed) (struct gendisk *); | 963 | int (*media_changed) (struct gendisk *); |
965 | int (*revalidate_disk) (struct gendisk *); | 964 | int (*revalidate_disk) (struct gendisk *); |
965 | int (*getgeo)(struct block_device *, struct hd_geometry *); | ||
966 | struct module *owner; | 966 | struct module *owner; |
967 | }; | 967 | }; |
968 | 968 | ||
@@ -1345,7 +1345,8 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1345 | 1345 | ||
1346 | /* fs/open.c */ | 1346 | /* fs/open.c */ |
1347 | 1347 | ||
1348 | extern int do_truncate(struct dentry *, loff_t start, struct file *filp); | 1348 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
1349 | struct file *filp); | ||
1349 | extern long do_sys_open(const char __user *filename, int flags, int mode); | 1350 | extern long do_sys_open(const char __user *filename, int flags, int mode); |
1350 | extern struct file *filp_open(const char *, int, int); | 1351 | extern struct file *filp_open(const char *, int, int); |
1351 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); | 1352 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 7b6a6a58e465..ef8d0cbb832f 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -801,7 +801,7 @@ typedef struct hwif_s { | |||
801 | unsigned dma; | 801 | unsigned dma; |
802 | 802 | ||
803 | void (*led_act)(void *data, int rw); | 803 | void (*led_act)(void *data, int rw); |
804 | } ____cacheline_maxaligned_in_smp ide_hwif_t; | 804 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
805 | 805 | ||
806 | /* | 806 | /* |
807 | * internal ide interrupt handler type | 807 | * internal ide interrupt handler type |
@@ -1001,6 +1001,7 @@ extern int noautodma; | |||
1001 | 1001 | ||
1002 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 1002 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); |
1003 | extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); | 1003 | extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); |
1004 | extern void ide_softirq_done(struct request *rq); | ||
1004 | 1005 | ||
1005 | /* | 1006 | /* |
1006 | * This is used on exit from the driver to designate the next irq handler | 1007 | * This is used on exit from the driver to designate the next irq handler |
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 511999c7eeda..395f0aad9cbf 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h | |||
@@ -131,17 +131,17 @@ struct frad_conf | |||
131 | /* these are the fields of an RFC 1490 header */ | 131 | /* these are the fields of an RFC 1490 header */ |
132 | struct frhdr | 132 | struct frhdr |
133 | { | 133 | { |
134 | unsigned char control __attribute__((packed)); | 134 | unsigned char control; |
135 | 135 | ||
136 | /* for IP packets, this can be the NLPID */ | 136 | /* for IP packets, this can be the NLPID */ |
137 | unsigned char pad __attribute__((packed)); | 137 | unsigned char pad; |
138 | 138 | ||
139 | unsigned char NLPID __attribute__((packed)); | 139 | unsigned char NLPID; |
140 | unsigned char OUI[3] __attribute__((packed)); | 140 | unsigned char OUI[3]; |
141 | unsigned short PID __attribute__((packed)); | 141 | unsigned short PID; |
142 | 142 | ||
143 | #define IP_NLPID pad | 143 | #define IP_NLPID pad |
144 | }; | 144 | } __attribute__((packed)); |
145 | 145 | ||
146 | /* see RFC 1490 for the definition of the following */ | 146 | /* see RFC 1490 for the definition of the following */ |
147 | #define FRAD_I_UI 0x03 | 147 | #define FRAD_I_UI 0x03 |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 41f150a3d2dd..2c08fdc2bdf7 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -79,7 +79,7 @@ static inline void __deprecated save_flags(unsigned long *x) | |||
79 | { | 79 | { |
80 | local_save_flags(*x); | 80 | local_save_flags(*x); |
81 | } | 81 | } |
82 | #define save_flags(x) save_flags(&x); | 82 | #define save_flags(x) save_flags(&x) |
83 | static inline void __deprecated restore_flags(unsigned long x) | 83 | static inline void __deprecated restore_flags(unsigned long x) |
84 | { | 84 | { |
85 | local_irq_restore(x); | 85 | local_irq_restore(x); |
@@ -112,7 +112,7 @@ enum | |||
112 | TIMER_SOFTIRQ, | 112 | TIMER_SOFTIRQ, |
113 | NET_TX_SOFTIRQ, | 113 | NET_TX_SOFTIRQ, |
114 | NET_RX_SOFTIRQ, | 114 | NET_RX_SOFTIRQ, |
115 | SCSI_SOFTIRQ, | 115 | BLOCK_SOFTIRQ, |
116 | TASKLET_SOFTIRQ | 116 | TASKLET_SOFTIRQ |
117 | }; | 117 | }; |
118 | 118 | ||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 93bbed5c6cf4..9c8f4c9ed429 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -191,6 +191,10 @@ struct inet6_skb_parm { | |||
191 | __u16 srcrt; | 191 | __u16 srcrt; |
192 | __u16 dst1; | 192 | __u16 dst1; |
193 | __u16 lastopt; | 193 | __u16 lastopt; |
194 | __u32 nhoff; | ||
195 | __u16 flags; | ||
196 | |||
197 | #define IP6SKB_XFRM_TRANSFORMED 1 | ||
194 | }; | 198 | }; |
195 | 199 | ||
196 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) | 200 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) |
diff --git a/include/linux/isdnif.h b/include/linux/isdnif.h index 7a4eacd77cb2..04e10f9f14f8 100644 --- a/include/linux/isdnif.h +++ b/include/linux/isdnif.h | |||
@@ -282,43 +282,43 @@ typedef struct setup_parm { | |||
282 | 282 | ||
283 | typedef struct T30_s { | 283 | typedef struct T30_s { |
284 | /* session parameters */ | 284 | /* session parameters */ |
285 | __u8 resolution __attribute__ ((packed)); | 285 | __u8 resolution; |
286 | __u8 rate __attribute__ ((packed)); | 286 | __u8 rate; |
287 | __u8 width __attribute__ ((packed)); | 287 | __u8 width; |
288 | __u8 length __attribute__ ((packed)); | 288 | __u8 length; |
289 | __u8 compression __attribute__ ((packed)); | 289 | __u8 compression; |
290 | __u8 ecm __attribute__ ((packed)); | 290 | __u8 ecm; |
291 | __u8 binary __attribute__ ((packed)); | 291 | __u8 binary; |
292 | __u8 scantime __attribute__ ((packed)); | 292 | __u8 scantime; |
293 | __u8 id[FAXIDLEN] __attribute__ ((packed)); | 293 | __u8 id[FAXIDLEN]; |
294 | /* additional parameters */ | 294 | /* additional parameters */ |
295 | __u8 phase __attribute__ ((packed)); | 295 | __u8 phase; |
296 | __u8 direction __attribute__ ((packed)); | 296 | __u8 direction; |
297 | __u8 code __attribute__ ((packed)); | 297 | __u8 code; |
298 | __u8 badlin __attribute__ ((packed)); | 298 | __u8 badlin; |
299 | __u8 badmul __attribute__ ((packed)); | 299 | __u8 badmul; |
300 | __u8 bor __attribute__ ((packed)); | 300 | __u8 bor; |
301 | __u8 fet __attribute__ ((packed)); | 301 | __u8 fet; |
302 | __u8 pollid[FAXIDLEN] __attribute__ ((packed)); | 302 | __u8 pollid[FAXIDLEN]; |
303 | __u8 cq __attribute__ ((packed)); | 303 | __u8 cq; |
304 | __u8 cr __attribute__ ((packed)); | 304 | __u8 cr; |
305 | __u8 ctcrty __attribute__ ((packed)); | 305 | __u8 ctcrty; |
306 | __u8 minsp __attribute__ ((packed)); | 306 | __u8 minsp; |
307 | __u8 phcto __attribute__ ((packed)); | 307 | __u8 phcto; |
308 | __u8 rel __attribute__ ((packed)); | 308 | __u8 rel; |
309 | __u8 nbc __attribute__ ((packed)); | 309 | __u8 nbc; |
310 | /* remote station parameters */ | 310 | /* remote station parameters */ |
311 | __u8 r_resolution __attribute__ ((packed)); | 311 | __u8 r_resolution; |
312 | __u8 r_rate __attribute__ ((packed)); | 312 | __u8 r_rate; |
313 | __u8 r_width __attribute__ ((packed)); | 313 | __u8 r_width; |
314 | __u8 r_length __attribute__ ((packed)); | 314 | __u8 r_length; |
315 | __u8 r_compression __attribute__ ((packed)); | 315 | __u8 r_compression; |
316 | __u8 r_ecm __attribute__ ((packed)); | 316 | __u8 r_ecm; |
317 | __u8 r_binary __attribute__ ((packed)); | 317 | __u8 r_binary; |
318 | __u8 r_scantime __attribute__ ((packed)); | 318 | __u8 r_scantime; |
319 | __u8 r_id[FAXIDLEN] __attribute__ ((packed)); | 319 | __u8 r_id[FAXIDLEN]; |
320 | __u8 r_code __attribute__ ((packed)); | 320 | __u8 r_code; |
321 | } T30_s; | 321 | } __attribute__((packed)) T30_s; |
322 | 322 | ||
323 | #define ISDN_TTY_FAX_CONN_IN 0 | 323 | #define ISDN_TTY_FAX_CONN_IN 0 |
324 | #define ISDN_TTY_FAX_CONN_OUT 1 | 324 | #define ISDN_TTY_FAX_CONN_OUT 1 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b1e407a4fbda..ca7ff8fdd090 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -316,8 +316,6 @@ extern int randomize_va_space; | |||
316 | #endif | 316 | #endif |
317 | 317 | ||
318 | /* Trap pasters of __FUNCTION__ at compile-time */ | 318 | /* Trap pasters of __FUNCTION__ at compile-time */ |
319 | #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 | ||
320 | #define __FUNCTION__ (__func__) | 319 | #define __FUNCTION__ (__func__) |
321 | #endif | ||
322 | 320 | ||
323 | #endif | 321 | #endif |
diff --git a/include/linux/key.h b/include/linux/key.h index 4d189e51bc6c..cbf464ad9589 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -177,6 +177,8 @@ struct key { | |||
177 | /* | 177 | /* |
178 | * kernel managed key type definition | 178 | * kernel managed key type definition |
179 | */ | 179 | */ |
180 | typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); | ||
181 | |||
180 | struct key_type { | 182 | struct key_type { |
181 | /* name of the type */ | 183 | /* name of the type */ |
182 | const char *name; | 184 | const char *name; |
@@ -218,6 +220,16 @@ struct key_type { | |||
218 | */ | 220 | */ |
219 | long (*read)(const struct key *key, char __user *buffer, size_t buflen); | 221 | long (*read)(const struct key *key, char __user *buffer, size_t buflen); |
220 | 222 | ||
223 | /* handle request_key() for this type instead of invoking | ||
224 | * /sbin/request-key (optional) | ||
225 | * - key is the key to instantiate | ||
226 | * - authkey is the authority to assume when instantiating this key | ||
227 | * - op is the operation to be done, usually "create" | ||
228 | * - the call must not return until the instantiation process has run | ||
229 | * its course | ||
230 | */ | ||
231 | request_key_actor_t request_key; | ||
232 | |||
221 | /* internal fields */ | 233 | /* internal fields */ |
222 | struct list_head link; /* link in types list */ | 234 | struct list_head link; /* link in types list */ |
223 | }; | 235 | }; |
diff --git a/include/linux/keyctl.h b/include/linux/keyctl.h index 8d7c59a29e09..3365945640c9 100644 --- a/include/linux/keyctl.h +++ b/include/linux/keyctl.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define KEY_SPEC_USER_KEYRING -4 /* - key ID for UID-specific keyring */ | 19 | #define KEY_SPEC_USER_KEYRING -4 /* - key ID for UID-specific keyring */ |
20 | #define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */ | 20 | #define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */ |
21 | #define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */ | 21 | #define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */ |
22 | #define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */ | ||
22 | 23 | ||
23 | /* request-key default keyrings */ | 24 | /* request-key default keyrings */ |
24 | #define KEY_REQKEY_DEFL_NO_CHANGE -1 | 25 | #define KEY_REQKEY_DEFL_NO_CHANGE -1 |
@@ -46,5 +47,7 @@ | |||
46 | #define KEYCTL_INSTANTIATE 12 /* instantiate a partially constructed key */ | 47 | #define KEYCTL_INSTANTIATE 12 /* instantiate a partially constructed key */ |
47 | #define KEYCTL_NEGATE 13 /* negate a partially constructed key */ | 48 | #define KEYCTL_NEGATE 13 /* negate a partially constructed key */ |
48 | #define KEYCTL_SET_REQKEY_KEYRING 14 /* set default request-key keyring */ | 49 | #define KEYCTL_SET_REQKEY_KEYRING 14 /* set default request-key keyring */ |
50 | #define KEYCTL_SET_TIMEOUT 15 /* set key timeout */ | ||
51 | #define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */ | ||
49 | 52 | ||
50 | #endif /* _LINUX_KEYCTL_H */ | 53 | #endif /* _LINUX_KEYCTL_H */ |
diff --git a/include/linux/memory.h b/include/linux/memory.h index dc4081b6f161..e251dc43d0f5 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -70,21 +70,15 @@ static inline void unregister_memory_notifier(struct notifier_block *nb) | |||
70 | { | 70 | { |
71 | } | 71 | } |
72 | #else | 72 | #else |
73 | extern int register_memory(struct memory_block *, struct mem_section *section, struct node *); | ||
74 | extern int register_new_memory(struct mem_section *); | 73 | extern int register_new_memory(struct mem_section *); |
75 | extern int unregister_memory_section(struct mem_section *); | 74 | extern int unregister_memory_section(struct mem_section *); |
76 | extern int memory_dev_init(void); | 75 | extern int memory_dev_init(void); |
77 | extern int register_memory_notifier(struct notifier_block *nb); | 76 | extern int remove_memory_block(unsigned long, struct mem_section *, int); |
78 | extern void unregister_memory_notifier(struct notifier_block *nb); | ||
79 | 77 | ||
80 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) | 78 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) |
81 | 79 | ||
82 | extern int invalidate_phys_mapping(unsigned long, unsigned long); | ||
83 | struct notifier_block; | 80 | struct notifier_block; |
84 | 81 | ||
85 | extern int register_memory_notifier(struct notifier_block *nb); | ||
86 | extern void unregister_memory_notifier(struct notifier_block *nb); | ||
87 | |||
88 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 82 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
89 | 83 | ||
90 | #define hotplug_memory_notifier(fn, pri) { \ | 84 | #define hotplug_memory_notifier(fn, pri) { \ |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index ed00b278cb93..c7ac77e873b3 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -22,6 +22,9 @@ | |||
22 | 22 | ||
23 | /* Flags for mbind */ | 23 | /* Flags for mbind */ |
24 | #define MPOL_MF_STRICT (1<<0) /* Verify existing pages in the mapping */ | 24 | #define MPOL_MF_STRICT (1<<0) /* Verify existing pages in the mapping */ |
25 | #define MPOL_MF_MOVE (1<<1) /* Move pages owned by this process to conform to mapping */ | ||
26 | #define MPOL_MF_MOVE_ALL (1<<2) /* Move every page to conform to mapping */ | ||
27 | #define MPOL_MF_INTERNAL (1<<3) /* Internal flags start here */ | ||
25 | 28 | ||
26 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
27 | 30 | ||
@@ -65,6 +68,7 @@ struct mempolicy { | |||
65 | nodemask_t nodes; /* interleave */ | 68 | nodemask_t nodes; /* interleave */ |
66 | /* undefined for default */ | 69 | /* undefined for default */ |
67 | } v; | 70 | } v; |
71 | nodemask_t cpuset_mems_allowed; /* mempolicy relative to these nodes */ | ||
68 | }; | 72 | }; |
69 | 73 | ||
70 | /* | 74 | /* |
@@ -141,12 +145,21 @@ void mpol_free_shared_policy(struct shared_policy *p); | |||
141 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, | 145 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, |
142 | unsigned long idx); | 146 | unsigned long idx); |
143 | 147 | ||
144 | struct mempolicy *get_vma_policy(struct task_struct *task, | ||
145 | struct vm_area_struct *vma, unsigned long addr); | ||
146 | |||
147 | extern void numa_default_policy(void); | 148 | extern void numa_default_policy(void); |
148 | extern void numa_policy_init(void); | 149 | extern void numa_policy_init(void); |
149 | extern void numa_policy_rebind(const nodemask_t *old, const nodemask_t *new); | 150 | extern void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *new); |
151 | extern void mpol_rebind_task(struct task_struct *tsk, | ||
152 | const nodemask_t *new); | ||
153 | extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new); | ||
154 | #define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x)) | ||
155 | |||
156 | #ifdef CONFIG_CPUSET | ||
157 | #define current_cpuset_is_being_rebound() \ | ||
158 | (cpuset_being_rebound == current->cpuset) | ||
159 | #else | ||
160 | #define current_cpuset_is_being_rebound() 0 | ||
161 | #endif | ||
162 | |||
150 | extern struct mempolicy default_policy; | 163 | extern struct mempolicy default_policy; |
151 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 164 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
152 | unsigned long addr); | 165 | unsigned long addr); |
@@ -159,6 +172,11 @@ static inline void check_highest_zone(int k) | |||
159 | policy_zone = k; | 172 | policy_zone = k; |
160 | } | 173 | } |
161 | 174 | ||
175 | int do_migrate_pages(struct mm_struct *mm, | ||
176 | const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags); | ||
177 | |||
178 | extern void *cpuset_being_rebound; /* Trigger mpol_copy vma rebind */ | ||
179 | |||
162 | #else | 180 | #else |
163 | 181 | ||
164 | struct mempolicy {}; | 182 | struct mempolicy {}; |
@@ -218,17 +236,35 @@ static inline void numa_default_policy(void) | |||
218 | { | 236 | { |
219 | } | 237 | } |
220 | 238 | ||
221 | static inline void numa_policy_rebind(const nodemask_t *old, | 239 | static inline void mpol_rebind_policy(struct mempolicy *pol, |
222 | const nodemask_t *new) | 240 | const nodemask_t *new) |
223 | { | 241 | { |
224 | } | 242 | } |
225 | 243 | ||
244 | static inline void mpol_rebind_task(struct task_struct *tsk, | ||
245 | const nodemask_t *new) | ||
246 | { | ||
247 | } | ||
248 | |||
249 | static inline void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new) | ||
250 | { | ||
251 | } | ||
252 | |||
253 | #define set_cpuset_being_rebound(x) do {} while (0) | ||
254 | |||
226 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 255 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
227 | unsigned long addr) | 256 | unsigned long addr) |
228 | { | 257 | { |
229 | return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER); | 258 | return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER); |
230 | } | 259 | } |
231 | 260 | ||
261 | static inline int do_migrate_pages(struct mm_struct *mm, | ||
262 | const nodemask_t *from_nodes, | ||
263 | const nodemask_t *to_nodes, int flags) | ||
264 | { | ||
265 | return 0; | ||
266 | } | ||
267 | |||
232 | static inline void check_highest_zone(int k) | 268 | static inline void check_highest_zone(int k) |
233 | { | 269 | { |
234 | } | 270 | } |
diff --git a/include/linux/mm.h b/include/linux/mm.h index bc01fff3aa01..df80e63903b5 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -223,24 +223,27 @@ struct page { | |||
223 | * & limit reverse map searches. | 223 | * & limit reverse map searches. |
224 | */ | 224 | */ |
225 | union { | 225 | union { |
226 | unsigned long private; /* Mapping-private opaque data: | 226 | struct { |
227 | * usually used for buffer_heads | 227 | unsigned long private; /* Mapping-private opaque data: |
228 | * if PagePrivate set; used for | 228 | * usually used for buffer_heads |
229 | * swp_entry_t if PageSwapCache | 229 | * if PagePrivate set; used for |
230 | * When page is free, this indicates | 230 | * swp_entry_t if PageSwapCache. |
231 | * order in the buddy system. | 231 | * When page is free, this |
232 | */ | 232 | * indicates order in the buddy |
233 | * system. | ||
234 | */ | ||
235 | struct address_space *mapping; /* If low bit clear, points to | ||
236 | * inode address_space, or NULL. | ||
237 | * If page mapped as anonymous | ||
238 | * memory, low bit is set, and | ||
239 | * it points to anon_vma object: | ||
240 | * see PAGE_MAPPING_ANON below. | ||
241 | */ | ||
242 | }; | ||
233 | #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS | 243 | #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS |
234 | spinlock_t ptl; | 244 | spinlock_t ptl; |
235 | #endif | 245 | #endif |
236 | } u; | 246 | }; |
237 | struct address_space *mapping; /* If low bit clear, points to | ||
238 | * inode address_space, or NULL. | ||
239 | * If page mapped as anonymous | ||
240 | * memory, low bit is set, and | ||
241 | * it points to anon_vma object: | ||
242 | * see PAGE_MAPPING_ANON below. | ||
243 | */ | ||
244 | pgoff_t index; /* Our offset within mapping. */ | 247 | pgoff_t index; /* Our offset within mapping. */ |
245 | struct list_head lru; /* Pageout list, eg. active_list | 248 | struct list_head lru; /* Pageout list, eg. active_list |
246 | * protected by zone->lru_lock ! | 249 | * protected by zone->lru_lock ! |
@@ -261,8 +264,8 @@ struct page { | |||
261 | #endif /* WANT_PAGE_VIRTUAL */ | 264 | #endif /* WANT_PAGE_VIRTUAL */ |
262 | }; | 265 | }; |
263 | 266 | ||
264 | #define page_private(page) ((page)->u.private) | 267 | #define page_private(page) ((page)->private) |
265 | #define set_page_private(page, v) ((page)->u.private = (v)) | 268 | #define set_page_private(page, v) ((page)->private = (v)) |
266 | 269 | ||
267 | /* | 270 | /* |
268 | * FIXME: take this include out, include page-flags.h in | 271 | * FIXME: take this include out, include page-flags.h in |
@@ -308,7 +311,7 @@ struct page { | |||
308 | */ | 311 | */ |
309 | #define get_page_testone(p) atomic_inc_and_test(&(p)->_count) | 312 | #define get_page_testone(p) atomic_inc_and_test(&(p)->_count) |
310 | 313 | ||
311 | #define set_page_count(p,v) atomic_set(&(p)->_count, v - 1) | 314 | #define set_page_count(p,v) atomic_set(&(p)->_count, (v) - 1) |
312 | #define __put_page(p) atomic_dec(&(p)->_count) | 315 | #define __put_page(p) atomic_dec(&(p)->_count) |
313 | 316 | ||
314 | extern void FASTCALL(__page_cache_release(struct page *)); | 317 | extern void FASTCALL(__page_cache_release(struct page *)); |
@@ -815,7 +818,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a | |||
815 | * overflow into the next struct page (as it might with DEBUG_SPINLOCK). | 818 | * overflow into the next struct page (as it might with DEBUG_SPINLOCK). |
816 | * When freeing, reset page->mapping so free_pages_check won't complain. | 819 | * When freeing, reset page->mapping so free_pages_check won't complain. |
817 | */ | 820 | */ |
818 | #define __pte_lockptr(page) &((page)->u.ptl) | 821 | #define __pte_lockptr(page) &((page)->ptl) |
819 | #define pte_lock_init(_page) do { \ | 822 | #define pte_lock_init(_page) do { \ |
820 | spin_lock_init(__pte_lockptr(_page)); \ | 823 | spin_lock_init(__pte_lockptr(_page)); \ |
821 | } while (0) | 824 | } while (0) |
@@ -1036,5 +1039,12 @@ int in_gate_area_no_task(unsigned long addr); | |||
1036 | /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */ | 1039 | /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */ |
1037 | #define OOM_DISABLE -17 | 1040 | #define OOM_DISABLE -17 |
1038 | 1041 | ||
1042 | int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, | ||
1043 | void __user *, size_t *, loff_t *); | ||
1044 | int shrink_slab(unsigned long scanned, gfp_t gfp_mask, | ||
1045 | unsigned long lru_pages); | ||
1046 | void drop_pagecache(void); | ||
1047 | void drop_slab(void); | ||
1048 | |||
1039 | #endif /* __KERNEL__ */ | 1049 | #endif /* __KERNEL__ */ |
1040 | #endif /* _LINUX_MM_H */ | 1050 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 47762ca695a5..49cc68af01f8 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
@@ -38,3 +38,25 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
38 | zone->nr_inactive--; | 38 | zone->nr_inactive--; |
39 | } | 39 | } |
40 | } | 40 | } |
41 | |||
42 | /* | ||
43 | * Isolate one page from the LRU lists. | ||
44 | * | ||
45 | * - zone->lru_lock must be held | ||
46 | */ | ||
47 | static inline int __isolate_lru_page(struct page *page) | ||
48 | { | ||
49 | if (unlikely(!TestClearPageLRU(page))) | ||
50 | return 0; | ||
51 | |||
52 | if (get_page_testone(page)) { | ||
53 | /* | ||
54 | * It is being freed elsewhere | ||
55 | */ | ||
56 | __put_page(page); | ||
57 | SetPageLRU(page); | ||
58 | return -ENOENT; | ||
59 | } | ||
60 | |||
61 | return 1; | ||
62 | } | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index c34f4a2c62f8..7e4ae6ab1977 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -38,7 +38,7 @@ struct pglist_data; | |||
38 | #if defined(CONFIG_SMP) | 38 | #if defined(CONFIG_SMP) |
39 | struct zone_padding { | 39 | struct zone_padding { |
40 | char x[0]; | 40 | char x[0]; |
41 | } ____cacheline_maxaligned_in_smp; | 41 | } ____cacheline_internodealigned_in_smp; |
42 | #define ZONE_PADDING(name) struct zone_padding name; | 42 | #define ZONE_PADDING(name) struct zone_padding name; |
43 | #else | 43 | #else |
44 | #define ZONE_PADDING(name) | 44 | #define ZONE_PADDING(name) |
@@ -233,7 +233,7 @@ struct zone { | |||
233 | * rarely used fields: | 233 | * rarely used fields: |
234 | */ | 234 | */ |
235 | char *name; | 235 | char *name; |
236 | } ____cacheline_maxaligned_in_smp; | 236 | } ____cacheline_internodealigned_in_smp; |
237 | 237 | ||
238 | 238 | ||
239 | /* | 239 | /* |
@@ -437,6 +437,8 @@ int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, | |||
437 | extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; | 437 | extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; |
438 | int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, | 438 | int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, |
439 | void __user *, size_t *, loff_t *); | 439 | void __user *, size_t *, loff_t *); |
440 | int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *, | ||
441 | void __user *, size_t *, loff_t *); | ||
440 | 442 | ||
441 | #include <linux/topology.h> | 443 | #include <linux/topology.h> |
442 | /* Returns the number of the current Node. */ | 444 | /* Returns the number of the current Node. */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index dd4e83eba933..b98a709f1794 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -22,7 +22,8 @@ | |||
22 | #define MNT_NOEXEC 0x04 | 22 | #define MNT_NOEXEC 0x04 |
23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ | 23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ |
24 | #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ | 24 | #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ |
25 | #define MNT_PNODE_MASK 0x30 /* propogation flag mask */ | 25 | |
26 | #define MNT_PNODE_MASK (MNT_SHARED | MNT_UNBINDABLE) | ||
26 | 27 | ||
27 | struct vfsmount { | 28 | struct vfsmount { |
28 | struct list_head mnt_hash; | 29 | struct list_head mnt_hash; |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 941da5c016a0..e933e2a355ad 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -329,7 +329,8 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) | |||
329 | extern void fat_cache_inval_inode(struct inode *inode); | 329 | extern void fat_cache_inval_inode(struct inode *inode); |
330 | extern int fat_get_cluster(struct inode *inode, int cluster, | 330 | extern int fat_get_cluster(struct inode *inode, int cluster, |
331 | int *fclus, int *dclus); | 331 | int *fclus, int *dclus); |
332 | extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys); | 332 | extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, |
333 | unsigned long *mapped_blocks); | ||
333 | 334 | ||
334 | /* fat/dir.c */ | 335 | /* fat/dir.c */ |
335 | extern struct file_operations fat_dir_operations; | 336 | extern struct file_operations fat_dir_operations; |
diff --git a/include/linux/ncp.h b/include/linux/ncp.h index 99f77876b716..99f0adeeb3f3 100644 --- a/include/linux/ncp.h +++ b/include/linux/ncp.h | |||
@@ -20,29 +20,29 @@ | |||
20 | #define NCP_DEALLOC_SLOT_REQUEST (0x5555) | 20 | #define NCP_DEALLOC_SLOT_REQUEST (0x5555) |
21 | 21 | ||
22 | struct ncp_request_header { | 22 | struct ncp_request_header { |
23 | __u16 type __attribute__((packed)); | 23 | __u16 type; |
24 | __u8 sequence __attribute__((packed)); | 24 | __u8 sequence; |
25 | __u8 conn_low __attribute__((packed)); | 25 | __u8 conn_low; |
26 | __u8 task __attribute__((packed)); | 26 | __u8 task; |
27 | __u8 conn_high __attribute__((packed)); | 27 | __u8 conn_high; |
28 | __u8 function __attribute__((packed)); | 28 | __u8 function; |
29 | __u8 data[0] __attribute__((packed)); | 29 | __u8 data[0]; |
30 | }; | 30 | } __attribute__((packed)); |
31 | 31 | ||
32 | #define NCP_REPLY (0x3333) | 32 | #define NCP_REPLY (0x3333) |
33 | #define NCP_WATCHDOG (0x3E3E) | 33 | #define NCP_WATCHDOG (0x3E3E) |
34 | #define NCP_POSITIVE_ACK (0x9999) | 34 | #define NCP_POSITIVE_ACK (0x9999) |
35 | 35 | ||
36 | struct ncp_reply_header { | 36 | struct ncp_reply_header { |
37 | __u16 type __attribute__((packed)); | 37 | __u16 type; |
38 | __u8 sequence __attribute__((packed)); | 38 | __u8 sequence; |
39 | __u8 conn_low __attribute__((packed)); | 39 | __u8 conn_low; |
40 | __u8 task __attribute__((packed)); | 40 | __u8 task; |
41 | __u8 conn_high __attribute__((packed)); | 41 | __u8 conn_high; |
42 | __u8 completion_code __attribute__((packed)); | 42 | __u8 completion_code; |
43 | __u8 connection_state __attribute__((packed)); | 43 | __u8 connection_state; |
44 | __u8 data[0] __attribute__((packed)); | 44 | __u8 data[0]; |
45 | }; | 45 | } __attribute__((packed)); |
46 | 46 | ||
47 | #define NCP_VOLNAME_LEN (16) | 47 | #define NCP_VOLNAME_LEN (16) |
48 | #define NCP_NUMBER_OF_VOLUMES (256) | 48 | #define NCP_NUMBER_OF_VOLUMES (256) |
@@ -128,37 +128,37 @@ struct nw_nfs_info { | |||
128 | }; | 128 | }; |
129 | 129 | ||
130 | struct nw_info_struct { | 130 | struct nw_info_struct { |
131 | __u32 spaceAlloc __attribute__((packed)); | 131 | __u32 spaceAlloc; |
132 | __le32 attributes __attribute__((packed)); | 132 | __le32 attributes; |
133 | __u16 flags __attribute__((packed)); | 133 | __u16 flags; |
134 | __le32 dataStreamSize __attribute__((packed)); | 134 | __le32 dataStreamSize; |
135 | __le32 totalStreamSize __attribute__((packed)); | 135 | __le32 totalStreamSize; |
136 | __u16 numberOfStreams __attribute__((packed)); | 136 | __u16 numberOfStreams; |
137 | __le16 creationTime __attribute__((packed)); | 137 | __le16 creationTime; |
138 | __le16 creationDate __attribute__((packed)); | 138 | __le16 creationDate; |
139 | __u32 creatorID __attribute__((packed)); | 139 | __u32 creatorID; |
140 | __le16 modifyTime __attribute__((packed)); | 140 | __le16 modifyTime; |
141 | __le16 modifyDate __attribute__((packed)); | 141 | __le16 modifyDate; |
142 | __u32 modifierID __attribute__((packed)); | 142 | __u32 modifierID; |
143 | __le16 lastAccessDate __attribute__((packed)); | 143 | __le16 lastAccessDate; |
144 | __u16 archiveTime __attribute__((packed)); | 144 | __u16 archiveTime; |
145 | __u16 archiveDate __attribute__((packed)); | 145 | __u16 archiveDate; |
146 | __u32 archiverID __attribute__((packed)); | 146 | __u32 archiverID; |
147 | __u16 inheritedRightsMask __attribute__((packed)); | 147 | __u16 inheritedRightsMask; |
148 | __le32 dirEntNum __attribute__((packed)); | 148 | __le32 dirEntNum; |
149 | __le32 DosDirNum __attribute__((packed)); | 149 | __le32 DosDirNum; |
150 | __u32 volNumber __attribute__((packed)); | 150 | __u32 volNumber; |
151 | __u32 EADataSize __attribute__((packed)); | 151 | __u32 EADataSize; |
152 | __u32 EAKeyCount __attribute__((packed)); | 152 | __u32 EAKeyCount; |
153 | __u32 EAKeySize __attribute__((packed)); | 153 | __u32 EAKeySize; |
154 | __u32 NSCreator __attribute__((packed)); | 154 | __u32 NSCreator; |
155 | __u8 nameLen __attribute__((packed)); | 155 | __u8 nameLen; |
156 | __u8 entryName[256] __attribute__((packed)); | 156 | __u8 entryName[256]; |
157 | /* libncp may depend on there being nothing after entryName */ | 157 | /* libncp may depend on there being nothing after entryName */ |
158 | #ifdef __KERNEL__ | 158 | #ifdef __KERNEL__ |
159 | struct nw_nfs_info nfs; | 159 | struct nw_nfs_info nfs; |
160 | #endif | 160 | #endif |
161 | }; | 161 | } __attribute__((packed)); |
162 | 162 | ||
163 | /* modify mask - use with MODIFY_DOS_INFO structure */ | 163 | /* modify mask - use with MODIFY_DOS_INFO structure */ |
164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) | 164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) |
@@ -176,26 +176,26 @@ struct nw_info_struct { | |||
176 | #define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000)) | 176 | #define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000)) |
177 | 177 | ||
178 | struct nw_modify_dos_info { | 178 | struct nw_modify_dos_info { |
179 | __le32 attributes __attribute__((packed)); | 179 | __le32 attributes; |
180 | __le16 creationDate __attribute__((packed)); | 180 | __le16 creationDate; |
181 | __le16 creationTime __attribute__((packed)); | 181 | __le16 creationTime; |
182 | __u32 creatorID __attribute__((packed)); | 182 | __u32 creatorID; |
183 | __le16 modifyDate __attribute__((packed)); | 183 | __le16 modifyDate; |
184 | __le16 modifyTime __attribute__((packed)); | 184 | __le16 modifyTime; |
185 | __u32 modifierID __attribute__((packed)); | 185 | __u32 modifierID; |
186 | __u16 archiveDate __attribute__((packed)); | 186 | __u16 archiveDate; |
187 | __u16 archiveTime __attribute__((packed)); | 187 | __u16 archiveTime; |
188 | __u32 archiverID __attribute__((packed)); | 188 | __u32 archiverID; |
189 | __le16 lastAccessDate __attribute__((packed)); | 189 | __le16 lastAccessDate; |
190 | __u16 inheritanceGrantMask __attribute__((packed)); | 190 | __u16 inheritanceGrantMask; |
191 | __u16 inheritanceRevokeMask __attribute__((packed)); | 191 | __u16 inheritanceRevokeMask; |
192 | __u32 maximumSpace __attribute__((packed)); | 192 | __u32 maximumSpace; |
193 | }; | 193 | } __attribute__((packed)); |
194 | 194 | ||
195 | struct nw_search_sequence { | 195 | struct nw_search_sequence { |
196 | __u8 volNumber __attribute__((packed)); | 196 | __u8 volNumber; |
197 | __u32 dirBase __attribute__((packed)); | 197 | __u32 dirBase; |
198 | __u32 sequence __attribute__((packed)); | 198 | __u32 sequence; |
199 | }; | 199 | } __attribute__((packed)); |
200 | 200 | ||
201 | #endif /* _LINUX_NCP_H */ | 201 | #endif /* _LINUX_NCP_H */ |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index be365e70ee99..4cf6088625c1 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -168,6 +168,37 @@ void nf_log_packet(int pf, | |||
168 | const struct net_device *out, | 168 | const struct net_device *out, |
169 | struct nf_loginfo *li, | 169 | struct nf_loginfo *li, |
170 | const char *fmt, ...); | 170 | const char *fmt, ...); |
171 | |||
172 | int nf_hook_slow(int pf, unsigned int hook, struct sk_buff **pskb, | ||
173 | struct net_device *indev, struct net_device *outdev, | ||
174 | int (*okfn)(struct sk_buff *), int thresh); | ||
175 | |||
176 | /** | ||
177 | * nf_hook_thresh - call a netfilter hook | ||
178 | * | ||
179 | * Returns 1 if the hook has allowed the packet to pass. The function | ||
180 | * okfn must be invoked by the caller in this case. Any other return | ||
181 | * value indicates the packet has been consumed by the hook. | ||
182 | */ | ||
183 | static inline int nf_hook_thresh(int pf, unsigned int hook, | ||
184 | struct sk_buff **pskb, | ||
185 | struct net_device *indev, | ||
186 | struct net_device *outdev, | ||
187 | int (*okfn)(struct sk_buff *), int thresh) | ||
188 | { | ||
189 | #ifndef CONFIG_NETFILTER_DEBUG | ||
190 | if (list_empty(&nf_hooks[pf][hook])) | ||
191 | return 1; | ||
192 | #endif | ||
193 | return nf_hook_slow(pf, hook, pskb, indev, outdev, okfn, thresh); | ||
194 | } | ||
195 | |||
196 | static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | ||
197 | struct net_device *indev, struct net_device *outdev, | ||
198 | int (*okfn)(struct sk_buff *)) | ||
199 | { | ||
200 | return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN); | ||
201 | } | ||
171 | 202 | ||
172 | /* Activate hook; either okfn or kfree_skb called, unless a hook | 203 | /* Activate hook; either okfn or kfree_skb called, unless a hook |
173 | returns NF_STOLEN (in which case, it's up to the hook to deal with | 204 | returns NF_STOLEN (in which case, it's up to the hook to deal with |
@@ -188,35 +219,17 @@ void nf_log_packet(int pf, | |||
188 | 219 | ||
189 | /* This is gross, but inline doesn't cut it for avoiding the function | 220 | /* This is gross, but inline doesn't cut it for avoiding the function |
190 | call in fast path: gcc doesn't inline (needs value tracking?). --RR */ | 221 | call in fast path: gcc doesn't inline (needs value tracking?). --RR */ |
191 | #ifdef CONFIG_NETFILTER_DEBUG | 222 | |
192 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ | 223 | /* HX: It's slightly less gross now. */ |
193 | ({int __ret; \ | 224 | |
194 | if ((__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, INT_MIN)) == 1) \ | ||
195 | __ret = (okfn)(skb); \ | ||
196 | __ret;}) | ||
197 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ | ||
198 | ({int __ret; \ | ||
199 | if ((__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1) \ | ||
200 | __ret = (okfn)(skb); \ | ||
201 | __ret;}) | ||
202 | #else | ||
203 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ | ||
204 | ({int __ret; \ | ||
205 | if (list_empty(&nf_hooks[pf][hook]) || \ | ||
206 | (__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, INT_MIN)) == 1) \ | ||
207 | __ret = (okfn)(skb); \ | ||
208 | __ret;}) | ||
209 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ | 225 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ |
210 | ({int __ret; \ | 226 | ({int __ret; \ |
211 | if (list_empty(&nf_hooks[pf][hook]) || \ | 227 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1)\ |
212 | (__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1) \ | ||
213 | __ret = (okfn)(skb); \ | 228 | __ret = (okfn)(skb); \ |
214 | __ret;}) | 229 | __ret;}) |
215 | #endif | ||
216 | 230 | ||
217 | int nf_hook_slow(int pf, unsigned int hook, struct sk_buff **pskb, | 231 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ |
218 | struct net_device *indev, struct net_device *outdev, | 232 | NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN) |
219 | int (*okfn)(struct sk_buff *), int thresh); | ||
220 | 233 | ||
221 | /* Call setsockopt() */ | 234 | /* Call setsockopt() */ |
222 | int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt, | 235 | int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt, |
@@ -261,6 +274,20 @@ struct nf_queue_rerouter { | |||
261 | extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer); | 274 | extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer); |
262 | extern int nf_unregister_queue_rerouter(int pf); | 275 | extern int nf_unregister_queue_rerouter(int pf); |
263 | 276 | ||
277 | #include <net/flow.h> | ||
278 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); | ||
279 | |||
280 | static inline void | ||
281 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) | ||
282 | { | ||
283 | #ifdef CONFIG_IP_NF_NAT_NEEDED | ||
284 | void (*decodefn)(struct sk_buff *, struct flowi *); | ||
285 | |||
286 | if (family == AF_INET && (decodefn = ip_nat_decode_session) != NULL) | ||
287 | decodefn(skb, fl); | ||
288 | #endif | ||
289 | } | ||
290 | |||
264 | #ifdef CONFIG_PROC_FS | 291 | #ifdef CONFIG_PROC_FS |
265 | #include <linux/proc_fs.h> | 292 | #include <linux/proc_fs.h> |
266 | extern struct proc_dir_entry *proc_net_netfilter; | 293 | extern struct proc_dir_entry *proc_net_netfilter; |
@@ -268,7 +295,24 @@ extern struct proc_dir_entry *proc_net_netfilter; | |||
268 | 295 | ||
269 | #else /* !CONFIG_NETFILTER */ | 296 | #else /* !CONFIG_NETFILTER */ |
270 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) | 297 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) |
298 | static inline int nf_hook_thresh(int pf, unsigned int hook, | ||
299 | struct sk_buff **pskb, | ||
300 | struct net_device *indev, | ||
301 | struct net_device *outdev, | ||
302 | int (*okfn)(struct sk_buff *), int thresh) | ||
303 | { | ||
304 | return okfn(*pskb); | ||
305 | } | ||
306 | static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | ||
307 | struct net_device *indev, struct net_device *outdev, | ||
308 | int (*okfn)(struct sk_buff *)) | ||
309 | { | ||
310 | return okfn(*pskb); | ||
311 | } | ||
271 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} | 312 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
313 | struct flowi; | ||
314 | static inline void | ||
315 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) {} | ||
272 | #endif /*CONFIG_NETFILTER*/ | 316 | #endif /*CONFIG_NETFILTER*/ |
273 | 317 | ||
274 | #endif /*__KERNEL__*/ | 318 | #endif /*__KERNEL__*/ |
diff --git a/include/linux/netfilter_ipv4/ipt_policy.h b/include/linux/netfilter_ipv4/ipt_policy.h new file mode 100644 index 000000000000..7fd1bec453f1 --- /dev/null +++ b/include/linux/netfilter_ipv4/ipt_policy.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef _IPT_POLICY_H | ||
2 | #define _IPT_POLICY_H | ||
3 | |||
4 | #define IPT_POLICY_MAX_ELEM 4 | ||
5 | |||
6 | enum ipt_policy_flags | ||
7 | { | ||
8 | IPT_POLICY_MATCH_IN = 0x1, | ||
9 | IPT_POLICY_MATCH_OUT = 0x2, | ||
10 | IPT_POLICY_MATCH_NONE = 0x4, | ||
11 | IPT_POLICY_MATCH_STRICT = 0x8, | ||
12 | }; | ||
13 | |||
14 | enum ipt_policy_modes | ||
15 | { | ||
16 | IPT_POLICY_MODE_TRANSPORT, | ||
17 | IPT_POLICY_MODE_TUNNEL | ||
18 | }; | ||
19 | |||
20 | struct ipt_policy_spec | ||
21 | { | ||
22 | u_int8_t saddr:1, | ||
23 | daddr:1, | ||
24 | proto:1, | ||
25 | mode:1, | ||
26 | spi:1, | ||
27 | reqid:1; | ||
28 | }; | ||
29 | |||
30 | struct ipt_policy_elem | ||
31 | { | ||
32 | u_int32_t saddr; | ||
33 | u_int32_t smask; | ||
34 | u_int32_t daddr; | ||
35 | u_int32_t dmask; | ||
36 | u_int32_t spi; | ||
37 | u_int32_t reqid; | ||
38 | u_int8_t proto; | ||
39 | u_int8_t mode; | ||
40 | |||
41 | struct ipt_policy_spec match; | ||
42 | struct ipt_policy_spec invert; | ||
43 | }; | ||
44 | |||
45 | struct ipt_policy_info | ||
46 | { | ||
47 | struct ipt_policy_elem pol[IPT_POLICY_MAX_ELEM]; | ||
48 | u_int16_t flags; | ||
49 | u_int16_t len; | ||
50 | }; | ||
51 | |||
52 | #endif /* _IPT_POLICY_H */ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_policy.h b/include/linux/netfilter_ipv6/ip6t_policy.h new file mode 100644 index 000000000000..5a93afcd2ff1 --- /dev/null +++ b/include/linux/netfilter_ipv6/ip6t_policy.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef _IP6T_POLICY_H | ||
2 | #define _IP6T_POLICY_H | ||
3 | |||
4 | #define IP6T_POLICY_MAX_ELEM 4 | ||
5 | |||
6 | enum ip6t_policy_flags | ||
7 | { | ||
8 | IP6T_POLICY_MATCH_IN = 0x1, | ||
9 | IP6T_POLICY_MATCH_OUT = 0x2, | ||
10 | IP6T_POLICY_MATCH_NONE = 0x4, | ||
11 | IP6T_POLICY_MATCH_STRICT = 0x8, | ||
12 | }; | ||
13 | |||
14 | enum ip6t_policy_modes | ||
15 | { | ||
16 | IP6T_POLICY_MODE_TRANSPORT, | ||
17 | IP6T_POLICY_MODE_TUNNEL | ||
18 | }; | ||
19 | |||
20 | struct ip6t_policy_spec | ||
21 | { | ||
22 | u_int8_t saddr:1, | ||
23 | daddr:1, | ||
24 | proto:1, | ||
25 | mode:1, | ||
26 | spi:1, | ||
27 | reqid:1; | ||
28 | }; | ||
29 | |||
30 | struct ip6t_policy_elem | ||
31 | { | ||
32 | struct in6_addr saddr; | ||
33 | struct in6_addr smask; | ||
34 | struct in6_addr daddr; | ||
35 | struct in6_addr dmask; | ||
36 | u_int32_t spi; | ||
37 | u_int32_t reqid; | ||
38 | u_int8_t proto; | ||
39 | u_int8_t mode; | ||
40 | |||
41 | struct ip6t_policy_spec match; | ||
42 | struct ip6t_policy_spec invert; | ||
43 | }; | ||
44 | |||
45 | struct ip6t_policy_info | ||
46 | { | ||
47 | struct ip6t_policy_elem pol[IP6T_POLICY_MAX_ELEM]; | ||
48 | u_int16_t flags; | ||
49 | u_int16_t len; | ||
50 | }; | ||
51 | |||
52 | #endif /* _IP6T_POLICY_H */ | ||
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index def32c5715be..8eb7fa76c1d0 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -5,6 +5,9 @@ | |||
5 | * pages. A pagevec is a multipage container which is used for that. | 5 | * pages. A pagevec is a multipage container which is used for that. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _LINUX_PAGEVEC_H | ||
9 | #define _LINUX_PAGEVEC_H | ||
10 | |||
8 | /* 14 pointers + two long's align the pagevec structure to a power of two */ | 11 | /* 14 pointers + two long's align the pagevec structure to a power of two */ |
9 | #define PAGEVEC_SIZE 14 | 12 | #define PAGEVEC_SIZE 14 |
10 | 13 | ||
@@ -83,3 +86,5 @@ static inline void pagevec_lru_add(struct pagevec *pvec) | |||
83 | if (pagevec_count(pvec)) | 86 | if (pagevec_count(pvec)) |
84 | __pagevec_lru_add(pvec); | 87 | __pagevec_lru_add(pvec); |
85 | } | 88 | } |
89 | |||
90 | #endif /* _LINUX_PAGEVEC_H */ | ||
diff --git a/include/linux/parport.h b/include/linux/parport.h index f7ff0b0c4031..f67f838a3a1f 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h | |||
@@ -236,12 +236,14 @@ struct pardevice { | |||
236 | 236 | ||
237 | /* IEEE1284 information */ | 237 | /* IEEE1284 information */ |
238 | 238 | ||
239 | /* IEEE1284 phases */ | 239 | /* IEEE1284 phases. These are exposed to userland through ppdev IOCTL |
240 | * PP[GS]ETPHASE, so do not change existing values. */ | ||
240 | enum ieee1284_phase { | 241 | enum ieee1284_phase { |
241 | IEEE1284_PH_FWD_DATA, | 242 | IEEE1284_PH_FWD_DATA, |
242 | IEEE1284_PH_FWD_IDLE, | 243 | IEEE1284_PH_FWD_IDLE, |
243 | IEEE1284_PH_TERMINATE, | 244 | IEEE1284_PH_TERMINATE, |
244 | IEEE1284_PH_NEGOTIATION, | 245 | IEEE1284_PH_NEGOTIATION, |
246 | IEEE1284_PH_HBUSY_DNA, | ||
245 | IEEE1284_PH_REV_IDLE, | 247 | IEEE1284_PH_REV_IDLE, |
246 | IEEE1284_PH_HBUSY_DAVAIL, | 248 | IEEE1284_PH_HBUSY_DAVAIL, |
247 | IEEE1284_PH_REV_DATA, | 249 | IEEE1284_PH_REV_DATA, |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index fb8d2d24e4bb..cb9039a21f2a 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | struct percpu_data { | 20 | struct percpu_data { |
21 | void *ptrs[NR_CPUS]; | 21 | void *ptrs[NR_CPUS]; |
22 | void *blkp; | ||
23 | }; | 22 | }; |
24 | 23 | ||
25 | /* | 24 | /* |
@@ -33,14 +32,14 @@ struct percpu_data { | |||
33 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ | 32 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ |
34 | }) | 33 | }) |
35 | 34 | ||
36 | extern void *__alloc_percpu(size_t size, size_t align); | 35 | extern void *__alloc_percpu(size_t size); |
37 | extern void free_percpu(const void *); | 36 | extern void free_percpu(const void *); |
38 | 37 | ||
39 | #else /* CONFIG_SMP */ | 38 | #else /* CONFIG_SMP */ |
40 | 39 | ||
41 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 40 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
42 | 41 | ||
43 | static inline void *__alloc_percpu(size_t size, size_t align) | 42 | static inline void *__alloc_percpu(size_t size) |
44 | { | 43 | { |
45 | void *ret = kmalloc(size, GFP_KERNEL); | 44 | void *ret = kmalloc(size, GFP_KERNEL); |
46 | if (ret) | 45 | if (ret) |
@@ -55,7 +54,6 @@ static inline void free_percpu(const void *ptr) | |||
55 | #endif /* CONFIG_SMP */ | 54 | #endif /* CONFIG_SMP */ |
56 | 55 | ||
57 | /* Simple wrapper for the common case: zeros memory. */ | 56 | /* Simple wrapper for the common case: zeros memory. */ |
58 | #define alloc_percpu(type) \ | 57 | #define alloc_percpu(type) ((type *)(__alloc_percpu(sizeof(type)))) |
59 | ((type *)(__alloc_percpu(sizeof(type), __alignof__(type)))) | ||
60 | 58 | ||
61 | #endif /* __LINUX_PERCPU_H */ | 59 | #endif /* __LINUX_PERCPU_H */ |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index b2b3dba1298d..9d5cd106b344 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -20,8 +20,6 @@ | |||
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 | ||
25 | 23 | ||
26 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ | 24 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ |
27 | #define PTRACE_SETOPTIONS 0x4200 | 25 | #define PTRACE_SETOPTIONS 0x4200 |
@@ -80,6 +78,8 @@ | |||
80 | 78 | ||
81 | 79 | ||
82 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); | 80 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); |
81 | extern struct task_struct *ptrace_get_task_struct(pid_t pid); | ||
82 | extern int ptrace_traceme(void); | ||
83 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); | 83 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); |
84 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 84 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
85 | extern int ptrace_attach(struct task_struct *tsk); | 85 | extern int ptrace_attach(struct task_struct *tsk); |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 36e5d269612f..c57ff2fcb30a 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #ifndef _LINUX_RADIX_TREE_H | 19 | #ifndef _LINUX_RADIX_TREE_H |
20 | #define _LINUX_RADIX_TREE_H | 20 | #define _LINUX_RADIX_TREE_H |
21 | 21 | ||
22 | #include <linux/sched.h> | ||
22 | #include <linux/preempt.h> | 23 | #include <linux/preempt.h> |
23 | #include <linux/types.h> | 24 | #include <linux/types.h> |
24 | 25 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index a471f3bb713e..a1d26cb28925 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -65,7 +65,7 @@ struct rcu_ctrlblk { | |||
65 | long cur; /* Current batch number. */ | 65 | long cur; /* Current batch number. */ |
66 | long completed; /* Number of the last completed batch */ | 66 | long completed; /* Number of the last completed batch */ |
67 | int next_pending; /* Is the next batch already waiting? */ | 67 | int next_pending; /* Is the next batch already waiting? */ |
68 | } ____cacheline_maxaligned_in_smp; | 68 | } ____cacheline_internodealigned_in_smp; |
69 | 69 | ||
70 | /* Is batch a before batch b ? */ | 70 | /* Is batch a before batch b ? */ |
71 | static inline int rcu_batch_before(long a, long b) | 71 | static inline int rcu_batch_before(long a, long b) |
@@ -125,36 +125,7 @@ static inline void rcu_bh_qsctr_inc(int cpu) | |||
125 | rdp->passed_quiesc = 1; | 125 | rdp->passed_quiesc = 1; |
126 | } | 126 | } |
127 | 127 | ||
128 | static inline int __rcu_pending(struct rcu_ctrlblk *rcp, | 128 | extern int rcu_pending(int cpu); |
129 | struct rcu_data *rdp) | ||
130 | { | ||
131 | /* This cpu has pending rcu entries and the grace period | ||
132 | * for them has completed. | ||
133 | */ | ||
134 | if (rdp->curlist && !rcu_batch_before(rcp->completed, rdp->batch)) | ||
135 | return 1; | ||
136 | |||
137 | /* This cpu has no pending entries, but there are new entries */ | ||
138 | if (!rdp->curlist && rdp->nxtlist) | ||
139 | return 1; | ||
140 | |||
141 | /* This cpu has finished callbacks to invoke */ | ||
142 | if (rdp->donelist) | ||
143 | return 1; | ||
144 | |||
145 | /* The rcu core waits for a quiescent state from the cpu */ | ||
146 | if (rdp->quiescbatch != rcp->cur || rdp->qs_pending) | ||
147 | return 1; | ||
148 | |||
149 | /* nothing to do */ | ||
150 | return 0; | ||
151 | } | ||
152 | |||
153 | static inline int rcu_pending(int cpu) | ||
154 | { | ||
155 | return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)) || | ||
156 | __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu)); | ||
157 | } | ||
158 | 129 | ||
159 | /** | 130 | /** |
160 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. | 131 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. |
diff --git a/include/linux/rcuref.h b/include/linux/rcuref.h deleted file mode 100644 index e1adbba14b67..000000000000 --- a/include/linux/rcuref.h +++ /dev/null | |||
@@ -1,220 +0,0 @@ | |||
1 | /* | ||
2 | * rcuref.h | ||
3 | * | ||
4 | * Reference counting for elements of lists/arrays protected by | ||
5 | * RCU. | ||
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
20 | * | ||
21 | * Copyright (C) IBM Corporation, 2005 | ||
22 | * | ||
23 | * Author: Dipankar Sarma <dipankar@in.ibm.com> | ||
24 | * Ravikiran Thirumalai <kiran_th@gmail.com> | ||
25 | * | ||
26 | * See Documentation/RCU/rcuref.txt for detailed user guide. | ||
27 | * | ||
28 | */ | ||
29 | |||
30 | #ifndef _RCUREF_H_ | ||
31 | #define _RCUREF_H_ | ||
32 | |||
33 | #ifdef __KERNEL__ | ||
34 | |||
35 | #include <linux/types.h> | ||
36 | #include <linux/interrupt.h> | ||
37 | #include <linux/spinlock.h> | ||
38 | #include <asm/atomic.h> | ||
39 | |||
40 | /* | ||
41 | * These APIs work on traditional atomic_t counters used in the | ||
42 | * kernel for reference counting. Under special circumstances | ||
43 | * where a lock-free get() operation races with a put() operation | ||
44 | * these APIs can be used. See Documentation/RCU/rcuref.txt. | ||
45 | */ | ||
46 | |||
47 | #ifdef __HAVE_ARCH_CMPXCHG | ||
48 | |||
49 | /** | ||
50 | * rcuref_inc - increment refcount for object. | ||
51 | * @rcuref: reference counter in the object in question. | ||
52 | * | ||
53 | * This should be used only for objects where we use RCU and | ||
54 | * use the rcuref_inc_lf() api to acquire a reference | ||
55 | * in a lock-free reader-side critical section. | ||
56 | */ | ||
57 | static inline void rcuref_inc(atomic_t *rcuref) | ||
58 | { | ||
59 | atomic_inc(rcuref); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * rcuref_dec - decrement refcount for object. | ||
64 | * @rcuref: reference counter in the object in question. | ||
65 | * | ||
66 | * This should be used only for objects where we use RCU and | ||
67 | * use the rcuref_inc_lf() api to acquire a reference | ||
68 | * in a lock-free reader-side critical section. | ||
69 | */ | ||
70 | static inline void rcuref_dec(atomic_t *rcuref) | ||
71 | { | ||
72 | atomic_dec(rcuref); | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * rcuref_dec_and_test - decrement refcount for object and test | ||
77 | * @rcuref: reference counter in the object. | ||
78 | * @release: pointer to the function that will clean up the object | ||
79 | * when the last reference to the object is released. | ||
80 | * This pointer is required. | ||
81 | * | ||
82 | * Decrement the refcount, and if 0, return 1. Else return 0. | ||
83 | * | ||
84 | * This should be used only for objects where we use RCU and | ||
85 | * use the rcuref_inc_lf() api to acquire a reference | ||
86 | * in a lock-free reader-side critical section. | ||
87 | */ | ||
88 | static inline int rcuref_dec_and_test(atomic_t *rcuref) | ||
89 | { | ||
90 | return atomic_dec_and_test(rcuref); | ||
91 | } | ||
92 | |||
93 | /* | ||
94 | * cmpxchg is needed on UP too, if deletions to the list/array can happen | ||
95 | * in interrupt context. | ||
96 | */ | ||
97 | |||
98 | /** | ||
99 | * rcuref_inc_lf - Take reference to an object in a read-side | ||
100 | * critical section protected by RCU. | ||
101 | * @rcuref: reference counter in the object in question. | ||
102 | * | ||
103 | * Try and increment the refcount by 1. The increment might fail if | ||
104 | * the reference counter has been through a 1 to 0 transition and | ||
105 | * is no longer part of the lock-free list. | ||
106 | * Returns non-zero on successful increment and zero otherwise. | ||
107 | */ | ||
108 | static inline int rcuref_inc_lf(atomic_t *rcuref) | ||
109 | { | ||
110 | int c, old; | ||
111 | c = atomic_read(rcuref); | ||
112 | while (c && (old = cmpxchg(&rcuref->counter, c, c + 1)) != c) | ||
113 | c = old; | ||
114 | return c; | ||
115 | } | ||
116 | |||
117 | #else /* !__HAVE_ARCH_CMPXCHG */ | ||
118 | |||
119 | extern spinlock_t __rcuref_hash[]; | ||
120 | |||
121 | /* | ||
122 | * Use a hash table of locks to protect the reference count | ||
123 | * since cmpxchg is not available in this arch. | ||
124 | */ | ||
125 | #ifdef CONFIG_SMP | ||
126 | #define RCUREF_HASH_SIZE 4 | ||
127 | #define RCUREF_HASH(k) \ | ||
128 | (&__rcuref_hash[(((unsigned long)k)>>8) & (RCUREF_HASH_SIZE-1)]) | ||
129 | #else | ||
130 | #define RCUREF_HASH_SIZE 1 | ||
131 | #define RCUREF_HASH(k) &__rcuref_hash[0] | ||
132 | #endif /* CONFIG_SMP */ | ||
133 | |||
134 | /** | ||
135 | * rcuref_inc - increment refcount for object. | ||
136 | * @rcuref: reference counter in the object in question. | ||
137 | * | ||
138 | * This should be used only for objects where we use RCU and | ||
139 | * use the rcuref_inc_lf() api to acquire a reference in a lock-free | ||
140 | * reader-side critical section. | ||
141 | */ | ||
142 | static inline void rcuref_inc(atomic_t *rcuref) | ||
143 | { | ||
144 | unsigned long flags; | ||
145 | spin_lock_irqsave(RCUREF_HASH(rcuref), flags); | ||
146 | rcuref->counter += 1; | ||
147 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * rcuref_dec - decrement refcount for object. | ||
152 | * @rcuref: reference counter in the object in question. | ||
153 | * | ||
154 | * This should be used only for objects where we use RCU and | ||
155 | * use the rcuref_inc_lf() api to acquire a reference in a lock-free | ||
156 | * reader-side critical section. | ||
157 | */ | ||
158 | static inline void rcuref_dec(atomic_t *rcuref) | ||
159 | { | ||
160 | unsigned long flags; | ||
161 | spin_lock_irqsave(RCUREF_HASH(rcuref), flags); | ||
162 | rcuref->counter -= 1; | ||
163 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
164 | } | ||
165 | |||
166 | /** | ||
167 | * rcuref_dec_and_test - decrement refcount for object and test | ||
168 | * @rcuref: reference counter in the object. | ||
169 | * @release: pointer to the function that will clean up the object | ||
170 | * when the last reference to the object is released. | ||
171 | * This pointer is required. | ||
172 | * | ||
173 | * Decrement the refcount, and if 0, return 1. Else return 0. | ||
174 | * | ||
175 | * This should be used only for objects where we use RCU and | ||
176 | * use the rcuref_inc_lf() api to acquire a reference in a lock-free | ||
177 | * reader-side critical section. | ||
178 | */ | ||
179 | static inline int rcuref_dec_and_test(atomic_t *rcuref) | ||
180 | { | ||
181 | unsigned long flags; | ||
182 | spin_lock_irqsave(RCUREF_HASH(rcuref), flags); | ||
183 | rcuref->counter--; | ||
184 | if (!rcuref->counter) { | ||
185 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
186 | return 1; | ||
187 | } else { | ||
188 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
189 | return 0; | ||
190 | } | ||
191 | } | ||
192 | |||
193 | /** | ||
194 | * rcuref_inc_lf - Take reference to an object of a lock-free collection | ||
195 | * by traversing a lock-free list/array. | ||
196 | * @rcuref: reference counter in the object in question. | ||
197 | * | ||
198 | * Try and increment the refcount by 1. The increment might fail if | ||
199 | * the reference counter has been through a 1 to 0 transition and | ||
200 | * object is no longer part of the lock-free list. | ||
201 | * Returns non-zero on successful increment and zero otherwise. | ||
202 | */ | ||
203 | static inline int rcuref_inc_lf(atomic_t *rcuref) | ||
204 | { | ||
205 | int ret; | ||
206 | unsigned long flags; | ||
207 | spin_lock_irqsave(RCUREF_HASH(rcuref), flags); | ||
208 | if (rcuref->counter) | ||
209 | ret = rcuref->counter++; | ||
210 | else | ||
211 | ret = 0; | ||
212 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
213 | return ret; | ||
214 | } | ||
215 | |||
216 | |||
217 | #endif /* !__HAVE_ARCH_CMPXCHG */ | ||
218 | |||
219 | #endif /* __KERNEL__ */ | ||
220 | #endif /* _RCUREF_H_ */ | ||
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h index fb7e80737325..7342e66247fb 100644 --- a/include/linux/relayfs_fs.h +++ b/include/linux/relayfs_fs.h | |||
@@ -65,20 +65,6 @@ struct rchan | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * Relayfs inode | ||
69 | */ | ||
70 | struct relayfs_inode_info | ||
71 | { | ||
72 | struct inode vfs_inode; | ||
73 | struct rchan_buf *buf; | ||
74 | }; | ||
75 | |||
76 | static inline struct relayfs_inode_info *RELAYFS_I(struct inode *inode) | ||
77 | { | ||
78 | return container_of(inode, struct relayfs_inode_info, vfs_inode); | ||
79 | } | ||
80 | |||
81 | /* | ||
82 | * Relay channel client callbacks | 68 | * Relay channel client callbacks |
83 | */ | 69 | */ |
84 | struct rchan_callbacks | 70 | struct rchan_callbacks |
@@ -124,6 +110,46 @@ struct rchan_callbacks | |||
124 | */ | 110 | */ |
125 | void (*buf_unmapped)(struct rchan_buf *buf, | 111 | void (*buf_unmapped)(struct rchan_buf *buf, |
126 | struct file *filp); | 112 | struct file *filp); |
113 | /* | ||
114 | * create_buf_file - create file to represent a relayfs channel buffer | ||
115 | * @filename: the name of the file to create | ||
116 | * @parent: the parent of the file to create | ||
117 | * @mode: the mode of the file to create | ||
118 | * @buf: the channel buffer | ||
119 | * @is_global: outparam - set non-zero if the buffer should be global | ||
120 | * | ||
121 | * Called during relay_open(), once for each per-cpu buffer, | ||
122 | * to allow the client to create a file to be used to | ||
123 | * represent the corresponding channel buffer. If the file is | ||
124 | * created outside of relayfs, the parent must also exist in | ||
125 | * that filesystem. | ||
126 | * | ||
127 | * The callback should return the dentry of the file created | ||
128 | * to represent the relay buffer. | ||
129 | * | ||
130 | * Setting the is_global outparam to a non-zero value will | ||
131 | * cause relay_open() to create a single global buffer rather | ||
132 | * than the default set of per-cpu buffers. | ||
133 | * | ||
134 | * See Documentation/filesystems/relayfs.txt for more info. | ||
135 | */ | ||
136 | struct dentry *(*create_buf_file)(const char *filename, | ||
137 | struct dentry *parent, | ||
138 | int mode, | ||
139 | struct rchan_buf *buf, | ||
140 | int *is_global); | ||
141 | |||
142 | /* | ||
143 | * remove_buf_file - remove file representing a relayfs channel buffer | ||
144 | * @dentry: the dentry of the file to remove | ||
145 | * | ||
146 | * Called during relay_close(), once for each per-cpu buffer, | ||
147 | * to allow the client to remove a file used to represent a | ||
148 | * channel buffer. | ||
149 | * | ||
150 | * The callback should return 0 if successful, negative if not. | ||
151 | */ | ||
152 | int (*remove_buf_file)(struct dentry *dentry); | ||
127 | }; | 153 | }; |
128 | 154 | ||
129 | /* | 155 | /* |
@@ -148,6 +174,12 @@ extern size_t relay_switch_subbuf(struct rchan_buf *buf, | |||
148 | extern struct dentry *relayfs_create_dir(const char *name, | 174 | extern struct dentry *relayfs_create_dir(const char *name, |
149 | struct dentry *parent); | 175 | struct dentry *parent); |
150 | extern int relayfs_remove_dir(struct dentry *dentry); | 176 | extern int relayfs_remove_dir(struct dentry *dentry); |
177 | extern struct dentry *relayfs_create_file(const char *name, | ||
178 | struct dentry *parent, | ||
179 | int mode, | ||
180 | struct file_operations *fops, | ||
181 | void *data); | ||
182 | extern int relayfs_remove_file(struct dentry *dentry); | ||
151 | 183 | ||
152 | /** | 184 | /** |
153 | * relay_write - write data into the channel | 185 | * relay_write - write data into the channel |
@@ -247,10 +279,9 @@ static inline void subbuf_start_reserve(struct rchan_buf *buf, | |||
247 | } | 279 | } |
248 | 280 | ||
249 | /* | 281 | /* |
250 | * exported relayfs file operations, fs/relayfs/inode.c | 282 | * exported relay file operations, fs/relayfs/inode.c |
251 | */ | 283 | */ |
252 | 284 | extern struct file_operations relay_file_operations; | |
253 | extern struct file_operations relayfs_file_operations; | ||
254 | 285 | ||
255 | #endif /* _LINUX_RELAYFS_FS_H */ | 286 | #endif /* _LINUX_RELAYFS_FS_H */ |
256 | 287 | ||
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 3bd7cce19e26..157d7e3236b5 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/string.h> | ||
24 | #include <linux/rio.h> | 25 | #include <linux/rio.h> |
25 | 26 | ||
26 | extern int __rio_local_read_config_32(struct rio_mport *port, u32 offset, | 27 | extern int __rio_local_read_config_32(struct rio_mport *port, u32 offset, |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index e1aaf1fac8e0..0b2ba67ff13c 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef _LINUX_RTC_H_ | 11 | #ifndef _LINUX_RTC_H_ |
12 | #define _LINUX_RTC_H_ | 12 | #define _LINUX_RTC_H_ |
13 | 13 | ||
14 | #include <linux/interrupt.h> | ||
15 | |||
14 | /* | 16 | /* |
15 | * The struct used to pass data via the following ioctl. Similar to the | 17 | * The struct used to pass data via the following ioctl. Similar to the |
16 | * struct tm in <time.h>, but it needs to be here so that the kernel | 18 | * struct tm in <time.h>, but it needs to be here so that the kernel |
@@ -102,6 +104,7 @@ int rtc_register(rtc_task_t *task); | |||
102 | int rtc_unregister(rtc_task_t *task); | 104 | int rtc_unregister(rtc_task_t *task); |
103 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 105 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
104 | void rtc_get_rtc_time(struct rtc_time *rtc_tm); | 106 | void rtc_get_rtc_time(struct rtc_time *rtc_tm); |
107 | irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs); | ||
105 | 108 | ||
106 | #endif /* __KERNEL__ */ | 109 | #endif /* __KERNEL__ */ |
107 | 110 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 7da33619d5d0..78eb92ae4d94 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/percpu.h> | 34 | #include <linux/percpu.h> |
35 | #include <linux/topology.h> | 35 | #include <linux/topology.h> |
36 | #include <linux/seccomp.h> | 36 | #include <linux/seccomp.h> |
37 | #include <linux/rcupdate.h> | ||
37 | 38 | ||
38 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ | 39 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ |
39 | 40 | ||
@@ -350,8 +351,16 @@ struct sighand_struct { | |||
350 | atomic_t count; | 351 | atomic_t count; |
351 | struct k_sigaction action[_NSIG]; | 352 | struct k_sigaction action[_NSIG]; |
352 | spinlock_t siglock; | 353 | spinlock_t siglock; |
354 | struct rcu_head rcu; | ||
353 | }; | 355 | }; |
354 | 356 | ||
357 | extern void sighand_free_cb(struct rcu_head *rhp); | ||
358 | |||
359 | static inline void sighand_free(struct sighand_struct *sp) | ||
360 | { | ||
361 | call_rcu(&sp->rcu, sighand_free_cb); | ||
362 | } | ||
363 | |||
355 | /* | 364 | /* |
356 | * NOTE! "signal_struct" does not have it's own | 365 | * NOTE! "signal_struct" does not have it's own |
357 | * locking, because a shared signal_struct always | 366 | * locking, because a shared signal_struct always |
@@ -762,6 +771,7 @@ struct task_struct { | |||
762 | unsigned keep_capabilities:1; | 771 | unsigned keep_capabilities:1; |
763 | struct user_struct *user; | 772 | struct user_struct *user; |
764 | #ifdef CONFIG_KEYS | 773 | #ifdef CONFIG_KEYS |
774 | struct key *request_key_auth; /* assumed request_key authority */ | ||
765 | struct key *thread_keyring; /* keyring private to this thread */ | 775 | struct key *thread_keyring; /* keyring private to this thread */ |
766 | unsigned char jit_keyring; /* default keyring to attach requested keys to */ | 776 | unsigned char jit_keyring; /* default keyring to attach requested keys to */ |
767 | #endif | 777 | #endif |
@@ -844,6 +854,7 @@ struct task_struct { | |||
844 | int cpuset_mems_generation; | 854 | int cpuset_mems_generation; |
845 | #endif | 855 | #endif |
846 | atomic_t fs_excl; /* holding fs exclusive resources */ | 856 | atomic_t fs_excl; /* holding fs exclusive resources */ |
857 | struct rcu_head rcu; | ||
847 | }; | 858 | }; |
848 | 859 | ||
849 | static inline pid_t process_group(struct task_struct *tsk) | 860 | static inline pid_t process_group(struct task_struct *tsk) |
@@ -867,8 +878,14 @@ static inline int pid_alive(struct task_struct *p) | |||
867 | extern void free_task(struct task_struct *tsk); | 878 | extern void free_task(struct task_struct *tsk); |
868 | extern void __put_task_struct(struct task_struct *tsk); | 879 | extern void __put_task_struct(struct task_struct *tsk); |
869 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 880 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
870 | #define put_task_struct(tsk) \ | 881 | |
871 | do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) | 882 | extern void __put_task_struct_cb(struct rcu_head *rhp); |
883 | |||
884 | static inline void put_task_struct(struct task_struct *t) | ||
885 | { | ||
886 | if (atomic_dec_and_test(&t->usage)) | ||
887 | call_rcu(&t->rcu, __put_task_struct_cb); | ||
888 | } | ||
872 | 889 | ||
873 | /* | 890 | /* |
874 | * Per process flags | 891 | * Per process flags |
@@ -895,6 +912,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) | |||
895 | #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ | 912 | #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ |
896 | #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ | 913 | #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ |
897 | #define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ | 914 | #define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ |
915 | #define PF_SWAPWRITE 0x01000000 /* Allowed to write to swap */ | ||
898 | 916 | ||
899 | /* | 917 | /* |
900 | * Only the _current_ task can read/write to tsk->flags, but other | 918 | * Only the _current_ task can read/write to tsk->flags, but other |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h new file mode 100644 index 000000000000..76850b75b3f6 --- /dev/null +++ b/include/linux/screen_info.h | |||
@@ -0,0 +1,77 @@ | |||
1 | #ifndef _SCREEN_INFO_H | ||
2 | #define _SCREEN_INFO_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* | ||
7 | * These are set up by the setup-routine at boot-time: | ||
8 | */ | ||
9 | |||
10 | struct screen_info { | ||
11 | u8 orig_x; /* 0x00 */ | ||
12 | u8 orig_y; /* 0x01 */ | ||
13 | u16 dontuse1; /* 0x02 -- EXT_MEM_K sits here */ | ||
14 | u16 orig_video_page; /* 0x04 */ | ||
15 | u8 orig_video_mode; /* 0x06 */ | ||
16 | u8 orig_video_cols; /* 0x07 */ | ||
17 | u16 unused2; /* 0x08 */ | ||
18 | u16 orig_video_ega_bx; /* 0x0a */ | ||
19 | u16 unused3; /* 0x0c */ | ||
20 | u8 orig_video_lines; /* 0x0e */ | ||
21 | u8 orig_video_isVGA; /* 0x0f */ | ||
22 | u16 orig_video_points; /* 0x10 */ | ||
23 | |||
24 | /* VESA graphic mode -- linear frame buffer */ | ||
25 | u16 lfb_width; /* 0x12 */ | ||
26 | u16 lfb_height; /* 0x14 */ | ||
27 | u16 lfb_depth; /* 0x16 */ | ||
28 | u32 lfb_base; /* 0x18 */ | ||
29 | u32 lfb_size; /* 0x1c */ | ||
30 | u16 dontuse2, dontuse3; /* 0x20 -- CL_MAGIC and CL_OFFSET here */ | ||
31 | u16 lfb_linelength; /* 0x24 */ | ||
32 | u8 red_size; /* 0x26 */ | ||
33 | u8 red_pos; /* 0x27 */ | ||
34 | u8 green_size; /* 0x28 */ | ||
35 | u8 green_pos; /* 0x29 */ | ||
36 | u8 blue_size; /* 0x2a */ | ||
37 | u8 blue_pos; /* 0x2b */ | ||
38 | u8 rsvd_size; /* 0x2c */ | ||
39 | u8 rsvd_pos; /* 0x2d */ | ||
40 | u16 vesapm_seg; /* 0x2e */ | ||
41 | u16 vesapm_off; /* 0x30 */ | ||
42 | u16 pages; /* 0x32 */ | ||
43 | u16 vesa_attributes; /* 0x34 */ | ||
44 | u32 capabilities; /* 0x36 */ | ||
45 | /* 0x3a -- 0x3f reserved for future expansion */ | ||
46 | }; | ||
47 | |||
48 | extern struct screen_info screen_info; | ||
49 | |||
50 | #define ORIG_X (screen_info.orig_x) | ||
51 | #define ORIG_Y (screen_info.orig_y) | ||
52 | #define ORIG_VIDEO_MODE (screen_info.orig_video_mode) | ||
53 | #define ORIG_VIDEO_COLS (screen_info.orig_video_cols) | ||
54 | #define ORIG_VIDEO_EGA_BX (screen_info.orig_video_ega_bx) | ||
55 | #define ORIG_VIDEO_LINES (screen_info.orig_video_lines) | ||
56 | #define ORIG_VIDEO_ISVGA (screen_info.orig_video_isVGA) | ||
57 | #define ORIG_VIDEO_POINTS (screen_info.orig_video_points) | ||
58 | |||
59 | #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ | ||
60 | #define VIDEO_TYPE_CGA 0x11 /* CGA Display */ | ||
61 | #define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ | ||
62 | #define VIDEO_TYPE_EGAC 0x21 /* EGA in Color Mode */ | ||
63 | #define VIDEO_TYPE_VGAC 0x22 /* VGA+ in Color Mode */ | ||
64 | #define VIDEO_TYPE_VLFB 0x23 /* VESA VGA in graphic mode */ | ||
65 | |||
66 | #define VIDEO_TYPE_PICA_S3 0x30 /* ACER PICA-61 local S3 video */ | ||
67 | #define VIDEO_TYPE_MIPS_G364 0x31 /* MIPS Magnum 4000 G364 video */ | ||
68 | #define VIDEO_TYPE_SGI 0x33 /* Various SGI graphics hardware */ | ||
69 | |||
70 | #define VIDEO_TYPE_TGAC 0x40 /* DEC TGA */ | ||
71 | |||
72 | #define VIDEO_TYPE_SUN 0x50 /* Sun frame buffer. */ | ||
73 | #define VIDEO_TYPE_SUNPCI 0x51 /* Sun PCI based frame buffer. */ | ||
74 | |||
75 | #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ | ||
76 | |||
77 | #endif /* _SCREEN_INFO_H */ | ||
diff --git a/include/linux/sdla.h b/include/linux/sdla.h index 3b6afb8caa42..564acd3a71c1 100644 --- a/include/linux/sdla.h +++ b/include/linux/sdla.h | |||
@@ -293,46 +293,46 @@ void sdla(void *cfg_info, char *dev, struct frad_conf *conf, int quiet); | |||
293 | #define SDLA_S508_INTEN 0x10 | 293 | #define SDLA_S508_INTEN 0x10 |
294 | 294 | ||
295 | struct sdla_cmd { | 295 | struct sdla_cmd { |
296 | char opp_flag __attribute__((packed)); | 296 | char opp_flag; |
297 | char cmd __attribute__((packed)); | 297 | char cmd; |
298 | short length __attribute__((packed)); | 298 | short length; |
299 | char retval __attribute__((packed)); | 299 | char retval; |
300 | short dlci __attribute__((packed)); | 300 | short dlci; |
301 | char flags __attribute__((packed)); | 301 | char flags; |
302 | short rxlost_int __attribute__((packed)); | 302 | short rxlost_int; |
303 | long rxlost_app __attribute__((packed)); | 303 | long rxlost_app; |
304 | char reserve[2] __attribute__((packed)); | 304 | char reserve[2]; |
305 | char data[SDLA_MAX_DATA] __attribute__((packed)); /* transfer data buffer */ | 305 | char data[SDLA_MAX_DATA]; /* transfer data buffer */ |
306 | }; | 306 | } __attribute__((packed)); |
307 | 307 | ||
308 | struct intr_info { | 308 | struct intr_info { |
309 | char flags __attribute__((packed)); | 309 | char flags; |
310 | short txlen __attribute__((packed)); | 310 | short txlen; |
311 | char irq __attribute__((packed)); | 311 | char irq; |
312 | char flags2 __attribute__((packed)); | 312 | char flags2; |
313 | short timeout __attribute__((packed)); | 313 | short timeout; |
314 | }; | 314 | } __attribute__((packed)); |
315 | 315 | ||
316 | /* found in the 508's control window at RXBUF_INFO */ | 316 | /* found in the 508's control window at RXBUF_INFO */ |
317 | struct buf_info { | 317 | struct buf_info { |
318 | unsigned short rse_num __attribute__((packed)); | 318 | unsigned short rse_num; |
319 | unsigned long rse_base __attribute__((packed)); | 319 | unsigned long rse_base; |
320 | unsigned long rse_next __attribute__((packed)); | 320 | unsigned long rse_next; |
321 | unsigned long buf_base __attribute__((packed)); | 321 | unsigned long buf_base; |
322 | unsigned short reserved __attribute__((packed)); | 322 | unsigned short reserved; |
323 | unsigned long buf_top __attribute__((packed)); | 323 | unsigned long buf_top; |
324 | }; | 324 | } __attribute__((packed)); |
325 | 325 | ||
326 | /* structure pointed to by rse_base in RXBUF_INFO struct */ | 326 | /* structure pointed to by rse_base in RXBUF_INFO struct */ |
327 | struct buf_entry { | 327 | struct buf_entry { |
328 | char opp_flag __attribute__((packed)); | 328 | char opp_flag; |
329 | short length __attribute__((packed)); | 329 | short length; |
330 | short dlci __attribute__((packed)); | 330 | short dlci; |
331 | char flags __attribute__((packed)); | 331 | char flags; |
332 | short timestamp __attribute__((packed)); | 332 | short timestamp; |
333 | short reserved[2] __attribute__((packed)); | 333 | short reserved[2]; |
334 | long buf_addr __attribute__((packed)); | 334 | long buf_addr; |
335 | }; | 335 | } __attribute__((packed)); |
336 | 336 | ||
337 | #endif | 337 | #endif |
338 | 338 | ||
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index dc89116bb1ca..cd2773b29a64 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -26,11 +26,7 @@ static inline int has_secure_computing(struct thread_info *ti) | |||
26 | 26 | ||
27 | #else /* CONFIG_SECCOMP */ | 27 | #else /* CONFIG_SECCOMP */ |
28 | 28 | ||
29 | #if (__GNUC__ > 2) | 29 | typedef struct { } seccomp_t; |
30 | typedef struct { } seccomp_t; | ||
31 | #else | ||
32 | typedef struct { int gcc_is_buggy; } seccomp_t; | ||
33 | #endif | ||
34 | 30 | ||
35 | #define secure_computing(x) do { } while (0) | 31 | #define secure_computing(x) do { } while (0) |
36 | /* static inline to preserve typechecking */ | 32 | /* static inline to preserve typechecking */ |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 5dd5f02c5c5f..b7d093520bb6 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -18,6 +18,19 @@ | |||
18 | #define SA_PROBE SA_ONESHOT | 18 | #define SA_PROBE SA_ONESHOT |
19 | #define SA_SAMPLE_RANDOM SA_RESTART | 19 | #define SA_SAMPLE_RANDOM SA_RESTART |
20 | #define SA_SHIRQ 0x04000000 | 20 | #define SA_SHIRQ 0x04000000 |
21 | /* | ||
22 | * As above, these correspond to the IORESOURCE_IRQ_* defines in | ||
23 | * linux/ioport.h to select the interrupt line behaviour. When | ||
24 | * requesting an interrupt without specifying a SA_TRIGGER, the | ||
25 | * setting should be assumed to be "as already configured", which | ||
26 | * may be as per machine or firmware initialisation. | ||
27 | */ | ||
28 | #define SA_TRIGGER_LOW 0x00000008 | ||
29 | #define SA_TRIGGER_HIGH 0x00000004 | ||
30 | #define SA_TRIGGER_FALLING 0x00000002 | ||
31 | #define SA_TRIGGER_RISING 0x00000001 | ||
32 | #define SA_TRIGGER_MASK (SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\ | ||
33 | SA_TRIGGER_RISING|SA_TRIGGER_FALLING) | ||
21 | 34 | ||
22 | /* | 35 | /* |
23 | * Real Time signals may be queued. | 36 | * Real Time signals may be queued. |
@@ -81,6 +94,23 @@ static inline int sigfindinword(unsigned long word) | |||
81 | 94 | ||
82 | #endif /* __HAVE_ARCH_SIG_BITOPS */ | 95 | #endif /* __HAVE_ARCH_SIG_BITOPS */ |
83 | 96 | ||
97 | static inline int sigisemptyset(sigset_t *set) | ||
98 | { | ||
99 | extern void _NSIG_WORDS_is_unsupported_size(void); | ||
100 | switch (_NSIG_WORDS) { | ||
101 | case 4: | ||
102 | return (set->sig[3] | set->sig[2] | | ||
103 | set->sig[1] | set->sig[0]) == 0; | ||
104 | case 2: | ||
105 | return (set->sig[1] | set->sig[0]) == 0; | ||
106 | case 1: | ||
107 | return set->sig[0] == 0; | ||
108 | default: | ||
109 | _NSIG_WORDS_is_unsupported_size(); | ||
110 | return 0; | ||
111 | } | ||
112 | } | ||
113 | |||
84 | #define sigmask(sig) (1UL << ((sig) - 1)) | 114 | #define sigmask(sig) (1UL << ((sig) - 1)) |
85 | 115 | ||
86 | #ifndef __HAVE_ARCH_SIG_SETOPS | 116 | #ifndef __HAVE_ARCH_SIG_SETOPS |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 483cfc47ec34..e5fd66c5650b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -251,7 +251,7 @@ struct sk_buff { | |||
251 | * want to keep them across layers you have to do a skb_clone() | 251 | * want to keep them across layers you have to do a skb_clone() |
252 | * first. This is owned by whoever has the skb queued ATM. | 252 | * first. This is owned by whoever has the skb queued ATM. |
253 | */ | 253 | */ |
254 | char cb[40]; | 254 | char cb[48]; |
255 | 255 | ||
256 | unsigned int len, | 256 | unsigned int len, |
257 | data_len, | 257 | data_len, |
diff --git a/include/linux/slab.h b/include/linux/slab.h index d1ea4051b996..1fb77a9cc148 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -53,6 +53,8 @@ typedef struct kmem_cache kmem_cache_t; | |||
53 | #define SLAB_CTOR_ATOMIC 0x002UL /* tell constructor it can't sleep */ | 53 | #define SLAB_CTOR_ATOMIC 0x002UL /* tell constructor it can't sleep */ |
54 | #define SLAB_CTOR_VERIFY 0x004UL /* tell constructor it's a verify call */ | 54 | #define SLAB_CTOR_VERIFY 0x004UL /* tell constructor it's a verify call */ |
55 | 55 | ||
56 | #ifndef CONFIG_SLOB | ||
57 | |||
56 | /* prototypes */ | 58 | /* prototypes */ |
57 | extern void __init kmem_cache_init(void); | 59 | extern void __init kmem_cache_init(void); |
58 | 60 | ||
@@ -134,6 +136,39 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
134 | extern int FASTCALL(kmem_cache_reap(int)); | 136 | extern int FASTCALL(kmem_cache_reap(int)); |
135 | extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); | 137 | extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); |
136 | 138 | ||
139 | #else /* CONFIG_SLOB */ | ||
140 | |||
141 | /* SLOB allocator routines */ | ||
142 | |||
143 | void kmem_cache_init(void); | ||
144 | struct kmem_cache *kmem_find_general_cachep(size_t, gfp_t gfpflags); | ||
145 | struct kmem_cache *kmem_cache_create(const char *c, size_t, size_t, | ||
146 | unsigned long, | ||
147 | void (*)(void *, struct kmem_cache *, unsigned long), | ||
148 | void (*)(void *, struct kmem_cache *, unsigned long)); | ||
149 | int kmem_cache_destroy(struct kmem_cache *c); | ||
150 | void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags); | ||
151 | void kmem_cache_free(struct kmem_cache *c, void *b); | ||
152 | const char *kmem_cache_name(struct kmem_cache *); | ||
153 | void *kmalloc(size_t size, gfp_t flags); | ||
154 | void *kzalloc(size_t size, gfp_t flags); | ||
155 | void kfree(const void *m); | ||
156 | unsigned int ksize(const void *m); | ||
157 | unsigned int kmem_cache_size(struct kmem_cache *c); | ||
158 | |||
159 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | ||
160 | { | ||
161 | return kzalloc(n * size, flags); | ||
162 | } | ||
163 | |||
164 | #define kmem_cache_shrink(d) (0) | ||
165 | #define kmem_cache_reap(a) | ||
166 | #define kmem_ptr_validate(a, b) (0) | ||
167 | #define kmem_cache_alloc_node(c, f, n) kmem_cache_alloc(c, f) | ||
168 | #define kmalloc_node(s, f, n) kmalloc(s, f) | ||
169 | |||
170 | #endif /* CONFIG_SLOB */ | ||
171 | |||
137 | /* System wide caches */ | 172 | /* System wide caches */ |
138 | extern kmem_cache_t *vm_area_cachep; | 173 | extern kmem_cache_t *vm_area_cachep; |
139 | extern kmem_cache_t *names_cachep; | 174 | extern kmem_cache_t *names_cachep; |
diff --git a/include/linux/spinlock_types_up.h b/include/linux/spinlock_types_up.h index def2d173a8db..04135b0e198e 100644 --- a/include/linux/spinlock_types_up.h +++ b/include/linux/spinlock_types_up.h | |||
@@ -22,30 +22,16 @@ typedef struct { | |||
22 | 22 | ||
23 | #else | 23 | #else |
24 | 24 | ||
25 | /* | ||
26 | * All gcc 2.95 versions and early versions of 2.96 have a nasty bug | ||
27 | * with empty initializers. | ||
28 | */ | ||
29 | #if (__GNUC__ > 2) | ||
30 | typedef struct { } raw_spinlock_t; | 25 | typedef struct { } raw_spinlock_t; |
31 | 26 | ||
32 | #define __RAW_SPIN_LOCK_UNLOCKED { } | 27 | #define __RAW_SPIN_LOCK_UNLOCKED { } |
33 | #else | ||
34 | typedef struct { int gcc_is_buggy; } raw_spinlock_t; | ||
35 | #define __RAW_SPIN_LOCK_UNLOCKED (raw_spinlock_t) { 0 } | ||
36 | #endif | ||
37 | 28 | ||
38 | #endif | 29 | #endif |
39 | 30 | ||
40 | #if (__GNUC__ > 2) | ||
41 | typedef struct { | 31 | typedef struct { |
42 | /* no debug version on UP */ | 32 | /* no debug version on UP */ |
43 | } raw_rwlock_t; | 33 | } raw_rwlock_t; |
44 | 34 | ||
45 | #define __RAW_RW_LOCK_UNLOCKED { } | 35 | #define __RAW_RW_LOCK_UNLOCKED { } |
46 | #else | ||
47 | typedef struct { int gcc_is_buggy; } raw_rwlock_t; | ||
48 | #define __RAW_RW_LOCK_UNLOCKED (raw_rwlock_t) { 0 } | ||
49 | #endif | ||
50 | 36 | ||
51 | #endif /* __LINUX_SPINLOCK_TYPES_UP_H */ | 37 | #endif /* __LINUX_SPINLOCK_TYPES_UP_H */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 556617bcf7ac..389d1c382e20 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -175,6 +175,13 @@ extern int try_to_free_pages(struct zone **, gfp_t); | |||
175 | extern int shrink_all_memory(int); | 175 | extern int shrink_all_memory(int); |
176 | extern int vm_swappiness; | 176 | extern int vm_swappiness; |
177 | 177 | ||
178 | #ifdef CONFIG_MIGRATION | ||
179 | extern int isolate_lru_page(struct page *p); | ||
180 | extern int putback_lru_pages(struct list_head *l); | ||
181 | extern int migrate_pages(struct list_head *l, struct list_head *t, | ||
182 | struct list_head *moved, struct list_head *failed); | ||
183 | #endif | ||
184 | |||
178 | #ifdef CONFIG_MMU | 185 | #ifdef CONFIG_MMU |
179 | /* linux/mm/shmem.c */ | 186 | /* linux/mm/shmem.c */ |
180 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 187 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
@@ -192,7 +199,7 @@ extern int rw_swap_page_sync(int, swp_entry_t, struct page *); | |||
192 | extern struct address_space swapper_space; | 199 | extern struct address_space swapper_space; |
193 | #define total_swapcache_pages swapper_space.nrpages | 200 | #define total_swapcache_pages swapper_space.nrpages |
194 | extern void show_swap_cache_info(void); | 201 | extern void show_swap_cache_info(void); |
195 | extern int add_to_swap(struct page *); | 202 | extern int add_to_swap(struct page *, gfp_t); |
196 | extern void __delete_from_swap_cache(struct page *); | 203 | extern void __delete_from_swap_cache(struct page *); |
197 | extern void delete_from_swap_cache(struct page *); | 204 | extern void delete_from_swap_cache(struct page *); |
198 | extern int move_to_swap_cache(struct page *, swp_entry_t); | 205 | extern int move_to_swap_cache(struct page *, swp_entry_t); |
diff --git a/include/linux/synclink.h b/include/linux/synclink.h index 763bd290f28d..1b7cd8d1a71b 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SyncLink Multiprotocol Serial Adapter Driver | 2 | * SyncLink Multiprotocol Serial Adapter Driver |
3 | * | 3 | * |
4 | * $Id: synclink.h,v 3.6 2002/02/20 21:58:20 paulkf Exp $ | 4 | * $Id: synclink.h,v 3.10 2005/11/08 19:50:54 paulkf Exp $ |
5 | * | 5 | * |
6 | * Copyright (C) 1998-2000 by Microgate Corporation | 6 | * Copyright (C) 1998-2000 by Microgate Corporation |
7 | * | 7 | * |
@@ -128,10 +128,14 @@ | |||
128 | #define MGSL_BUS_TYPE_EISA 2 | 128 | #define MGSL_BUS_TYPE_EISA 2 |
129 | #define MGSL_BUS_TYPE_PCI 5 | 129 | #define MGSL_BUS_TYPE_PCI 5 |
130 | 130 | ||
131 | #define MGSL_INTERFACE_MASK 0xf | ||
131 | #define MGSL_INTERFACE_DISABLE 0 | 132 | #define MGSL_INTERFACE_DISABLE 0 |
132 | #define MGSL_INTERFACE_RS232 1 | 133 | #define MGSL_INTERFACE_RS232 1 |
133 | #define MGSL_INTERFACE_V35 2 | 134 | #define MGSL_INTERFACE_V35 2 |
134 | #define MGSL_INTERFACE_RS422 3 | 135 | #define MGSL_INTERFACE_RS422 3 |
136 | #define MGSL_INTERFACE_RTS_EN 0x10 | ||
137 | #define MGSL_INTERFACE_LL 0x20 | ||
138 | #define MGSL_INTERFACE_RL 0x40 | ||
135 | 139 | ||
136 | typedef struct _MGSL_PARAMS | 140 | typedef struct _MGSL_PARAMS |
137 | { | 141 | { |
@@ -163,6 +167,9 @@ typedef struct _MGSL_PARAMS | |||
163 | #define SYNCLINK_DEVICE_ID 0x0010 | 167 | #define SYNCLINK_DEVICE_ID 0x0010 |
164 | #define MGSCC_DEVICE_ID 0x0020 | 168 | #define MGSCC_DEVICE_ID 0x0020 |
165 | #define SYNCLINK_SCA_DEVICE_ID 0x0030 | 169 | #define SYNCLINK_SCA_DEVICE_ID 0x0030 |
170 | #define SYNCLINK_GT_DEVICE_ID 0x0070 | ||
171 | #define SYNCLINK_GT4_DEVICE_ID 0x0080 | ||
172 | #define SYNCLINK_AC_DEVICE_ID 0x0090 | ||
166 | #define MGSL_MAX_SERIAL_NUMBER 30 | 173 | #define MGSL_MAX_SERIAL_NUMBER 30 |
167 | 174 | ||
168 | /* | 175 | /* |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 44fdd48d38e6..3eed47347013 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -511,6 +511,8 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio); | |||
511 | asmlinkage long sys_ioprio_get(int which, int who); | 511 | asmlinkage long sys_ioprio_get(int which, int who); |
512 | asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, | 512 | asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, |
513 | unsigned long maxnode); | 513 | unsigned long maxnode); |
514 | asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode, | ||
515 | const unsigned long __user *from, const unsigned long __user *to); | ||
514 | 516 | ||
515 | asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, | 517 | asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, |
516 | __u32 __user *ustatus); | 518 | __u32 __user *ustatus); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index a9b80fc7f0f3..7f472127b7b5 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -180,6 +180,8 @@ enum | |||
180 | VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ | 180 | VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ |
181 | VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ | 181 | VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ |
182 | VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ | 182 | VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ |
183 | VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ | ||
184 | VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ | ||
183 | }; | 185 | }; |
184 | 186 | ||
185 | 187 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index 1267f88ece6e..57449704a47b 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
24 | #include <linux/tty_driver.h> | 24 | #include <linux/tty_driver.h> |
25 | #include <linux/tty_ldisc.h> | 25 | #include <linux/tty_ldisc.h> |
26 | #include <linux/screen_info.h> | ||
26 | 27 | ||
27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
28 | 29 | ||
@@ -37,77 +38,6 @@ | |||
37 | #define NR_LDISCS 16 | 38 | #define NR_LDISCS 16 |
38 | 39 | ||
39 | /* | 40 | /* |
40 | * These are set up by the setup-routine at boot-time: | ||
41 | */ | ||
42 | |||
43 | struct screen_info { | ||
44 | u8 orig_x; /* 0x00 */ | ||
45 | u8 orig_y; /* 0x01 */ | ||
46 | u16 dontuse1; /* 0x02 -- EXT_MEM_K sits here */ | ||
47 | u16 orig_video_page; /* 0x04 */ | ||
48 | u8 orig_video_mode; /* 0x06 */ | ||
49 | u8 orig_video_cols; /* 0x07 */ | ||
50 | u16 unused2; /* 0x08 */ | ||
51 | u16 orig_video_ega_bx; /* 0x0a */ | ||
52 | u16 unused3; /* 0x0c */ | ||
53 | u8 orig_video_lines; /* 0x0e */ | ||
54 | u8 orig_video_isVGA; /* 0x0f */ | ||
55 | u16 orig_video_points; /* 0x10 */ | ||
56 | |||
57 | /* VESA graphic mode -- linear frame buffer */ | ||
58 | u16 lfb_width; /* 0x12 */ | ||
59 | u16 lfb_height; /* 0x14 */ | ||
60 | u16 lfb_depth; /* 0x16 */ | ||
61 | u32 lfb_base; /* 0x18 */ | ||
62 | u32 lfb_size; /* 0x1c */ | ||
63 | u16 dontuse2, dontuse3; /* 0x20 -- CL_MAGIC and CL_OFFSET here */ | ||
64 | u16 lfb_linelength; /* 0x24 */ | ||
65 | u8 red_size; /* 0x26 */ | ||
66 | u8 red_pos; /* 0x27 */ | ||
67 | u8 green_size; /* 0x28 */ | ||
68 | u8 green_pos; /* 0x29 */ | ||
69 | u8 blue_size; /* 0x2a */ | ||
70 | u8 blue_pos; /* 0x2b */ | ||
71 | u8 rsvd_size; /* 0x2c */ | ||
72 | u8 rsvd_pos; /* 0x2d */ | ||
73 | u16 vesapm_seg; /* 0x2e */ | ||
74 | u16 vesapm_off; /* 0x30 */ | ||
75 | u16 pages; /* 0x32 */ | ||
76 | u16 vesa_attributes; /* 0x34 */ | ||
77 | u32 capabilities; /* 0x36 */ | ||
78 | /* 0x3a -- 0x3f reserved for future expansion */ | ||
79 | }; | ||
80 | |||
81 | extern struct screen_info screen_info; | ||
82 | |||
83 | #define ORIG_X (screen_info.orig_x) | ||
84 | #define ORIG_Y (screen_info.orig_y) | ||
85 | #define ORIG_VIDEO_MODE (screen_info.orig_video_mode) | ||
86 | #define ORIG_VIDEO_COLS (screen_info.orig_video_cols) | ||
87 | #define ORIG_VIDEO_EGA_BX (screen_info.orig_video_ega_bx) | ||
88 | #define ORIG_VIDEO_LINES (screen_info.orig_video_lines) | ||
89 | #define ORIG_VIDEO_ISVGA (screen_info.orig_video_isVGA) | ||
90 | #define ORIG_VIDEO_POINTS (screen_info.orig_video_points) | ||
91 | |||
92 | #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ | ||
93 | #define VIDEO_TYPE_CGA 0x11 /* CGA Display */ | ||
94 | #define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ | ||
95 | #define VIDEO_TYPE_EGAC 0x21 /* EGA in Color Mode */ | ||
96 | #define VIDEO_TYPE_VGAC 0x22 /* VGA+ in Color Mode */ | ||
97 | #define VIDEO_TYPE_VLFB 0x23 /* VESA VGA in graphic mode */ | ||
98 | |||
99 | #define VIDEO_TYPE_PICA_S3 0x30 /* ACER PICA-61 local S3 video */ | ||
100 | #define VIDEO_TYPE_MIPS_G364 0x31 /* MIPS Magnum 4000 G364 video */ | ||
101 | #define VIDEO_TYPE_SGI 0x33 /* Various SGI graphics hardware */ | ||
102 | |||
103 | #define VIDEO_TYPE_TGAC 0x40 /* DEC TGA */ | ||
104 | |||
105 | #define VIDEO_TYPE_SUN 0x50 /* Sun frame buffer. */ | ||
106 | #define VIDEO_TYPE_SUNPCI 0x51 /* Sun PCI based frame buffer. */ | ||
107 | |||
108 | #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ | ||
109 | |||
110 | /* | ||
111 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 41 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
112 | * a c_cc[] character, but indicates that a particular special character | 42 | * a c_cc[] character, but indicates that a particular special character |
113 | * isn't in use (eg VINTR has no character etc) | 43 | * isn't in use (eg VINTR has no character etc) |
diff --git a/include/linux/wavefront.h b/include/linux/wavefront.h index 61bd0fd35240..51ab3c933acd 100644 --- a/include/linux/wavefront.h +++ b/include/linux/wavefront.h | |||
@@ -434,22 +434,22 @@ typedef struct wf_multisample { | |||
434 | } wavefront_multisample; | 434 | } wavefront_multisample; |
435 | 435 | ||
436 | typedef struct wf_alias { | 436 | typedef struct wf_alias { |
437 | INT16 OriginalSample __attribute__ ((packed)); | 437 | INT16 OriginalSample; |
438 | 438 | ||
439 | struct wf_sample_offset sampleStartOffset __attribute__ ((packed)); | 439 | struct wf_sample_offset sampleStartOffset; |
440 | struct wf_sample_offset loopStartOffset __attribute__ ((packed)); | 440 | struct wf_sample_offset loopStartOffset; |
441 | struct wf_sample_offset sampleEndOffset __attribute__ ((packed)); | 441 | struct wf_sample_offset sampleEndOffset; |
442 | struct wf_sample_offset loopEndOffset __attribute__ ((packed)); | 442 | struct wf_sample_offset loopEndOffset; |
443 | 443 | ||
444 | INT16 FrequencyBias __attribute__ ((packed)); | 444 | INT16 FrequencyBias; |
445 | 445 | ||
446 | UCHAR8 SampleResolution:2 __attribute__ ((packed)); | 446 | UCHAR8 SampleResolution:2; |
447 | UCHAR8 Unused1:1 __attribute__ ((packed)); | 447 | UCHAR8 Unused1:1; |
448 | UCHAR8 Loop:1 __attribute__ ((packed)); | 448 | UCHAR8 Loop:1; |
449 | UCHAR8 Bidirectional:1 __attribute__ ((packed)); | 449 | UCHAR8 Bidirectional:1; |
450 | UCHAR8 Unused2:1 __attribute__ ((packed)); | 450 | UCHAR8 Unused2:1; |
451 | UCHAR8 Reverse:1 __attribute__ ((packed)); | 451 | UCHAR8 Reverse:1; |
452 | UCHAR8 Unused3:1 __attribute__ ((packed)); | 452 | UCHAR8 Unused3:1; |
453 | 453 | ||
454 | /* This structure is meant to be padded only to 16 bits on their | 454 | /* This structure is meant to be padded only to 16 bits on their |
455 | original. Of course, whoever wrote their documentation didn't | 455 | original. Of course, whoever wrote their documentation didn't |
@@ -460,8 +460,8 @@ typedef struct wf_alias { | |||
460 | standard 16->32 bit issues. | 460 | standard 16->32 bit issues. |
461 | */ | 461 | */ |
462 | 462 | ||
463 | UCHAR8 sixteen_bit_padding __attribute__ ((packed)); | 463 | UCHAR8 sixteen_bit_padding; |
464 | } wavefront_alias; | 464 | } __attribute__((packed)) wavefront_alias; |
465 | 465 | ||
466 | typedef struct wf_drum { | 466 | typedef struct wf_drum { |
467 | UCHAR8 PatchNumber; | 467 | UCHAR8 PatchNumber; |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index ac39d04d027c..86b111300231 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -65,6 +65,7 @@ extern int FASTCALL(schedule_work(struct work_struct *work)); | |||
65 | extern int FASTCALL(schedule_delayed_work(struct work_struct *work, unsigned long delay)); | 65 | extern int FASTCALL(schedule_delayed_work(struct work_struct *work, unsigned long delay)); |
66 | 66 | ||
67 | extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay); | 67 | extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay); |
68 | extern int schedule_on_each_cpu(void (*func)(void *info), void *info); | ||
68 | extern void flush_scheduled_work(void); | 69 | extern void flush_scheduled_work(void); |
69 | extern int current_is_keventd(void); | 70 | extern int current_is_keventd(void); |
70 | extern int keventd_up(void); | 71 | extern int keventd_up(void); |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index b096159086e8..beaef5c7a0ea 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -103,7 +103,9 @@ void balance_dirty_pages_ratelimited(struct address_space *mapping); | |||
103 | int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); | 103 | int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); |
104 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); | 104 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); |
105 | int sync_page_range(struct inode *inode, struct address_space *mapping, | 105 | int sync_page_range(struct inode *inode, struct address_space *mapping, |
106 | loff_t pos, size_t count); | 106 | loff_t pos, loff_t count); |
107 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, | ||
108 | loff_t pos, loff_t count); | ||
107 | 109 | ||
108 | /* pdflush.c */ | 110 | /* pdflush.c */ |
109 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl | 111 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl |