diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-20 05:13:31 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-20 05:13:31 -0500 |
| commit | ff607748590fba14aecedb0d50edc4ada98d4302 (patch) | |
| tree | 986e0a3abe922713069a8e8bc913043fed89a39a /include/linux | |
| parent | db024d5398cd332023896caf70530564b15ec88e (diff) | |
| parent | 6aff8f1f07a7fff48121d1ad4a550f3af24ccc81 (diff) | |
Merge branch 'upstream'
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/jbd.h | 8 | ||||
| -rw-r--r-- | include/linux/kernel.h | 6 | ||||
| -rw-r--r-- | include/linux/ktime.h | 10 | ||||
| -rw-r--r-- | include/linux/libata.h | 8 | ||||
| -rw-r--r-- | include/linux/lockd/lockd.h | 6 | ||||
| -rw-r--r-- | include/linux/mm.h | 2 | ||||
| -rw-r--r-- | include/linux/netfilter.h | 21 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4.h | 2 | ||||
| -rw-r--r-- | include/linux/ptrace.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 5 | ||||
| -rw-r--r-- | include/linux/timex.h | 3 |
11 files changed, 40 insertions, 32 deletions
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 0fe4aa891ddc..41ee79962bb2 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
| @@ -498,12 +498,6 @@ struct transaction_s | |||
| 498 | struct journal_head *t_checkpoint_list; | 498 | struct journal_head *t_checkpoint_list; |
| 499 | 499 | ||
| 500 | /* | 500 | /* |
| 501 | * Doubly-linked circular list of all buffers submitted for IO while | ||
| 502 | * checkpointing. [j_list_lock] | ||
| 503 | */ | ||
| 504 | struct journal_head *t_checkpoint_io_list; | ||
| 505 | |||
| 506 | /* | ||
| 507 | * Doubly-linked circular list of temporary buffers currently undergoing | 501 | * Doubly-linked circular list of temporary buffers currently undergoing |
| 508 | * IO in the log [j_list_lock] | 502 | * IO in the log [j_list_lock] |
| 509 | */ | 503 | */ |
| @@ -852,7 +846,7 @@ extern void journal_commit_transaction(journal_t *); | |||
| 852 | 846 | ||
| 853 | /* Checkpoint list management */ | 847 | /* Checkpoint list management */ |
| 854 | int __journal_clean_checkpoint_list(journal_t *journal); | 848 | int __journal_clean_checkpoint_list(journal_t *journal); |
| 855 | int __journal_remove_checkpoint(struct journal_head *); | 849 | void __journal_remove_checkpoint(struct journal_head *); |
| 856 | void __journal_insert_checkpoint(struct journal_head *, transaction_t *); | 850 | void __journal_insert_checkpoint(struct journal_head *, transaction_t *); |
| 857 | 851 | ||
| 858 | /* Buffer IO */ | 852 | /* Buffer IO */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b49affa0ac5a..3b507bf05d09 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -326,12 +326,6 @@ struct sysinfo { | |||
| 326 | /* Force a compilation error if condition is true */ | 326 | /* Force a compilation error if condition is true */ |
| 327 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 327 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
| 328 | 328 | ||
| 329 | #ifdef CONFIG_SYSCTL | ||
| 330 | extern int randomize_va_space; | ||
| 331 | #else | ||
| 332 | #define randomize_va_space 1 | ||
| 333 | #endif | ||
| 334 | |||
| 335 | /* Trap pasters of __FUNCTION__ at compile-time */ | 329 | /* Trap pasters of __FUNCTION__ at compile-time */ |
| 336 | #define __FUNCTION__ (__func__) | 330 | #define __FUNCTION__ (__func__) |
| 337 | 331 | ||
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 6aca67a569a2..f3dec45ef874 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
| @@ -96,10 +96,16 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) | |||
| 96 | ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; }) | 96 | ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; }) |
| 97 | 97 | ||
| 98 | /* convert a timespec to ktime_t format: */ | 98 | /* convert a timespec to ktime_t format: */ |
| 99 | #define timespec_to_ktime(ts) ktime_set((ts).tv_sec, (ts).tv_nsec) | 99 | static inline ktime_t timespec_to_ktime(struct timespec ts) |
| 100 | { | ||
| 101 | return ktime_set(ts.tv_sec, ts.tv_nsec); | ||
| 102 | } | ||
| 100 | 103 | ||
| 101 | /* convert a timeval to ktime_t format: */ | 104 | /* convert a timeval to ktime_t format: */ |
| 102 | #define timeval_to_ktime(tv) ktime_set((tv).tv_sec, (tv).tv_usec * 1000) | 105 | static inline ktime_t timeval_to_ktime(struct timeval tv) |
| 106 | { | ||
| 107 | return ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC); | ||
| 108 | } | ||
| 103 | 109 | ||
| 104 | /* Map the ktime_t to timespec conversion to ns_to_timespec function */ | 110 | /* Map the ktime_t to timespec conversion to ns_to_timespec function */ |
| 105 | #define ktime_to_timespec(kt) ns_to_timespec((kt).tv64) | 111 | #define ktime_to_timespec(kt) ns_to_timespec((kt).tv64) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 67d07c44b2e7..63500881acc6 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -541,10 +541,10 @@ extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, | |||
| 541 | extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, | 541 | extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, |
| 542 | unsigned int n_elem); | 542 | unsigned int n_elem); |
| 543 | extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); | 543 | extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); |
| 544 | extern void ata_dev_id_string(const u16 *id, unsigned char *s, | 544 | extern void ata_id_string(const u16 *id, unsigned char *s, |
| 545 | unsigned int ofs, unsigned int len); | 545 | unsigned int ofs, unsigned int len); |
| 546 | extern void ata_dev_id_c_string(const u16 *id, unsigned char *s, | 546 | extern void ata_id_c_string(const u16 *id, unsigned char *s, |
| 547 | unsigned int ofs, unsigned int len); | 547 | unsigned int ofs, unsigned int len); |
| 548 | extern void ata_dev_config(struct ata_port *ap, unsigned int i); | 548 | extern void ata_dev_config(struct ata_port *ap, unsigned int i); |
| 549 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 549 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
| 550 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 550 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 920766cea79c..ef21ed296039 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -149,7 +149,7 @@ struct nlm_rqst * nlmclnt_alloc_call(void); | |||
| 149 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); | 149 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); |
| 150 | void nlmclnt_finish_block(struct nlm_rqst *req); | 150 | void nlmclnt_finish_block(struct nlm_rqst *req); |
| 151 | long nlmclnt_block(struct nlm_rqst *req, long timeout); | 151 | long nlmclnt_block(struct nlm_rqst *req, long timeout); |
| 152 | u32 nlmclnt_grant(struct nlm_lock *); | 152 | u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *); |
| 153 | void nlmclnt_recovery(struct nlm_host *, u32); | 153 | void nlmclnt_recovery(struct nlm_host *, u32); |
| 154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); | 154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); |
| 155 | int nlmclnt_setgrantargs(struct nlm_rqst *, struct nlm_lock *); | 155 | int nlmclnt_setgrantargs(struct nlm_rqst *, struct nlm_lock *); |
| @@ -204,7 +204,7 @@ nlmsvc_file_inode(struct nlm_file *file) | |||
| 204 | * Compare two host addresses (needs modifying for ipv6) | 204 | * Compare two host addresses (needs modifying for ipv6) |
| 205 | */ | 205 | */ |
| 206 | static __inline__ int | 206 | static __inline__ int |
| 207 | nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) | 207 | nlm_cmp_addr(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2) |
| 208 | { | 208 | { |
| 209 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; | 209 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; |
| 210 | } | 210 | } |
| @@ -214,7 +214,7 @@ nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) | |||
| 214 | * When the second lock is of type F_UNLCK, this acts like a wildcard. | 214 | * When the second lock is of type F_UNLCK, this acts like a wildcard. |
| 215 | */ | 215 | */ |
| 216 | static __inline__ int | 216 | static __inline__ int |
| 217 | nlm_compare_locks(struct file_lock *fl1, struct file_lock *fl2) | 217 | nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2) |
| 218 | { | 218 | { |
| 219 | return fl1->fl_pid == fl2->fl_pid | 219 | return fl1->fl_pid == fl2->fl_pid |
| 220 | && fl1->fl_start == fl2->fl_start | 220 | && fl1->fl_start == fl2->fl_start |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 75e9f0724997..26e1663a5cbe 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1051,5 +1051,7 @@ int shrink_slab(unsigned long scanned, gfp_t gfp_mask, | |||
| 1051 | void drop_pagecache(void); | 1051 | void drop_pagecache(void); |
| 1052 | void drop_slab(void); | 1052 | void drop_slab(void); |
| 1053 | 1053 | ||
| 1054 | extern int randomize_va_space; | ||
| 1055 | |||
| 1054 | #endif /* __KERNEL__ */ | 1056 | #endif /* __KERNEL__ */ |
| 1055 | #endif /* _LINUX_MM_H */ | 1057 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 4cf6088625c1..468896939843 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
| @@ -184,8 +184,11 @@ static inline int nf_hook_thresh(int pf, unsigned int hook, | |||
| 184 | struct sk_buff **pskb, | 184 | struct sk_buff **pskb, |
| 185 | struct net_device *indev, | 185 | struct net_device *indev, |
| 186 | struct net_device *outdev, | 186 | struct net_device *outdev, |
| 187 | int (*okfn)(struct sk_buff *), int thresh) | 187 | int (*okfn)(struct sk_buff *), int thresh, |
| 188 | int cond) | ||
| 188 | { | 189 | { |
| 190 | if (!cond) | ||
| 191 | return 1; | ||
| 189 | #ifndef CONFIG_NETFILTER_DEBUG | 192 | #ifndef CONFIG_NETFILTER_DEBUG |
| 190 | if (list_empty(&nf_hooks[pf][hook])) | 193 | if (list_empty(&nf_hooks[pf][hook])) |
| 191 | return 1; | 194 | return 1; |
| @@ -197,7 +200,7 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
| 197 | struct net_device *indev, struct net_device *outdev, | 200 | struct net_device *indev, struct net_device *outdev, |
| 198 | int (*okfn)(struct sk_buff *)) | 201 | int (*okfn)(struct sk_buff *)) |
| 199 | { | 202 | { |
| 200 | return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN); | 203 | return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN, 1); |
| 201 | } | 204 | } |
| 202 | 205 | ||
| 203 | /* Activate hook; either okfn or kfree_skb called, unless a hook | 206 | /* Activate hook; either okfn or kfree_skb called, unless a hook |
| @@ -224,7 +227,13 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
| 224 | 227 | ||
| 225 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ | 228 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ |
| 226 | ({int __ret; \ | 229 | ({int __ret; \ |
| 227 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1)\ | 230 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh, 1)) == 1)\ |
| 231 | __ret = (okfn)(skb); \ | ||
| 232 | __ret;}) | ||
| 233 | |||
| 234 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ | ||
| 235 | ({int __ret; \ | ||
| 236 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, INT_MIN, cond)) == 1)\ | ||
| 228 | __ret = (okfn)(skb); \ | 237 | __ret = (okfn)(skb); \ |
| 229 | __ret;}) | 238 | __ret;}) |
| 230 | 239 | ||
| @@ -295,11 +304,13 @@ extern struct proc_dir_entry *proc_net_netfilter; | |||
| 295 | 304 | ||
| 296 | #else /* !CONFIG_NETFILTER */ | 305 | #else /* !CONFIG_NETFILTER */ |
| 297 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) | 306 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) |
| 307 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) | ||
| 298 | static inline int nf_hook_thresh(int pf, unsigned int hook, | 308 | static inline int nf_hook_thresh(int pf, unsigned int hook, |
| 299 | struct sk_buff **pskb, | 309 | struct sk_buff **pskb, |
| 300 | struct net_device *indev, | 310 | struct net_device *indev, |
| 301 | struct net_device *outdev, | 311 | struct net_device *outdev, |
| 302 | int (*okfn)(struct sk_buff *), int thresh) | 312 | int (*okfn)(struct sk_buff *), int thresh, |
| 313 | int cond) | ||
| 303 | { | 314 | { |
| 304 | return okfn(*pskb); | 315 | return okfn(*pskb); |
| 305 | } | 316 | } |
| @@ -307,7 +318,7 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
| 307 | struct net_device *indev, struct net_device *outdev, | 318 | struct net_device *indev, struct net_device *outdev, |
| 308 | int (*okfn)(struct sk_buff *)) | 319 | int (*okfn)(struct sk_buff *)) |
| 309 | { | 320 | { |
| 310 | return okfn(*pskb); | 321 | return 1; |
| 311 | } | 322 | } |
| 312 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} | 323 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
| 313 | struct flowi; | 324 | struct flowi; |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index fdc4a9527343..43c09d790b83 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
| @@ -79,7 +79,7 @@ enum nf_ip_hook_priorities { | |||
| 79 | 79 | ||
| 80 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
| 81 | extern int ip_route_me_harder(struct sk_buff **pskb); | 81 | extern int ip_route_me_harder(struct sk_buff **pskb); |
| 82 | 82 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); | |
| 83 | #endif /*__KERNEL__*/ | 83 | #endif /*__KERNEL__*/ |
| 84 | 84 | ||
| 85 | #endif /*__LINUX_IP_NETFILTER_H*/ | 85 | #endif /*__LINUX_IP_NETFILTER_H*/ |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 9d5cd106b344..0d36750fc0f1 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
| @@ -84,6 +84,7 @@ extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __us | |||
| 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); |
| 86 | extern int ptrace_detach(struct task_struct *, unsigned int); | 86 | extern int ptrace_detach(struct task_struct *, unsigned int); |
| 87 | extern void __ptrace_detach(struct task_struct *, unsigned int); | ||
| 87 | extern void ptrace_disable(struct task_struct *); | 88 | extern void ptrace_disable(struct task_struct *); |
| 88 | extern int ptrace_check_attach(struct task_struct *task, int kill); | 89 | extern int ptrace_check_attach(struct task_struct *task, int kill); |
| 89 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); | 90 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9c1da0269a18..b6f51e3a38ec 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -697,12 +697,9 @@ struct task_struct { | |||
| 697 | 697 | ||
| 698 | int lock_depth; /* BKL lock depth */ | 698 | int lock_depth; /* BKL lock depth */ |
| 699 | 699 | ||
| 700 | #if defined(CONFIG_SMP) | 700 | #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) |
| 701 | int last_waker_cpu; /* CPU that last woke this task up */ | ||
| 702 | #if defined(__ARCH_WANT_UNLOCKED_CTXSW) | ||
| 703 | int oncpu; | 701 | int oncpu; |
| 704 | #endif | 702 | #endif |
| 705 | #endif | ||
| 706 | int prio, static_prio; | 703 | int prio, static_prio; |
| 707 | struct list_head run_list; | 704 | struct list_head run_list; |
| 708 | prio_array_t *array; | 705 | prio_array_t *array; |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 04a4a8cb4ed3..b7ca1204e42a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
| @@ -345,6 +345,9 @@ time_interpolator_reset(void) | |||
| 345 | 345 | ||
| 346 | #endif /* !CONFIG_TIME_INTERPOLATION */ | 346 | #endif /* !CONFIG_TIME_INTERPOLATION */ |
| 347 | 347 | ||
| 348 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | ||
| 349 | extern u64 current_tick_length(void); | ||
| 350 | |||
| 348 | #endif /* KERNEL */ | 351 | #endif /* KERNEL */ |
| 349 | 352 | ||
| 350 | #endif /* LINUX_TIMEX_H */ | 353 | #endif /* LINUX_TIMEX_H */ |
