diff options
Diffstat (limited to 'include/linux')
106 files changed, 1012 insertions, 561 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 127d2d192b5a..bcf875e844fe 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -247,7 +247,6 @@ unifdef-y += isdn.h | |||
| 247 | unifdef-y += isdnif.h | 247 | unifdef-y += isdnif.h |
| 248 | unifdef-y += isdn_divertif.h | 248 | unifdef-y += isdn_divertif.h |
| 249 | unifdef-y += isdn_ppp.h | 249 | unifdef-y += isdn_ppp.h |
| 250 | unifdef-y += isicom.h | ||
| 251 | unifdef-y += jbd.h | 250 | unifdef-y += jbd.h |
| 252 | unifdef-y += joystick.h | 251 | unifdef-y += joystick.h |
| 253 | unifdef-y += kdev_t.h | 252 | unifdef-y += kdev_t.h |
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index 93bfb0beb62a..8ff274933948 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
| 13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
| 14 | #include <linux/klist.h> | 14 | #include <linux/klist.h> |
| 15 | #include <linux/spinlock.h> | ||
| 16 | 15 | ||
| 17 | struct attribute_container { | 16 | struct attribute_container { |
| 18 | struct list_head node; | 17 | struct list_head node; |
diff --git a/include/linux/audit.h b/include/linux/audit.h index fccc6e50298a..8ca7ca0b47f0 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -63,9 +63,12 @@ | |||
| 63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ | 63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ |
| 64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ | 64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ |
| 65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ | 65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ |
| 66 | #define AUDIT_TTY_GET 1014 /* Get TTY auditing status */ | ||
| 67 | #define AUDIT_TTY_SET 1015 /* Set TTY auditing status */ | ||
| 66 | 68 | ||
| 67 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ | 69 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ |
| 68 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ | 70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ |
| 71 | #define AUDIT_USER_TTY 1124 /* Non-ICANON TTY input meaning */ | ||
| 69 | #define AUDIT_LAST_USER_MSG 1199 | 72 | #define AUDIT_LAST_USER_MSG 1199 |
| 70 | #define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */ | 73 | #define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */ |
| 71 | #define AUDIT_LAST_USER_MSG2 2999 | 74 | #define AUDIT_LAST_USER_MSG2 2999 |
| @@ -92,6 +95,7 @@ | |||
| 92 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ | 95 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ |
| 93 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ | 96 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ |
| 94 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ | 97 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ |
| 98 | #define AUDIT_TTY 1319 /* Input on an administrative TTY */ | ||
| 95 | 99 | ||
| 96 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 100 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
| 97 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 101 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
| @@ -289,6 +293,10 @@ struct audit_status { | |||
| 289 | __u32 backlog; /* messages waiting in queue */ | 293 | __u32 backlog; /* messages waiting in queue */ |
| 290 | }; | 294 | }; |
| 291 | 295 | ||
| 296 | struct audit_tty_status { | ||
| 297 | __u32 enabled; /* 1 = enabled, 0 = disabled */ | ||
| 298 | }; | ||
| 299 | |||
| 292 | /* audit_rule_data supports filter rules with both integer and string | 300 | /* audit_rule_data supports filter rules with both integer and string |
| 293 | * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and | 301 | * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and |
| 294 | * AUDIT_LIST_RULES requests. | 302 | * AUDIT_LIST_RULES requests. |
| @@ -515,11 +523,13 @@ extern void audit_log_d_path(struct audit_buffer *ab, | |||
| 515 | const char *prefix, | 523 | const char *prefix, |
| 516 | struct dentry *dentry, | 524 | struct dentry *dentry, |
| 517 | struct vfsmount *vfsmnt); | 525 | struct vfsmount *vfsmnt); |
| 526 | extern void audit_log_lost(const char *message); | ||
| 518 | /* Private API (for audit.c only) */ | 527 | /* Private API (for audit.c only) */ |
| 519 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 528 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); |
| 520 | extern int audit_filter_type(int type); | 529 | extern int audit_filter_type(int type); |
| 521 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 530 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
| 522 | void *data, size_t datasz, uid_t loginuid, u32 sid); | 531 | void *data, size_t datasz, uid_t loginuid, u32 sid); |
| 532 | extern int audit_enabled; | ||
| 523 | #else | 533 | #else |
| 524 | #define audit_log(c,g,t,f,...) do { ; } while (0) | 534 | #define audit_log(c,g,t,f,...) do { ; } while (0) |
| 525 | #define audit_log_start(c,g,t) ({ NULL; }) | 535 | #define audit_log_start(c,g,t) ({ NULL; }) |
| @@ -530,6 +540,7 @@ extern int audit_receive_filter(int type, int pid, int uid, int seq, | |||
| 530 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 540 | #define audit_log_untrustedstring(a,s) do { ; } while (0) |
| 531 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) | 541 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) |
| 532 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) | 542 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) |
| 543 | #define audit_enabled 0 | ||
| 533 | #endif | 544 | #endif |
| 534 | #endif | 545 | #endif |
| 535 | #endif | 546 | #endif |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index f2542c24b328..7011d6255593 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -93,7 +93,6 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) | |||
| 93 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); | 93 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); |
| 94 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); | 94 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); |
| 95 | long congestion_wait(int rw, long timeout); | 95 | long congestion_wait(int rw, long timeout); |
| 96 | long congestion_wait_interruptible(int rw, long timeout); | ||
| 97 | void congestion_end(int rw); | 96 | void congestion_end(int rw); |
| 98 | 97 | ||
| 99 | #define bdi_cap_writeback_dirty(bdi) \ | 98 | #define bdi_cap_writeback_dirty(bdi) \ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index fae138bd2207..f78965fc6426 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/bio.h> | 14 | #include <linux/bio.h> |
| 15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 16 | #include <linux/stringify.h> | 16 | #include <linux/stringify.h> |
| 17 | #include <linux/bsg.h> | ||
| 17 | 18 | ||
| 18 | #include <asm/scatterlist.h> | 19 | #include <asm/scatterlist.h> |
| 19 | 20 | ||
| @@ -41,6 +42,8 @@ struct elevator_queue; | |||
| 41 | typedef struct elevator_queue elevator_t; | 42 | typedef struct elevator_queue elevator_t; |
| 42 | struct request_pm_state; | 43 | struct request_pm_state; |
| 43 | struct blk_trace; | 44 | struct blk_trace; |
| 45 | struct request; | ||
| 46 | struct sg_io_hdr; | ||
| 44 | 47 | ||
| 45 | #define BLKDEV_MIN_RQ 4 | 48 | #define BLKDEV_MIN_RQ 4 |
| 46 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ | 49 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ |
| @@ -314,6 +317,9 @@ struct request { | |||
| 314 | */ | 317 | */ |
| 315 | rq_end_io_fn *end_io; | 318 | rq_end_io_fn *end_io; |
| 316 | void *end_io_data; | 319 | void *end_io_data; |
| 320 | |||
| 321 | /* for bidi */ | ||
| 322 | struct request *next_rq; | ||
| 317 | }; | 323 | }; |
| 318 | 324 | ||
| 319 | /* | 325 | /* |
| @@ -468,6 +474,10 @@ struct request_queue | |||
| 468 | unsigned int bi_size; | 474 | unsigned int bi_size; |
| 469 | 475 | ||
| 470 | struct mutex sysfs_lock; | 476 | struct mutex sysfs_lock; |
| 477 | |||
| 478 | #if defined(CONFIG_BLK_DEV_BSG) | ||
| 479 | struct bsg_class_device bsg_dev; | ||
| 480 | #endif | ||
| 471 | }; | 481 | }; |
| 472 | 482 | ||
| 473 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 483 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
| @@ -479,6 +489,7 @@ struct request_queue | |||
| 479 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ | 489 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ |
| 480 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ | 490 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ |
| 481 | #define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */ | 491 | #define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */ |
| 492 | #define QUEUE_FLAG_BIDI 9 /* queue supports bidi requests */ | ||
| 482 | 493 | ||
| 483 | enum { | 494 | enum { |
| 484 | /* | 495 | /* |
| @@ -543,6 +554,7 @@ enum { | |||
| 543 | #define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED) | 554 | #define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED) |
| 544 | #define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER) | 555 | #define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER) |
| 545 | #define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) | 556 | #define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) |
| 557 | #define blk_bidi_rq(rq) ((rq)->next_rq != NULL) | ||
| 546 | 558 | ||
| 547 | #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) | 559 | #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) |
| 548 | 560 | ||
| @@ -607,7 +619,12 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn; | |||
| 607 | #define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT) | 619 | #define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT) |
| 608 | #define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD) | 620 | #define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD) |
| 609 | 621 | ||
| 610 | #ifdef CONFIG_MMU | 622 | /* |
| 623 | * default timeout for SG_IO if none specified | ||
| 624 | */ | ||
| 625 | #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ) | ||
| 626 | |||
| 627 | #ifdef CONFIG_BOUNCE | ||
| 611 | extern int init_emergency_isa_pool(void); | 628 | extern int init_emergency_isa_pool(void); |
| 612 | extern void blk_queue_bounce(request_queue_t *q, struct bio **bio); | 629 | extern void blk_queue_bounce(request_queue_t *q, struct bio **bio); |
| 613 | #else | 630 | #else |
| @@ -637,7 +654,8 @@ extern void blk_requeue_request(request_queue_t *, struct request *); | |||
| 637 | extern void blk_plug_device(request_queue_t *); | 654 | extern void blk_plug_device(request_queue_t *); |
| 638 | extern int blk_remove_plug(request_queue_t *); | 655 | extern int blk_remove_plug(request_queue_t *); |
| 639 | extern void blk_recount_segments(request_queue_t *, struct bio *); | 656 | extern void blk_recount_segments(request_queue_t *, struct bio *); |
| 640 | extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *); | 657 | extern int scsi_cmd_ioctl(struct file *, struct request_queue *, |
| 658 | struct gendisk *, unsigned int, void __user *); | ||
| 641 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, | 659 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, |
| 642 | struct gendisk *, struct scsi_ioctl_command __user *); | 660 | struct gendisk *, struct scsi_ioctl_command __user *); |
| 643 | 661 | ||
| @@ -680,6 +698,12 @@ extern int blk_execute_rq(request_queue_t *, struct gendisk *, | |||
| 680 | struct request *, int); | 698 | struct request *, int); |
| 681 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, | 699 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, |
| 682 | struct request *, int, rq_end_io_fn *); | 700 | struct request *, int, rq_end_io_fn *); |
| 701 | extern int blk_fill_sghdr_rq(request_queue_t *, struct request *, | ||
| 702 | struct sg_io_hdr *, int); | ||
| 703 | extern int blk_unmap_sghdr_rq(struct request *, struct sg_io_hdr *); | ||
| 704 | extern int blk_complete_sghdr_rq(struct request *, struct sg_io_hdr *, | ||
| 705 | struct bio *); | ||
| 706 | extern int blk_verify_command(unsigned char *, int); | ||
| 683 | 707 | ||
| 684 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) | 708 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) |
| 685 | { | 709 | { |
diff --git a/include/linux/bsg.h b/include/linux/bsg.h new file mode 100644 index 000000000000..bd998ca6cb2e --- /dev/null +++ b/include/linux/bsg.h | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | #ifndef BSG_H | ||
| 2 | #define BSG_H | ||
| 3 | |||
| 4 | #define BSG_PROTOCOL_SCSI 0 | ||
| 5 | |||
| 6 | #define BSG_SUB_PROTOCOL_SCSI_CMD 0 | ||
| 7 | #define BSG_SUB_PROTOCOL_SCSI_TMF 1 | ||
| 8 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 | ||
| 9 | |||
| 10 | struct sg_io_v4 { | ||
| 11 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ | ||
| 12 | __u32 protocol; /* [i] 0 -> SCSI , .... */ | ||
| 13 | __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task | ||
| 14 | management function, .... */ | ||
| 15 | |||
| 16 | __u32 request_len; /* [i] in bytes */ | ||
| 17 | __u64 request; /* [i], [*i] {SCSI: cdb} */ | ||
| 18 | __u32 request_attr; /* [i] {SCSI: task attribute} */ | ||
| 19 | __u32 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ | ||
| 20 | __u32 request_priority; /* [i] {SCSI: task priority} */ | ||
| 21 | __u32 max_response_len; /* [i] in bytes */ | ||
| 22 | __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ | ||
| 23 | |||
| 24 | /* "din_" for data in (from device); "dout_" for data out (to device) */ | ||
| 25 | __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ | ||
| 26 | __u32 din_xfer_len; /* [i] bytes to be transferred from device */ | ||
| 27 | __u64 dout_xferp; /* [i], [*i] */ | ||
| 28 | __u64 din_xferp; /* [i], [*o] */ | ||
| 29 | |||
| 30 | __u32 timeout; /* [i] units: millisecond */ | ||
| 31 | __u32 flags; /* [i] bit mask */ | ||
| 32 | __u64 usr_ptr; /* [i->o] unused internally */ | ||
| 33 | __u32 spare_in; /* [i] */ | ||
| 34 | |||
| 35 | __u32 driver_status; /* [o] 0 -> ok */ | ||
| 36 | __u32 transport_status; /* [o] 0 -> ok */ | ||
| 37 | __u32 device_status; /* [o] {SCSI: command completion status} */ | ||
| 38 | __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ | ||
| 39 | __u32 info; /* [o] additional information */ | ||
| 40 | __u32 duration; /* [o] time to complete, in milliseconds */ | ||
| 41 | __u32 response_len; /* [o] bytes of response actually written */ | ||
| 42 | __s32 din_resid; /* [o] actual_din_xfer_len - din_xfer_len */ | ||
| 43 | __u32 generated_tag; /* [o] {SCSI: task tag that transport chose} */ | ||
| 44 | __u32 spare_out; /* [o] */ | ||
| 45 | |||
| 46 | __u32 padding; | ||
| 47 | }; | ||
| 48 | |||
| 49 | #ifdef __KERNEL__ | ||
| 50 | |||
| 51 | #if defined(CONFIG_BLK_DEV_BSG) | ||
| 52 | struct bsg_class_device { | ||
| 53 | struct class_device *class_dev; | ||
| 54 | struct device *dev; | ||
| 55 | int minor; | ||
| 56 | struct list_head list; | ||
| 57 | struct request_queue *queue; | ||
| 58 | }; | ||
| 59 | |||
| 60 | extern int bsg_register_queue(struct request_queue *, const char *); | ||
| 61 | extern void bsg_unregister_queue(struct request_queue *); | ||
| 62 | #else | ||
| 63 | struct bsg_class_device { }; | ||
| 64 | #define bsg_register_queue(disk, name) (0) | ||
| 65 | #define bsg_unregister_queue(disk) do { } while (0) | ||
| 66 | #endif | ||
| 67 | |||
| 68 | #endif /* __KERNEL__ */ | ||
| 69 | |||
| 70 | #endif | ||
diff --git a/include/linux/bug.h b/include/linux/bug.h index 42aa0a54b6f4..54398d2c6d8d 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h | |||
| @@ -10,6 +10,8 @@ enum bug_trap_type { | |||
| 10 | BUG_TRAP_TYPE_BUG = 2, | 10 | BUG_TRAP_TYPE_BUG = 2, |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | struct pt_regs; | ||
| 14 | |||
| 13 | #ifdef CONFIG_GENERIC_BUG | 15 | #ifdef CONFIG_GENERIC_BUG |
| 14 | #include <asm-generic/bug.h> | 16 | #include <asm-generic/bug.h> |
| 15 | 17 | ||
| @@ -20,7 +22,7 @@ static inline int is_warning_bug(const struct bug_entry *bug) | |||
| 20 | 22 | ||
| 21 | const struct bug_entry *find_bug(unsigned long bugaddr); | 23 | const struct bug_entry *find_bug(unsigned long bugaddr); |
| 22 | 24 | ||
| 23 | enum bug_trap_type report_bug(unsigned long bug_addr); | 25 | enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs); |
| 24 | 26 | ||
| 25 | int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, | 27 | int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, |
| 26 | struct module *); | 28 | struct module *); |
| @@ -31,7 +33,8 @@ int is_valid_bugaddr(unsigned long addr); | |||
| 31 | 33 | ||
| 32 | #else /* !CONFIG_GENERIC_BUG */ | 34 | #else /* !CONFIG_GENERIC_BUG */ |
| 33 | 35 | ||
| 34 | static inline enum bug_trap_type report_bug(unsigned long bug_addr) | 36 | static inline enum bug_trap_type report_bug(unsigned long bug_addr, |
| 37 | struct pt_regs *regs) | ||
| 35 | { | 38 | { |
| 36 | return BUG_TRAP_TYPE_BUG; | 39 | return BUG_TRAP_TYPE_BUG; |
| 37 | } | 40 | } |
diff --git a/include/linux/capability.h b/include/linux/capability.h index bbf8df7de28f..2dfa58555934 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
| @@ -44,7 +44,6 @@ typedef struct __user_cap_data_struct { | |||
| 44 | 44 | ||
| 45 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
| 46 | 46 | ||
| 47 | #include <linux/spinlock.h> | ||
| 48 | #include <asm/current.h> | 47 | #include <asm/current.h> |
| 49 | 48 | ||
| 50 | /* #define STRICT_CAP_T_TYPECHECKS */ | 49 | /* #define STRICT_CAP_T_TYPECHECKS */ |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index f50f04bdbc16..2b641b176e7f 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
| @@ -414,8 +414,8 @@ struct cdrom_generic_command | |||
| 414 | #define CDO_CHECK_TYPE 0x10 /* check type on open for data */ | 414 | #define CDO_CHECK_TYPE 0x10 /* check type on open for data */ |
| 415 | 415 | ||
| 416 | /* Special codes used when specifying changer slots. */ | 416 | /* Special codes used when specifying changer slots. */ |
| 417 | #define CDSL_NONE ((int) (~0U>>1)-1) | 417 | #define CDSL_NONE (INT_MAX-1) |
| 418 | #define CDSL_CURRENT ((int) (~0U>>1)) | 418 | #define CDSL_CURRENT INT_MAX |
| 419 | 419 | ||
| 420 | /* For partition based multisession access. IDE can handle 64 partitions | 420 | /* For partition based multisession access. IDE can handle 64 partitions |
| 421 | * per drive - SCSI CD-ROM's use minors to differentiate between the | 421 | * per drive - SCSI CD-ROM's use minors to differentiate between the |
diff --git a/include/linux/cobalt-nvram.h b/include/linux/cobalt-nvram.h deleted file mode 100644 index ea429562ff36..000000000000 --- a/include/linux/cobalt-nvram.h +++ /dev/null | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * $Id: cobalt-nvram.h,v 1.20 2001/10/17 23:16:55 thockin Exp $ | ||
| 3 | * cobalt-nvram.h : defines for the various fields in the cobalt NVRAM | ||
| 4 | * | ||
| 5 | * Copyright 2001,2002 Sun Microsystems, Inc. | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef COBALT_NVRAM_H | ||
| 9 | #define COBALT_NVRAM_H | ||
| 10 | |||
| 11 | #include <linux/nvram.h> | ||
| 12 | |||
| 13 | #define COBT_CMOS_INFO_MAX 0x7f /* top address allowed */ | ||
| 14 | #define COBT_CMOS_BIOS_DRIVE_INFO 0x12 /* drive info would go here */ | ||
| 15 | |||
| 16 | #define COBT_CMOS_CKS_START NVRAM_OFFSET(0x0e) | ||
| 17 | #define COBT_CMOS_CKS_END NVRAM_OFFSET(0x7f) | ||
| 18 | |||
| 19 | /* flag bytes - 16 flags for now, leave room for more */ | ||
| 20 | #define COBT_CMOS_FLAG_BYTE_0 NVRAM_OFFSET(0x10) | ||
| 21 | #define COBT_CMOS_FLAG_BYTE_1 NVRAM_OFFSET(0x11) | ||
| 22 | |||
| 23 | /* flags in flag bytes - up to 16 */ | ||
| 24 | #define COBT_CMOS_FLAG_MIN 0x0001 | ||
| 25 | #define COBT_CMOS_CONSOLE_FLAG 0x0001 /* console on/off */ | ||
| 26 | #define COBT_CMOS_DEBUG_FLAG 0x0002 /* ROM debug messages */ | ||
| 27 | #define COBT_CMOS_AUTO_PROMPT_FLAG 0x0004 /* boot to ROM prompt? */ | ||
| 28 | #define COBT_CMOS_CLEAN_BOOT_FLAG 0x0008 /* set by a clean shutdown */ | ||
| 29 | #define COBT_CMOS_HW_NOPROBE_FLAG 0x0010 /* go easy on the probing */ | ||
| 30 | #define COBT_CMOS_SYSFAULT_FLAG 0x0020 /* system fault detected */ | ||
| 31 | #define COBT_CMOS_OOPSPANIC_FLAG 0x0040 /* panic on oops */ | ||
| 32 | #define COBT_CMOS_DELAY_CACHE_FLAG 0x0080 /* delay cache initialization */ | ||
| 33 | #define COBT_CMOS_NOLOGO_FLAG 0x0100 /* hide "C" logo @ boot */ | ||
| 34 | #define COBT_CMOS_VERSION_FLAG 0x0200 /* the version field is valid */ | ||
| 35 | #define COBT_CMOS_FLAG_MAX 0x0200 | ||
| 36 | |||
| 37 | /* leave byte 0x12 blank - Linux looks for drive info here */ | ||
| 38 | |||
| 39 | /* CMOS structure version, valid if COBT_CMOS_VERSION_FLAG is true */ | ||
| 40 | #define COBT_CMOS_VERSION NVRAM_OFFSET(0x13) | ||
| 41 | #define COBT_CMOS_VER_BTOCODE 1 /* min. version needed for btocode */ | ||
| 42 | |||
| 43 | /* index of default boot method */ | ||
| 44 | #define COBT_CMOS_BOOT_METHOD NVRAM_OFFSET(0x20) | ||
| 45 | #define COBT_CMOS_BOOT_METHOD_DISK 0 | ||
| 46 | #define COBT_CMOS_BOOT_METHOD_ROM 1 | ||
| 47 | #define COBT_CMOS_BOOT_METHOD_NET 2 | ||
| 48 | |||
| 49 | #define COBT_CMOS_BOOT_DEV_MIN NVRAM_OFFSET(0x21) | ||
| 50 | /* major #, minor # of first through fourth boot device */ | ||
| 51 | #define COBT_CMOS_BOOT_DEV0_MAJ NVRAM_OFFSET(0x21) | ||
| 52 | #define COBT_CMOS_BOOT_DEV0_MIN NVRAM_OFFSET(0x22) | ||
| 53 | #define COBT_CMOS_BOOT_DEV1_MAJ NVRAM_OFFSET(0x23) | ||
| 54 | #define COBT_CMOS_BOOT_DEV1_MIN NVRAM_OFFSET(0x24) | ||
| 55 | #define COBT_CMOS_BOOT_DEV2_MAJ NVRAM_OFFSET(0x25) | ||
| 56 | #define COBT_CMOS_BOOT_DEV2_MIN NVRAM_OFFSET(0x26) | ||
| 57 | #define COBT_CMOS_BOOT_DEV3_MAJ NVRAM_OFFSET(0x27) | ||
| 58 | #define COBT_CMOS_BOOT_DEV3_MIN NVRAM_OFFSET(0x28) | ||
| 59 | #define COBT_CMOS_BOOT_DEV_MAX NVRAM_OFFSET(0x28) | ||
| 60 | |||
| 61 | /* checksum of bytes 0xe-0x7f */ | ||
| 62 | #define COBT_CMOS_CHECKSUM NVRAM_OFFSET(0x2e) | ||
| 63 | |||
| 64 | /* running uptime counter, units of 5 minutes (32 bits =~ 41000 years) */ | ||
| 65 | #define COBT_CMOS_UPTIME_0 NVRAM_OFFSET(0x30) | ||
| 66 | #define COBT_CMOS_UPTIME_1 NVRAM_OFFSET(0x31) | ||
| 67 | #define COBT_CMOS_UPTIME_2 NVRAM_OFFSET(0x32) | ||
| 68 | #define COBT_CMOS_UPTIME_3 NVRAM_OFFSET(0x33) | ||
| 69 | |||
| 70 | /* count of successful boots (32 bits) */ | ||
| 71 | #define COBT_CMOS_BOOTCOUNT_0 NVRAM_OFFSET(0x38) | ||
| 72 | #define COBT_CMOS_BOOTCOUNT_1 NVRAM_OFFSET(0x39) | ||
| 73 | #define COBT_CMOS_BOOTCOUNT_2 NVRAM_OFFSET(0x3a) | ||
| 74 | #define COBT_CMOS_BOOTCOUNT_3 NVRAM_OFFSET(0x3b) | ||
| 75 | |||
| 76 | /* 13 bytes: system serial number, same as on the back of the system */ | ||
| 77 | #define COBT_CMOS_SYS_SERNUM_LEN 13 | ||
| 78 | #define COBT_CMOS_SYS_SERNUM_0 NVRAM_OFFSET(0x40) | ||
| 79 | #define COBT_CMOS_SYS_SERNUM_1 NVRAM_OFFSET(0x41) | ||
| 80 | #define COBT_CMOS_SYS_SERNUM_2 NVRAM_OFFSET(0x42) | ||
| 81 | #define COBT_CMOS_SYS_SERNUM_3 NVRAM_OFFSET(0x43) | ||
| 82 | #define COBT_CMOS_SYS_SERNUM_4 NVRAM_OFFSET(0x44) | ||
| 83 | #define COBT_CMOS_SYS_SERNUM_5 NVRAM_OFFSET(0x45) | ||
| 84 | #define COBT_CMOS_SYS_SERNUM_6 NVRAM_OFFSET(0x46) | ||
| 85 | #define COBT_CMOS_SYS_SERNUM_7 NVRAM_OFFSET(0x47) | ||
| 86 | #define COBT_CMOS_SYS_SERNUM_8 NVRAM_OFFSET(0x48) | ||
| 87 | #define COBT_CMOS_SYS_SERNUM_9 NVRAM_OFFSET(0x49) | ||
| 88 | #define COBT_CMOS_SYS_SERNUM_10 NVRAM_OFFSET(0x4a) | ||
| 89 | #define COBT_CMOS_SYS_SERNUM_11 NVRAM_OFFSET(0x4b) | ||
| 90 | #define COBT_CMOS_SYS_SERNUM_12 NVRAM_OFFSET(0x4c) | ||
| 91 | /* checksum for serial num - 1 byte */ | ||
| 92 | #define COBT_CMOS_SYS_SERNUM_CSUM NVRAM_OFFSET(0x4f) | ||
| 93 | |||
| 94 | #define COBT_CMOS_ROM_REV_MAJ NVRAM_OFFSET(0x50) | ||
| 95 | #define COBT_CMOS_ROM_REV_MIN NVRAM_OFFSET(0x51) | ||
| 96 | #define COBT_CMOS_ROM_REV_REV NVRAM_OFFSET(0x52) | ||
| 97 | |||
| 98 | #define COBT_CMOS_BTO_CODE_0 NVRAM_OFFSET(0x53) | ||
| 99 | #define COBT_CMOS_BTO_CODE_1 NVRAM_OFFSET(0x54) | ||
| 100 | #define COBT_CMOS_BTO_CODE_2 NVRAM_OFFSET(0x55) | ||
| 101 | #define COBT_CMOS_BTO_CODE_3 NVRAM_OFFSET(0x56) | ||
| 102 | |||
| 103 | #define COBT_CMOS_BTO_IP_CSUM NVRAM_OFFSET(0x57) | ||
| 104 | #define COBT_CMOS_BTO_IP_0 NVRAM_OFFSET(0x58) | ||
| 105 | #define COBT_CMOS_BTO_IP_1 NVRAM_OFFSET(0x59) | ||
| 106 | #define COBT_CMOS_BTO_IP_2 NVRAM_OFFSET(0x5a) | ||
| 107 | #define COBT_CMOS_BTO_IP_3 NVRAM_OFFSET(0x5b) | ||
| 108 | |||
| 109 | #endif /* COBALT_NVRAM_H */ | ||
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index fef6f3d0a4a7..8c6967f3fb11 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
| @@ -40,9 +40,9 @@ | |||
| 40 | #include <linux/types.h> | 40 | #include <linux/types.h> |
| 41 | #include <linux/list.h> | 41 | #include <linux/list.h> |
| 42 | #include <linux/kref.h> | 42 | #include <linux/kref.h> |
| 43 | #include <linux/mutex.h> | ||
| 43 | 44 | ||
| 44 | #include <asm/atomic.h> | 45 | #include <asm/atomic.h> |
| 45 | #include <asm/semaphore.h> | ||
| 46 | 46 | ||
| 47 | #define CONFIGFS_ITEM_NAME_LEN 20 | 47 | #define CONFIGFS_ITEM_NAME_LEN 20 |
| 48 | 48 | ||
| @@ -75,7 +75,6 @@ extern void config_item_init(struct config_item *); | |||
| 75 | extern void config_item_init_type_name(struct config_item *item, | 75 | extern void config_item_init_type_name(struct config_item *item, |
| 76 | const char *name, | 76 | const char *name, |
| 77 | struct config_item_type *type); | 77 | struct config_item_type *type); |
| 78 | extern void config_item_cleanup(struct config_item *); | ||
| 79 | 78 | ||
| 80 | extern struct config_item * config_item_get(struct config_item *); | 79 | extern struct config_item * config_item_get(struct config_item *); |
| 81 | extern void config_item_put(struct config_item *); | 80 | extern void config_item_put(struct config_item *); |
| @@ -87,12 +86,10 @@ struct config_item_type { | |||
| 87 | struct configfs_attribute **ct_attrs; | 86 | struct configfs_attribute **ct_attrs; |
| 88 | }; | 87 | }; |
| 89 | 88 | ||
| 90 | |||
| 91 | /** | 89 | /** |
| 92 | * group - a group of config_items of a specific type, belonging | 90 | * group - a group of config_items of a specific type, belonging |
| 93 | * to a specific subsystem. | 91 | * to a specific subsystem. |
| 94 | */ | 92 | */ |
| 95 | |||
| 96 | struct config_group { | 93 | struct config_group { |
| 97 | struct config_item cg_item; | 94 | struct config_item cg_item; |
| 98 | struct list_head cg_children; | 95 | struct list_head cg_children; |
| @@ -100,13 +97,11 @@ struct config_group { | |||
| 100 | struct config_group **default_groups; | 97 | struct config_group **default_groups; |
| 101 | }; | 98 | }; |
| 102 | 99 | ||
| 103 | |||
| 104 | extern void config_group_init(struct config_group *group); | 100 | extern void config_group_init(struct config_group *group); |
| 105 | extern void config_group_init_type_name(struct config_group *group, | 101 | extern void config_group_init_type_name(struct config_group *group, |
| 106 | const char *name, | 102 | const char *name, |
| 107 | struct config_item_type *type); | 103 | struct config_item_type *type); |
| 108 | 104 | ||
| 109 | |||
| 110 | static inline struct config_group *to_config_group(struct config_item *item) | 105 | static inline struct config_group *to_config_group(struct config_item *item) |
| 111 | { | 106 | { |
| 112 | return item ? container_of(item,struct config_group,cg_item) : NULL; | 107 | return item ? container_of(item,struct config_group,cg_item) : NULL; |
| @@ -122,7 +117,8 @@ static inline void config_group_put(struct config_group *group) | |||
| 122 | config_item_put(&group->cg_item); | 117 | config_item_put(&group->cg_item); |
| 123 | } | 118 | } |
| 124 | 119 | ||
| 125 | extern struct config_item *config_group_find_obj(struct config_group *, const char *); | 120 | extern struct config_item *config_group_find_item(struct config_group *, |
| 121 | const char *); | ||
| 126 | 122 | ||
| 127 | 123 | ||
| 128 | struct configfs_attribute { | 124 | struct configfs_attribute { |
| @@ -131,6 +127,22 @@ struct configfs_attribute { | |||
| 131 | mode_t ca_mode; | 127 | mode_t ca_mode; |
| 132 | }; | 128 | }; |
| 133 | 129 | ||
| 130 | /* | ||
| 131 | * Users often need to create attribute structures for their configurable | ||
| 132 | * attributes, containing a configfs_attribute member and function pointers | ||
| 133 | * for the show() and store() operations on that attribute. They can use | ||
| 134 | * this macro (similar to sysfs' __ATTR) to make defining attributes easier. | ||
| 135 | */ | ||
| 136 | #define __CONFIGFS_ATTR(_name, _mode, _show, _store) \ | ||
| 137 | { \ | ||
| 138 | .attr = { \ | ||
| 139 | .ca_name = __stringify(_name), \ | ||
| 140 | .ca_mode = _mode, \ | ||
| 141 | .ca_owner = THIS_MODULE, \ | ||
| 142 | }, \ | ||
| 143 | .show = _show, \ | ||
| 144 | .store = _store, \ | ||
| 145 | } | ||
| 134 | 146 | ||
| 135 | /* | 147 | /* |
| 136 | * If allow_link() exists, the item can symlink(2) out to other | 148 | * If allow_link() exists, the item can symlink(2) out to other |
| @@ -157,12 +169,13 @@ struct configfs_group_operations { | |||
| 157 | struct config_item *(*make_item)(struct config_group *group, const char *name); | 169 | struct config_item *(*make_item)(struct config_group *group, const char *name); |
| 158 | struct config_group *(*make_group)(struct config_group *group, const char *name); | 170 | struct config_group *(*make_group)(struct config_group *group, const char *name); |
| 159 | int (*commit_item)(struct config_item *item); | 171 | int (*commit_item)(struct config_item *item); |
| 172 | void (*disconnect_notify)(struct config_group *group, struct config_item *item); | ||
| 160 | void (*drop_item)(struct config_group *group, struct config_item *item); | 173 | void (*drop_item)(struct config_group *group, struct config_item *item); |
| 161 | }; | 174 | }; |
| 162 | 175 | ||
| 163 | struct configfs_subsystem { | 176 | struct configfs_subsystem { |
| 164 | struct config_group su_group; | 177 | struct config_group su_group; |
| 165 | struct semaphore su_sem; | 178 | struct mutex su_mutex; |
| 166 | }; | 179 | }; |
| 167 | 180 | ||
| 168 | static inline struct configfs_subsystem *to_configfs_subsystem(struct config_group *group) | 181 | static inline struct configfs_subsystem *to_configfs_subsystem(struct config_group *group) |
| @@ -175,6 +188,11 @@ static inline struct configfs_subsystem *to_configfs_subsystem(struct config_gro | |||
| 175 | int configfs_register_subsystem(struct configfs_subsystem *subsys); | 188 | int configfs_register_subsystem(struct configfs_subsystem *subsys); |
| 176 | void configfs_unregister_subsystem(struct configfs_subsystem *subsys); | 189 | void configfs_unregister_subsystem(struct configfs_subsystem *subsys); |
| 177 | 190 | ||
| 191 | /* These functions can sleep and can alloc with GFP_KERNEL */ | ||
| 192 | /* WARNING: These cannot be called underneath configfs callbacks!! */ | ||
| 193 | int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target); | ||
| 194 | void configfs_undepend_item(struct configfs_subsystem *subsys, struct config_item *target); | ||
| 195 | |||
| 178 | #endif /* __KERNEL__ */ | 196 | #endif /* __KERNEL__ */ |
| 179 | 197 | ||
| 180 | #endif /* _CONFIGFS_H_ */ | 198 | #endif /* _CONFIGFS_H_ */ |
diff --git a/include/linux/console.h b/include/linux/console.h index 62ef6e11d0d2..56a7bcda49cb 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #define _LINUX_CONSOLE_H_ 1 | 15 | #define _LINUX_CONSOLE_H_ 1 |
| 16 | 16 | ||
| 17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
| 18 | #include <linux/spinlock.h> | ||
| 19 | 18 | ||
| 20 | struct vc_data; | 19 | struct vc_data; |
| 21 | struct console_font_op; | 20 | struct console_font_op; |
| @@ -99,6 +98,7 @@ struct console { | |||
| 99 | struct tty_driver *(*device)(struct console *, int *); | 98 | struct tty_driver *(*device)(struct console *, int *); |
| 100 | void (*unblank)(void); | 99 | void (*unblank)(void); |
| 101 | int (*setup)(struct console *, char *); | 100 | int (*setup)(struct console *, char *); |
| 101 | int (*early_setup)(void); | ||
| 102 | short flags; | 102 | short flags; |
| 103 | short index; | 103 | short index; |
| 104 | int cflag; | 104 | int cflag; |
| @@ -107,6 +107,7 @@ struct console { | |||
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | extern int add_preferred_console(char *name, int idx, char *options); | 109 | extern int add_preferred_console(char *name, int idx, char *options); |
| 110 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); | ||
| 110 | extern void register_console(struct console *); | 111 | extern void register_console(struct console *); |
| 111 | extern int unregister_console(struct console *); | 112 | extern int unregister_console(struct console *); |
| 112 | extern struct console *console_drivers; | 113 | extern struct console *console_drivers; |
diff --git a/include/linux/consolemap.h b/include/linux/consolemap.h index 82c9a1f11020..06b2768c603f 100644 --- a/include/linux/consolemap.h +++ b/include/linux/consolemap.h | |||
| @@ -8,9 +8,12 @@ | |||
| 8 | #define IBMPC_MAP 2 | 8 | #define IBMPC_MAP 2 |
| 9 | #define USER_MAP 3 | 9 | #define USER_MAP 3 |
| 10 | 10 | ||
| 11 | #include <linux/types.h> | ||
| 12 | |||
| 11 | struct vc_data; | 13 | struct vc_data; |
| 12 | 14 | ||
| 13 | extern unsigned char inverse_translate(struct vc_data *conp, int glyph); | 15 | extern u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode); |
| 14 | extern unsigned short *set_translate(int m, struct vc_data *vc); | 16 | extern unsigned short *set_translate(int m, struct vc_data *vc); |
| 15 | extern int conv_uni_to_pc(struct vc_data *conp, long ucs); | 17 | extern int conv_uni_to_pc(struct vc_data *conp, long ucs); |
| 18 | extern u32 conv_8bit_to_uni(unsigned char c); | ||
| 16 | void console_map_init(void); | 19 | void console_map_init(void); |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 3b2df2523f1d..c2236bbff412 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -120,7 +120,6 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | |||
| 120 | 120 | ||
| 121 | #define lock_cpu_hotplug() do { } while (0) | 121 | #define lock_cpu_hotplug() do { } while (0) |
| 122 | #define unlock_cpu_hotplug() do { } while (0) | 122 | #define unlock_cpu_hotplug() do { } while (0) |
| 123 | #define lock_cpu_hotplug_interruptible() 0 | ||
| 124 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) | 123 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) |
| 125 | #define register_hotcpu_notifier(nb) do { (void)(nb); } while (0) | 124 | #define register_hotcpu_notifier(nb) do { (void)(nb); } while (0) |
| 126 | #define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0) | 125 | #define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0) |
diff --git a/include/linux/crc7.h b/include/linux/crc7.h new file mode 100644 index 000000000000..1786e772d5c6 --- /dev/null +++ b/include/linux/crc7.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #ifndef _LINUX_CRC7_H | ||
| 2 | #define _LINUX_CRC7_H | ||
| 3 | #include <linux/types.h> | ||
| 4 | |||
| 5 | extern const u8 crc7_syndrome_table[256]; | ||
| 6 | |||
| 7 | static inline u8 crc7_byte(u8 crc, u8 data) | ||
| 8 | { | ||
| 9 | return crc7_syndrome_table[(crc << 1) ^ data]; | ||
| 10 | } | ||
| 11 | |||
| 12 | extern u8 crc7(u8 crc, const u8 *buffer, size_t len); | ||
| 13 | |||
| 14 | #endif | ||
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 9a663c6db16a..2dc21cbeb304 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
| @@ -31,7 +31,11 @@ static inline int valid_dma_direction(int dma_direction) | |||
| 31 | (dma_direction == DMA_FROM_DEVICE)); | 31 | (dma_direction == DMA_FROM_DEVICE)); |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | #ifdef CONFIG_HAS_DMA | ||
| 34 | #include <asm/dma-mapping.h> | 35 | #include <asm/dma-mapping.h> |
| 36 | #else | ||
| 37 | #include <asm-generic/dma-mapping-broken.h> | ||
| 38 | #endif | ||
| 35 | 39 | ||
| 36 | /* Backwards compat, remove in 2.7.x */ | 40 | /* Backwards compat, remove in 2.7.x */ |
| 37 | #define dma_sync_single dma_sync_single_for_cpu | 41 | #define dma_sync_single dma_sync_single_for_cpu |
diff --git a/include/linux/ds17287rtc.h b/include/linux/ds17287rtc.h index c281ba42e28f..d85d3f497b96 100644 --- a/include/linux/ds17287rtc.h +++ b/include/linux/ds17287rtc.h | |||
| @@ -11,7 +11,6 @@ | |||
| 11 | #define __LINUX_DS17287RTC_H | 11 | #define __LINUX_DS17287RTC_H |
| 12 | 12 | ||
| 13 | #include <linux/rtc.h> /* get the user-level API */ | 13 | #include <linux/rtc.h> /* get the user-level API */ |
| 14 | #include <linux/spinlock.h> /* spinlock_t */ | ||
| 15 | #include <linux/mc146818rtc.h> | 14 | #include <linux/mc146818rtc.h> |
| 16 | 15 | ||
| 17 | /* Register A */ | 16 | /* Register A */ |
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h index dfed8009ebff..16cb25cbf7c5 100644 --- a/include/linux/efs_fs.h +++ b/include/linux/efs_fs.h | |||
| @@ -45,6 +45,7 @@ extern efs_block_t efs_map_block(struct inode *, efs_block_t); | |||
| 45 | extern int efs_get_block(struct inode *, sector_t, struct buffer_head *, int); | 45 | extern int efs_get_block(struct inode *, sector_t, struct buffer_head *, int); |
| 46 | 46 | ||
| 47 | extern struct dentry *efs_lookup(struct inode *, struct dentry *, struct nameidata *); | 47 | extern struct dentry *efs_lookup(struct inode *, struct dentry *, struct nameidata *); |
| 48 | extern struct dentry *efs_get_dentry(struct super_block *sb, void *vobjp); | ||
| 48 | extern struct dentry *efs_get_parent(struct dentry *); | 49 | extern struct dentry *efs_get_parent(struct dentry *); |
| 49 | extern int efs_bmap(struct inode *, int); | 50 | extern int efs_bmap(struct inode *, int); |
| 50 | 51 | ||
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h new file mode 100644 index 000000000000..8872fe8392d6 --- /dev/null +++ b/include/linux/exportfs.h | |||
| @@ -0,0 +1,126 @@ | |||
| 1 | #ifndef LINUX_EXPORTFS_H | ||
| 2 | #define LINUX_EXPORTFS_H 1 | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | struct dentry; | ||
| 7 | struct super_block; | ||
| 8 | struct vfsmount; | ||
| 9 | |||
| 10 | |||
| 11 | /** | ||
| 12 | * struct export_operations - for nfsd to communicate with file systems | ||
| 13 | * @decode_fh: decode a file handle fragment and return a &struct dentry | ||
| 14 | * @encode_fh: encode a file handle fragment from a dentry | ||
| 15 | * @get_name: find the name for a given inode in a given directory | ||
| 16 | * @get_parent: find the parent of a given directory | ||
| 17 | * @get_dentry: find a dentry for the inode given a file handle sub-fragment | ||
| 18 | * @find_exported_dentry: | ||
| 19 | * set by the exporting module to a standard helper function. | ||
| 20 | * | ||
| 21 | * Description: | ||
| 22 | * The export_operations structure provides a means for nfsd to communicate | ||
| 23 | * with a particular exported file system - particularly enabling nfsd and | ||
| 24 | * the filesystem to co-operate when dealing with file handles. | ||
| 25 | * | ||
| 26 | * export_operations contains two basic operation for dealing with file | ||
| 27 | * handles, decode_fh() and encode_fh(), and allows for some other | ||
| 28 | * operations to be defined which standard helper routines use to get | ||
| 29 | * specific information from the filesystem. | ||
| 30 | * | ||
| 31 | * nfsd encodes information use to determine which filesystem a filehandle | ||
| 32 | * applies to in the initial part of the file handle. The remainder, termed | ||
| 33 | * a file handle fragment, is controlled completely by the filesystem. The | ||
| 34 | * standard helper routines assume that this fragment will contain one or | ||
| 35 | * two sub-fragments, one which identifies the file, and one which may be | ||
| 36 | * used to identify the (a) directory containing the file. | ||
| 37 | * | ||
| 38 | * In some situations, nfsd needs to get a dentry which is connected into a | ||
| 39 | * specific part of the file tree. To allow for this, it passes the | ||
| 40 | * function acceptable() together with a @context which can be used to see | ||
| 41 | * if the dentry is acceptable. As there can be multiple dentrys for a | ||
| 42 | * given file, the filesystem should check each one for acceptability before | ||
| 43 | * looking for the next. As soon as an acceptable one is found, it should | ||
| 44 | * be returned. | ||
| 45 | * | ||
| 46 | * decode_fh: | ||
| 47 | * @decode_fh is given a &struct super_block (@sb), a file handle fragment | ||
| 48 | * (@fh, @fh_len) and an acceptability testing function (@acceptable, | ||
| 49 | * @context). It should return a &struct dentry which refers to the same | ||
| 50 | * file that the file handle fragment refers to, and which passes the | ||
| 51 | * acceptability test. If it cannot, it should return a %NULL pointer if | ||
| 52 | * the file was found but no acceptable &dentries were available, or a | ||
| 53 | * %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or | ||
| 54 | * %ENOMEM). | ||
| 55 | * | ||
| 56 | * encode_fh: | ||
| 57 | * @encode_fh should store in the file handle fragment @fh (using at most | ||
| 58 | * @max_len bytes) information that can be used by @decode_fh to recover the | ||
| 59 | * file refered to by the &struct dentry @de. If the @connectable flag is | ||
| 60 | * set, the encode_fh() should store sufficient information so that a good | ||
| 61 | * attempt can be made to find not only the file but also it's place in the | ||
| 62 | * filesystem. This typically means storing a reference to de->d_parent in | ||
| 63 | * the filehandle fragment. encode_fh() should return the number of bytes | ||
| 64 | * stored or a negative error code such as %-ENOSPC | ||
| 65 | * | ||
| 66 | * get_name: | ||
| 67 | * @get_name should find a name for the given @child in the given @parent | ||
| 68 | * directory. The name should be stored in the @name (with the | ||
| 69 | * understanding that it is already pointing to a a %NAME_MAX+1 sized | ||
| 70 | * buffer. get_name() should return %0 on success, a negative error code | ||
| 71 | * or error. @get_name will be called without @parent->i_mutex held. | ||
| 72 | * | ||
| 73 | * get_parent: | ||
| 74 | * @get_parent should find the parent directory for the given @child which | ||
| 75 | * is also a directory. In the event that it cannot be found, or storage | ||
| 76 | * space cannot be allocated, a %ERR_PTR should be returned. | ||
| 77 | * | ||
| 78 | * get_dentry: | ||
| 79 | * Given a &super_block (@sb) and a pointer to a file-system specific inode | ||
| 80 | * identifier, possibly an inode number, (@inump) get_dentry() should find | ||
| 81 | * the identified inode and return a dentry for that inode. Any suitable | ||
| 82 | * dentry can be returned including, if necessary, a new dentry created with | ||
| 83 | * d_alloc_root. The caller can then find any other extant dentrys by | ||
| 84 | * following the d_alias links. If a new dentry was created using | ||
| 85 | * d_alloc_root, DCACHE_NFSD_DISCONNECTED should be set, and the dentry | ||
| 86 | * should be d_rehash()ed. | ||
| 87 | * | ||
| 88 | * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code | ||
| 89 | * can be returned. The @inump will be whatever was passed to | ||
| 90 | * nfsd_find_fh_dentry() in either the @obj or @parent parameters. | ||
| 91 | * | ||
| 92 | * Locking rules: | ||
| 93 | * get_parent is called with child->d_inode->i_mutex down | ||
| 94 | * get_name is not (which is possibly inconsistent) | ||
| 95 | */ | ||
| 96 | |||
| 97 | struct export_operations { | ||
| 98 | struct dentry *(*decode_fh)(struct super_block *sb, __u32 *fh, | ||
| 99 | int fh_len, int fh_type, | ||
| 100 | int (*acceptable)(void *context, struct dentry *de), | ||
| 101 | void *context); | ||
| 102 | int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len, | ||
| 103 | int connectable); | ||
| 104 | int (*get_name)(struct dentry *parent, char *name, | ||
| 105 | struct dentry *child); | ||
| 106 | struct dentry * (*get_parent)(struct dentry *child); | ||
| 107 | struct dentry * (*get_dentry)(struct super_block *sb, void *inump); | ||
| 108 | |||
| 109 | /* This is set by the exporting module to a standard helper */ | ||
| 110 | struct dentry * (*find_exported_dentry)( | ||
| 111 | struct super_block *sb, void *obj, void *parent, | ||
| 112 | int (*acceptable)(void *context, struct dentry *de), | ||
| 113 | void *context); | ||
| 114 | }; | ||
| 115 | |||
| 116 | extern struct dentry *find_exported_dentry(struct super_block *sb, void *obj, | ||
| 117 | void *parent, int (*acceptable)(void *context, struct dentry *de), | ||
| 118 | void *context); | ||
| 119 | |||
| 120 | extern int exportfs_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, | ||
| 121 | int connectable); | ||
| 122 | extern struct dentry *exportfs_decode_fh(struct vfsmount *mnt, __u32 *fh, | ||
| 123 | int fh_len, int fileid_type, int (*acceptable)(void *, struct dentry *), | ||
| 124 | void *context); | ||
| 125 | |||
| 126 | #endif /* LINUX_EXPORTFS_H */ | ||
diff --git a/include/linux/ext2_fs_sb.h b/include/linux/ext2_fs_sb.h index 4eda0ed76a48..d149f2959e67 100644 --- a/include/linux/ext2_fs_sb.h +++ b/include/linux/ext2_fs_sb.h | |||
| @@ -33,6 +33,8 @@ struct ext2_sb_info { | |||
| 33 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 33 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
| 34 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 34 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
| 35 | unsigned long s_groups_count; /* Number of groups in the fs */ | 35 | unsigned long s_groups_count; /* Number of groups in the fs */ |
| 36 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
| 37 | unsigned long s_blocks_last; /* Last seen block count */ | ||
| 36 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 38 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
| 37 | struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */ | 39 | struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */ |
| 38 | struct buffer_head ** s_group_desc; | 40 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/ext3_fs_sb.h b/include/linux/ext3_fs_sb.h index f61309c81cc4..d3c08353edf6 100644 --- a/include/linux/ext3_fs_sb.h +++ b/include/linux/ext3_fs_sb.h | |||
| @@ -38,6 +38,8 @@ struct ext3_sb_info { | |||
| 38 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 38 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
| 39 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 39 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
| 40 | unsigned long s_groups_count; /* Number of groups in the fs */ | 40 | unsigned long s_groups_count; /* Number of groups in the fs */ |
| 41 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
| 42 | unsigned long s_blocks_last; /* Last seen block count */ | ||
| 41 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 43 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
| 42 | struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */ | 44 | struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */ |
| 43 | struct buffer_head ** s_group_desc; | 45 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/ext4_fs_sb.h b/include/linux/ext4_fs_sb.h index 691a713139ce..2347557a327a 100644 --- a/include/linux/ext4_fs_sb.h +++ b/include/linux/ext4_fs_sb.h | |||
| @@ -39,6 +39,8 @@ struct ext4_sb_info { | |||
| 39 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 39 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
| 40 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 40 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
| 41 | unsigned long s_groups_count; /* Number of groups in the fs */ | 41 | unsigned long s_groups_count; /* Number of groups in the fs */ |
| 42 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
| 43 | unsigned long s_blocks_last; /* Last seen block count */ | ||
| 42 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 44 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
| 43 | struct ext4_super_block * s_es; /* Pointer to the super block in the buffer */ | 45 | struct ext4_super_block * s_es; /* Pointer to the super block in the buffer */ |
| 44 | struct buffer_head ** s_group_desc; | 46 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 66226824ab68..cec54106aa87 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -119,6 +119,7 @@ struct dentry; | |||
| 119 | #define FB_ACCEL_NV_40 46 /* nVidia Arch 40 */ | 119 | #define FB_ACCEL_NV_40 46 /* nVidia Arch 40 */ |
| 120 | #define FB_ACCEL_XGI_VOLARI_V 47 /* XGI Volari V3XT, V5, V8 */ | 120 | #define FB_ACCEL_XGI_VOLARI_V 47 /* XGI Volari V3XT, V5, V8 */ |
| 121 | #define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */ | 121 | #define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */ |
| 122 | #define FB_ACCEL_OMAP1610 49 /* TI OMAP16xx */ | ||
| 122 | #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ | 123 | #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ |
| 123 | #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ | 124 | #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ |
| 124 | #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ | 125 | #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ |
| @@ -529,6 +530,8 @@ struct fb_cursor_user { | |||
| 529 | #define FB_EVENT_CONBLANK 0x0C | 530 | #define FB_EVENT_CONBLANK 0x0C |
| 530 | /* Get drawing requirements */ | 531 | /* Get drawing requirements */ |
| 531 | #define FB_EVENT_GET_REQ 0x0D | 532 | #define FB_EVENT_GET_REQ 0x0D |
| 533 | /* Unbind from the console if possible */ | ||
| 534 | #define FB_EVENT_FB_UNBIND 0x0E | ||
| 532 | 535 | ||
| 533 | struct fb_event { | 536 | struct fb_event { |
| 534 | struct fb_info *info; | 537 | struct fb_info *info; |
diff --git a/include/linux/file.h b/include/linux/file.h index a59001e9ea58..0114fbc78061 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
| @@ -73,6 +73,7 @@ extern struct file * FASTCALL(fget_light(unsigned int fd, int *fput_needed)); | |||
| 73 | extern void FASTCALL(set_close_on_exec(unsigned int fd, int flag)); | 73 | extern void FASTCALL(set_close_on_exec(unsigned int fd, int flag)); |
| 74 | extern void put_filp(struct file *); | 74 | extern void put_filp(struct file *); |
| 75 | extern int get_unused_fd(void); | 75 | extern int get_unused_fd(void); |
| 76 | extern int get_unused_fd_flags(int flags); | ||
| 76 | extern void FASTCALL(put_unused_fd(unsigned int fd)); | 77 | extern void FASTCALL(put_unused_fd(unsigned int fd)); |
| 77 | struct kmem_cache; | 78 | struct kmem_cache; |
| 78 | 79 | ||
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 4631086f5060..2d38b1a74662 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | /* Freezer declarations */ | 1 | /* Freezer declarations */ |
| 2 | 2 | ||
| 3 | #ifndef FREEZER_H_INCLUDED | ||
| 4 | #define FREEZER_H_INCLUDED | ||
| 5 | |||
| 3 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
| 4 | 7 | ||
| 5 | #ifdef CONFIG_PM | 8 | #ifdef CONFIG_PM |
| @@ -115,6 +118,14 @@ static inline int freezer_should_skip(struct task_struct *p) | |||
| 115 | return !!(p->flags & PF_FREEZER_SKIP); | 118 | return !!(p->flags & PF_FREEZER_SKIP); |
| 116 | } | 119 | } |
| 117 | 120 | ||
| 121 | /* | ||
| 122 | * Tell the freezer that the current task should be frozen by it | ||
| 123 | */ | ||
| 124 | static inline void set_freezable(void) | ||
| 125 | { | ||
| 126 | current->flags &= ~PF_NOFREEZE; | ||
| 127 | } | ||
| 128 | |||
| 118 | #else | 129 | #else |
| 119 | static inline int frozen(struct task_struct *p) { return 0; } | 130 | static inline int frozen(struct task_struct *p) { return 0; } |
| 120 | static inline int freezing(struct task_struct *p) { return 0; } | 131 | static inline int freezing(struct task_struct *p) { return 0; } |
| @@ -130,4 +141,7 @@ static inline int try_to_freeze(void) { return 0; } | |||
| 130 | static inline void freezer_do_not_count(void) {} | 141 | static inline void freezer_do_not_count(void) {} |
| 131 | static inline void freezer_count(void) {} | 142 | static inline void freezer_count(void) {} |
| 132 | static inline int freezer_should_skip(struct task_struct *p) { return 0; } | 143 | static inline int freezer_should_skip(struct task_struct *p) { return 0; } |
| 144 | static inline void set_freezable(void) {} | ||
| 133 | #endif | 145 | #endif |
| 146 | |||
| 147 | #endif /* FREEZER_H_INCLUDED */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4f0b3bf5983c..58ce336d4a6b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -44,7 +44,7 @@ extern int get_max_files(void); | |||
| 44 | struct inodes_stat_t { | 44 | struct inodes_stat_t { |
| 45 | int nr_inodes; | 45 | int nr_inodes; |
| 46 | int nr_unused; | 46 | int nr_unused; |
| 47 | int dummy[5]; | 47 | int dummy[5]; /* padding for sysctl ABI compatibility */ |
| 48 | }; | 48 | }; |
| 49 | extern struct inodes_stat_t inodes_stat; | 49 | extern struct inodes_stat_t inodes_stat; |
| 50 | 50 | ||
| @@ -283,11 +283,13 @@ extern int dir_notify_enable; | |||
| 283 | #include <linux/init.h> | 283 | #include <linux/init.h> |
| 284 | #include <linux/pid.h> | 284 | #include <linux/pid.h> |
| 285 | #include <linux/mutex.h> | 285 | #include <linux/mutex.h> |
| 286 | #include <linux/sysctl.h> | ||
| 286 | 287 | ||
| 287 | #include <asm/atomic.h> | 288 | #include <asm/atomic.h> |
| 288 | #include <asm/semaphore.h> | 289 | #include <asm/semaphore.h> |
| 289 | #include <asm/byteorder.h> | 290 | #include <asm/byteorder.h> |
| 290 | 291 | ||
| 292 | struct export_operations; | ||
| 291 | struct hd_geometry; | 293 | struct hd_geometry; |
| 292 | struct iovec; | 294 | struct iovec; |
| 293 | struct nameidata; | 295 | struct nameidata; |
| @@ -820,6 +822,10 @@ struct file_lock { | |||
| 820 | union { | 822 | union { |
| 821 | struct nfs_lock_info nfs_fl; | 823 | struct nfs_lock_info nfs_fl; |
| 822 | struct nfs4_lock_info nfs4_fl; | 824 | struct nfs4_lock_info nfs4_fl; |
| 825 | struct { | ||
| 826 | struct list_head link; /* link in AFS vnode's pending_locks list */ | ||
| 827 | int state; /* state of grant or error if -ve */ | ||
| 828 | } afs; | ||
| 823 | } fl_u; | 829 | } fl_u; |
| 824 | }; | 830 | }; |
| 825 | 831 | ||
| @@ -1273,119 +1279,6 @@ static inline void file_accessed(struct file *file) | |||
| 1273 | 1279 | ||
| 1274 | int sync_inode(struct inode *inode, struct writeback_control *wbc); | 1280 | int sync_inode(struct inode *inode, struct writeback_control *wbc); |
| 1275 | 1281 | ||
| 1276 | /** | ||
| 1277 | * struct export_operations - for nfsd to communicate with file systems | ||
| 1278 | * @decode_fh: decode a file handle fragment and return a &struct dentry | ||
| 1279 | * @encode_fh: encode a file handle fragment from a dentry | ||
| 1280 | * @get_name: find the name for a given inode in a given directory | ||
| 1281 | * @get_parent: find the parent of a given directory | ||
| 1282 | * @get_dentry: find a dentry for the inode given a file handle sub-fragment | ||
| 1283 | * @find_exported_dentry: | ||
| 1284 | * set by the exporting module to a standard helper function. | ||
| 1285 | * | ||
| 1286 | * Description: | ||
| 1287 | * The export_operations structure provides a means for nfsd to communicate | ||
| 1288 | * with a particular exported file system - particularly enabling nfsd and | ||
| 1289 | * the filesystem to co-operate when dealing with file handles. | ||
| 1290 | * | ||
| 1291 | * export_operations contains two basic operation for dealing with file | ||
| 1292 | * handles, decode_fh() and encode_fh(), and allows for some other | ||
| 1293 | * operations to be defined which standard helper routines use to get | ||
| 1294 | * specific information from the filesystem. | ||
| 1295 | * | ||
| 1296 | * nfsd encodes information use to determine which filesystem a filehandle | ||
| 1297 | * applies to in the initial part of the file handle. The remainder, termed | ||
| 1298 | * a file handle fragment, is controlled completely by the filesystem. The | ||
| 1299 | * standard helper routines assume that this fragment will contain one or | ||
| 1300 | * two sub-fragments, one which identifies the file, and one which may be | ||
| 1301 | * used to identify the (a) directory containing the file. | ||
| 1302 | * | ||
| 1303 | * In some situations, nfsd needs to get a dentry which is connected into a | ||
| 1304 | * specific part of the file tree. To allow for this, it passes the | ||
| 1305 | * function acceptable() together with a @context which can be used to see | ||
| 1306 | * if the dentry is acceptable. As there can be multiple dentrys for a | ||
| 1307 | * given file, the filesystem should check each one for acceptability before | ||
| 1308 | * looking for the next. As soon as an acceptable one is found, it should | ||
| 1309 | * be returned. | ||
| 1310 | * | ||
| 1311 | * decode_fh: | ||
| 1312 | * @decode_fh is given a &struct super_block (@sb), a file handle fragment | ||
| 1313 | * (@fh, @fh_len) and an acceptability testing function (@acceptable, | ||
| 1314 | * @context). It should return a &struct dentry which refers to the same | ||
| 1315 | * file that the file handle fragment refers to, and which passes the | ||
| 1316 | * acceptability test. If it cannot, it should return a %NULL pointer if | ||
| 1317 | * the file was found but no acceptable &dentries were available, or a | ||
| 1318 | * %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or | ||
| 1319 | * %ENOMEM). | ||
| 1320 | * | ||
| 1321 | * encode_fh: | ||
| 1322 | * @encode_fh should store in the file handle fragment @fh (using at most | ||
| 1323 | * @max_len bytes) information that can be used by @decode_fh to recover the | ||
| 1324 | * file refered to by the &struct dentry @de. If the @connectable flag is | ||
| 1325 | * set, the encode_fh() should store sufficient information so that a good | ||
| 1326 | * attempt can be made to find not only the file but also it's place in the | ||
| 1327 | * filesystem. This typically means storing a reference to de->d_parent in | ||
| 1328 | * the filehandle fragment. encode_fh() should return the number of bytes | ||
| 1329 | * stored or a negative error code such as %-ENOSPC | ||
| 1330 | * | ||
| 1331 | * get_name: | ||
| 1332 | * @get_name should find a name for the given @child in the given @parent | ||
| 1333 | * directory. The name should be stored in the @name (with the | ||
| 1334 | * understanding that it is already pointing to a a %NAME_MAX+1 sized | ||
| 1335 | * buffer. get_name() should return %0 on success, a negative error code | ||
| 1336 | * or error. @get_name will be called without @parent->i_mutex held. | ||
| 1337 | * | ||
| 1338 | * get_parent: | ||
| 1339 | * @get_parent should find the parent directory for the given @child which | ||
| 1340 | * is also a directory. In the event that it cannot be found, or storage | ||
| 1341 | * space cannot be allocated, a %ERR_PTR should be returned. | ||
| 1342 | * | ||
| 1343 | * get_dentry: | ||
| 1344 | * Given a &super_block (@sb) and a pointer to a file-system specific inode | ||
| 1345 | * identifier, possibly an inode number, (@inump) get_dentry() should find | ||
| 1346 | * the identified inode and return a dentry for that inode. Any suitable | ||
| 1347 | * dentry can be returned including, if necessary, a new dentry created with | ||
| 1348 | * d_alloc_root. The caller can then find any other extant dentrys by | ||
| 1349 | * following the d_alias links. If a new dentry was created using | ||
| 1350 | * d_alloc_root, DCACHE_NFSD_DISCONNECTED should be set, and the dentry | ||
| 1351 | * should be d_rehash()ed. | ||
| 1352 | * | ||
| 1353 | * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code | ||
| 1354 | * can be returned. The @inump will be whatever was passed to | ||
| 1355 | * nfsd_find_fh_dentry() in either the @obj or @parent parameters. | ||
| 1356 | * | ||
| 1357 | * Locking rules: | ||
| 1358 | * get_parent is called with child->d_inode->i_mutex down | ||
| 1359 | * get_name is not (which is possibly inconsistent) | ||
| 1360 | */ | ||
| 1361 | |||
| 1362 | struct export_operations { | ||
| 1363 | struct dentry *(*decode_fh)(struct super_block *sb, __u32 *fh, int fh_len, int fh_type, | ||
| 1364 | int (*acceptable)(void *context, struct dentry *de), | ||
| 1365 | void *context); | ||
| 1366 | int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len, | ||
| 1367 | int connectable); | ||
| 1368 | |||
| 1369 | /* the following are only called from the filesystem itself */ | ||
| 1370 | int (*get_name)(struct dentry *parent, char *name, | ||
| 1371 | struct dentry *child); | ||
| 1372 | struct dentry * (*get_parent)(struct dentry *child); | ||
| 1373 | struct dentry * (*get_dentry)(struct super_block *sb, void *inump); | ||
| 1374 | |||
| 1375 | /* This is set by the exporting module to a standard helper */ | ||
| 1376 | struct dentry * (*find_exported_dentry)( | ||
| 1377 | struct super_block *sb, void *obj, void *parent, | ||
| 1378 | int (*acceptable)(void *context, struct dentry *de), | ||
| 1379 | void *context); | ||
| 1380 | |||
| 1381 | |||
| 1382 | }; | ||
| 1383 | |||
| 1384 | extern struct dentry * | ||
| 1385 | find_exported_dentry(struct super_block *sb, void *obj, void *parent, | ||
| 1386 | int (*acceptable)(void *context, struct dentry *de), | ||
| 1387 | void *context); | ||
| 1388 | |||
| 1389 | struct file_system_type { | 1282 | struct file_system_type { |
| 1390 | const char *name; | 1283 | const char *name; |
| 1391 | int fs_flags; | 1284 | int fs_flags; |
| @@ -1522,7 +1415,7 @@ extern void putname(const char *name); | |||
| 1522 | 1415 | ||
| 1523 | #ifdef CONFIG_BLOCK | 1416 | #ifdef CONFIG_BLOCK |
| 1524 | extern int register_blkdev(unsigned int, const char *); | 1417 | extern int register_blkdev(unsigned int, const char *); |
| 1525 | extern int unregister_blkdev(unsigned int, const char *); | 1418 | extern void unregister_blkdev(unsigned int, const char *); |
| 1526 | extern struct block_device *bdget(dev_t); | 1419 | extern struct block_device *bdget(dev_t); |
| 1527 | extern void bd_set_size(struct block_device *, loff_t size); | 1420 | extern void bd_set_size(struct block_device *, loff_t size); |
| 1528 | extern void bd_forget(struct inode *inode); | 1421 | extern void bd_forget(struct inode *inode); |
| @@ -1610,6 +1503,9 @@ extern int __invalidate_device(struct block_device *); | |||
| 1610 | extern int invalidate_partition(struct gendisk *, int); | 1503 | extern int invalidate_partition(struct gendisk *, int); |
| 1611 | #endif | 1504 | #endif |
| 1612 | extern int invalidate_inodes(struct super_block *); | 1505 | extern int invalidate_inodes(struct super_block *); |
| 1506 | unsigned long __invalidate_mapping_pages(struct address_space *mapping, | ||
| 1507 | pgoff_t start, pgoff_t end, | ||
| 1508 | bool be_atomic); | ||
| 1613 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1509 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
| 1614 | pgoff_t start, pgoff_t end); | 1510 | pgoff_t start, pgoff_t end); |
| 1615 | 1511 | ||
| @@ -2043,5 +1939,9 @@ static inline void free_secdata(void *secdata) | |||
| 2043 | { } | 1939 | { } |
| 2044 | #endif /* CONFIG_SECURITY */ | 1940 | #endif /* CONFIG_SECURITY */ |
| 2045 | 1941 | ||
| 1942 | int proc_nr_files(ctl_table *table, int write, struct file *filp, | ||
| 1943 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
| 1944 | |||
| 1945 | |||
| 2046 | #endif /* __KERNEL__ */ | 1946 | #endif /* __KERNEL__ */ |
| 2047 | #endif /* _LINUX_FS_H */ | 1947 | #endif /* _LINUX_FS_H */ |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 73710d617775..695741b0e420 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
| @@ -112,7 +112,7 @@ struct fsl_usb2_platform_data { | |||
| 112 | struct fsl_spi_platform_data { | 112 | struct fsl_spi_platform_data { |
| 113 | u32 initial_spmode; /* initial SPMODE value */ | 113 | u32 initial_spmode; /* initial SPMODE value */ |
| 114 | u16 bus_num; | 114 | u16 bus_num; |
| 115 | 115 | bool qe_mode; | |
| 116 | /* board specific information */ | 116 | /* board specific information */ |
| 117 | u16 max_chipselect; | 117 | u16 max_chipselect; |
| 118 | void (*activate_cs)(u8 cs, u8 polarity); | 118 | void (*activate_cs)(u8 cs, u8 polarity); |
| @@ -120,5 +120,10 @@ struct fsl_spi_platform_data { | |||
| 120 | u32 sysclk; | 120 | u32 sysclk; |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | struct mpc8xx_pcmcia_ops { | ||
| 124 | void(*hw_ctrl)(int slot, int enable); | ||
| 125 | int(*voltage_set)(int slot, int vcc, int vpp); | ||
| 126 | }; | ||
| 127 | |||
| 123 | #endif /* _FSL_DEVICE_H_ */ | 128 | #endif /* _FSL_DEVICE_H_ */ |
| 124 | #endif /* __KERNEL__ */ | 129 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 534744efe30d..9fbe9d258e22 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
| @@ -339,7 +339,7 @@ struct fuse_dirent { | |||
| 339 | char name[0]; | 339 | char name[0]; |
| 340 | }; | 340 | }; |
| 341 | 341 | ||
| 342 | #define FUSE_NAME_OFFSET ((unsigned) ((struct fuse_dirent *) 0)->name) | 342 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) |
| 343 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) | 343 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) |
| 344 | #define FUSE_DIRENT_SIZE(d) \ | 344 | #define FUSE_DIRENT_SIZE(d) \ |
| 345 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 345 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 0d2ef0b082a6..bc68dd9a6d41 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -30,6 +30,9 @@ struct vm_area_struct; | |||
| 30 | * cannot handle allocation failures. | 30 | * cannot handle allocation failures. |
| 31 | * | 31 | * |
| 32 | * __GFP_NORETRY: The VM implementation must not retry indefinitely. | 32 | * __GFP_NORETRY: The VM implementation must not retry indefinitely. |
| 33 | * | ||
| 34 | * __GFP_MOVABLE: Flag that this page will be movable by the page migration | ||
| 35 | * mechanism or reclaimed | ||
| 33 | */ | 36 | */ |
| 34 | #define __GFP_WAIT ((__force gfp_t)0x10u) /* Can wait and reschedule? */ | 37 | #define __GFP_WAIT ((__force gfp_t)0x10u) /* Can wait and reschedule? */ |
| 35 | #define __GFP_HIGH ((__force gfp_t)0x20u) /* Should access emergency pools? */ | 38 | #define __GFP_HIGH ((__force gfp_t)0x20u) /* Should access emergency pools? */ |
| @@ -45,6 +48,7 @@ struct vm_area_struct; | |||
| 45 | #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */ | 48 | #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */ |
| 46 | #define __GFP_HARDWALL ((__force gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */ | 49 | #define __GFP_HARDWALL ((__force gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */ |
| 47 | #define __GFP_THISNODE ((__force gfp_t)0x40000u)/* No fallback, no policies */ | 50 | #define __GFP_THISNODE ((__force gfp_t)0x40000u)/* No fallback, no policies */ |
| 51 | #define __GFP_MOVABLE ((__force gfp_t)0x80000u) /* Page is movable */ | ||
| 48 | 52 | ||
| 49 | #define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ | 53 | #define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ |
| 50 | #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) | 54 | #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) |
| @@ -53,7 +57,8 @@ struct vm_area_struct; | |||
| 53 | #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ | 57 | #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ |
| 54 | __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ | 58 | __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ |
| 55 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_COMP| \ | 59 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_COMP| \ |
| 56 | __GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE) | 60 | __GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE| \ |
| 61 | __GFP_MOVABLE) | ||
| 57 | 62 | ||
| 58 | /* This equals 0, but use constants in case they ever change */ | 63 | /* This equals 0, but use constants in case they ever change */ |
| 59 | #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) | 64 | #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) |
| @@ -65,6 +70,15 @@ struct vm_area_struct; | |||
| 65 | #define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL) | 70 | #define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL) |
| 66 | #define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \ | 71 | #define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \ |
| 67 | __GFP_HIGHMEM) | 72 | __GFP_HIGHMEM) |
| 73 | #define GFP_HIGHUSER_MOVABLE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ | ||
| 74 | __GFP_HARDWALL | __GFP_HIGHMEM | \ | ||
| 75 | __GFP_MOVABLE) | ||
| 76 | #define GFP_NOFS_PAGECACHE (__GFP_WAIT | __GFP_IO | __GFP_MOVABLE) | ||
| 77 | #define GFP_USER_PAGECACHE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ | ||
| 78 | __GFP_HARDWALL | __GFP_MOVABLE) | ||
| 79 | #define GFP_HIGHUSER_PAGECACHE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ | ||
| 80 | __GFP_HARDWALL | __GFP_HIGHMEM | \ | ||
| 81 | __GFP_MOVABLE) | ||
| 68 | 82 | ||
| 69 | #ifdef CONFIG_NUMA | 83 | #ifdef CONFIG_NUMA |
| 70 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 84 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
| @@ -92,6 +106,9 @@ static inline enum zone_type gfp_zone(gfp_t flags) | |||
| 92 | if (flags & __GFP_DMA32) | 106 | if (flags & __GFP_DMA32) |
| 93 | return ZONE_DMA32; | 107 | return ZONE_DMA32; |
| 94 | #endif | 108 | #endif |
| 109 | if ((flags & (__GFP_HIGHMEM | __GFP_MOVABLE)) == | ||
| 110 | (__GFP_HIGHMEM | __GFP_MOVABLE)) | ||
| 111 | return ZONE_MOVABLE; | ||
| 95 | #ifdef CONFIG_HIGHMEM | 112 | #ifdef CONFIG_HIGHMEM |
| 96 | if (flags & __GFP_HIGHMEM) | 113 | if (flags & __GFP_HIGHMEM) |
| 97 | return ZONE_HIGHMEM; | 114 | return ZONE_HIGHMEM; |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 98e2cce996a4..12c5e4e3135a 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
| @@ -73,10 +73,27 @@ static inline void clear_user_highpage(struct page *page, unsigned long vaddr) | |||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | #ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE | 75 | #ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE |
| 76 | /** | ||
| 77 | * __alloc_zeroed_user_highpage - Allocate a zeroed HIGHMEM page for a VMA with caller-specified movable GFP flags | ||
| 78 | * @movableflags: The GFP flags related to the pages future ability to move like __GFP_MOVABLE | ||
| 79 | * @vma: The VMA the page is to be allocated for | ||
| 80 | * @vaddr: The virtual address the page will be inserted into | ||
| 81 | * | ||
| 82 | * This function will allocate a page for a VMA but the caller is expected | ||
| 83 | * to specify via movableflags whether the page will be movable in the | ||
| 84 | * future or not | ||
| 85 | * | ||
| 86 | * An architecture may override this function by defining | ||
| 87 | * __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE and providing their own | ||
| 88 | * implementation. | ||
| 89 | */ | ||
| 76 | static inline struct page * | 90 | static inline struct page * |
| 77 | alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr) | 91 | __alloc_zeroed_user_highpage(gfp_t movableflags, |
| 92 | struct vm_area_struct *vma, | ||
| 93 | unsigned long vaddr) | ||
| 78 | { | 94 | { |
| 79 | struct page *page = alloc_page_vma(GFP_HIGHUSER, vma, vaddr); | 95 | struct page *page = alloc_page_vma(GFP_HIGHUSER | movableflags, |
| 96 | vma, vaddr); | ||
| 80 | 97 | ||
| 81 | if (page) | 98 | if (page) |
| 82 | clear_user_highpage(page, vaddr); | 99 | clear_user_highpage(page, vaddr); |
| @@ -85,6 +102,36 @@ alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr) | |||
| 85 | } | 102 | } |
| 86 | #endif | 103 | #endif |
| 87 | 104 | ||
| 105 | /** | ||
| 106 | * alloc_zeroed_user_highpage - Allocate a zeroed HIGHMEM page for a VMA | ||
| 107 | * @vma: The VMA the page is to be allocated for | ||
| 108 | * @vaddr: The virtual address the page will be inserted into | ||
| 109 | * | ||
| 110 | * This function will allocate a page for a VMA that the caller knows will | ||
| 111 | * not be able to move in the future using move_pages() or reclaim. If it | ||
| 112 | * is known that the page can move, use alloc_zeroed_user_highpage_movable | ||
| 113 | */ | ||
| 114 | static inline struct page * | ||
| 115 | alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr) | ||
| 116 | { | ||
| 117 | return __alloc_zeroed_user_highpage(0, vma, vaddr); | ||
| 118 | } | ||
| 119 | |||
| 120 | /** | ||
| 121 | * alloc_zeroed_user_highpage_movable - Allocate a zeroed HIGHMEM page for a VMA that the caller knows can move | ||
| 122 | * @vma: The VMA the page is to be allocated for | ||
| 123 | * @vaddr: The virtual address the page will be inserted into | ||
| 124 | * | ||
| 125 | * This function will allocate a page for a VMA that the caller knows will | ||
| 126 | * be able to migrate in the future using move_pages() or reclaimed | ||
| 127 | */ | ||
| 128 | static inline struct page * | ||
| 129 | alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma, | ||
| 130 | unsigned long vaddr) | ||
| 131 | { | ||
| 132 | return __alloc_zeroed_user_highpage(__GFP_MOVABLE, vma, vaddr); | ||
| 133 | } | ||
| 134 | |||
| 88 | static inline void clear_highpage(struct page *page) | 135 | static inline void clear_highpage(struct page *page) |
| 89 | { | 136 | { |
| 90 | void *kaddr = kmap_atomic(page, KM_USER0); | 137 | void *kaddr = kmap_atomic(page, KM_USER0); |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 17c29dca8354..540799bc85f8 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -329,12 +329,13 @@ extern void sysrq_timer_list_show(void); | |||
| 329 | #ifdef CONFIG_TIMER_STATS | 329 | #ifdef CONFIG_TIMER_STATS |
| 330 | 330 | ||
| 331 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | 331 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, |
| 332 | void *timerf, char * comm); | 332 | void *timerf, char *comm, |
| 333 | unsigned int timer_flag); | ||
| 333 | 334 | ||
| 334 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 335 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
| 335 | { | 336 | { |
| 336 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 337 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
| 337 | timer->function, timer->start_comm); | 338 | timer->function, timer->start_comm, 0); |
| 338 | } | 339 | } |
| 339 | 340 | ||
| 340 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | 341 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 2c13715e9dde..49b7053043ad 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -15,6 +15,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | |||
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 17 | int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); |
| 18 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | ||
| 18 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); | 19 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); |
| 19 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int); | 20 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int); |
| 20 | void unmap_hugepage_range(struct vm_area_struct *, unsigned long, unsigned long); | 21 | void unmap_hugepage_range(struct vm_area_struct *, unsigned long, unsigned long); |
| @@ -29,6 +30,7 @@ int hugetlb_reserve_pages(struct inode *inode, long from, long to); | |||
| 29 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 30 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
| 30 | 31 | ||
| 31 | extern unsigned long max_huge_pages; | 32 | extern unsigned long max_huge_pages; |
| 33 | extern unsigned long hugepages_treat_as_movable; | ||
| 32 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 34 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
| 33 | extern int sysctl_hugetlb_shm_group; | 35 | extern int sysctl_hugetlb_shm_group; |
| 34 | 36 | ||
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 52f53e2e70c3..333a370a3bdc 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
| 32 | #include <linux/workqueue.h> /* work_struct */ | 32 | #include <linux/workqueue.h> /* work_struct */ |
| 33 | #include <linux/mempool.h> | 33 | #include <linux/mempool.h> |
| 34 | #include <linux/mutex.h> | ||
| 34 | 35 | ||
| 35 | #include <asm/io.h> | 36 | #include <asm/io.h> |
| 36 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ | 37 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ |
| @@ -425,7 +426,7 @@ struct i2o_device { | |||
| 425 | 426 | ||
| 426 | struct device device; | 427 | struct device device; |
| 427 | 428 | ||
| 428 | struct semaphore lock; /* device lock */ | 429 | struct mutex lock; /* device lock */ |
| 429 | }; | 430 | }; |
| 430 | 431 | ||
| 431 | /* | 432 | /* |
| @@ -544,7 +545,7 @@ struct i2o_controller { | |||
| 544 | struct i2o_dma hrt; /* HW Resource Table */ | 545 | struct i2o_dma hrt; /* HW Resource Table */ |
| 545 | i2o_lct *lct; /* Logical Config Table */ | 546 | i2o_lct *lct; /* Logical Config Table */ |
| 546 | struct i2o_dma dlct; /* Temp LCT */ | 547 | struct i2o_dma dlct; /* Temp LCT */ |
| 547 | struct semaphore lct_lock; /* Lock for LCT updates */ | 548 | struct mutex lct_lock; /* Lock for LCT updates */ |
| 548 | struct i2o_dma status_block; /* IOP status block */ | 549 | struct i2o_dma status_block; /* IOP status block */ |
| 549 | 550 | ||
| 550 | struct i2o_io base; /* controller messaging unit */ | 551 | struct i2o_io base; /* controller messaging unit */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index 915572fa030b..0edda411959c 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
| @@ -78,8 +78,11 @@ void *idr_find(struct idr *idp, int id); | |||
| 78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); | 78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); |
| 79 | int idr_get_new(struct idr *idp, void *ptr, int *id); | 79 | int idr_get_new(struct idr *idp, void *ptr, int *id); |
| 80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | 80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); |
| 81 | int idr_for_each(struct idr *idp, | ||
| 82 | int (*fn)(int id, void *p, void *data), void *data); | ||
| 81 | void *idr_replace(struct idr *idp, void *ptr, int id); | 83 | void *idr_replace(struct idr *idp, void *ptr, int id); |
| 82 | void idr_remove(struct idr *idp, int id); | 84 | void idr_remove(struct idr *idp, int id); |
| 85 | void idr_remove_all(struct idr *idp); | ||
| 83 | void idr_destroy(struct idr *idp); | 86 | void idr_destroy(struct idr *idp); |
| 84 | void idr_init(struct idr *idp); | 87 | void idr_init(struct idr *idp); |
| 85 | 88 | ||
diff --git a/include/linux/init.h b/include/linux/init.h index 56ec4c62eee0..5b5285316339 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -171,9 +171,6 @@ struct obs_kernel_param { | |||
| 171 | #define __setup(str, fn) \ | 171 | #define __setup(str, fn) \ |
| 172 | __setup_param(str, fn, fn, 0) | 172 | __setup_param(str, fn, fn, 0) |
| 173 | 173 | ||
| 174 | #define __obsolete_setup(str) \ | ||
| 175 | __setup_null_param(str, __LINE__) | ||
| 176 | |||
| 177 | /* NOTE: fn is as per module_param, not __setup! Emits warning if fn | 174 | /* NOTE: fn is as per module_param, not __setup! Emits warning if fn |
| 178 | * returns non-zero. */ | 175 | * returns non-zero. */ |
| 179 | #define early_param(str, fn) \ | 176 | #define early_param(str, fn) \ |
| @@ -239,7 +236,6 @@ void __init parse_early_param(void); | |||
| 239 | #define __setup_param(str, unique_id, fn) /* nothing */ | 236 | #define __setup_param(str, unique_id, fn) /* nothing */ |
| 240 | #define __setup_null_param(str, unique_id) /* nothing */ | 237 | #define __setup_null_param(str, unique_id) /* nothing */ |
| 241 | #define __setup(str, func) /* nothing */ | 238 | #define __setup(str, func) /* nothing */ |
| 242 | #define __obsolete_setup(str) /* nothing */ | ||
| 243 | #endif | 239 | #endif |
| 244 | 240 | ||
| 245 | /* Data marked not to be saved by software suspend */ | 241 | /* Data marked not to be saved by software suspend */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 276ccaa2670c..cab741c2d603 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/lockdep.h> | 8 | #include <linux/lockdep.h> |
| 9 | #include <linux/ipc.h> | 9 | #include <linux/ipc.h> |
| 10 | #include <linux/pid_namespace.h> | 10 | #include <linux/pid_namespace.h> |
| 11 | #include <linux/user_namespace.h> | ||
| 11 | 12 | ||
| 12 | #define INIT_FDTABLE \ | 13 | #define INIT_FDTABLE \ |
| 13 | { \ | 14 | { \ |
| @@ -78,6 +79,7 @@ extern struct nsproxy init_nsproxy; | |||
| 78 | .uts_ns = &init_uts_ns, \ | 79 | .uts_ns = &init_uts_ns, \ |
| 79 | .mnt_ns = NULL, \ | 80 | .mnt_ns = NULL, \ |
| 80 | INIT_IPC_NS(ipc_ns) \ | 81 | INIT_IPC_NS(ipc_ns) \ |
| 82 | .user_ns = &init_user_ns, \ | ||
| 81 | } | 83 | } |
| 82 | 84 | ||
| 83 | #define INIT_SIGHAND(sighand) { \ | 85 | #define INIT_SIGHAND(sighand) { \ |
diff --git a/include/linux/io.h b/include/linux/io.h index 8423dd376514..e3b2dda6c8eb 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
| @@ -63,32 +63,7 @@ void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | |||
| 63 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | 63 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, |
| 64 | unsigned long size); | 64 | unsigned long size); |
| 65 | void devm_iounmap(struct device *dev, void __iomem *addr); | 65 | void devm_iounmap(struct device *dev, void __iomem *addr); |
| 66 | 66 | int check_signature(const volatile void __iomem *io_addr, | |
| 67 | /** | 67 | const unsigned char *signature, int length); |
| 68 | * check_signature - find BIOS signatures | ||
| 69 | * @io_addr: mmio address to check | ||
| 70 | * @signature: signature block | ||
| 71 | * @length: length of signature | ||
| 72 | * | ||
| 73 | * Perform a signature comparison with the mmio address io_addr. This | ||
| 74 | * address should have been obtained by ioremap. | ||
| 75 | * Returns 1 on a match. | ||
| 76 | */ | ||
| 77 | |||
| 78 | static inline int check_signature(const volatile void __iomem *io_addr, | ||
| 79 | const unsigned char *signature, int length) | ||
| 80 | { | ||
| 81 | int retval = 0; | ||
| 82 | do { | ||
| 83 | if (readb(io_addr) != *signature) | ||
| 84 | goto out; | ||
| 85 | io_addr++; | ||
| 86 | signature++; | ||
| 87 | length--; | ||
| 88 | } while (length); | ||
| 89 | retval = 1; | ||
| 90 | out: | ||
| 91 | return retval; | ||
| 92 | } | ||
| 93 | 68 | ||
| 94 | #endif /* _LINUX_IO_H */ | 69 | #endif /* _LINUX_IO_H */ |
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index 1980867a64a4..3fd3ddd5f0d9 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
| @@ -52,6 +52,7 @@ struct ipc_perm | |||
| 52 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
| 53 | 53 | ||
| 54 | #include <linux/kref.h> | 54 | #include <linux/kref.h> |
| 55 | #include <linux/spinlock.h> | ||
| 55 | 56 | ||
| 56 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ | 57 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ |
| 57 | 58 | ||
| @@ -92,6 +93,7 @@ extern struct ipc_namespace init_ipc_ns; | |||
| 92 | 93 | ||
| 93 | #ifdef CONFIG_SYSVIPC | 94 | #ifdef CONFIG_SYSVIPC |
| 94 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | 95 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, |
| 96 | extern void free_ipc_ns(struct kref *kref); | ||
| 95 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, | 97 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, |
| 96 | struct ipc_namespace *ns); | 98 | struct ipc_namespace *ns); |
| 97 | #else | 99 | #else |
| @@ -103,13 +105,9 @@ static inline struct ipc_namespace *copy_ipcs(unsigned long flags, | |||
| 103 | } | 105 | } |
| 104 | #endif | 106 | #endif |
| 105 | 107 | ||
| 106 | #ifdef CONFIG_IPC_NS | ||
| 107 | extern void free_ipc_ns(struct kref *kref); | ||
| 108 | #endif | ||
| 109 | |||
| 110 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 108 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
| 111 | { | 109 | { |
| 112 | #ifdef CONFIG_IPC_NS | 110 | #ifdef CONFIG_SYSVIPC |
| 113 | if (ns) | 111 | if (ns) |
| 114 | kref_get(&ns->kref); | 112 | kref_get(&ns->kref); |
| 115 | #endif | 113 | #endif |
| @@ -118,7 +116,7 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | |||
| 118 | 116 | ||
| 119 | static inline void put_ipc_ns(struct ipc_namespace *ns) | 117 | static inline void put_ipc_ns(struct ipc_namespace *ns) |
| 120 | { | 118 | { |
| 121 | #ifdef CONFIG_IPC_NS | 119 | #ifdef CONFIG_SYSVIPC |
| 122 | kref_put(&ns->kref, free_ipc_ns); | 120 | kref_put(&ns->kref, free_ipc_ns); |
| 123 | #endif | 121 | #endif |
| 124 | } | 122 | } |
| @@ -126,5 +124,3 @@ static inline void put_ipc_ns(struct ipc_namespace *ns) | |||
| 126 | #endif /* __KERNEL__ */ | 124 | #endif /* __KERNEL__ */ |
| 127 | 125 | ||
| 128 | #endif /* _LINUX_IPC_H */ | 126 | #endif /* _LINUX_IPC_H */ |
| 129 | |||
| 130 | |||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 1695054e8c63..44657197fcb0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -161,6 +161,7 @@ struct irq_desc { | |||
| 161 | unsigned int wake_depth; /* nested wake enables */ | 161 | unsigned int wake_depth; /* nested wake enables */ |
| 162 | unsigned int irq_count; /* For detecting broken IRQs */ | 162 | unsigned int irq_count; /* For detecting broken IRQs */ |
| 163 | unsigned int irqs_unhandled; | 163 | unsigned int irqs_unhandled; |
| 164 | unsigned long last_unhandled; /* Aging timer for unhandled count */ | ||
| 164 | spinlock_t lock; | 165 | spinlock_t lock; |
| 165 | #ifdef CONFIG_SMP | 166 | #ifdef CONFIG_SMP |
| 166 | cpumask_t affinity; | 167 | cpumask_t affinity; |
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 5f06527dca21..f73de6fb5c68 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
| @@ -7,9 +7,9 @@ | |||
| 7 | 7 | ||
| 8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
| 9 | 9 | ||
| 10 | #define KSYM_NAME_LEN 127 | 10 | #define KSYM_NAME_LEN 128 |
| 11 | #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + KSYM_NAME_LEN + \ | 11 | #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ |
| 12 | 2*(BITS_PER_LONG*3/10) + MODULE_NAME_LEN + 1) | 12 | 2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + 1) |
| 13 | 13 | ||
| 14 | #ifdef CONFIG_KALLSYMS | 14 | #ifdef CONFIG_KALLSYMS |
| 15 | /* Lookup the address for a symbol. Returns 0 if not found. */ | 15 | /* Lookup the address for a symbol. Returns 0 if not found. */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7a4852505914..1eb9cde550c4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -210,6 +210,7 @@ extern enum system_states { | |||
| 210 | #define TAINT_MACHINE_CHECK (1<<4) | 210 | #define TAINT_MACHINE_CHECK (1<<4) |
| 211 | #define TAINT_BAD_PAGE (1<<5) | 211 | #define TAINT_BAD_PAGE (1<<5) |
| 212 | #define TAINT_USER (1<<6) | 212 | #define TAINT_USER (1<<6) |
| 213 | #define TAINT_DIE (1<<7) | ||
| 213 | 214 | ||
| 214 | extern void dump_stack(void); | 215 | extern void dump_stack(void); |
| 215 | 216 | ||
diff --git a/include/linux/kernelcapi.h b/include/linux/kernelcapi.h index aea34e74c496..8c4350a9ed87 100644 --- a/include/linux/kernelcapi.h +++ b/include/linux/kernelcapi.h | |||
| @@ -64,7 +64,7 @@ struct capi20_appl { | |||
| 64 | unsigned long nrecvdatapkt; | 64 | unsigned long nrecvdatapkt; |
| 65 | unsigned long nsentctlpkt; | 65 | unsigned long nsentctlpkt; |
| 66 | unsigned long nsentdatapkt; | 66 | unsigned long nsentdatapkt; |
| 67 | struct semaphore recv_sem; | 67 | struct mutex recv_mtx; |
| 68 | struct sk_buff_head recv_queue; | 68 | struct sk_buff_head recv_queue; |
| 69 | struct work_struct recv_work; | 69 | struct work_struct recv_work; |
| 70 | int release_in_progress; | 70 | int release_in_progress; |
diff --git a/include/linux/leds.h b/include/linux/leds.h index 88afceffb7cb..494bed7c2fc1 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #define __LINUX_LEDS_H_INCLUDED | 13 | #define __LINUX_LEDS_H_INCLUDED |
| 14 | 14 | ||
| 15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
| 16 | #include <linux/spinlock.h> | ||
| 17 | 16 | ||
| 18 | struct device; | 17 | struct device; |
| 19 | struct class_device; | 18 | struct class_device; |
diff --git a/include/linux/limits.h b/include/linux/limits.h index eaf2e099f125..2d0f94162fb3 100644 --- a/include/linux/limits.h +++ b/include/linux/limits.h | |||
| @@ -5,8 +5,6 @@ | |||
| 5 | 5 | ||
| 6 | #define NGROUPS_MAX 65536 /* supplemental group IDs are available */ | 6 | #define NGROUPS_MAX 65536 /* supplemental group IDs are available */ |
| 7 | #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ | 7 | #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ |
| 8 | #define CHILD_MAX 999 /* no limit :-) */ | ||
| 9 | #define OPEN_MAX 256 /* # open files a process may have */ | ||
| 10 | #define LINK_MAX 127 /* # links a file may have */ | 8 | #define LINK_MAX 127 /* # links a file may have */ |
| 11 | #define MAX_CANON 255 /* size of the canonical input queue */ | 9 | #define MAX_CANON 255 /* size of the canonical input queue */ |
| 12 | #define MAX_INPUT 255 /* size of the type-ahead buffer */ | 10 | #define MAX_INPUT 255 /* size of the type-ahead buffer */ |
diff --git a/include/linux/linux_logo.h b/include/linux/linux_logo.h index 9c01bde5bf1b..08a92969c76e 100644 --- a/include/linux/linux_logo.h +++ b/include/linux/linux_logo.h | |||
| @@ -33,5 +33,13 @@ struct linux_logo { | |||
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | extern const struct linux_logo *fb_find_logo(int depth); | 35 | extern const struct linux_logo *fb_find_logo(int depth); |
| 36 | #ifdef CONFIG_FB_LOGO_EXTRA | ||
| 37 | extern void fb_append_extra_logo(const struct linux_logo *logo, | ||
| 38 | unsigned int n); | ||
| 39 | #else | ||
| 40 | static inline void fb_append_extra_logo(const struct linux_logo *logo, | ||
| 41 | unsigned int n) | ||
| 42 | {} | ||
| 43 | #endif | ||
| 36 | 44 | ||
| 37 | #endif /* _LINUX_LINUX_LOGO_H */ | 45 | #endif /* _LINUX_LINUX_LOGO_H */ |
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 246de1d84a26..6f1637c61e10 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
| @@ -27,6 +27,7 @@ struct nlmsvc_binding { | |||
| 27 | struct nfs_fh *, | 27 | struct nfs_fh *, |
| 28 | struct file **); | 28 | struct file **); |
| 29 | void (*fclose)(struct file *); | 29 | void (*fclose)(struct file *); |
| 30 | unsigned long (*get_grace_period)(void); | ||
| 30 | }; | 31 | }; |
| 31 | 32 | ||
| 32 | extern struct nlmsvc_binding * nlmsvc_ops; | 33 | extern struct nlmsvc_binding * nlmsvc_ops; |
| @@ -38,4 +39,12 @@ extern int nlmclnt_proc(struct inode *, int, struct file_lock *); | |||
| 38 | extern int lockd_up(int proto); | 39 | extern int lockd_up(int proto); |
| 39 | extern void lockd_down(void); | 40 | extern void lockd_down(void); |
| 40 | 41 | ||
| 42 | unsigned long get_nfs_grace_period(void); | ||
| 43 | |||
| 44 | #ifdef CONFIG_NFSD_V4 | ||
| 45 | unsigned long get_nfs4_grace_period(void); | ||
| 46 | #else | ||
| 47 | static inline unsigned long get_nfs4_grace_period(void) {return 0;} | ||
| 48 | #endif | ||
| 49 | |||
| 41 | #endif /* LINUX_LOCKD_BIND_H */ | 50 | #endif /* LINUX_LOCKD_BIND_H */ |
diff --git a/include/linux/lzo.h b/include/linux/lzo.h index 582d8b711a13..d793497ec1ca 100644 --- a/include/linux/lzo.h +++ b/include/linux/lzo.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) | 17 | #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) |
| 18 | #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS | 18 | #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS |
| 19 | 19 | ||
| 20 | #define lzo1x_worst_compress(x) (x + (x / 64) + 16 + 3) | 20 | #define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3) |
| 21 | 21 | ||
| 22 | /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ | 22 | /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ |
| 23 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, | 23 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index daabb3aa1ec6..e147cf50529f 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
| @@ -159,7 +159,7 @@ extern void mpol_fix_fork_child_flag(struct task_struct *p); | |||
| 159 | 159 | ||
| 160 | extern struct mempolicy default_policy; | 160 | extern struct mempolicy default_policy; |
| 161 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 161 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
| 162 | unsigned long addr); | 162 | unsigned long addr, gfp_t gfp_flags); |
| 163 | extern unsigned slab_node(struct mempolicy *policy); | 163 | extern unsigned slab_node(struct mempolicy *policy); |
| 164 | 164 | ||
| 165 | extern enum zone_type policy_zone; | 165 | extern enum zone_type policy_zone; |
| @@ -256,9 +256,9 @@ static inline void mpol_fix_fork_child_flag(struct task_struct *p) | |||
| 256 | #define set_cpuset_being_rebound(x) do {} while (0) | 256 | #define set_cpuset_being_rebound(x) do {} while (0) |
| 257 | 257 | ||
| 258 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 258 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
| 259 | unsigned long addr) | 259 | unsigned long addr, gfp_t gfp_flags) |
| 260 | { | 260 | { |
| 261 | return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER); | 261 | return NODE_DATA(0)->node_zonelists + gfp_zone(gfp_flags); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | static inline int do_migrate_pages(struct mm_struct *mm, | 264 | static inline int do_migrate_pages(struct mm_struct *mm, |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 1c1207472bb4..a5c451816fdc 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #define _LINUX_MM_H | 2 | #define _LINUX_MM_H |
| 3 | 3 | ||
| 4 | #include <linux/errno.h> | 4 | #include <linux/errno.h> |
| 5 | #include <linux/capability.h> | ||
| 6 | 5 | ||
| 7 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
| 8 | 7 | ||
| @@ -27,7 +26,6 @@ extern unsigned long max_mapnr; | |||
| 27 | 26 | ||
| 28 | extern unsigned long num_physpages; | 27 | extern unsigned long num_physpages; |
| 29 | extern void * high_memory; | 28 | extern void * high_memory; |
| 30 | extern unsigned long vmalloc_earlyreserve; | ||
| 31 | extern int page_cluster; | 29 | extern int page_cluster; |
| 32 | 30 | ||
| 33 | #ifdef CONFIG_SYSCTL | 31 | #ifdef CONFIG_SYSCTL |
| @@ -601,6 +599,7 @@ static inline struct address_space *page_mapping(struct page *page) | |||
| 601 | { | 599 | { |
| 602 | struct address_space *mapping = page->mapping; | 600 | struct address_space *mapping = page->mapping; |
| 603 | 601 | ||
| 602 | VM_BUG_ON(PageSlab(page)); | ||
| 604 | if (unlikely(PageSwapCache(page))) | 603 | if (unlikely(PageSwapCache(page))) |
| 605 | mapping = &swapper_space; | 604 | mapping = &swapper_space; |
| 606 | #ifdef CONFIG_SLUB | 605 | #ifdef CONFIG_SLUB |
| @@ -812,27 +811,31 @@ extern unsigned long do_mremap(unsigned long addr, | |||
| 812 | unsigned long flags, unsigned long new_addr); | 811 | unsigned long flags, unsigned long new_addr); |
| 813 | 812 | ||
| 814 | /* | 813 | /* |
| 815 | * Prototype to add a shrinker callback for ageable caches. | 814 | * A callback you can register to apply pressure to ageable caches. |
| 816 | * | ||
| 817 | * These functions are passed a count `nr_to_scan' and a gfpmask. They should | ||
| 818 | * scan `nr_to_scan' objects, attempting to free them. | ||
| 819 | * | 815 | * |
| 820 | * The callback must return the number of objects which remain in the cache. | 816 | * 'shrink' is passed a count 'nr_to_scan' and a 'gfpmask'. It should |
| 817 | * look through the least-recently-used 'nr_to_scan' entries and | ||
| 818 | * attempt to free them up. It should return the number of objects | ||
| 819 | * which remain in the cache. If it returns -1, it means it cannot do | ||
| 820 | * any scanning at this time (eg. there is a risk of deadlock). | ||
| 821 | * | 821 | * |
| 822 | * The callback will be passed nr_to_scan == 0 when the VM is querying the | 822 | * The 'gfpmask' refers to the allocation we are currently trying to |
| 823 | * cache size, so a fastpath for that case is appropriate. | 823 | * fulfil. |
| 824 | */ | 824 | * |
| 825 | typedef int (*shrinker_t)(int nr_to_scan, gfp_t gfp_mask); | 825 | * Note that 'shrink' will be passed nr_to_scan == 0 when the VM is |
| 826 | 826 | * querying the cache size, so a fastpath for that case is appropriate. | |
| 827 | /* | ||
| 828 | * Add an aging callback. The int is the number of 'seeks' it takes | ||
| 829 | * to recreate one of the objects that these functions age. | ||
| 830 | */ | 827 | */ |
| 828 | struct shrinker { | ||
| 829 | int (*shrink)(int nr_to_scan, gfp_t gfp_mask); | ||
| 830 | int seeks; /* seeks to recreate an obj */ | ||
| 831 | 831 | ||
| 832 | #define DEFAULT_SEEKS 2 | 832 | /* These are for internal use */ |
| 833 | struct shrinker; | 833 | struct list_head list; |
| 834 | extern struct shrinker *set_shrinker(int, shrinker_t); | 834 | long nr; /* objs pending delete */ |
| 835 | extern void remove_shrinker(struct shrinker *shrinker); | 835 | }; |
| 836 | #define DEFAULT_SEEKS 2 /* A good number if you don't know better. */ | ||
| 837 | extern void register_shrinker(struct shrinker *); | ||
| 838 | extern void unregister_shrinker(struct shrinker *); | ||
| 836 | 839 | ||
| 837 | /* | 840 | /* |
| 838 | * Some shared mappigns will want the pages marked read-only | 841 | * Some shared mappigns will want the pages marked read-only |
| @@ -1072,6 +1075,10 @@ extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned lo | |||
| 1072 | extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | 1075 | extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, |
| 1073 | unsigned long len, unsigned long prot, | 1076 | unsigned long len, unsigned long prot, |
| 1074 | unsigned long flag, unsigned long pgoff); | 1077 | unsigned long flag, unsigned long pgoff); |
| 1078 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | ||
| 1079 | unsigned long len, unsigned long flags, | ||
| 1080 | unsigned int vm_flags, unsigned long pgoff, | ||
| 1081 | int accountable); | ||
| 1075 | 1082 | ||
| 1076 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1083 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, |
| 1077 | unsigned long len, unsigned long prot, | 1084 | unsigned long len, unsigned long prot, |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index d09b1345a3a1..da8eb8ad9e9b 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -24,6 +24,14 @@ | |||
| 24 | #endif | 24 | #endif |
| 25 | #define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1)) | 25 | #define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1)) |
| 26 | 26 | ||
| 27 | /* | ||
| 28 | * PAGE_ALLOC_COSTLY_ORDER is the order at which allocations are deemed | ||
| 29 | * costly to service. That is between allocation orders which should | ||
| 30 | * coelesce naturally under reasonable reclaim pressure and those which | ||
| 31 | * will not. | ||
| 32 | */ | ||
| 33 | #define PAGE_ALLOC_COSTLY_ORDER 3 | ||
| 34 | |||
| 27 | struct free_area { | 35 | struct free_area { |
| 28 | struct list_head free_list; | 36 | struct list_head free_list; |
| 29 | unsigned long nr_free; | 37 | unsigned long nr_free; |
| @@ -146,6 +154,7 @@ enum zone_type { | |||
| 146 | */ | 154 | */ |
| 147 | ZONE_HIGHMEM, | 155 | ZONE_HIGHMEM, |
| 148 | #endif | 156 | #endif |
| 157 | ZONE_MOVABLE, | ||
| 149 | MAX_NR_ZONES | 158 | MAX_NR_ZONES |
| 150 | }; | 159 | }; |
| 151 | 160 | ||
| @@ -167,6 +176,7 @@ enum zone_type { | |||
| 167 | + defined(CONFIG_ZONE_DMA32) \ | 176 | + defined(CONFIG_ZONE_DMA32) \ |
| 168 | + 1 \ | 177 | + 1 \ |
| 169 | + defined(CONFIG_HIGHMEM) \ | 178 | + defined(CONFIG_HIGHMEM) \ |
| 179 | + 1 \ | ||
| 170 | ) | 180 | ) |
| 171 | #if __ZONE_COUNT < 2 | 181 | #if __ZONE_COUNT < 2 |
| 172 | #define ZONES_SHIFT 0 | 182 | #define ZONES_SHIFT 0 |
| @@ -499,10 +509,22 @@ static inline int populated_zone(struct zone *zone) | |||
| 499 | return (!!zone->present_pages); | 509 | return (!!zone->present_pages); |
| 500 | } | 510 | } |
| 501 | 511 | ||
| 512 | extern int movable_zone; | ||
| 513 | |||
| 514 | static inline int zone_movable_is_highmem(void) | ||
| 515 | { | ||
| 516 | #if defined(CONFIG_HIGHMEM) && defined(CONFIG_ARCH_POPULATES_NODE_MAP) | ||
| 517 | return movable_zone == ZONE_HIGHMEM; | ||
| 518 | #else | ||
| 519 | return 0; | ||
| 520 | #endif | ||
| 521 | } | ||
| 522 | |||
| 502 | static inline int is_highmem_idx(enum zone_type idx) | 523 | static inline int is_highmem_idx(enum zone_type idx) |
| 503 | { | 524 | { |
| 504 | #ifdef CONFIG_HIGHMEM | 525 | #ifdef CONFIG_HIGHMEM |
| 505 | return (idx == ZONE_HIGHMEM); | 526 | return (idx == ZONE_HIGHMEM || |
| 527 | (idx == ZONE_MOVABLE && zone_movable_is_highmem())); | ||
| 506 | #else | 528 | #else |
| 507 | return 0; | 529 | return 0; |
| 508 | #endif | 530 | #endif |
| @@ -522,7 +544,9 @@ static inline int is_normal_idx(enum zone_type idx) | |||
| 522 | static inline int is_highmem(struct zone *zone) | 544 | static inline int is_highmem(struct zone *zone) |
| 523 | { | 545 | { |
| 524 | #ifdef CONFIG_HIGHMEM | 546 | #ifdef CONFIG_HIGHMEM |
| 525 | return zone == zone->zone_pgdat->node_zones + ZONE_HIGHMEM; | 547 | int zone_idx = zone - zone->zone_pgdat->node_zones; |
| 548 | return zone_idx == ZONE_HIGHMEM || | ||
| 549 | (zone_idx == ZONE_MOVABLE && zone_movable_is_highmem()); | ||
| 526 | #else | 550 | #else |
| 527 | return 0; | 551 | return 0; |
| 528 | #endif | 552 | #endif |
| @@ -566,6 +590,11 @@ int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, | |||
| 566 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, | 590 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, |
| 567 | struct file *, void __user *, size_t *, loff_t *); | 591 | struct file *, void __user *, size_t *, loff_t *); |
| 568 | 592 | ||
| 593 | extern int numa_zonelist_order_handler(struct ctl_table *, int, | ||
| 594 | struct file *, void __user *, size_t *, loff_t *); | ||
| 595 | extern char numa_zonelist_order[]; | ||
| 596 | #define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */ | ||
| 597 | |||
| 569 | #include <linux/topology.h> | 598 | #include <linux/topology.h> |
| 570 | /* Returns the number of the current Node. */ | 599 | /* Returns the number of the current Node. */ |
| 571 | #ifndef numa_node_id | 600 | #ifndef numa_node_id |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 1fa4d9813b31..8eed44f8ca73 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
| @@ -14,7 +14,7 @@ struct mnt_namespace { | |||
| 14 | int event; | 14 | int event; |
| 15 | }; | 15 | }; |
| 16 | 16 | ||
| 17 | extern struct mnt_namespace *copy_mnt_ns(int, struct mnt_namespace *, | 17 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
| 18 | struct fs_struct *); | 18 | struct fs_struct *); |
| 19 | extern void __put_mnt_ns(struct mnt_namespace *ns); | 19 | extern void __put_mnt_ns(struct mnt_namespace *ns); |
| 20 | 20 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index e6e0f86ef5fc..b6a646cea1cb 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 | 6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 |
| 7 | * Rewritten again by Rusty Russell, 2002 | 7 | * Rewritten again by Rusty Russell, 2002 |
| 8 | */ | 8 | */ |
| 9 | #include <linux/spinlock.h> | ||
| 10 | #include <linux/list.h> | 9 | #include <linux/list.h> |
| 11 | #include <linux/stat.h> | 10 | #include <linux/stat.h> |
| 12 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 0e09c005dda8..f950921523f5 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
| @@ -146,7 +146,7 @@ struct fat_boot_fsinfo { | |||
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | struct msdos_dir_entry { | 148 | struct msdos_dir_entry { |
| 149 | __u8 name[8],ext[3]; /* name and extension */ | 149 | __u8 name[MSDOS_NAME];/* name and extension */ |
| 150 | __u8 attr; /* attribute bits */ | 150 | __u8 attr; /* attribute bits */ |
| 151 | __u8 lcase; /* Case for base and extension */ | 151 | __u8 lcase; /* Case for base and extension */ |
| 152 | __u8 ctime_cs; /* Creation time, centiseconds (0-199) */ | 152 | __u8 ctime_cs; /* Creation time, centiseconds (0-199) */ |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 83e39eb054d3..88766e43e121 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
| @@ -148,8 +148,6 @@ struct ncp_nls_ioctl | |||
| 148 | #include <linux/ncp_fs_i.h> | 148 | #include <linux/ncp_fs_i.h> |
| 149 | #include <linux/ncp_fs_sb.h> | 149 | #include <linux/ncp_fs_sb.h> |
| 150 | 150 | ||
| 151 | /* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */ | ||
| 152 | #undef PRINTK | ||
| 153 | /* define because it is easy to change PRINTK to {*}PRINTK */ | 151 | /* define because it is easy to change PRINTK to {*}PRINTK */ |
| 154 | #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) | 152 | #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) |
| 155 | 153 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 322b5eae57dd..da7a13c97eb8 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -262,8 +262,6 @@ enum netdev_state_t | |||
| 262 | __LINK_STATE_LINKWATCH_PENDING, | 262 | __LINK_STATE_LINKWATCH_PENDING, |
| 263 | __LINK_STATE_DORMANT, | 263 | __LINK_STATE_DORMANT, |
| 264 | __LINK_STATE_QDISC_RUNNING, | 264 | __LINK_STATE_QDISC_RUNNING, |
| 265 | /* Set by the netpoll NAPI code */ | ||
| 266 | __LINK_STATE_POLL_LIST_FROZEN, | ||
| 267 | }; | 265 | }; |
| 268 | 266 | ||
| 269 | 267 | ||
| @@ -1022,14 +1020,6 @@ static inline void netif_rx_complete(struct net_device *dev) | |||
| 1022 | { | 1020 | { |
| 1023 | unsigned long flags; | 1021 | unsigned long flags; |
| 1024 | 1022 | ||
| 1025 | #ifdef CONFIG_NETPOLL | ||
| 1026 | /* Prevent race with netpoll - yes, this is a kludge. | ||
| 1027 | * But at least it doesn't penalize the non-netpoll | ||
| 1028 | * code path. */ | ||
| 1029 | if (test_bit(__LINK_STATE_POLL_LIST_FROZEN, &dev->state)) | ||
| 1030 | return; | ||
| 1031 | #endif | ||
| 1032 | |||
| 1033 | local_irq_save(flags); | 1023 | local_irq_save(flags); |
| 1034 | __netif_rx_complete(dev); | 1024 | __netif_rx_complete(dev); |
| 1035 | local_irq_restore(flags); | 1025 | local_irq_restore(flags); |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 9f62d6182d32..78feb7beff75 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
| @@ -42,6 +42,9 @@ | |||
| 42 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ | 42 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ |
| 43 | #define NFSEXP_ALLFLAGS 0xFE3F | 43 | #define NFSEXP_ALLFLAGS 0xFE3F |
| 44 | 44 | ||
| 45 | /* The flags that may vary depending on security flavor: */ | ||
| 46 | #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ | ||
| 47 | | NFSEXP_ALLSQUASH) | ||
| 45 | 48 | ||
| 46 | #ifdef __KERNEL__ | 49 | #ifdef __KERNEL__ |
| 47 | 50 | ||
| @@ -64,6 +67,19 @@ struct nfsd4_fs_locations { | |||
| 64 | int migrated; | 67 | int migrated; |
| 65 | }; | 68 | }; |
| 66 | 69 | ||
| 70 | /* | ||
| 71 | * We keep an array of pseudoflavors with the export, in order from most | ||
| 72 | * to least preferred. For the forseeable future, we don't expect more | ||
| 73 | * than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3, | ||
| 74 | * spkm3i, and spkm3p (and using all 8 at once should be rare). | ||
| 75 | */ | ||
| 76 | #define MAX_SECINFO_LIST 8 | ||
| 77 | |||
| 78 | struct exp_flavor_info { | ||
| 79 | u32 pseudoflavor; | ||
| 80 | u32 flags; | ||
| 81 | }; | ||
| 82 | |||
| 67 | struct svc_export { | 83 | struct svc_export { |
| 68 | struct cache_head h; | 84 | struct cache_head h; |
| 69 | struct auth_domain * ex_client; | 85 | struct auth_domain * ex_client; |
| @@ -76,6 +92,8 @@ struct svc_export { | |||
| 76 | int ex_fsid; | 92 | int ex_fsid; |
| 77 | unsigned char * ex_uuid; /* 16 byte fsid */ | 93 | unsigned char * ex_uuid; /* 16 byte fsid */ |
| 78 | struct nfsd4_fs_locations ex_fslocs; | 94 | struct nfsd4_fs_locations ex_fslocs; |
| 95 | int ex_nflavors; | ||
| 96 | struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; | ||
| 79 | }; | 97 | }; |
| 80 | 98 | ||
| 81 | /* an "export key" (expkey) maps a filehandlefragement to an | 99 | /* an "export key" (expkey) maps a filehandlefragement to an |
| @@ -95,10 +113,22 @@ struct svc_expkey { | |||
| 95 | 113 | ||
| 96 | #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) | 114 | #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) |
| 97 | #define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC)) | 115 | #define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC)) |
| 98 | #define EX_RDONLY(exp) ((exp)->ex_flags & NFSEXP_READONLY) | ||
| 99 | #define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE) | 116 | #define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE) |
| 100 | #define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES) | 117 | #define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES) |
| 101 | 118 | ||
| 119 | static inline int EX_RDONLY(struct svc_export *exp, struct svc_rqst *rqstp) | ||
| 120 | { | ||
| 121 | struct exp_flavor_info *f; | ||
| 122 | struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors; | ||
| 123 | |||
| 124 | for (f = exp->ex_flavors; f < end; f++) { | ||
| 125 | if (f->pseudoflavor == rqstp->rq_flavor) | ||
| 126 | return f->flags & NFSEXP_READONLY; | ||
| 127 | } | ||
| 128 | return exp->ex_flags & NFSEXP_READONLY; | ||
| 129 | } | ||
| 130 | |||
| 131 | __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp); | ||
| 102 | 132 | ||
| 103 | /* | 133 | /* |
| 104 | * Function declarations | 134 | * Function declarations |
| @@ -112,13 +142,19 @@ struct svc_export * exp_get_by_name(struct auth_domain *clp, | |||
| 112 | struct vfsmount *mnt, | 142 | struct vfsmount *mnt, |
| 113 | struct dentry *dentry, | 143 | struct dentry *dentry, |
| 114 | struct cache_req *reqp); | 144 | struct cache_req *reqp); |
| 145 | struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, | ||
| 146 | struct vfsmount *, | ||
| 147 | struct dentry *); | ||
| 115 | struct svc_export * exp_parent(struct auth_domain *clp, | 148 | struct svc_export * exp_parent(struct auth_domain *clp, |
| 116 | struct vfsmount *mnt, | 149 | struct vfsmount *mnt, |
| 117 | struct dentry *dentry, | 150 | struct dentry *dentry, |
| 118 | struct cache_req *reqp); | 151 | struct cache_req *reqp); |
| 152 | struct svc_export * rqst_exp_parent(struct svc_rqst *, | ||
| 153 | struct vfsmount *mnt, | ||
| 154 | struct dentry *dentry); | ||
| 119 | int exp_rootfh(struct auth_domain *, | 155 | int exp_rootfh(struct auth_domain *, |
| 120 | char *path, struct knfsd_fh *, int maxsize); | 156 | char *path, struct knfsd_fh *, int maxsize); |
| 121 | __be32 exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); | 157 | __be32 exp_pseudoroot(struct svc_rqst *, struct svc_fh *); |
| 122 | __be32 nfserrno(int errno); | 158 | __be32 nfserrno(int errno); |
| 123 | 159 | ||
| 124 | extern struct cache_detail svc_export_cache; | 160 | extern struct cache_detail svc_export_cache; |
| @@ -135,6 +171,7 @@ static inline void exp_get(struct svc_export *exp) | |||
| 135 | extern struct svc_export * | 171 | extern struct svc_export * |
| 136 | exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, | 172 | exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, |
| 137 | struct cache_req *reqp); | 173 | struct cache_req *reqp); |
| 174 | struct svc_export * rqst_exp_find(struct svc_rqst *, int, u32 *); | ||
| 138 | 175 | ||
| 139 | #endif /* __KERNEL__ */ | 176 | #endif /* __KERNEL__ */ |
| 140 | 177 | ||
diff --git a/include/linux/nfsd/interface.h b/include/linux/nfsd/interface.h deleted file mode 100644 index af0979704afb..000000000000 --- a/include/linux/nfsd/interface.h +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nfsd/interface.h | ||
| 3 | * | ||
| 4 | * defines interface between nfsd and other bits of | ||
| 5 | * the kernel. Particularly filesystems (eventually). | ||
| 6 | * | ||
| 7 | * Copyright (C) 2000 Neil Brown <neilb@cse.unsw.edu.au> | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef LINUX_NFSD_INTERFACE_H | ||
| 11 | #define LINUX_NFSD_INTERFACE_H | ||
| 12 | |||
| 13 | #endif /* LINUX_NFSD_INTERFACE_H */ | ||
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 72feac581aa3..e452256d3f72 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/nfsd/export.h> | 22 | #include <linux/nfsd/export.h> |
| 23 | #include <linux/nfsd/auth.h> | 23 | #include <linux/nfsd/auth.h> |
| 24 | #include <linux/nfsd/stats.h> | 24 | #include <linux/nfsd/stats.h> |
| 25 | #include <linux/nfsd/interface.h> | ||
| 26 | /* | 25 | /* |
| 27 | * nfsd version | 26 | * nfsd version |
| 28 | */ | 27 | */ |
| @@ -72,6 +71,9 @@ int nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, | |||
| 72 | struct svc_export **expp); | 71 | struct svc_export **expp); |
| 73 | __be32 nfsd_lookup(struct svc_rqst *, struct svc_fh *, | 72 | __be32 nfsd_lookup(struct svc_rqst *, struct svc_fh *, |
| 74 | const char *, int, struct svc_fh *); | 73 | const char *, int, struct svc_fh *); |
| 74 | __be32 nfsd_lookup_dentry(struct svc_rqst *, struct svc_fh *, | ||
| 75 | const char *, int, | ||
| 76 | struct svc_export **, struct dentry **); | ||
| 75 | __be32 nfsd_setattr(struct svc_rqst *, struct svc_fh *, | 77 | __be32 nfsd_setattr(struct svc_rqst *, struct svc_fh *, |
| 76 | struct iattr *, int, time_t); | 78 | struct iattr *, int, time_t); |
| 77 | #ifdef CONFIG_NFSD_V4 | 79 | #ifdef CONFIG_NFSD_V4 |
| @@ -120,7 +122,8 @@ __be32 nfsd_statfs(struct svc_rqst *, struct svc_fh *, | |||
| 120 | struct kstatfs *); | 122 | struct kstatfs *); |
| 121 | 123 | ||
| 122 | int nfsd_notify_change(struct inode *, struct iattr *); | 124 | int nfsd_notify_change(struct inode *, struct iattr *); |
| 123 | __be32 nfsd_permission(struct svc_export *, struct dentry *, int); | 125 | __be32 nfsd_permission(struct svc_rqst *, struct svc_export *, |
| 126 | struct dentry *, int); | ||
| 124 | int nfsd_sync_dir(struct dentry *dp); | 127 | int nfsd_sync_dir(struct dentry *dp); |
| 125 | 128 | ||
| 126 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) | 129 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) |
| @@ -149,6 +152,7 @@ extern int nfsd_max_blksize; | |||
| 149 | * NFSv4 State | 152 | * NFSv4 State |
| 150 | */ | 153 | */ |
| 151 | #ifdef CONFIG_NFSD_V4 | 154 | #ifdef CONFIG_NFSD_V4 |
| 155 | extern unsigned int max_delegations; | ||
| 152 | void nfs4_state_init(void); | 156 | void nfs4_state_init(void); |
| 153 | int nfs4_state_start(void); | 157 | int nfs4_state_start(void); |
| 154 | void nfs4_state_shutdown(void); | 158 | void nfs4_state_shutdown(void); |
| @@ -236,6 +240,7 @@ void nfsd_lockd_shutdown(void); | |||
| 236 | #define nfserr_badname __constant_htonl(NFSERR_BADNAME) | 240 | #define nfserr_badname __constant_htonl(NFSERR_BADNAME) |
| 237 | #define nfserr_cb_path_down __constant_htonl(NFSERR_CB_PATH_DOWN) | 241 | #define nfserr_cb_path_down __constant_htonl(NFSERR_CB_PATH_DOWN) |
| 238 | #define nfserr_locked __constant_htonl(NFSERR_LOCKED) | 242 | #define nfserr_locked __constant_htonl(NFSERR_LOCKED) |
| 243 | #define nfserr_wrongsec __constant_htonl(NFSERR_WRONGSEC) | ||
| 239 | #define nfserr_replay_me __constant_htonl(NFSERR_REPLAY_ME) | 244 | #define nfserr_replay_me __constant_htonl(NFSERR_REPLAY_ME) |
| 240 | 245 | ||
| 241 | /* error codes for internal use */ | 246 | /* error codes for internal use */ |
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index ab5c236bd9a7..db348f749376 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
| @@ -67,7 +67,7 @@ struct nfs4_cb_recall { | |||
| 67 | int cbr_trunc; | 67 | int cbr_trunc; |
| 68 | stateid_t cbr_stateid; | 68 | stateid_t cbr_stateid; |
| 69 | u32 cbr_fhlen; | 69 | u32 cbr_fhlen; |
| 70 | u32 cbr_fhval[NFS4_FHSIZE]; | 70 | char cbr_fhval[NFS4_FHSIZE]; |
| 71 | struct nfs4_delegation *cbr_dp; | 71 | struct nfs4_delegation *cbr_dp; |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| @@ -224,6 +224,7 @@ struct nfs4_file { | |||
| 224 | struct inode *fi_inode; | 224 | struct inode *fi_inode; |
| 225 | u32 fi_id; /* used with stateowner->so_id | 225 | u32 fi_id; /* used with stateowner->so_id |
| 226 | * for stateid_hashtbl hash */ | 226 | * for stateid_hashtbl hash */ |
| 227 | bool fi_had_conflict; | ||
| 227 | }; | 228 | }; |
| 228 | 229 | ||
| 229 | /* | 230 | /* |
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 09799bcee0ac..1b653267133a 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
| @@ -293,6 +293,12 @@ struct nfsd4_rename { | |||
| 293 | struct nfsd4_change_info rn_tinfo; /* response */ | 293 | struct nfsd4_change_info rn_tinfo; /* response */ |
| 294 | }; | 294 | }; |
| 295 | 295 | ||
| 296 | struct nfsd4_secinfo { | ||
| 297 | u32 si_namelen; /* request */ | ||
| 298 | char *si_name; /* request */ | ||
| 299 | struct svc_export *si_exp; /* response */ | ||
| 300 | }; | ||
| 301 | |||
| 296 | struct nfsd4_setattr { | 302 | struct nfsd4_setattr { |
| 297 | stateid_t sa_stateid; /* request */ | 303 | stateid_t sa_stateid; /* request */ |
| 298 | u32 sa_bmval[2]; /* request */ | 304 | u32 sa_bmval[2]; /* request */ |
| @@ -365,6 +371,7 @@ struct nfsd4_op { | |||
| 365 | struct nfsd4_remove remove; | 371 | struct nfsd4_remove remove; |
| 366 | struct nfsd4_rename rename; | 372 | struct nfsd4_rename rename; |
| 367 | clientid_t renew; | 373 | clientid_t renew; |
| 374 | struct nfsd4_secinfo secinfo; | ||
| 368 | struct nfsd4_setattr setattr; | 375 | struct nfsd4_setattr setattr; |
| 369 | struct nfsd4_setclientid setclientid; | 376 | struct nfsd4_setclientid setclientid; |
| 370 | struct nfsd4_setclientid_confirm setclientid_confirm; | 377 | struct nfsd4_setclientid_confirm setclientid_confirm; |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 189e0dc993ab..ce06188b7a56 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
| @@ -28,10 +28,11 @@ struct nsproxy { | |||
| 28 | struct ipc_namespace *ipc_ns; | 28 | struct ipc_namespace *ipc_ns; |
| 29 | struct mnt_namespace *mnt_ns; | 29 | struct mnt_namespace *mnt_ns; |
| 30 | struct pid_namespace *pid_ns; | 30 | struct pid_namespace *pid_ns; |
| 31 | struct user_namespace *user_ns; | ||
| 31 | }; | 32 | }; |
| 32 | extern struct nsproxy init_nsproxy; | 33 | extern struct nsproxy init_nsproxy; |
| 33 | 34 | ||
| 34 | int copy_namespaces(int flags, struct task_struct *tsk); | 35 | int copy_namespaces(unsigned long flags, struct task_struct *tsk); |
| 35 | void get_task_namespaces(struct task_struct *tsk); | 36 | void get_task_namespaces(struct task_struct *tsk); |
| 36 | void free_nsproxy(struct nsproxy *ns); | 37 | void free_nsproxy(struct nsproxy *ns); |
| 37 | int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **, | 38 | int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 37a71580ad8a..5e84f2e8d54c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -432,6 +432,8 @@ extern struct bus_type pci_bus_type; | |||
| 432 | * code, or pci core code. */ | 432 | * code, or pci core code. */ |
| 433 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ | 433 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ |
| 434 | extern struct list_head pci_devices; /* list of all devices */ | 434 | extern struct list_head pci_devices; /* list of all devices */ |
| 435 | /* Some device drivers need know if pci is initiated */ | ||
| 436 | extern int no_pci_devices(void); | ||
| 435 | 437 | ||
| 436 | void pcibios_fixup_bus(struct pci_bus *); | 438 | void pcibios_fixup_bus(struct pci_bus *); |
| 437 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); | 439 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); |
| @@ -724,6 +726,7 @@ static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev * | |||
| 724 | { return NULL; } | 726 | { return NULL; } |
| 725 | 727 | ||
| 726 | #define pci_dev_present(ids) (0) | 728 | #define pci_dev_present(ids) (0) |
| 729 | #define no_pci_devices() (1) | ||
| 727 | #define pci_find_present(ids) (NULL) | 730 | #define pci_find_present(ids) (NULL) |
| 728 | #define pci_dev_put(dev) do { } while (0) | 731 | #define pci_dev_put(dev) do { } while (0) |
| 729 | 732 | ||
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index b72be2f79e6a..926adaae0f96 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef __LINUX_PERCPU_H | 1 | #ifndef __LINUX_PERCPU_H |
| 2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
| 3 | 3 | ||
| 4 | #include <linux/spinlock.h> /* For preempt_disable() */ | 4 | #include <linux/preempt.h> |
| 5 | #include <linux/slab.h> /* For kmalloc() */ | 5 | #include <linux/slab.h> /* For kmalloc() */ |
| 6 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
| 7 | #include <linux/string.h> /* For memset() */ | 7 | #include <linux/string.h> /* For memset() */ |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index f5aa593ccf32..3d9f70972cdf 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
| 10 | #include <linux/smp.h> | 10 | #include <linux/smp.h> |
| 11 | #include <linux/list.h> | ||
| 11 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
| 12 | #include <linux/percpu.h> | 13 | #include <linux/percpu.h> |
| 13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| @@ -17,6 +18,9 @@ | |||
| 17 | struct percpu_counter { | 18 | struct percpu_counter { |
| 18 | spinlock_t lock; | 19 | spinlock_t lock; |
| 19 | s64 count; | 20 | s64 count; |
| 21 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 22 | struct list_head list; /* All percpu_counters are on a list */ | ||
| 23 | #endif | ||
| 20 | s32 *counters; | 24 | s32 *counters; |
| 21 | }; | 25 | }; |
| 22 | 26 | ||
| @@ -26,18 +30,8 @@ struct percpu_counter { | |||
| 26 | #define FBC_BATCH (NR_CPUS*4) | 30 | #define FBC_BATCH (NR_CPUS*4) |
| 27 | #endif | 31 | #endif |
| 28 | 32 | ||
| 29 | static inline void percpu_counter_init(struct percpu_counter *fbc, s64 amount) | 33 | void percpu_counter_init(struct percpu_counter *fbc, s64 amount); |
| 30 | { | 34 | void percpu_counter_destroy(struct percpu_counter *fbc); |
| 31 | spin_lock_init(&fbc->lock); | ||
| 32 | fbc->count = amount; | ||
| 33 | fbc->counters = alloc_percpu(s32); | ||
| 34 | } | ||
| 35 | |||
| 36 | static inline void percpu_counter_destroy(struct percpu_counter *fbc) | ||
| 37 | { | ||
| 38 | free_percpu(fbc->counters); | ||
| 39 | } | ||
| 40 | |||
| 41 | void percpu_counter_mod(struct percpu_counter *fbc, s32 amount); | 35 | void percpu_counter_mod(struct percpu_counter *fbc, s32 amount); |
| 42 | s64 percpu_counter_sum(struct percpu_counter *fbc); | 36 | s64 percpu_counter_sum(struct percpu_counter *fbc); |
| 43 | 37 | ||
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 169c6c24209b..b9a17e08ff0f 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
| @@ -29,7 +29,7 @@ static inline void get_pid_ns(struct pid_namespace *ns) | |||
| 29 | kref_get(&ns->kref); | 29 | kref_get(&ns->kref); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | extern struct pid_namespace *copy_pid_ns(int flags, struct pid_namespace *ns); | 32 | extern struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *ns); |
| 33 | extern void free_pid_ns(struct kref *kref); | 33 | extern void free_pid_ns(struct kref *kref); |
| 34 | 34 | ||
| 35 | static inline void put_pid_ns(struct pid_namespace *ns) | 35 | static inline void put_pid_ns(struct pid_namespace *ns) |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 52a9be41250d..e2eff9079fe9 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
| @@ -59,4 +59,8 @@ | |||
| 59 | # define PR_ENDIAN_LITTLE 1 /* True little endian mode */ | 59 | # define PR_ENDIAN_LITTLE 1 /* True little endian mode */ |
| 60 | # define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */ | 60 | # define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */ |
| 61 | 61 | ||
| 62 | /* Get/set process seccomp mode */ | ||
| 63 | #define PR_GET_SECCOMP 21 | ||
| 64 | #define PR_SET_SECCOMP 22 | ||
| 65 | |||
| 62 | #endif /* _LINUX_PRCTL_H */ | 66 | #endif /* _LINUX_PRCTL_H */ |
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h index fc86f274147f..1adfe668d031 100644 --- a/include/linux/prefetch.h +++ b/include/linux/prefetch.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | prefetch(x) - prefetches the cacheline at "x" for read | 28 | prefetch(x) - prefetches the cacheline at "x" for read |
| 29 | prefetchw(x) - prefetches the cacheline at "x" for write | 29 | prefetchw(x) - prefetches the cacheline at "x" for write |
| 30 | spin_lock_prefetch(x) - prefectches the spinlock *x for taking | 30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking |
| 31 | 31 | ||
| 32 | there is also PREFETCH_STRIDE which is the architecure-prefered | 32 | there is also PREFETCH_STRIDE which is the architecure-prefered |
| 33 | "lookahead" size for prefetching streamed operations. | 33 | "lookahead" size for prefetching streamed operations. |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 3469f96bc8b2..28e3664fdf1b 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #include <linux/magic.h> | 7 | #include <linux/magic.h> |
| 8 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
| 9 | 9 | ||
| 10 | struct completion; | ||
| 11 | |||
| 10 | /* | 12 | /* |
| 11 | * The proc filesystem constants/structures | 13 | * The proc filesystem constants/structures |
| 12 | */ | 14 | */ |
| @@ -56,6 +58,14 @@ struct proc_dir_entry { | |||
| 56 | gid_t gid; | 58 | gid_t gid; |
| 57 | loff_t size; | 59 | loff_t size; |
| 58 | const struct inode_operations *proc_iops; | 60 | const struct inode_operations *proc_iops; |
| 61 | /* | ||
| 62 | * NULL ->proc_fops means "PDE is going away RSN" or | ||
| 63 | * "PDE is just created". In either case, e.g. ->read_proc won't be | ||
| 64 | * called because it's too late or too early, respectively. | ||
| 65 | * | ||
| 66 | * If you're allocating ->proc_fops dynamically, save a pointer | ||
| 67 | * somewhere. | ||
| 68 | */ | ||
| 59 | const struct file_operations *proc_fops; | 69 | const struct file_operations *proc_fops; |
| 60 | get_info_t *get_info; | 70 | get_info_t *get_info; |
| 61 | struct module *owner; | 71 | struct module *owner; |
| @@ -66,6 +76,9 @@ struct proc_dir_entry { | |||
| 66 | atomic_t count; /* use count */ | 76 | atomic_t count; /* use count */ |
| 67 | int deleted; /* delete flag */ | 77 | int deleted; /* delete flag */ |
| 68 | void *set; | 78 | void *set; |
| 79 | int pde_users; /* number of callers into module in progress */ | ||
| 80 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ | ||
| 81 | struct completion *pde_unload_completion; | ||
| 69 | }; | 82 | }; |
| 70 | 83 | ||
| 71 | struct kcore_list { | 84 | struct kcore_list { |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index eeb1976ef7bf..ae8146abd746 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
| @@ -110,6 +110,8 @@ static inline void ptrace_unlink(struct task_struct *child) | |||
| 110 | __ptrace_unlink(child); | 110 | __ptrace_unlink(child); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data); | ||
| 114 | int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data); | ||
| 113 | 115 | ||
| 114 | #ifndef force_successful_syscall_return | 116 | #ifndef force_successful_syscall_return |
| 115 | /* | 117 | /* |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index dd5a05d03d4f..75e17a05540e 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
| @@ -262,7 +262,7 @@ int bitmap_active(struct bitmap *bitmap); | |||
| 262 | 262 | ||
| 263 | char *file_path(struct file *file, char *buf, int count); | 263 | char *file_path(struct file *file, char *buf, int count); |
| 264 | void bitmap_print_sb(struct bitmap *bitmap); | 264 | void bitmap_print_sb(struct bitmap *bitmap); |
| 265 | int bitmap_update_sb(struct bitmap *bitmap); | 265 | void bitmap_update_sb(struct bitmap *bitmap); |
| 266 | 266 | ||
| 267 | int bitmap_setallbits(struct bitmap *bitmap); | 267 | int bitmap_setallbits(struct bitmap *bitmap); |
| 268 | void bitmap_write_all(struct bitmap *bitmap); | 268 | void bitmap_write_all(struct bitmap *bitmap); |
| @@ -278,8 +278,8 @@ int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int d | |||
| 278 | void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted); | 278 | void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted); |
| 279 | void bitmap_close_sync(struct bitmap *bitmap); | 279 | void bitmap_close_sync(struct bitmap *bitmap); |
| 280 | 280 | ||
| 281 | int bitmap_unplug(struct bitmap *bitmap); | 281 | void bitmap_unplug(struct bitmap *bitmap); |
| 282 | int bitmap_daemon_work(struct bitmap *bitmap); | 282 | void bitmap_daemon_work(struct bitmap *bitmap); |
| 283 | #endif | 283 | #endif |
| 284 | 284 | ||
| 285 | #endif | 285 | #endif |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index de72c49747c8..28ac632b42dd 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
| @@ -51,7 +51,7 @@ struct mdk_rdev_s | |||
| 51 | 51 | ||
| 52 | sector_t size; /* Device size (in blocks) */ | 52 | sector_t size; /* Device size (in blocks) */ |
| 53 | mddev_t *mddev; /* RAID array if running */ | 53 | mddev_t *mddev; /* RAID array if running */ |
| 54 | unsigned long last_events; /* IO event timestamp */ | 54 | long last_events; /* IO event timestamp */ |
| 55 | 55 | ||
| 56 | struct block_device *bdev; /* block device handle */ | 56 | struct block_device *bdev; /* block device handle */ |
| 57 | 57 | ||
diff --git a/include/linux/rtc/m48t59.h b/include/linux/rtc/m48t59.h new file mode 100644 index 000000000000..e8c7c21ceb1f --- /dev/null +++ b/include/linux/rtc/m48t59.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/rtc/m48t59.h | ||
| 3 | * | ||
| 4 | * Definitions for the platform data of m48t59 RTC chip driver. | ||
| 5 | * | ||
| 6 | * Copyright (c) 2007 Wind River Systems, Inc. | ||
| 7 | * | ||
| 8 | * Mark Zhan <rongkai.zhan@windriver.com> | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License version 2 as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef _LINUX_RTC_M48T59_H_ | ||
| 16 | #define _LINUX_RTC_M48T59_H_ | ||
| 17 | |||
| 18 | /* | ||
| 19 | * M48T59 Register Offset | ||
| 20 | */ | ||
| 21 | #define M48T59_YEAR 0x1fff | ||
| 22 | #define M48T59_MONTH 0x1ffe | ||
| 23 | #define M48T59_MDAY 0x1ffd /* Day of Month */ | ||
| 24 | #define M48T59_WDAY 0x1ffc /* Day of Week */ | ||
| 25 | #define M48T59_WDAY_CB 0x20 /* Century Bit */ | ||
| 26 | #define M48T59_WDAY_CEB 0x10 /* Century Enable Bit */ | ||
| 27 | #define M48T59_HOUR 0x1ffb | ||
| 28 | #define M48T59_MIN 0x1ffa | ||
| 29 | #define M48T59_SEC 0x1ff9 | ||
| 30 | #define M48T59_CNTL 0x1ff8 | ||
| 31 | #define M48T59_CNTL_READ 0x40 | ||
| 32 | #define M48T59_CNTL_WRITE 0x80 | ||
| 33 | #define M48T59_WATCHDOG 0x1ff7 | ||
| 34 | #define M48T59_INTR 0x1ff6 | ||
| 35 | #define M48T59_INTR_AFE 0x80 /* Alarm Interrupt Enable */ | ||
| 36 | #define M48T59_INTR_ABE 0x20 | ||
| 37 | #define M48T59_ALARM_DATE 0x1ff5 | ||
| 38 | #define M48T59_ALARM_HOUR 0x1ff4 | ||
| 39 | #define M48T59_ALARM_MIN 0x1ff3 | ||
| 40 | #define M48T59_ALARM_SEC 0x1ff2 | ||
| 41 | #define M48T59_UNUSED 0x1ff1 | ||
| 42 | #define M48T59_FLAGS 0x1ff0 | ||
| 43 | #define M48T59_FLAGS_WDT 0x80 /* watchdog timer expired */ | ||
| 44 | #define M48T59_FLAGS_AF 0x40 /* alarm */ | ||
| 45 | #define M48T59_FLAGS_BF 0x10 /* low battery */ | ||
| 46 | |||
| 47 | #define M48T59_NVRAM_SIZE 0x1ff0 | ||
| 48 | |||
| 49 | struct m48t59_plat_data { | ||
| 50 | /* The method to access M48T59 registers, | ||
| 51 | * NOTE: The 'ofs' should be 0x00~0x1fff | ||
| 52 | */ | ||
| 53 | void (*write_byte)(struct device *dev, u32 ofs, u8 val); | ||
| 54 | unsigned char (*read_byte)(struct device *dev, u32 ofs); | ||
| 55 | }; | ||
| 56 | |||
| 57 | #endif /* _LINUX_RTC_M48T59_H_ */ | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index cfb680585ab8..731edaca8ffd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ | 26 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ |
| 27 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ | 27 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ |
| 28 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ | 28 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ |
| 29 | #define CLONE_NEWUSER 0x10000000 /* New user namespace */ | ||
| 29 | 30 | ||
| 30 | /* | 31 | /* |
| 31 | * Scheduling policies | 32 | * Scheduling policies |
| @@ -287,6 +288,7 @@ extern signed long schedule_timeout_uninterruptible(signed long timeout); | |||
| 287 | asmlinkage void schedule(void); | 288 | asmlinkage void schedule(void); |
| 288 | 289 | ||
| 289 | struct nsproxy; | 290 | struct nsproxy; |
| 291 | struct user_namespace; | ||
| 290 | 292 | ||
| 291 | /* Maximum number of active map areas.. This is a random (large) number */ | 293 | /* Maximum number of active map areas.. This is a random (large) number */ |
| 292 | #define DEFAULT_MAX_MAP_COUNT 65536 | 294 | #define DEFAULT_MAX_MAP_COUNT 65536 |
| @@ -529,6 +531,10 @@ struct signal_struct { | |||
| 529 | #ifdef CONFIG_TASKSTATS | 531 | #ifdef CONFIG_TASKSTATS |
| 530 | struct taskstats *stats; | 532 | struct taskstats *stats; |
| 531 | #endif | 533 | #endif |
| 534 | #ifdef CONFIG_AUDIT | ||
| 535 | unsigned audit_tty; | ||
| 536 | struct tty_audit_buf *tty_audit_buf; | ||
| 537 | #endif | ||
| 532 | }; | 538 | }; |
| 533 | 539 | ||
| 534 | /* Context switch must be unlocked if interrupts are to be enabled */ | 540 | /* Context switch must be unlocked if interrupts are to be enabled */ |
| @@ -972,7 +978,8 @@ struct task_struct { | |||
| 972 | unsigned int rt_priority; | 978 | unsigned int rt_priority; |
| 973 | cputime_t utime, stime; | 979 | cputime_t utime, stime; |
| 974 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 980 | unsigned long nvcsw, nivcsw; /* context switch counts */ |
| 975 | struct timespec start_time; | 981 | struct timespec start_time; /* monotonic time */ |
| 982 | struct timespec real_start_time; /* boot based time */ | ||
| 976 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ | 983 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ |
| 977 | unsigned long min_flt, maj_flt; | 984 | unsigned long min_flt, maj_flt; |
| 978 | 985 | ||
| @@ -1403,7 +1410,7 @@ extern struct task_struct *find_task_by_pid_type(int type, int pid); | |||
| 1403 | extern void __set_special_pids(pid_t session, pid_t pgrp); | 1410 | extern void __set_special_pids(pid_t session, pid_t pgrp); |
| 1404 | 1411 | ||
| 1405 | /* per-UID process charging. */ | 1412 | /* per-UID process charging. */ |
| 1406 | extern struct user_struct * alloc_uid(uid_t); | 1413 | extern struct user_struct * alloc_uid(struct user_namespace *, uid_t); |
| 1407 | static inline struct user_struct *get_uid(struct user_struct *u) | 1414 | static inline struct user_struct *get_uid(struct user_struct *u) |
| 1408 | { | 1415 | { |
| 1409 | atomic_inc(&u->__count); | 1416 | atomic_inc(&u->__count); |
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 1a82d30c4b17..d2b058130eb1 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | #include <linux/spinlock.h> | ||
| 2 | |||
| 3 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); | 1 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); |
| 4 | 2 | ||
| 5 | extern unsigned scx200_gpio_base; | 3 | extern unsigned scx200_gpio_base; |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 3e8b1cf54303..262a8dccfa81 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
| @@ -4,8 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #ifdef CONFIG_SECCOMP | 5 | #ifdef CONFIG_SECCOMP |
| 6 | 6 | ||
| 7 | #define NR_SECCOMP_MODES 1 | ||
| 8 | |||
| 9 | #include <linux/thread_info.h> | 7 | #include <linux/thread_info.h> |
| 10 | #include <asm/seccomp.h> | 8 | #include <asm/seccomp.h> |
| 11 | 9 | ||
| @@ -18,20 +16,23 @@ static inline void secure_computing(int this_syscall) | |||
| 18 | __secure_computing(this_syscall); | 16 | __secure_computing(this_syscall); |
| 19 | } | 17 | } |
| 20 | 18 | ||
| 21 | static inline int has_secure_computing(struct thread_info *ti) | 19 | extern long prctl_get_seccomp(void); |
| 22 | { | 20 | extern long prctl_set_seccomp(unsigned long); |
| 23 | return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP)); | ||
| 24 | } | ||
| 25 | 21 | ||
| 26 | #else /* CONFIG_SECCOMP */ | 22 | #else /* CONFIG_SECCOMP */ |
| 27 | 23 | ||
| 28 | typedef struct { } seccomp_t; | 24 | typedef struct { } seccomp_t; |
| 29 | 25 | ||
| 30 | #define secure_computing(x) do { } while (0) | 26 | #define secure_computing(x) do { } while (0) |
| 31 | /* static inline to preserve typechecking */ | 27 | |
| 32 | static inline int has_secure_computing(struct thread_info *ti) | 28 | static inline long prctl_get_seccomp(void) |
| 29 | { | ||
| 30 | return -EINVAL; | ||
| 31 | } | ||
| 32 | |||
| 33 | static inline long prctl_set_seccomp(unsigned long arg2) | ||
| 33 | { | 34 | { |
| 34 | return 0; | 35 | return -EINVAL; |
| 35 | } | 36 | } |
| 36 | 37 | ||
| 37 | #endif /* CONFIG_SECCOMP */ | 38 | #endif /* CONFIG_SECCOMP */ |
diff --git a/include/linux/serial.h b/include/linux/serial.h index 33fc8cb8ddfb..deb714314fb1 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
| @@ -177,11 +177,5 @@ struct serial_icounter_struct { | |||
| 177 | #ifdef __KERNEL__ | 177 | #ifdef __KERNEL__ |
| 178 | #include <linux/compiler.h> | 178 | #include <linux/compiler.h> |
| 179 | 179 | ||
| 180 | /* Allow architectures to override entries in serial8250_ports[] at run time: */ | ||
| 181 | struct uart_port; /* forward declaration */ | ||
| 182 | extern int early_serial_setup(struct uart_port *port); | ||
| 183 | extern int early_serial_console_init(char *options); | ||
| 184 | extern int serial8250_start_console(struct uart_port *port, char *options); | ||
| 185 | |||
| 186 | #endif /* __KERNEL__ */ | 180 | #endif /* __KERNEL__ */ |
| 187 | #endif /* _LINUX_SERIAL_H */ | 181 | #endif /* _LINUX_SERIAL_H */ |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 71310d80c09a..706ee9a4c80c 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
| @@ -60,4 +60,8 @@ void serial8250_unregister_port(int line); | |||
| 60 | void serial8250_suspend_port(int line); | 60 | void serial8250_suspend_port(int line); |
| 61 | void serial8250_resume_port(int line); | 61 | void serial8250_resume_port(int line); |
| 62 | 62 | ||
| 63 | extern int serial8250_find_port(struct uart_port *p); | ||
| 64 | extern int serial8250_find_port_for_earlycon(void); | ||
| 65 | extern int setup_early_serial8250_console(char *cmdline); | ||
| 66 | |||
| 63 | #endif | 67 | #endif |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 7f2c99d66e9d..9c721cd2c9d6 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -142,6 +142,9 @@ | |||
| 142 | /* Micrel KS8695 */ | 142 | /* Micrel KS8695 */ |
| 143 | #define PORT_KS8695 76 | 143 | #define PORT_KS8695 76 |
| 144 | 144 | ||
| 145 | /* Broadcom SB1250, etc. SOC */ | ||
| 146 | #define PORT_SB1250_DUART 77 | ||
| 147 | |||
| 145 | 148 | ||
| 146 | #ifdef __KERNEL__ | 149 | #ifdef __KERNEL__ |
| 147 | 150 | ||
diff --git a/include/linux/signal.h b/include/linux/signal.h index 9a5eac508e5e..ea91abe740da 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
| 9 | #include <linux/spinlock.h> | ||
| 10 | 9 | ||
| 11 | /* | 10 | /* |
| 12 | * Real Time signals may be queued. | 11 | * Real Time signals may be queued. |
diff --git a/include/linux/slab.h b/include/linux/slab.h index cebcd3833c76..0e1d0daef6a2 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -14,8 +14,6 @@ | |||
| 14 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
| 15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 16 | 16 | ||
| 17 | typedef struct kmem_cache kmem_cache_t __deprecated; | ||
| 18 | |||
| 19 | /* | 17 | /* |
| 20 | * Flags to pass to kmem_cache_create(). | 18 | * Flags to pass to kmem_cache_create(). |
| 21 | * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set. | 19 | * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set. |
| @@ -33,6 +31,19 @@ typedef struct kmem_cache kmem_cache_t __deprecated; | |||
| 33 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ | 31 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ |
| 34 | 32 | ||
| 35 | /* | 33 | /* |
| 34 | * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests. | ||
| 35 | * | ||
| 36 | * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault. | ||
| 37 | * | ||
| 38 | * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can. | ||
| 39 | * Both make kfree a no-op. | ||
| 40 | */ | ||
| 41 | #define ZERO_SIZE_PTR ((void *)16) | ||
| 42 | |||
| 43 | #define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) < \ | ||
| 44 | (unsigned long)ZERO_SIZE_PTR) | ||
| 45 | |||
| 46 | /* | ||
| 36 | * struct kmem_cache related prototypes | 47 | * struct kmem_cache related prototypes |
| 37 | */ | 48 | */ |
| 38 | void __init kmem_cache_init(void); | 49 | void __init kmem_cache_init(void); |
| @@ -44,8 +55,6 @@ struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | |||
| 44 | void (*)(void *, struct kmem_cache *, unsigned long)); | 55 | void (*)(void *, struct kmem_cache *, unsigned long)); |
| 45 | void kmem_cache_destroy(struct kmem_cache *); | 56 | void kmem_cache_destroy(struct kmem_cache *); |
| 46 | int kmem_cache_shrink(struct kmem_cache *); | 57 | int kmem_cache_shrink(struct kmem_cache *); |
| 47 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
| 48 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); | ||
| 49 | void kmem_cache_free(struct kmem_cache *, void *); | 58 | void kmem_cache_free(struct kmem_cache *, void *); |
| 50 | unsigned int kmem_cache_size(struct kmem_cache *); | 59 | unsigned int kmem_cache_size(struct kmem_cache *); |
| 51 | const char *kmem_cache_name(struct kmem_cache *); | 60 | const char *kmem_cache_name(struct kmem_cache *); |
| @@ -63,16 +72,6 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | |||
| 63 | sizeof(struct __struct), __alignof__(struct __struct),\ | 72 | sizeof(struct __struct), __alignof__(struct __struct),\ |
| 64 | (__flags), NULL, NULL) | 73 | (__flags), NULL, NULL) |
| 65 | 74 | ||
| 66 | #ifdef CONFIG_NUMA | ||
| 67 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
| 68 | #else | ||
| 69 | static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | ||
| 70 | gfp_t flags, int node) | ||
| 71 | { | ||
| 72 | return kmem_cache_alloc(cachep, flags); | ||
| 73 | } | ||
| 74 | #endif | ||
| 75 | |||
| 76 | /* | 75 | /* |
| 77 | * The largest kmalloc size supported by the slab allocators is | 76 | * The largest kmalloc size supported by the slab allocators is |
| 78 | * 32 megabyte (2^25) or the maximum allocatable page order if that is | 77 | * 32 megabyte (2^25) or the maximum allocatable page order if that is |
| @@ -91,59 +90,50 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | |||
| 91 | /* | 90 | /* |
| 92 | * Common kmalloc functions provided by all allocators | 91 | * Common kmalloc functions provided by all allocators |
| 93 | */ | 92 | */ |
| 94 | void *__kmalloc(size_t, gfp_t); | ||
| 95 | void *__kzalloc(size_t, gfp_t); | ||
| 96 | void * __must_check krealloc(const void *, size_t, gfp_t); | 93 | void * __must_check krealloc(const void *, size_t, gfp_t); |
| 97 | void kfree(const void *); | 94 | void kfree(const void *); |
| 98 | size_t ksize(const void *); | 95 | size_t ksize(const void *); |
| 99 | 96 | ||
| 100 | /** | ||
| 101 | * kcalloc - allocate memory for an array. The memory is set to zero. | ||
| 102 | * @n: number of elements. | ||
| 103 | * @size: element size. | ||
| 104 | * @flags: the type of memory to allocate. | ||
| 105 | */ | ||
| 106 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | ||
| 107 | { | ||
| 108 | if (n != 0 && size > ULONG_MAX / n) | ||
| 109 | return NULL; | ||
| 110 | return __kzalloc(n * size, flags); | ||
| 111 | } | ||
| 112 | |||
| 113 | /* | 97 | /* |
| 114 | * Allocator specific definitions. These are mainly used to establish optimized | 98 | * Allocator specific definitions. These are mainly used to establish optimized |
| 115 | * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by selecting | 99 | * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by |
| 116 | * the appropriate general cache at compile time. | 100 | * selecting the appropriate general cache at compile time. |
| 101 | * | ||
| 102 | * Allocators must define at least: | ||
| 103 | * | ||
| 104 | * kmem_cache_alloc() | ||
| 105 | * __kmalloc() | ||
| 106 | * kmalloc() | ||
| 107 | * | ||
| 108 | * Those wishing to support NUMA must also define: | ||
| 109 | * | ||
| 110 | * kmem_cache_alloc_node() | ||
| 111 | * kmalloc_node() | ||
| 112 | * | ||
| 113 | * See each allocator definition file for additional comments and | ||
| 114 | * implementation notes. | ||
| 117 | */ | 115 | */ |
| 118 | |||
| 119 | #if defined(CONFIG_SLAB) || defined(CONFIG_SLUB) | ||
| 120 | #ifdef CONFIG_SLUB | 116 | #ifdef CONFIG_SLUB |
| 121 | #include <linux/slub_def.h> | 117 | #include <linux/slub_def.h> |
| 118 | #elif defined(CONFIG_SLOB) | ||
| 119 | #include <linux/slob_def.h> | ||
| 122 | #else | 120 | #else |
| 123 | #include <linux/slab_def.h> | 121 | #include <linux/slab_def.h> |
| 124 | #endif /* !CONFIG_SLUB */ | 122 | #endif |
| 125 | #else | ||
| 126 | |||
| 127 | /* | ||
| 128 | * Fallback definitions for an allocator not wanting to provide | ||
| 129 | * its own optimized kmalloc definitions (like SLOB). | ||
| 130 | */ | ||
| 131 | 123 | ||
| 132 | /** | 124 | /** |
| 133 | * kmalloc - allocate memory | 125 | * kcalloc - allocate memory for an array. The memory is set to zero. |
| 134 | * @size: how many bytes of memory are required. | 126 | * @n: number of elements. |
| 127 | * @size: element size. | ||
| 135 | * @flags: the type of memory to allocate. | 128 | * @flags: the type of memory to allocate. |
| 136 | * | 129 | * |
| 137 | * kmalloc is the normal method of allocating memory | ||
| 138 | * in the kernel. | ||
| 139 | * | ||
| 140 | * The @flags argument may be one of: | 130 | * The @flags argument may be one of: |
| 141 | * | 131 | * |
| 142 | * %GFP_USER - Allocate memory on behalf of user. May sleep. | 132 | * %GFP_USER - Allocate memory on behalf of user. May sleep. |
| 143 | * | 133 | * |
| 144 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. | 134 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. |
| 145 | * | 135 | * |
| 146 | * %GFP_ATOMIC - Allocation will not sleep. | 136 | * %GFP_ATOMIC - Allocation will not sleep. May use emergency pools. |
| 147 | * For example, use this inside interrupt handlers. | 137 | * For example, use this inside interrupt handlers. |
| 148 | * | 138 | * |
| 149 | * %GFP_HIGHUSER - Allocate pages from high memory. | 139 | * %GFP_HIGHUSER - Allocate pages from high memory. |
| @@ -152,18 +142,22 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
| 152 | * | 142 | * |
| 153 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. | 143 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. |
| 154 | * | 144 | * |
| 145 | * %GFP_NOWAIT - Allocation will not sleep. | ||
| 146 | * | ||
| 147 | * %GFP_THISNODE - Allocate node-local memory only. | ||
| 148 | * | ||
| 149 | * %GFP_DMA - Allocation suitable for DMA. | ||
| 150 | * Should only be used for kmalloc() caches. Otherwise, use a | ||
| 151 | * slab created with SLAB_DMA. | ||
| 152 | * | ||
| 155 | * Also it is possible to set different flags by OR'ing | 153 | * Also it is possible to set different flags by OR'ing |
| 156 | * in one or more of the following additional @flags: | 154 | * in one or more of the following additional @flags: |
| 157 | * | 155 | * |
| 158 | * %__GFP_COLD - Request cache-cold pages instead of | 156 | * %__GFP_COLD - Request cache-cold pages instead of |
| 159 | * trying to return cache-warm pages. | 157 | * trying to return cache-warm pages. |
| 160 | * | 158 | * |
| 161 | * %__GFP_DMA - Request memory from the DMA-capable zone. | ||
| 162 | * | ||
| 163 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. | 159 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. |
| 164 | * | 160 | * |
| 165 | * %__GFP_HIGHMEM - Allocated memory may be from highmem. | ||
| 166 | * | ||
| 167 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail | 161 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail |
| 168 | * (think twice before using). | 162 | * (think twice before using). |
| 169 | * | 163 | * |
| @@ -173,24 +167,29 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
| 173 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. | 167 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. |
| 174 | * | 168 | * |
| 175 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. | 169 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. |
| 170 | * | ||
| 171 | * There are other flags available as well, but these are not intended | ||
| 172 | * for general use, and so are not documented here. For a full list of | ||
| 173 | * potential flags, always refer to linux/gfp.h. | ||
| 176 | */ | 174 | */ |
| 177 | static inline void *kmalloc(size_t size, gfp_t flags) | 175 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) |
| 178 | { | 176 | { |
| 179 | return __kmalloc(size, flags); | 177 | if (n != 0 && size > ULONG_MAX / n) |
| 178 | return NULL; | ||
| 179 | return __kmalloc(n * size, flags | __GFP_ZERO); | ||
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | #if !defined(CONFIG_NUMA) && !defined(CONFIG_SLOB) | ||
| 182 | /** | 183 | /** |
| 183 | * kzalloc - allocate memory. The memory is set to zero. | 184 | * kmalloc_node - allocate memory from a specific node |
| 184 | * @size: how many bytes of memory are required. | 185 | * @size: how many bytes of memory are required. |
| 185 | * @flags: the type of memory to allocate (see kmalloc). | 186 | * @flags: the type of memory to allocate (see kcalloc). |
| 187 | * @node: node to allocate from. | ||
| 188 | * | ||
| 189 | * kmalloc() for non-local nodes, used to allocate from a specific node | ||
| 190 | * if available. Equivalent to kmalloc() in the non-NUMA single-node | ||
| 191 | * case. | ||
| 186 | */ | 192 | */ |
| 187 | static inline void *kzalloc(size_t size, gfp_t flags) | ||
| 188 | { | ||
| 189 | return __kzalloc(size, flags); | ||
| 190 | } | ||
| 191 | #endif | ||
| 192 | |||
| 193 | #ifndef CONFIG_NUMA | ||
| 194 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 193 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
| 195 | { | 194 | { |
| 196 | return kmalloc(size, flags); | 195 | return kmalloc(size, flags); |
| @@ -200,7 +199,15 @@ static inline void *__kmalloc_node(size_t size, gfp_t flags, int node) | |||
| 200 | { | 199 | { |
| 201 | return __kmalloc(size, flags); | 200 | return __kmalloc(size, flags); |
| 202 | } | 201 | } |
| 203 | #endif /* !CONFIG_NUMA */ | 202 | |
| 203 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
| 204 | |||
| 205 | static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | ||
| 206 | gfp_t flags, int node) | ||
| 207 | { | ||
| 208 | return kmem_cache_alloc(cachep, flags); | ||
| 209 | } | ||
| 210 | #endif /* !CONFIG_NUMA && !CONFIG_SLOB */ | ||
| 204 | 211 | ||
| 205 | /* | 212 | /* |
| 206 | * kmalloc_track_caller is a special version of kmalloc that records the | 213 | * kmalloc_track_caller is a special version of kmalloc that records the |
| @@ -245,6 +252,23 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); | |||
| 245 | 252 | ||
| 246 | #endif /* DEBUG_SLAB */ | 253 | #endif /* DEBUG_SLAB */ |
| 247 | 254 | ||
| 255 | /* | ||
| 256 | * Shortcuts | ||
| 257 | */ | ||
| 258 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) | ||
| 259 | { | ||
| 260 | return kmem_cache_alloc(k, flags | __GFP_ZERO); | ||
| 261 | } | ||
| 262 | |||
| 263 | /** | ||
| 264 | * kzalloc - allocate memory. The memory is set to zero. | ||
| 265 | * @size: how many bytes of memory are required. | ||
| 266 | * @flags: the type of memory to allocate (see kmalloc). | ||
| 267 | */ | ||
| 268 | static inline void *kzalloc(size_t size, gfp_t flags) | ||
| 269 | { | ||
| 270 | return kmalloc(size, flags | __GFP_ZERO); | ||
| 271 | } | ||
| 272 | |||
| 248 | #endif /* __KERNEL__ */ | 273 | #endif /* __KERNEL__ */ |
| 249 | #endif /* _LINUX_SLAB_H */ | 274 | #endif /* _LINUX_SLAB_H */ |
| 250 | |||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 8d81a60518e4..32bdc2ffd715 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
| @@ -25,10 +25,17 @@ struct cache_sizes { | |||
| 25 | }; | 25 | }; |
| 26 | extern struct cache_sizes malloc_sizes[]; | 26 | extern struct cache_sizes malloc_sizes[]; |
| 27 | 27 | ||
| 28 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
| 29 | void *__kmalloc(size_t size, gfp_t flags); | ||
| 30 | |||
| 28 | static inline void *kmalloc(size_t size, gfp_t flags) | 31 | static inline void *kmalloc(size_t size, gfp_t flags) |
| 29 | { | 32 | { |
| 30 | if (__builtin_constant_p(size)) { | 33 | if (__builtin_constant_p(size)) { |
| 31 | int i = 0; | 34 | int i = 0; |
| 35 | |||
| 36 | if (!size) | ||
| 37 | return ZERO_SIZE_PTR; | ||
| 38 | |||
| 32 | #define CACHE(x) \ | 39 | #define CACHE(x) \ |
| 33 | if (size <= x) \ | 40 | if (size <= x) \ |
| 34 | goto found; \ | 41 | goto found; \ |
| @@ -51,39 +58,18 @@ found: | |||
| 51 | return __kmalloc(size, flags); | 58 | return __kmalloc(size, flags); |
| 52 | } | 59 | } |
| 53 | 60 | ||
| 54 | static inline void *kzalloc(size_t size, gfp_t flags) | ||
| 55 | { | ||
| 56 | if (__builtin_constant_p(size)) { | ||
| 57 | int i = 0; | ||
| 58 | #define CACHE(x) \ | ||
| 59 | if (size <= x) \ | ||
| 60 | goto found; \ | ||
| 61 | else \ | ||
| 62 | i++; | ||
| 63 | #include "kmalloc_sizes.h" | ||
| 64 | #undef CACHE | ||
| 65 | { | ||
| 66 | extern void __you_cannot_kzalloc_that_much(void); | ||
| 67 | __you_cannot_kzalloc_that_much(); | ||
| 68 | } | ||
| 69 | found: | ||
| 70 | #ifdef CONFIG_ZONE_DMA | ||
| 71 | if (flags & GFP_DMA) | ||
| 72 | return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep, | ||
| 73 | flags); | ||
| 74 | #endif | ||
| 75 | return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags); | ||
| 76 | } | ||
| 77 | return __kzalloc(size, flags); | ||
| 78 | } | ||
| 79 | |||
| 80 | #ifdef CONFIG_NUMA | 61 | #ifdef CONFIG_NUMA |
| 81 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | 62 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); |
| 63 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
| 82 | 64 | ||
| 83 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 65 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
| 84 | { | 66 | { |
| 85 | if (__builtin_constant_p(size)) { | 67 | if (__builtin_constant_p(size)) { |
| 86 | int i = 0; | 68 | int i = 0; |
| 69 | |||
| 70 | if (!size) | ||
| 71 | return ZERO_SIZE_PTR; | ||
| 72 | |||
| 87 | #define CACHE(x) \ | 73 | #define CACHE(x) \ |
| 88 | if (size <= x) \ | 74 | if (size <= x) \ |
| 89 | goto found; \ | 75 | goto found; \ |
diff --git a/include/linux/slob_def.h b/include/linux/slob_def.h new file mode 100644 index 000000000000..a2daf2d418a9 --- /dev/null +++ b/include/linux/slob_def.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | #ifndef __LINUX_SLOB_DEF_H | ||
| 2 | #define __LINUX_SLOB_DEF_H | ||
| 3 | |||
| 4 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
| 5 | |||
| 6 | static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) | ||
| 7 | { | ||
| 8 | return kmem_cache_alloc_node(cachep, flags, -1); | ||
| 9 | } | ||
| 10 | |||
| 11 | void *__kmalloc_node(size_t size, gfp_t flags, int node); | ||
| 12 | |||
| 13 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | ||
| 14 | { | ||
| 15 | return __kmalloc_node(size, flags, node); | ||
| 16 | } | ||
| 17 | |||
| 18 | /** | ||
| 19 | * kmalloc - allocate memory | ||
| 20 | * @size: how many bytes of memory are required. | ||
| 21 | * @flags: the type of memory to allocate (see kcalloc). | ||
| 22 | * | ||
| 23 | * kmalloc is the normal method of allocating memory | ||
| 24 | * in the kernel. | ||
| 25 | */ | ||
| 26 | static inline void *kmalloc(size_t size, gfp_t flags) | ||
| 27 | { | ||
| 28 | return __kmalloc_node(size, flags, -1); | ||
| 29 | } | ||
| 30 | |||
| 31 | static inline void *__kmalloc(size_t size, gfp_t flags) | ||
| 32 | { | ||
| 33 | return kmalloc(size, flags); | ||
| 34 | } | ||
| 35 | |||
| 36 | /** | ||
| 37 | * kzalloc - allocate memory. The memory is set to zero. | ||
| 38 | * @size: how many bytes of memory are required. | ||
| 39 | * @flags: the type of memory to allocate (see kcalloc). | ||
| 40 | */ | ||
| 41 | static inline void *kzalloc(size_t size, gfp_t flags) | ||
| 42 | { | ||
| 43 | return __kzalloc(size, flags); | ||
| 44 | } | ||
| 45 | |||
| 46 | #endif /* __LINUX_SLOB_DEF_H */ | ||
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 6207a3d8da71..07f7e4cbcee3 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -16,7 +16,9 @@ struct kmem_cache_node { | |||
| 16 | unsigned long nr_partial; | 16 | unsigned long nr_partial; |
| 17 | atomic_long_t nr_slabs; | 17 | atomic_long_t nr_slabs; |
| 18 | struct list_head partial; | 18 | struct list_head partial; |
| 19 | #ifdef CONFIG_SLUB_DEBUG | ||
| 19 | struct list_head full; | 20 | struct list_head full; |
| 21 | #endif | ||
| 20 | }; | 22 | }; |
| 21 | 23 | ||
| 22 | /* | 24 | /* |
| @@ -44,7 +46,9 @@ struct kmem_cache { | |||
| 44 | int align; /* Alignment */ | 46 | int align; /* Alignment */ |
| 45 | const char *name; /* Name (only for display!) */ | 47 | const char *name; /* Name (only for display!) */ |
| 46 | struct list_head list; /* List of slab caches */ | 48 | struct list_head list; /* List of slab caches */ |
| 49 | #ifdef CONFIG_SLUB_DEBUG | ||
| 47 | struct kobject kobj; /* For sysfs */ | 50 | struct kobject kobj; /* For sysfs */ |
| 51 | #endif | ||
| 48 | 52 | ||
| 49 | #ifdef CONFIG_NUMA | 53 | #ifdef CONFIG_NUMA |
| 50 | int defrag_ratio; | 54 | int defrag_ratio; |
| @@ -159,17 +163,8 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
| 159 | #define SLUB_DMA 0 | 163 | #define SLUB_DMA 0 |
| 160 | #endif | 164 | #endif |
| 161 | 165 | ||
| 162 | 166 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | |
| 163 | /* | 167 | void *__kmalloc(size_t size, gfp_t flags); |
| 164 | * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests. | ||
| 165 | * | ||
| 166 | * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault. | ||
| 167 | * | ||
| 168 | * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can. | ||
| 169 | * Both make kfree a no-op. | ||
| 170 | */ | ||
| 171 | #define ZERO_SIZE_PTR ((void *)16) | ||
| 172 | |||
| 173 | 168 | ||
| 174 | static inline void *kmalloc(size_t size, gfp_t flags) | 169 | static inline void *kmalloc(size_t size, gfp_t flags) |
| 175 | { | 170 | { |
| @@ -184,21 +179,9 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
| 184 | return __kmalloc(size, flags); | 179 | return __kmalloc(size, flags); |
| 185 | } | 180 | } |
| 186 | 181 | ||
| 187 | static inline void *kzalloc(size_t size, gfp_t flags) | ||
| 188 | { | ||
| 189 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | ||
| 190 | struct kmem_cache *s = kmalloc_slab(size); | ||
| 191 | |||
| 192 | if (!s) | ||
| 193 | return ZERO_SIZE_PTR; | ||
| 194 | |||
| 195 | return kmem_cache_zalloc(s, flags); | ||
| 196 | } else | ||
| 197 | return __kzalloc(size, flags); | ||
| 198 | } | ||
| 199 | |||
| 200 | #ifdef CONFIG_NUMA | 182 | #ifdef CONFIG_NUMA |
| 201 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | 183 | void *__kmalloc_node(size_t size, gfp_t flags, int node); |
| 184 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
| 202 | 185 | ||
| 203 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 186 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
| 204 | { | 187 | { |
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index cf715a40d833..58962c51dee1 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #ifdef CONFIG_LOCK_KERNEL | 4 | #ifdef CONFIG_LOCK_KERNEL |
| 5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
| 6 | #include <linux/spinlock.h> | ||
| 7 | 6 | ||
| 8 | #define kernel_locked() (current->lock_depth >= 0) | 7 | #define kernel_locked() (current->lock_depth >= 0) |
| 9 | 8 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index fe195c97a89d..f852e1afd65a 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -253,6 +253,9 @@ struct ucred { | |||
| 253 | 253 | ||
| 254 | #define MSG_EOF MSG_FIN | 254 | #define MSG_EOF MSG_FIN |
| 255 | 255 | ||
| 256 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file | ||
| 257 | descriptor received through | ||
| 258 | SCM_RIGHTS */ | ||
| 256 | #if defined(CONFIG_COMPAT) | 259 | #if defined(CONFIG_COMPAT) |
| 257 | #define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */ | 260 | #define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */ |
| 258 | #else | 261 | #else |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 34d4b075f7b8..40c7b5d993b9 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
| @@ -153,8 +153,6 @@ | |||
| 153 | #define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ | 153 | #define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ |
| 154 | #define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */ | 154 | #define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */ |
| 155 | 155 | ||
| 156 | int sonypi_camera_command(int command, u8 value); | ||
| 157 | |||
| 158 | #endif /* __KERNEL__ */ | 156 | #endif /* __KERNEL__ */ |
| 159 | 157 | ||
| 160 | #endif /* _SONYPI_H_ */ | 158 | #endif /* _SONYPI_H_ */ |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 1be5ea059477..302b81d1d117 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -76,6 +76,7 @@ struct spi_device { | |||
| 76 | #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) | 76 | #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) |
| 77 | #define SPI_CS_HIGH 0x04 /* chipselect active high? */ | 77 | #define SPI_CS_HIGH 0x04 /* chipselect active high? */ |
| 78 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ | 78 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ |
| 79 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ | ||
| 79 | u8 bits_per_word; | 80 | u8 bits_per_word; |
| 80 | int irq; | 81 | int irq; |
| 81 | void *controller_state; | 82 | void *controller_state; |
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index 9dbca629dcfb..b8db32cea1de 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
| @@ -26,6 +26,7 @@ struct spi_bitbang { | |||
| 26 | struct list_head queue; | 26 | struct list_head queue; |
| 27 | u8 busy; | 27 | u8 busy; |
| 28 | u8 use_dma; | 28 | u8 use_dma; |
| 29 | u8 flags; /* extra spi->mode support */ | ||
| 29 | 30 | ||
| 30 | struct spi_master *master; | 31 | struct spi_master *master; |
| 31 | 32 | ||
diff --git a/include/linux/spi/tle62x0.h b/include/linux/spi/tle62x0.h new file mode 100644 index 000000000000..60b59187e590 --- /dev/null +++ b/include/linux/spi/tle62x0.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * tle62x0.h - platform glue to Infineon TLE62x0 driver chips | ||
| 3 | * | ||
| 4 | * Copyright 2007 Simtec Electronics | ||
| 5 | * Ben Dooks <ben@simtec.co.uk> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | struct tle62x0_pdata { | ||
| 22 | unsigned int init_state; | ||
| 23 | unsigned int gpio_count; | ||
| 24 | }; | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index a946176db638..c376f3b36c89 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -282,6 +282,13 @@ do { \ | |||
| 282 | 1 : ({ local_irq_restore(flags); 0; }); \ | 282 | 1 : ({ local_irq_restore(flags); 0; }); \ |
| 283 | }) | 283 | }) |
| 284 | 284 | ||
| 285 | #define write_trylock_irqsave(lock, flags) \ | ||
| 286 | ({ \ | ||
| 287 | local_irq_save(flags); \ | ||
| 288 | write_trylock(lock) ? \ | ||
| 289 | 1 : ({ local_irq_restore(flags); 0; }); \ | ||
| 290 | }) | ||
| 291 | |||
| 285 | /* | 292 | /* |
| 286 | * Locks two spinlocks l1 and l2. | 293 | * Locks two spinlocks l1 and l2. |
| 287 | * l1_first indicates if spinlock l1 should be taken first. | 294 | * l1_first indicates if spinlock l1 should be taken first. |
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index bbac101ac372..459c5fc11d51 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
| @@ -58,6 +58,7 @@ u32 gss_unwrap( | |||
| 58 | u32 gss_delete_sec_context( | 58 | u32 gss_delete_sec_context( |
| 59 | struct gss_ctx **ctx_id); | 59 | struct gss_ctx **ctx_id); |
| 60 | 60 | ||
| 61 | u32 gss_svc_to_pseudoflavor(struct gss_api_mech *, u32 service); | ||
| 61 | u32 gss_pseudoflavor_to_service(struct gss_api_mech *, u32 pseudoflavor); | 62 | u32 gss_pseudoflavor_to_service(struct gss_api_mech *, u32 pseudoflavor); |
| 62 | char *gss_service_to_auth_domain_name(struct gss_api_mech *, u32 service); | 63 | char *gss_service_to_auth_domain_name(struct gss_api_mech *, u32 service); |
| 63 | 64 | ||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 129d50f2225c..8531a70da73d 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -212,6 +212,7 @@ struct svc_rqst { | |||
| 212 | struct svc_pool * rq_pool; /* thread pool */ | 212 | struct svc_pool * rq_pool; /* thread pool */ |
| 213 | struct svc_procedure * rq_procinfo; /* procedure info */ | 213 | struct svc_procedure * rq_procinfo; /* procedure info */ |
| 214 | struct auth_ops * rq_authop; /* authentication flavour */ | 214 | struct auth_ops * rq_authop; /* authentication flavour */ |
| 215 | u32 rq_flavor; /* pseudoflavor */ | ||
| 215 | struct svc_cred rq_cred; /* auth info */ | 216 | struct svc_cred rq_cred; /* auth info */ |
| 216 | struct sk_buff * rq_skbuff; /* fast recv inet buffer */ | 217 | struct sk_buff * rq_skbuff; /* fast recv inet buffer */ |
| 217 | struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ | 218 | struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ |
| @@ -248,6 +249,7 @@ struct svc_rqst { | |||
| 248 | */ | 249 | */ |
| 249 | /* Catering to nfsd */ | 250 | /* Catering to nfsd */ |
| 250 | struct auth_domain * rq_client; /* RPC peer info */ | 251 | struct auth_domain * rq_client; /* RPC peer info */ |
| 252 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ | ||
| 251 | struct svc_cacherep * rq_cacherep; /* cache info */ | 253 | struct svc_cacherep * rq_cacherep; /* cache info */ |
| 252 | struct knfsd_fh * rq_reffh; /* Referrence filehandle, used to | 254 | struct knfsd_fh * rq_reffh; /* Referrence filehandle, used to |
| 253 | * determine what device number | 255 | * determine what device number |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index de92619b0826..22e1ef8e200e 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
| @@ -127,6 +127,7 @@ extern struct auth_domain *auth_unix_lookup(struct in_addr addr); | |||
| 127 | extern int auth_unix_forget_old(struct auth_domain *dom); | 127 | extern int auth_unix_forget_old(struct auth_domain *dom); |
| 128 | extern void svcauth_unix_purge(void); | 128 | extern void svcauth_unix_purge(void); |
| 129 | extern void svcauth_unix_info_release(void *); | 129 | extern void svcauth_unix_info_release(void *); |
| 130 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | ||
| 130 | 131 | ||
| 131 | static inline unsigned long hash_str(char *name, int bits) | 132 | static inline unsigned long hash_str(char *name, int bits) |
| 132 | { | 133 | { |
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h index 5a5db16ab660..417a1def56db 100644 --- a/include/linux/sunrpc/svcauth_gss.h +++ b/include/linux/sunrpc/svcauth_gss.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | int gss_svc_init(void); | 22 | int gss_svc_init(void); |
| 23 | void gss_svc_shutdown(void); | 23 | void gss_svc_shutdown(void); |
| 24 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); | 24 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); |
| 25 | u32 svcauth_gss_flavor(struct auth_domain *dom); | ||
| 25 | 26 | ||
| 26 | #endif /* __KERNEL__ */ | 27 | #endif /* __KERNEL__ */ |
| 27 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ | 28 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 006868881346..665f85f2a3af 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -188,7 +188,8 @@ extern int rotate_reclaimable_page(struct page *page); | |||
| 188 | extern void swap_setup(void); | 188 | extern void swap_setup(void); |
| 189 | 189 | ||
| 190 | /* linux/mm/vmscan.c */ | 190 | /* linux/mm/vmscan.c */ |
| 191 | extern unsigned long try_to_free_pages(struct zone **, gfp_t); | 191 | extern unsigned long try_to_free_pages(struct zone **zones, int order, |
| 192 | gfp_t gfp_mask); | ||
| 192 | extern unsigned long shrink_all_memory(unsigned long nr_pages); | 193 | extern unsigned long shrink_all_memory(unsigned long nr_pages); |
| 193 | extern int vm_swappiness; | 194 | extern int vm_swappiness; |
| 194 | extern int remove_mapping(struct address_space *mapping, struct page *page); | 195 | extern int remove_mapping(struct address_space *mapping, struct page *page); |
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index a46104a28f66..dce1ed204972 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | #define TASKSTATS_VERSION 4 | 34 | #define TASKSTATS_VERSION 5 |
| 35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN | 35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
| 36 | * in linux/sched.h */ | 36 | * in linux/sched.h */ |
| 37 | 37 | ||
| @@ -149,6 +149,9 @@ struct taskstats { | |||
| 149 | __u64 read_bytes; /* bytes of read I/O */ | 149 | __u64 read_bytes; /* bytes of read I/O */ |
| 150 | __u64 write_bytes; /* bytes of write I/O */ | 150 | __u64 write_bytes; /* bytes of write I/O */ |
| 151 | __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */ | 151 | __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */ |
| 152 | |||
| 153 | __u64 nvcsw; /* voluntary_ctxt_switches */ | ||
| 154 | __u64 nivcsw; /* nonvoluntary_ctxt_switches */ | ||
| 152 | }; | 155 | }; |
| 153 | 156 | ||
| 154 | 157 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index dda9be685ab6..ec3b0ced0afe 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -36,7 +36,8 @@ struct timezone { | |||
| 36 | #define NSEC_PER_SEC 1000000000L | 36 | #define NSEC_PER_SEC 1000000000L |
| 37 | #define FSEC_PER_SEC 1000000000000000L | 37 | #define FSEC_PER_SEC 1000000000000000L |
| 38 | 38 | ||
| 39 | static inline int timespec_equal(struct timespec *a, struct timespec *b) | 39 | static inline int timespec_equal(const struct timespec *a, |
| 40 | const struct timespec *b) | ||
| 40 | { | 41 | { |
| 41 | return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); | 42 | return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); |
| 42 | } | 43 | } |
| @@ -116,6 +117,8 @@ extern int do_setitimer(int which, struct itimerval *value, | |||
| 116 | extern unsigned int alarm_setitimer(unsigned int seconds); | 117 | extern unsigned int alarm_setitimer(unsigned int seconds); |
| 117 | extern int do_getitimer(int which, struct itimerval *value); | 118 | extern int do_getitimer(int which, struct itimerval *value); |
| 118 | extern void getnstimeofday(struct timespec *tv); | 119 | extern void getnstimeofday(struct timespec *tv); |
| 120 | extern void getboottime(struct timespec *ts); | ||
| 121 | extern void monotonic_to_bootbased(struct timespec *ts); | ||
| 119 | 122 | ||
| 120 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 123 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
| 121 | extern int timekeeping_is_continuous(void); | 124 | extern int timekeeping_is_continuous(void); |
diff --git a/include/linux/timer.h b/include/linux/timer.h index c661710d3627..78cf899b4409 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
| 5 | #include <linux/ktime.h> | 5 | #include <linux/ktime.h> |
| 6 | #include <linux/spinlock.h> | ||
| 7 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
| 8 | 7 | ||
| 9 | struct tvec_t_base_s; | 8 | struct tvec_t_base_s; |
| @@ -91,16 +90,13 @@ extern unsigned long get_next_timer_interrupt(unsigned long now); | |||
| 91 | */ | 90 | */ |
| 92 | #ifdef CONFIG_TIMER_STATS | 91 | #ifdef CONFIG_TIMER_STATS |
| 93 | 92 | ||
| 93 | #define TIMER_STATS_FLAG_DEFERRABLE 0x1 | ||
| 94 | |||
| 94 | extern void init_timer_stats(void); | 95 | extern void init_timer_stats(void); |
| 95 | 96 | ||
| 96 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | 97 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, |
| 97 | void *timerf, char * comm); | 98 | void *timerf, char *comm, |
| 98 | 99 | unsigned int timer_flag); | |
| 99 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
| 100 | { | ||
| 101 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
| 102 | timer->function, timer->start_comm); | ||
| 103 | } | ||
| 104 | 100 | ||
| 105 | extern void __timer_stats_timer_set_start_info(struct timer_list *timer, | 101 | extern void __timer_stats_timer_set_start_info(struct timer_list *timer, |
| 106 | void *addr); | 102 | void *addr); |
| @@ -119,10 +115,6 @@ static inline void init_timer_stats(void) | |||
| 119 | { | 115 | { |
| 120 | } | 116 | } |
| 121 | 117 | ||
| 122 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
| 123 | { | ||
| 124 | } | ||
| 125 | |||
| 126 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | 118 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) |
| 127 | { | 119 | { |
| 128 | } | 120 | } |
diff --git a/include/linux/tty.h b/include/linux/tty.h index bb4576085203..691a1748d9d2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -178,6 +178,7 @@ struct tty_bufhead { | |||
| 178 | #define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) | 178 | #define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) |
| 179 | 179 | ||
| 180 | struct device; | 180 | struct device; |
| 181 | struct signal_struct; | ||
| 181 | /* | 182 | /* |
| 182 | * Where all of the state associated with a tty is kept while the tty | 183 | * Where all of the state associated with a tty is kept while the tty |
| 183 | * is open. Since the termios state should be kept even if the tty | 184 | * is open. Since the termios state should be kept even if the tty |
| @@ -310,6 +311,7 @@ extern void tty_hangup(struct tty_struct * tty); | |||
| 310 | extern void tty_vhangup(struct tty_struct * tty); | 311 | extern void tty_vhangup(struct tty_struct * tty); |
| 311 | extern void tty_unhangup(struct file *filp); | 312 | extern void tty_unhangup(struct file *filp); |
| 312 | extern int tty_hung_up_p(struct file * filp); | 313 | extern int tty_hung_up_p(struct file * filp); |
| 314 | extern int is_tty(struct file *filp); | ||
| 313 | extern void do_SAK(struct tty_struct *tty); | 315 | extern void do_SAK(struct tty_struct *tty); |
| 314 | extern void __do_SAK(struct tty_struct *tty); | 316 | extern void __do_SAK(struct tty_struct *tty); |
| 315 | extern void disassociate_ctty(int priv); | 317 | extern void disassociate_ctty(int priv); |
| @@ -338,9 +340,46 @@ extern struct tty_struct *get_current_tty(void); | |||
| 338 | 340 | ||
| 339 | extern struct mutex tty_mutex; | 341 | extern struct mutex tty_mutex; |
| 340 | 342 | ||
| 343 | extern void tty_write_unlock(struct tty_struct *tty); | ||
| 344 | extern int tty_write_lock(struct tty_struct *tty, int ndelay); | ||
| 345 | #define tty_is_writelocked(tty) (mutex_is_locked(&tty->atomic_write_lock)) | ||
| 346 | |||
| 347 | |||
| 348 | |||
| 341 | /* n_tty.c */ | 349 | /* n_tty.c */ |
| 342 | extern struct tty_ldisc tty_ldisc_N_TTY; | 350 | extern struct tty_ldisc tty_ldisc_N_TTY; |
| 343 | 351 | ||
| 352 | /* tty_audit.c */ | ||
| 353 | #ifdef CONFIG_AUDIT | ||
| 354 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, | ||
| 355 | size_t size); | ||
| 356 | extern void tty_audit_exit(void); | ||
| 357 | extern void tty_audit_fork(struct signal_struct *sig); | ||
| 358 | extern void tty_audit_push(struct tty_struct *tty); | ||
| 359 | extern void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid); | ||
| 360 | extern void tty_audit_opening(void); | ||
| 361 | #else | ||
| 362 | static inline void tty_audit_add_data(struct tty_struct *tty, | ||
| 363 | unsigned char *data, size_t size) | ||
| 364 | { | ||
| 365 | } | ||
| 366 | static inline void tty_audit_exit(void) | ||
| 367 | { | ||
| 368 | } | ||
| 369 | static inline void tty_audit_fork(struct signal_struct *sig) | ||
| 370 | { | ||
| 371 | } | ||
| 372 | static inline void tty_audit_push(struct tty_struct *tty) | ||
| 373 | { | ||
| 374 | } | ||
| 375 | static inline void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid) | ||
| 376 | { | ||
| 377 | } | ||
| 378 | static inline void tty_audit_opening(void) | ||
| 379 | { | ||
| 380 | } | ||
| 381 | #endif | ||
| 382 | |||
| 344 | /* tty_ioctl.c */ | 383 | /* tty_ioctl.c */ |
| 345 | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, | 384 | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, |
| 346 | unsigned int cmd, unsigned long arg); | 385 | unsigned int cmd, unsigned long arg); |
diff --git a/include/linux/uio.h b/include/linux/uio.h index 9af8bbcd8963..b7fe13883bdb 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
| @@ -13,10 +13,6 @@ | |||
| 13 | * 2 of the License, or (at your option) any later version. | 13 | * 2 of the License, or (at your option) any later version. |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | |||
| 17 | /* A word of warning: Our uio structure will clash with the C library one (which is now obsolete). Remove the C | ||
| 18 | library one from sys/uio.h if you have a very old library set */ | ||
| 19 | |||
| 20 | struct iovec | 16 | struct iovec |
| 21 | { | 17 | { |
| 22 | void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ | 18 | void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ |
| @@ -38,11 +34,6 @@ struct kvec { | |||
| 38 | 34 | ||
| 39 | #define UIO_FASTIOV 8 | 35 | #define UIO_FASTIOV 8 |
| 40 | #define UIO_MAXIOV 1024 | 36 | #define UIO_MAXIOV 1024 |
| 41 | #if 0 | ||
| 42 | #define UIO_MAXIOV 16 /* Maximum iovec's in one operation | ||
| 43 | 16 matches BSD */ | ||
| 44 | /* Beg pardon: BSD has 1024 --ANK */ | ||
| 45 | #endif | ||
| 46 | 37 | ||
| 47 | /* | 38 | /* |
| 48 | * Total number of bytes covered by an iovec. | 39 | * Total number of bytes covered by an iovec. |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h new file mode 100644 index 000000000000..bb320573bb9e --- /dev/null +++ b/include/linux/user_namespace.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | #ifndef _LINUX_USER_NAMESPACE_H | ||
| 2 | #define _LINUX_USER_NAMESPACE_H | ||
| 3 | |||
| 4 | #include <linux/kref.h> | ||
| 5 | #include <linux/nsproxy.h> | ||
| 6 | #include <linux/sched.h> | ||
| 7 | #include <linux/err.h> | ||
| 8 | |||
| 9 | #define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) | ||
| 10 | #define UIDHASH_SZ (1 << UIDHASH_BITS) | ||
| 11 | |||
| 12 | struct user_namespace { | ||
| 13 | struct kref kref; | ||
| 14 | struct list_head uidhash_table[UIDHASH_SZ]; | ||
| 15 | struct user_struct *root_user; | ||
| 16 | }; | ||
| 17 | |||
| 18 | extern struct user_namespace init_user_ns; | ||
| 19 | |||
| 20 | #ifdef CONFIG_USER_NS | ||
| 21 | |||
| 22 | static inline struct user_namespace *get_user_ns(struct user_namespace *ns) | ||
| 23 | { | ||
| 24 | if (ns) | ||
| 25 | kref_get(&ns->kref); | ||
| 26 | return ns; | ||
| 27 | } | ||
| 28 | |||
| 29 | extern struct user_namespace *copy_user_ns(int flags, | ||
| 30 | struct user_namespace *old_ns); | ||
| 31 | extern void free_user_ns(struct kref *kref); | ||
| 32 | |||
| 33 | static inline void put_user_ns(struct user_namespace *ns) | ||
| 34 | { | ||
| 35 | if (ns) | ||
| 36 | kref_put(&ns->kref, free_user_ns); | ||
| 37 | } | ||
| 38 | |||
| 39 | #else | ||
| 40 | |||
| 41 | static inline struct user_namespace *get_user_ns(struct user_namespace *ns) | ||
| 42 | { | ||
| 43 | return &init_user_ns; | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline struct user_namespace *copy_user_ns(int flags, | ||
| 47 | struct user_namespace *old_ns) | ||
| 48 | { | ||
| 49 | if (flags & CLONE_NEWUSER) | ||
| 50 | return ERR_PTR(-EINVAL); | ||
| 51 | |||
| 52 | return NULL; | ||
| 53 | } | ||
| 54 | |||
| 55 | static inline void put_user_ns(struct user_namespace *ns) | ||
| 56 | { | ||
| 57 | } | ||
| 58 | |||
| 59 | #endif | ||
| 60 | |||
| 61 | #endif /* _LINUX_USER_H */ | ||
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index f8d3b326e93a..923db99175f2 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
| @@ -48,26 +48,14 @@ static inline void get_uts_ns(struct uts_namespace *ns) | |||
| 48 | kref_get(&ns->kref); | 48 | kref_get(&ns->kref); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | #ifdef CONFIG_UTS_NS | 51 | extern struct uts_namespace *copy_utsname(unsigned long flags, |
| 52 | extern struct uts_namespace *copy_utsname(int flags, struct uts_namespace *ns); | 52 | struct uts_namespace *ns); |
| 53 | extern void free_uts_ns(struct kref *kref); | 53 | extern void free_uts_ns(struct kref *kref); |
| 54 | 54 | ||
| 55 | static inline void put_uts_ns(struct uts_namespace *ns) | 55 | static inline void put_uts_ns(struct uts_namespace *ns) |
| 56 | { | 56 | { |
| 57 | kref_put(&ns->kref, free_uts_ns); | 57 | kref_put(&ns->kref, free_uts_ns); |
| 58 | } | 58 | } |
| 59 | #else | ||
| 60 | static inline struct uts_namespace *copy_utsname(int flags, | ||
| 61 | struct uts_namespace *ns) | ||
| 62 | { | ||
| 63 | return ns; | ||
| 64 | } | ||
| 65 | |||
| 66 | static inline void put_uts_ns(struct uts_namespace *ns) | ||
| 67 | { | ||
| 68 | } | ||
| 69 | #endif | ||
| 70 | |||
| 71 | static inline struct new_utsname *utsname(void) | 59 | static inline struct new_utsname *utsname(void) |
| 72 | { | 60 | { |
| 73 | return ¤t->nsproxy->uts_ns->name; | 61 | return ¤t->nsproxy->uts_ns->name; |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4b7ee83787c1..132b260aef1e 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
| @@ -65,9 +65,10 @@ extern struct vm_struct *get_vm_area_node(unsigned long size, | |||
| 65 | unsigned long flags, int node, | 65 | unsigned long flags, int node, |
| 66 | gfp_t gfp_mask); | 66 | gfp_t gfp_mask); |
| 67 | extern struct vm_struct *remove_vm_area(void *addr); | 67 | extern struct vm_struct *remove_vm_area(void *addr); |
| 68 | |||
| 68 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 69 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
| 69 | struct page ***pages); | 70 | struct page ***pages); |
| 70 | extern void unmap_vm_area(struct vm_struct *area); | 71 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); |
| 71 | 72 | ||
| 72 | /* | 73 | /* |
| 73 | * Internals. Dont't use.. | 74 | * Internals. Dont't use.. |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index d9325cf8a134..75370ec0923e 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #define HIGHMEM_ZONE(xx) | 25 | #define HIGHMEM_ZONE(xx) |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) | 28 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) , xx##_MOVABLE |
| 29 | 29 | ||
| 30 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | 30 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, |
| 31 | FOR_ALL_ZONES(PGALLOC), | 31 | FOR_ALL_ZONES(PGALLOC), |
| @@ -170,7 +170,8 @@ static inline unsigned long node_page_state(int node, | |||
| 170 | #ifdef CONFIG_HIGHMEM | 170 | #ifdef CONFIG_HIGHMEM |
| 171 | zone_page_state(&zones[ZONE_HIGHMEM], item) + | 171 | zone_page_state(&zones[ZONE_HIGHMEM], item) + |
| 172 | #endif | 172 | #endif |
| 173 | zone_page_state(&zones[ZONE_NORMAL], item); | 173 | zone_page_state(&zones[ZONE_NORMAL], item) + |
| 174 | zone_page_state(&zones[ZONE_MOVABLE], item); | ||
| 174 | } | 175 | } |
| 175 | 176 | ||
| 176 | extern void zone_statistics(struct zonelist *, struct zone *); | 177 | extern void zone_statistics(struct zonelist *, struct zone *); |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index d961635d0e61..699b7e9864fa 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
| @@ -75,6 +75,8 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | |||
| 75 | int vt_waitactive(int vt); | 75 | int vt_waitactive(int vt); |
| 76 | void change_console(struct vc_data *new_vc); | 76 | void change_console(struct vc_data *new_vc); |
| 77 | void reset_vc(struct vc_data *vc); | 77 | void reset_vc(struct vc_data *vc); |
| 78 | extern int unbind_con_driver(const struct consw *csw, int first, int last, | ||
| 79 | int deflt); | ||
| 78 | 80 | ||
| 79 | /* | 81 | /* |
| 80 | * vc_screen.c shares this temporary buffer with the console write code so that | 82 | * vc_screen.c shares this temporary buffer with the console write code so that |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index ce0719a2cfeb..ce6badc98f6d 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -148,7 +148,7 @@ extern int keventd_up(void); | |||
| 148 | extern void init_workqueues(void); | 148 | extern void init_workqueues(void); |
| 149 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 149 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
| 150 | 150 | ||
| 151 | extern void cancel_work_sync(struct work_struct *work); | 151 | extern int cancel_work_sync(struct work_struct *work); |
| 152 | 152 | ||
| 153 | /* | 153 | /* |
| 154 | * Kill off a pending schedule_delayed_work(). Note that the work callback | 154 | * Kill off a pending schedule_delayed_work(). Note that the work callback |
| @@ -166,14 +166,21 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
| 166 | return ret; | 166 | return ret; |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | extern void cancel_rearming_delayed_work(struct delayed_work *work); | 169 | extern int cancel_delayed_work_sync(struct delayed_work *work); |
| 170 | 170 | ||
| 171 | /* Obsolete. use cancel_rearming_delayed_work() */ | 171 | /* Obsolete. use cancel_delayed_work_sync() */ |
| 172 | static inline | 172 | static inline |
| 173 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | 173 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, |
| 174 | struct delayed_work *work) | 174 | struct delayed_work *work) |
| 175 | { | 175 | { |
| 176 | cancel_rearming_delayed_work(work); | 176 | cancel_delayed_work_sync(work); |
| 177 | } | ||
| 178 | |||
| 179 | /* Obsolete. use cancel_delayed_work_sync() */ | ||
| 180 | static inline | ||
| 181 | void cancel_rearming_delayed_work(struct delayed_work *work) | ||
| 182 | { | ||
| 183 | cancel_delayed_work_sync(work); | ||
| 177 | } | 184 | } |
| 178 | 185 | ||
| 179 | #endif | 186 | #endif |
