diff options
Diffstat (limited to 'include/linux')
34 files changed, 172 insertions, 106 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index bcd01f269f60..e1013156c25e 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -239,6 +239,7 @@ unifdef-y += ipc.h | |||
239 | unifdef-y += ipmi.h | 239 | unifdef-y += ipmi.h |
240 | unifdef-y += ipv6.h | 240 | unifdef-y += ipv6.h |
241 | unifdef-y += ipv6_route.h | 241 | unifdef-y += ipv6_route.h |
242 | unifdef-y += ip6_tunnel.h | ||
242 | unifdef-y += isdn.h | 243 | unifdef-y += isdn.h |
243 | unifdef-y += isdnif.h | 244 | unifdef-y += isdnif.h |
244 | unifdef-y += isdn_divertif.h | 245 | unifdef-y += isdn_divertif.h |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 2d956cd566ae..e1a708337be3 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -17,6 +17,8 @@ struct pt_regs; | |||
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | 19 | ||
20 | #define CORENAME_MAX_SIZE 128 | ||
21 | |||
20 | /* | 22 | /* |
21 | * This structure is used to hold the arguments that are used when loading binaries. | 23 | * This structure is used to hold the arguments that are used when loading binaries. |
22 | */ | 24 | */ |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 6548b35ab9f6..bbf8df7de28f 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | 18 | ||
19 | struct task_struct; | ||
20 | |||
19 | /* User-level do most of the mapping between kernel and user | 21 | /* User-level do most of the mapping between kernel and user |
20 | capabilities based on the version tag given by the kernel. The | 22 | capabilities based on the version tag given by the kernel. The |
21 | kernel might be somewhat backwards compatible, but don't bet on | 23 | kernel might be somewhat backwards compatible, but don't bet on |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 498c35920762..8287a72bb6a9 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -36,9 +36,7 @@ extern void __chk_io_ptr(const void __iomem *); | |||
36 | 36 | ||
37 | #ifdef __KERNEL__ | 37 | #ifdef __KERNEL__ |
38 | 38 | ||
39 | #if __GNUC__ > 4 | 39 | #if __GNUC__ >= 4 |
40 | #error no compiler-gcc.h file for this gcc version | ||
41 | #elif __GNUC__ == 4 | ||
42 | # include <linux/compiler-gcc4.h> | 40 | # include <linux/compiler-gcc4.h> |
43 | #elif __GNUC__ == 3 && __GNUC_MINOR__ >= 2 | 41 | #elif __GNUC__ == 3 && __GNUC_MINOR__ >= 2 |
44 | # include <linux/compiler-gcc3.h> | 42 | # include <linux/compiler-gcc3.h> |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 5e75e26d4787..4631086f5060 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -37,25 +37,25 @@ static inline void do_not_freeze(struct task_struct *p) | |||
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Wake up a frozen process | 39 | * Wake up a frozen process |
40 | * | ||
41 | * task_lock() is taken to prevent the race with refrigerator() which may | ||
42 | * occur if the freezing of tasks fails. Namely, without the lock, if the | ||
43 | * freezing of tasks failed, thaw_tasks() might have run before a task in | ||
44 | * refrigerator() could call frozen_process(), in which case the task would be | ||
45 | * frozen and no one would thaw it. | ||
40 | */ | 46 | */ |
41 | static inline int thaw_process(struct task_struct *p) | 47 | static inline int thaw_process(struct task_struct *p) |
42 | { | 48 | { |
49 | task_lock(p); | ||
43 | if (frozen(p)) { | 50 | if (frozen(p)) { |
44 | p->flags &= ~PF_FROZEN; | 51 | p->flags &= ~PF_FROZEN; |
52 | task_unlock(p); | ||
45 | wake_up_process(p); | 53 | wake_up_process(p); |
46 | return 1; | 54 | return 1; |
47 | } | 55 | } |
48 | return 0; | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * freezing is complete, mark process as frozen | ||
53 | */ | ||
54 | static inline void frozen_process(struct task_struct *p) | ||
55 | { | ||
56 | p->flags |= PF_FROZEN; | ||
57 | wmb(); | ||
58 | clear_tsk_thread_flag(p, TIF_FREEZE); | 56 | clear_tsk_thread_flag(p, TIF_FREEZE); |
57 | task_unlock(p); | ||
58 | return 0; | ||
59 | } | 59 | } |
60 | 60 | ||
61 | extern void refrigerator(void); | 61 | extern void refrigerator(void); |
@@ -71,14 +71,55 @@ static inline int try_to_freeze(void) | |||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | extern void thaw_some_processes(int all); | 74 | /* |
75 | * The PF_FREEZER_SKIP flag should be set by a vfork parent right before it | ||
76 | * calls wait_for_completion(&vfork) and reset right after it returns from this | ||
77 | * function. Next, the parent should call try_to_freeze() to freeze itself | ||
78 | * appropriately in case the child has exited before the freezing of tasks is | ||
79 | * complete. However, we don't want kernel threads to be frozen in unexpected | ||
80 | * places, so we allow them to block freeze_processes() instead or to set | ||
81 | * PF_NOFREEZE if needed and PF_FREEZER_SKIP is only set for userland vfork | ||
82 | * parents. Fortunately, in the ____call_usermodehelper() case the parent won't | ||
83 | * really block freeze_processes(), since ____call_usermodehelper() (the child) | ||
84 | * does a little before exec/exit and it can't be frozen before waking up the | ||
85 | * parent. | ||
86 | */ | ||
87 | |||
88 | /* | ||
89 | * If the current task is a user space one, tell the freezer not to count it as | ||
90 | * freezable. | ||
91 | */ | ||
92 | static inline void freezer_do_not_count(void) | ||
93 | { | ||
94 | if (current->mm) | ||
95 | current->flags |= PF_FREEZER_SKIP; | ||
96 | } | ||
97 | |||
98 | /* | ||
99 | * If the current task is a user space one, tell the freezer to count it as | ||
100 | * freezable again and try to freeze it. | ||
101 | */ | ||
102 | static inline void freezer_count(void) | ||
103 | { | ||
104 | if (current->mm) { | ||
105 | current->flags &= ~PF_FREEZER_SKIP; | ||
106 | try_to_freeze(); | ||
107 | } | ||
108 | } | ||
109 | |||
110 | /* | ||
111 | * Check if the task should be counted as freezeable by the freezer | ||
112 | */ | ||
113 | static inline int freezer_should_skip(struct task_struct *p) | ||
114 | { | ||
115 | return !!(p->flags & PF_FREEZER_SKIP); | ||
116 | } | ||
75 | 117 | ||
76 | #else | 118 | #else |
77 | static inline int frozen(struct task_struct *p) { return 0; } | 119 | static inline int frozen(struct task_struct *p) { return 0; } |
78 | static inline int freezing(struct task_struct *p) { return 0; } | 120 | static inline int freezing(struct task_struct *p) { return 0; } |
79 | static inline void freeze(struct task_struct *p) { BUG(); } | 121 | static inline void freeze(struct task_struct *p) { BUG(); } |
80 | static inline int thaw_process(struct task_struct *p) { return 1; } | 122 | static inline int thaw_process(struct task_struct *p) { return 1; } |
81 | static inline void frozen_process(struct task_struct *p) { BUG(); } | ||
82 | 123 | ||
83 | static inline void refrigerator(void) {} | 124 | static inline void refrigerator(void) {} |
84 | static inline int freeze_processes(void) { BUG(); return 0; } | 125 | static inline int freeze_processes(void) { BUG(); return 0; } |
@@ -86,5 +127,7 @@ static inline void thaw_processes(void) {} | |||
86 | 127 | ||
87 | static inline int try_to_freeze(void) { return 0; } | 128 | static inline int try_to_freeze(void) { return 0; } |
88 | 129 | ||
89 | 130 | static inline void freezer_do_not_count(void) {} | |
131 | static inline void freezer_count(void) {} | ||
132 | static inline int freezer_should_skip(struct task_struct *p) { return 0; } | ||
90 | #endif | 133 | #endif |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 4c03ee353e78..9756fc102a83 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -66,6 +66,7 @@ struct partition { | |||
66 | #include <linux/smp.h> | 66 | #include <linux/smp.h> |
67 | #include <linux/string.h> | 67 | #include <linux/string.h> |
68 | #include <linux/fs.h> | 68 | #include <linux/fs.h> |
69 | #include <linux/workqueue.h> | ||
69 | 70 | ||
70 | struct partition { | 71 | struct partition { |
71 | unsigned char boot_ind; /* 0x80 - active */ | 72 | unsigned char boot_ind; /* 0x80 - active */ |
@@ -94,6 +95,7 @@ struct hd_struct { | |||
94 | 95 | ||
95 | #define GENHD_FL_REMOVABLE 1 | 96 | #define GENHD_FL_REMOVABLE 1 |
96 | #define GENHD_FL_DRIVERFS 2 | 97 | #define GENHD_FL_DRIVERFS 2 |
98 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 | ||
97 | #define GENHD_FL_CD 8 | 99 | #define GENHD_FL_CD 8 |
98 | #define GENHD_FL_UP 16 | 100 | #define GENHD_FL_UP 16 |
99 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 101 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
@@ -138,6 +140,7 @@ struct gendisk { | |||
138 | #else | 140 | #else |
139 | struct disk_stats dkstats; | 141 | struct disk_stats dkstats; |
140 | #endif | 142 | #endif |
143 | struct work_struct async_notify; | ||
141 | }; | 144 | }; |
142 | 145 | ||
143 | /* Structure for sysfs attributes on block devices */ | 146 | /* Structure for sysfs attributes on block devices */ |
@@ -419,7 +422,7 @@ extern struct gendisk *alloc_disk_node(int minors, int node_id); | |||
419 | extern struct gendisk *alloc_disk(int minors); | 422 | extern struct gendisk *alloc_disk(int minors); |
420 | extern struct kobject *get_disk(struct gendisk *disk); | 423 | extern struct kobject *get_disk(struct gendisk *disk); |
421 | extern void put_disk(struct gendisk *disk); | 424 | extern void put_disk(struct gendisk *disk); |
422 | 425 | extern void genhd_media_change_notify(struct gendisk *disk); | |
423 | extern void blk_register_region(dev_t dev, unsigned long range, | 426 | extern void blk_register_region(dev_t dev, unsigned long range, |
424 | struct module *module, | 427 | struct module *module, |
425 | struct kobject *(*probe)(dev_t, int *, void *), | 428 | struct kobject *(*probe)(dev_t, int *, void *), |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 1db774cf9dc2..3213f6f4aa58 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ | 33 | #define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ |
34 | #define ETH_DATA_LEN 1500 /* Max. octets in payload */ | 34 | #define ETH_DATA_LEN 1500 /* Max. octets in payload */ |
35 | #define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ | 35 | #define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ |
36 | #define ETH_FCS_LEN 4 /* Octets in the FCS */ | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * These are the defined Ethernet Protocol ID's. | 39 | * These are the defined Ethernet Protocol ID's. |
diff --git a/include/linux/init.h b/include/linux/init.h index e007ae4dc41e..56ec4c62eee0 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -45,6 +45,19 @@ | |||
45 | #define __exitdata __attribute__ ((__section__(".exit.data"))) | 45 | #define __exitdata __attribute__ ((__section__(".exit.data"))) |
46 | #define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit"))) | 46 | #define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit"))) |
47 | 47 | ||
48 | /* modpost check for section mismatches during the kernel build. | ||
49 | * A section mismatch happens when there are references from a | ||
50 | * code or data section to an init section (both code or data). | ||
51 | * The init sections are (for most archs) discarded by the kernel | ||
52 | * when early init has completed so all such references are potential bugs. | ||
53 | * For exit sections the same issue exists. | ||
54 | * The following markers are used for the cases where the reference to | ||
55 | * the init/exit section (code or data) is valid and will teach modpost | ||
56 | * not to issue a warning. | ||
57 | * The markers follow same syntax rules as __init / __initdata. */ | ||
58 | #define __init_refok noinline __attribute__ ((__section__ (".text.init.refok"))) | ||
59 | #define __initdata_refok __attribute__ ((__section__ (".data.init.refok"))) | ||
60 | |||
48 | #ifdef MODULE | 61 | #ifdef MODULE |
49 | #define __exit __attribute__ ((__section__(".exit.text"))) | 62 | #define __exit __attribute__ ((__section__(".exit.text"))) |
50 | #else | 63 | #else |
diff --git a/include/linux/kmalloc_sizes.h b/include/linux/kmalloc_sizes.h index bda23e00ed71..e576b848ce10 100644 --- a/include/linux/kmalloc_sizes.h +++ b/include/linux/kmalloc_sizes.h | |||
@@ -19,17 +19,27 @@ | |||
19 | CACHE(32768) | 19 | CACHE(32768) |
20 | CACHE(65536) | 20 | CACHE(65536) |
21 | CACHE(131072) | 21 | CACHE(131072) |
22 | #if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU) | 22 | #if KMALLOC_MAX_SIZE >= 262144 |
23 | CACHE(262144) | 23 | CACHE(262144) |
24 | #endif | 24 | #endif |
25 | #ifndef CONFIG_MMU | 25 | #if KMALLOC_MAX_SIZE >= 524288 |
26 | CACHE(524288) | 26 | CACHE(524288) |
27 | #endif | ||
28 | #if KMALLOC_MAX_SIZE >= 1048576 | ||
27 | CACHE(1048576) | 29 | CACHE(1048576) |
28 | #ifdef CONFIG_LARGE_ALLOCS | 30 | #endif |
31 | #if KMALLOC_MAX_SIZE >= 2097152 | ||
29 | CACHE(2097152) | 32 | CACHE(2097152) |
33 | #endif | ||
34 | #if KMALLOC_MAX_SIZE >= 4194304 | ||
30 | CACHE(4194304) | 35 | CACHE(4194304) |
36 | #endif | ||
37 | #if KMALLOC_MAX_SIZE >= 8388608 | ||
31 | CACHE(8388608) | 38 | CACHE(8388608) |
39 | #endif | ||
40 | #if KMALLOC_MAX_SIZE >= 16777216 | ||
32 | CACHE(16777216) | 41 | CACHE(16777216) |
42 | #endif | ||
43 | #if KMALLOC_MAX_SIZE >= 33554432 | ||
33 | CACHE(33554432) | 44 | CACHE(33554432) |
34 | #endif /* CONFIG_LARGE_ALLOCS */ | 45 | #endif |
35 | #endif /* CONFIG_MMU */ | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 27d936279574..85f7b1bd1482 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -140,6 +140,7 @@ enum { | |||
140 | 140 | ||
141 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ | 141 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ |
142 | ATA_DFLAG_NCQ_OFF = (1 << 9), /* device limited to non-NCQ mode */ | 142 | ATA_DFLAG_NCQ_OFF = (1 << 9), /* device limited to non-NCQ mode */ |
143 | ATA_DFLAG_SPUNDOWN = (1 << 10), /* XXX: for spindown_compat */ | ||
143 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, | 144 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, |
144 | 145 | ||
145 | ATA_DFLAG_DETACH = (1 << 16), | 146 | ATA_DFLAG_DETACH = (1 << 16), |
@@ -173,6 +174,7 @@ enum { | |||
173 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ | 174 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ |
174 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ | 175 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ |
175 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ | 176 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ |
177 | ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */ | ||
176 | 178 | ||
177 | /* The following flag belongs to ap->pflags but is kept in | 179 | /* The following flag belongs to ap->pflags but is kept in |
178 | * ap->flags because it's referenced in many LLDs and will be | 180 | * ap->flags because it's referenced in many LLDs and will be |
@@ -431,7 +433,6 @@ struct ata_device { | |||
431 | struct scsi_device *sdev; /* attached SCSI device */ | 433 | struct scsi_device *sdev; /* attached SCSI device */ |
432 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 434 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ |
433 | u64 n_sectors; /* size of device, if ATA */ | 435 | u64 n_sectors; /* size of device, if ATA */ |
434 | u64 n_sectors_boot; /* size of ATA device at startup */ | ||
435 | unsigned int class; /* ATA_DEV_xxx */ | 436 | unsigned int class; /* ATA_DEV_xxx */ |
436 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ | 437 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
437 | u8 pio_mode; | 438 | u8 pio_mode; |
@@ -573,8 +574,6 @@ struct ata_port_operations { | |||
573 | void (*phy_reset) (struct ata_port *ap); /* obsolete */ | 574 | void (*phy_reset) (struct ata_port *ap); /* obsolete */ |
574 | int (*set_mode) (struct ata_port *ap, struct ata_device **r_failed_dev); | 575 | int (*set_mode) (struct ata_port *ap, struct ata_device **r_failed_dev); |
575 | 576 | ||
576 | void (*post_set_mode) (struct ata_port *ap); | ||
577 | |||
578 | int (*cable_detect) (struct ata_port *ap); | 577 | int (*cable_detect) (struct ata_port *ap); |
579 | 578 | ||
580 | int (*check_atapi_dma) (struct ata_queued_cmd *qc); | 579 | int (*check_atapi_dma) (struct ata_queued_cmd *qc); |
diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h index dd12b4c9e613..12bfe09de2b1 100644 --- a/include/linux/lockd/xdr4.h +++ b/include/linux/lockd/xdr4.h | |||
@@ -42,5 +42,6 @@ int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | |||
42 | int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 42 | int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
43 | int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 43 | int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
44 | */ | 44 | */ |
45 | extern struct rpc_version nlm_version4; | ||
45 | 46 | ||
46 | #endif /* LOCKD_XDR4_H */ | 47 | #endif /* LOCKD_XDR4_H */ |
diff --git a/include/linux/log2.h b/include/linux/log2.h index 57e641e19a81..1b8a2c1cb0e3 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h | |||
@@ -159,7 +159,7 @@ unsigned long __roundup_pow_of_two(unsigned long n) | |||
159 | #define roundup_pow_of_two(n) \ | 159 | #define roundup_pow_of_two(n) \ |
160 | ( \ | 160 | ( \ |
161 | __builtin_constant_p(n) ? ( \ | 161 | __builtin_constant_p(n) ? ( \ |
162 | (n == 1) ? 0 : \ | 162 | (n == 1) ? 1 : \ |
163 | (1UL << (ilog2((n) - 1) + 1)) \ | 163 | (1UL << (ilog2((n) - 1) + 1)) \ |
164 | ) : \ | 164 | ) : \ |
165 | __roundup_pow_of_two(n) \ | 165 | __roundup_pow_of_two(n) \ |
diff --git a/include/linux/mii.h b/include/linux/mii.h index beddc6d3b0f6..151b7e0182c7 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h | |||
@@ -56,8 +56,8 @@ | |||
56 | #define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ | 56 | #define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ |
57 | #define BMSR_RESV 0x00c0 /* Unused... */ | 57 | #define BMSR_RESV 0x00c0 /* Unused... */ |
58 | #define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */ | 58 | #define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */ |
59 | #define BMSR_100FULL2 0x0200 /* Can do 100BASE-T2 HDX */ | 59 | #define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */ |
60 | #define BMSR_100HALF2 0x0400 /* Can do 100BASE-T2 FDX */ | 60 | #define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */ |
61 | #define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ | 61 | #define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ |
62 | #define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ | 62 | #define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ |
63 | #define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ | 63 | #define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 4670ebd1f622..e4183c6c7de3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_MM_H | 1 | #ifndef _LINUX_MM_H |
2 | #define _LINUX_MM_H | 2 | #define _LINUX_MM_H |
3 | 3 | ||
4 | #include <linux/sched.h> | ||
5 | #include <linux/errno.h> | 4 | #include <linux/errno.h> |
6 | #include <linux/capability.h> | 5 | #include <linux/capability.h> |
7 | 6 | ||
@@ -20,6 +19,7 @@ | |||
20 | 19 | ||
21 | struct mempolicy; | 20 | struct mempolicy; |
22 | struct anon_vma; | 21 | struct anon_vma; |
22 | struct user_struct; | ||
23 | 23 | ||
24 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ | 24 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ |
25 | extern unsigned long max_mapnr; | 25 | extern unsigned long max_mapnr; |
@@ -717,14 +717,7 @@ extern unsigned long shmem_get_unmapped_area(struct file *file, | |||
717 | unsigned long flags); | 717 | unsigned long flags); |
718 | #endif | 718 | #endif |
719 | 719 | ||
720 | static inline int can_do_mlock(void) | 720 | extern int can_do_mlock(void); |
721 | { | ||
722 | if (capable(CAP_IPC_LOCK)) | ||
723 | return 1; | ||
724 | if (current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur != 0) | ||
725 | return 1; | ||
726 | return 0; | ||
727 | } | ||
728 | extern int user_shm_lock(size_t, struct user_struct *); | 721 | extern int user_shm_lock(size_t, struct user_struct *); |
729 | extern void user_shm_unlock(size_t, struct user_struct *); | 722 | extern void user_shm_unlock(size_t, struct user_struct *); |
730 | 723 | ||
diff --git a/include/linux/netfilter/nf_conntrack_ftp.h b/include/linux/netfilter/nf_conntrack_ftp.h index 81453ea7e4c2..b7c360ffd0d0 100644 --- a/include/linux/netfilter/nf_conntrack_ftp.h +++ b/include/linux/netfilter/nf_conntrack_ftp.h | |||
@@ -37,8 +37,7 @@ extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff **pskb, | |||
37 | enum nf_ct_ftp_type type, | 37 | enum nf_ct_ftp_type type, |
38 | unsigned int matchoff, | 38 | unsigned int matchoff, |
39 | unsigned int matchlen, | 39 | unsigned int matchlen, |
40 | struct nf_conntrack_expect *exp, | 40 | struct nf_conntrack_expect *exp); |
41 | u32 *seq); | ||
42 | #endif /* __KERNEL__ */ | 41 | #endif /* __KERNEL__ */ |
43 | 42 | ||
44 | #endif /* _NF_CONNTRACK_FTP_H */ | 43 | #endif /* _NF_CONNTRACK_FTP_H */ |
diff --git a/include/linux/netfilter/nf_conntrack_h323_types.h b/include/linux/netfilter/nf_conntrack_h323_types.h index 38d74d5c9700..f35b6b4801e7 100644 --- a/include/linux/netfilter/nf_conntrack_h323_types.h +++ b/include/linux/netfilter/nf_conntrack_h323_types.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* Generated by Jing Min Zhao's ASN.1 parser, Apr 20 2006 | 1 | /* Generated by Jing Min Zhao's ASN.1 parser, May 16 2007 |
2 | * | 2 | * |
3 | * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> | 3 | * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> |
4 | * | 4 | * |
@@ -12,7 +12,7 @@ typedef struct TransportAddress_ipAddress { /* SEQUENCE */ | |||
12 | 12 | ||
13 | typedef struct TransportAddress_ip6Address { /* SEQUENCE */ | 13 | typedef struct TransportAddress_ip6Address { /* SEQUENCE */ |
14 | int options; /* No use */ | 14 | int options; /* No use */ |
15 | unsigned ip6; | 15 | unsigned ip; |
16 | } TransportAddress_ip6Address; | 16 | } TransportAddress_ip6Address; |
17 | 17 | ||
18 | typedef struct TransportAddress { /* CHOICE */ | 18 | typedef struct TransportAddress { /* CHOICE */ |
@@ -364,23 +364,6 @@ typedef struct Alerting_UUIE { /* SEQUENCE */ | |||
364 | Alerting_UUIE_fastStart fastStart; | 364 | Alerting_UUIE_fastStart fastStart; |
365 | } Alerting_UUIE; | 365 | } Alerting_UUIE; |
366 | 366 | ||
367 | typedef struct Information_UUIE_fastStart { /* SEQUENCE OF */ | ||
368 | int count; | ||
369 | OpenLogicalChannel item[30]; | ||
370 | } Information_UUIE_fastStart; | ||
371 | |||
372 | typedef struct Information_UUIE { /* SEQUENCE */ | ||
373 | enum { | ||
374 | eInformation_UUIE_callIdentifier = (1 << 31), | ||
375 | eInformation_UUIE_tokens = (1 << 30), | ||
376 | eInformation_UUIE_cryptoTokens = (1 << 29), | ||
377 | eInformation_UUIE_fastStart = (1 << 28), | ||
378 | eInformation_UUIE_fastConnectRefused = (1 << 27), | ||
379 | eInformation_UUIE_circuitInfo = (1 << 26), | ||
380 | } options; | ||
381 | Information_UUIE_fastStart fastStart; | ||
382 | } Information_UUIE; | ||
383 | |||
384 | typedef struct FacilityReason { /* CHOICE */ | 367 | typedef struct FacilityReason { /* CHOICE */ |
385 | enum { | 368 | enum { |
386 | eFacilityReason_routeCallToGatekeeper, | 369 | eFacilityReason_routeCallToGatekeeper, |
@@ -471,7 +454,6 @@ typedef struct H323_UU_PDU_h323_message_body { /* CHOICE */ | |||
471 | CallProceeding_UUIE callProceeding; | 454 | CallProceeding_UUIE callProceeding; |
472 | Connect_UUIE connect; | 455 | Connect_UUIE connect; |
473 | Alerting_UUIE alerting; | 456 | Alerting_UUIE alerting; |
474 | Information_UUIE information; | ||
475 | Facility_UUIE facility; | 457 | Facility_UUIE facility; |
476 | Progress_UUIE progress; | 458 | Progress_UUIE progress; |
477 | }; | 459 | }; |
@@ -561,6 +543,7 @@ typedef struct OpenLogicalChannelAck { /* SEQUENCE */ | |||
561 | } options; | 543 | } options; |
562 | OpenLogicalChannelAck_reverseLogicalChannelParameters | 544 | OpenLogicalChannelAck_reverseLogicalChannelParameters |
563 | reverseLogicalChannelParameters; | 545 | reverseLogicalChannelParameters; |
546 | NetworkAccessParameters separateStack; | ||
564 | OpenLogicalChannelAck_forwardMultiplexAckParameters | 547 | OpenLogicalChannelAck_forwardMultiplexAckParameters |
565 | forwardMultiplexAckParameters; | 548 | forwardMultiplexAckParameters; |
566 | } OpenLogicalChannelAck; | 549 | } OpenLogicalChannelAck; |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 1be5be88debe..7e7f33a38fc0 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | #define NFS4_VERIFIER_SIZE 8 | 18 | #define NFS4_VERIFIER_SIZE 8 |
19 | #define NFS4_STATEID_SIZE 16 | ||
19 | #define NFS4_FHSIZE 128 | 20 | #define NFS4_FHSIZE 128 |
20 | #define NFS4_MAXPATHLEN PATH_MAX | 21 | #define NFS4_MAXPATHLEN PATH_MAX |
21 | #define NFS4_MAXNAMLEN NAME_MAX | 22 | #define NFS4_MAXNAMLEN NAME_MAX |
@@ -113,7 +114,7 @@ struct nfs4_acl { | |||
113 | }; | 114 | }; |
114 | 115 | ||
115 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; | 116 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; |
116 | typedef struct { char data[16]; } nfs4_stateid; | 117 | typedef struct { char data[NFS4_STATEID_SIZE]; } nfs4_stateid; |
117 | 118 | ||
118 | enum nfs_opnum4 { | 119 | enum nfs_opnum4 { |
119 | OP_ACCESS = 3, | 120 | OP_ACCESS = 3, |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 41afab6b5f09..bd193af80162 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -81,6 +81,7 @@ extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, | |||
81 | extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, | 81 | extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, |
82 | struct nfs_page *); | 82 | struct nfs_page *); |
83 | extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); | 83 | extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); |
84 | extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); | ||
84 | extern int nfs_wait_on_request(struct nfs_page *); | 85 | extern int nfs_wait_on_request(struct nfs_page *); |
85 | extern void nfs_unlock_request(struct nfs_page *req); | 86 | extern void nfs_unlock_request(struct nfs_page *req); |
86 | extern int nfs_set_page_writeback_locked(struct nfs_page *req); | 87 | extern int nfs_set_page_writeback_locked(struct nfs_page *req); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3b1fbf49fa7d..4712e269d8d3 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -371,6 +371,7 @@ | |||
371 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 | 371 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 |
372 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 372 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
373 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 | 373 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 |
374 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c | ||
374 | 375 | ||
375 | #define PCI_VENDOR_ID_VLSI 0x1004 | 376 | #define PCI_VENDOR_ID_VLSI 0x1004 |
376 | #define PCI_DEVICE_ID_VLSI_82C592 0x0005 | 377 | #define PCI_DEVICE_ID_VLSI_82C592 0x0005 |
@@ -471,6 +472,7 @@ | |||
471 | #define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_2 0x0219 | 472 | #define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_2 0x0219 |
472 | #define PCI_DEVICE_ID_IBM_ICOM_V2_TWO_PORTS_RVX 0x021A | 473 | #define PCI_DEVICE_ID_IBM_ICOM_V2_TWO_PORTS_RVX 0x021A |
473 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM 0x0251 | 474 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM 0x0251 |
475 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 | ||
474 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 | 476 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 |
475 | 477 | ||
476 | #define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */ | 478 | #define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */ |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 6db9a4c15355..dd5a05d03d4f 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -232,6 +232,7 @@ struct bitmap { | |||
232 | struct page **filemap; /* list of cache pages for the file */ | 232 | struct page **filemap; /* list of cache pages for the file */ |
233 | unsigned long *filemap_attr; /* attributes associated w/ filemap pages */ | 233 | unsigned long *filemap_attr; /* attributes associated w/ filemap pages */ |
234 | unsigned long file_pages; /* number of pages in the file */ | 234 | unsigned long file_pages; /* number of pages in the file */ |
235 | int last_page_size; /* bytes in the last page */ | ||
235 | 236 | ||
236 | unsigned long flags; | 237 | unsigned long flags; |
237 | 238 | ||
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index bdd277223af0..97347f22fc20 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -74,17 +74,14 @@ void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned lon | |||
74 | void page_add_file_rmap(struct page *); | 74 | void page_add_file_rmap(struct page *); |
75 | void page_remove_rmap(struct page *, struct vm_area_struct *); | 75 | void page_remove_rmap(struct page *, struct vm_area_struct *); |
76 | 76 | ||
77 | /** | 77 | #ifdef CONFIG_DEBUG_VM |
78 | * page_dup_rmap - duplicate pte mapping to a page | 78 | void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address); |
79 | * @page: the page to add the mapping to | 79 | #else |
80 | * | 80 | static inline void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address) |
81 | * For copy_page_range only: minimal extract from page_add_rmap, | ||
82 | * avoiding unnecessary tests (already checked) so it's quicker. | ||
83 | */ | ||
84 | static inline void page_dup_rmap(struct page *page) | ||
85 | { | 81 | { |
86 | atomic_inc(&page->_mapcount); | 82 | atomic_inc(&page->_mapcount); |
87 | } | 83 | } |
84 | #endif | ||
88 | 85 | ||
89 | /* | 86 | /* |
90 | * Called from mm/vmscan.c to handle paging out | 87 | * Called from mm/vmscan.c to handle paging out |
diff --git a/include/linux/sched.h b/include/linux/sched.h index a81897e2a244..d58e74b98367 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1182,6 +1182,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
1182 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 1182 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
1183 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 1183 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
1184 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1184 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
1185 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ | ||
1185 | 1186 | ||
1186 | /* | 1187 | /* |
1187 | * Only the _current_ task can read/write to tsk->flags, but other | 1188 | * Only the _current_ task can read/write to tsk->flags, but other |
@@ -1615,11 +1616,13 @@ static inline int lock_need_resched(spinlock_t *lock) | |||
1615 | return 0; | 1616 | return 0; |
1616 | } | 1617 | } |
1617 | 1618 | ||
1618 | /* Reevaluate whether the task has signals pending delivery. | 1619 | /* |
1619 | This is required every time the blocked sigset_t changes. | 1620 | * Reevaluate whether the task has signals pending delivery. |
1620 | callers must hold sighand->siglock. */ | 1621 | * Wake the task if so. |
1621 | 1622 | * This is required every time the blocked sigset_t changes. | |
1622 | extern FASTCALL(void recalc_sigpending_tsk(struct task_struct *t)); | 1623 | * callers must hold sighand->siglock. |
1624 | */ | ||
1625 | extern void recalc_sigpending_and_wake(struct task_struct *t); | ||
1623 | extern void recalc_sigpending(void); | 1626 | extern void recalc_sigpending(void); |
1624 | 1627 | ||
1625 | extern void signal_wake_up(struct task_struct *t, int resume_stopped); | 1628 | extern void signal_wake_up(struct task_struct *t, int resume_stopped); |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 71829efc40ba..a015236cc572 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -32,9 +32,6 @@ typedef struct kmem_cache kmem_cache_t __deprecated; | |||
32 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ | 32 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ |
33 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ | 33 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ |
34 | 34 | ||
35 | /* Flags passed to a constructor functions */ | ||
36 | #define SLAB_CTOR_CONSTRUCTOR 0x001UL /* If not set, then deconstructor */ | ||
37 | |||
38 | /* | 35 | /* |
39 | * struct kmem_cache related prototypes | 36 | * struct kmem_cache related prototypes |
40 | */ | 37 | */ |
@@ -77,6 +74,21 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | |||
77 | #endif | 74 | #endif |
78 | 75 | ||
79 | /* | 76 | /* |
77 | * The largest kmalloc size supported by the slab allocators is | ||
78 | * 32 megabyte (2^25) or the maximum allocatable page order if that is | ||
79 | * less than 32 MB. | ||
80 | * | ||
81 | * WARNING: Its not easy to increase this value since the allocators have | ||
82 | * to do various tricks to work around compiler limitations in order to | ||
83 | * ensure proper constant folding. | ||
84 | */ | ||
85 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \ | ||
86 | (MAX_ORDER + PAGE_SHIFT) : 25) | ||
87 | |||
88 | #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) | ||
89 | #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) | ||
90 | |||
91 | /* | ||
80 | * Common kmalloc functions provided by all allocators | 92 | * Common kmalloc functions provided by all allocators |
81 | */ | 93 | */ |
82 | void *__kmalloc(size_t, gfp_t); | 94 | void *__kmalloc(size_t, gfp_t); |
@@ -233,9 +245,6 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); | |||
233 | 245 | ||
234 | #endif /* DEBUG_SLAB */ | 246 | #endif /* DEBUG_SLAB */ |
235 | 247 | ||
236 | extern const struct seq_operations slabinfo_op; | ||
237 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | ||
238 | |||
239 | #endif /* __KERNEL__ */ | 248 | #endif /* __KERNEL__ */ |
240 | #endif /* _LINUX_SLAB_H */ | 249 | #endif /* _LINUX_SLAB_H */ |
241 | 250 | ||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 5e4364644ed1..8d81a60518e4 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -109,4 +109,7 @@ found: | |||
109 | 109 | ||
110 | #endif /* CONFIG_NUMA */ | 110 | #endif /* CONFIG_NUMA */ |
111 | 111 | ||
112 | extern const struct seq_operations slabinfo_op; | ||
113 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | ||
114 | |||
112 | #endif /* _LINUX_SLAB_DEF_H */ | 115 | #endif /* _LINUX_SLAB_DEF_H */ |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index fd6627e2d115..0764c829d967 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -40,7 +40,6 @@ struct kmem_cache { | |||
40 | int objects; /* Number of objects in slab */ | 40 | int objects; /* Number of objects in slab */ |
41 | int refcount; /* Refcount for slab cache destroy */ | 41 | int refcount; /* Refcount for slab cache destroy */ |
42 | void (*ctor)(void *, struct kmem_cache *, unsigned long); | 42 | void (*ctor)(void *, struct kmem_cache *, unsigned long); |
43 | void (*dtor)(void *, struct kmem_cache *, unsigned long); | ||
44 | int inuse; /* Offset to metadata */ | 43 | int inuse; /* Offset to metadata */ |
45 | int align; /* Alignment */ | 44 | int align; /* Alignment */ |
46 | const char *name; /* Name (only for display!) */ | 45 | const char *name; /* Name (only for display!) */ |
@@ -59,17 +58,6 @@ struct kmem_cache { | |||
59 | */ | 58 | */ |
60 | #define KMALLOC_SHIFT_LOW 3 | 59 | #define KMALLOC_SHIFT_LOW 3 |
61 | 60 | ||
62 | #ifdef CONFIG_LARGE_ALLOCS | ||
63 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) =< 25 ? \ | ||
64 | (MAX_ORDER + PAGE_SHIFT - 1) : 25) | ||
65 | #else | ||
66 | #if !defined(CONFIG_MMU) || NR_CPUS > 512 || MAX_NUMNODES > 256 | ||
67 | #define KMALLOC_SHIFT_HIGH 20 | ||
68 | #else | ||
69 | #define KMALLOC_SHIFT_HIGH 18 | ||
70 | #endif | ||
71 | #endif | ||
72 | |||
73 | /* | 61 | /* |
74 | * We keep the general caches in an array of slab caches that are used for | 62 | * We keep the general caches in an array of slab caches that are used for |
75 | * 2^x bytes of allocations. | 63 | * 2^x bytes of allocations. |
@@ -80,7 +68,7 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; | |||
80 | * Sorry that the following has to be that ugly but some versions of GCC | 68 | * Sorry that the following has to be that ugly but some versions of GCC |
81 | * have trouble with constant propagation and loops. | 69 | * have trouble with constant propagation and loops. |
82 | */ | 70 | */ |
83 | static inline int kmalloc_index(int size) | 71 | static inline int kmalloc_index(size_t size) |
84 | { | 72 | { |
85 | /* | 73 | /* |
86 | * We should return 0 if size == 0 but we use the smallest object | 74 | * We should return 0 if size == 0 but we use the smallest object |
@@ -88,7 +76,7 @@ static inline int kmalloc_index(int size) | |||
88 | */ | 76 | */ |
89 | WARN_ON_ONCE(size == 0); | 77 | WARN_ON_ONCE(size == 0); |
90 | 78 | ||
91 | if (size >= (1 << KMALLOC_SHIFT_HIGH)) | 79 | if (size > KMALLOC_MAX_SIZE) |
92 | return -1; | 80 | return -1; |
93 | 81 | ||
94 | if (size > 64 && size <= 96) | 82 | if (size > 64 && size <= 96) |
@@ -111,17 +99,13 @@ static inline int kmalloc_index(int size) | |||
111 | if (size <= 64 * 1024) return 16; | 99 | if (size <= 64 * 1024) return 16; |
112 | if (size <= 128 * 1024) return 17; | 100 | if (size <= 128 * 1024) return 17; |
113 | if (size <= 256 * 1024) return 18; | 101 | if (size <= 256 * 1024) return 18; |
114 | #if KMALLOC_SHIFT_HIGH > 18 | ||
115 | if (size <= 512 * 1024) return 19; | 102 | if (size <= 512 * 1024) return 19; |
116 | if (size <= 1024 * 1024) return 20; | 103 | if (size <= 1024 * 1024) return 20; |
117 | #endif | ||
118 | #if KMALLOC_SHIFT_HIGH > 20 | ||
119 | if (size <= 2 * 1024 * 1024) return 21; | 104 | if (size <= 2 * 1024 * 1024) return 21; |
120 | if (size <= 4 * 1024 * 1024) return 22; | 105 | if (size <= 4 * 1024 * 1024) return 22; |
121 | if (size <= 8 * 1024 * 1024) return 23; | 106 | if (size <= 8 * 1024 * 1024) return 23; |
122 | if (size <= 16 * 1024 * 1024) return 24; | 107 | if (size <= 16 * 1024 * 1024) return 24; |
123 | if (size <= 32 * 1024 * 1024) return 25; | 108 | if (size <= 32 * 1024 * 1024) return 25; |
124 | #endif | ||
125 | return -1; | 109 | return -1; |
126 | 110 | ||
127 | /* | 111 | /* |
@@ -146,7 +130,12 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
146 | if (index == 0) | 130 | if (index == 0) |
147 | return NULL; | 131 | return NULL; |
148 | 132 | ||
149 | if (index < 0) { | 133 | /* |
134 | * This function only gets expanded if __builtin_constant_p(size), so | ||
135 | * testing it here shouldn't be needed. But some versions of gcc need | ||
136 | * help. | ||
137 | */ | ||
138 | if (__builtin_constant_p(size) && index < 0) { | ||
150 | /* | 139 | /* |
151 | * Generate a link failure. Would be great if we could | 140 | * Generate a link failure. Would be great if we could |
152 | * do something to stop the compile here. | 141 | * do something to stop the compile here. |
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index 13b3af547864..2c5cd55f44ff 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
30 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
31 | #include <linux/smb_mount.h> | 31 | #include <linux/smb_mount.h> |
32 | #include <linux/jiffies.h> | ||
32 | #include <asm/unaligned.h> | 33 | #include <asm/unaligned.h> |
33 | 34 | ||
34 | static inline struct smb_sb_info *SMB_SB(struct super_block *sb) | 35 | static inline struct smb_sb_info *SMB_SB(struct super_block *sb) |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 3f70149eabbb..96ac21f8dd73 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -6,6 +6,7 @@ | |||
6 | * Alan Cox. <alan@redhat.com> | 6 | * Alan Cox. <alan@redhat.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/errno.h> | ||
9 | 10 | ||
10 | extern void cpu_idle(void); | 11 | extern void cpu_idle(void); |
11 | 12 | ||
@@ -99,11 +100,9 @@ static inline void smp_send_reschedule(int cpu) { } | |||
99 | #define num_booting_cpus() 1 | 100 | #define num_booting_cpus() 1 |
100 | #define smp_prepare_boot_cpu() do {} while (0) | 101 | #define smp_prepare_boot_cpu() do {} while (0) |
101 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), | 102 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), |
102 | void *info, int retry, int wait) | 103 | void *info, int retry, int wait) |
103 | { | 104 | { |
104 | /* Disable interrupts here? */ | 105 | return -EBUSY; |
105 | func(info); | ||
106 | return 0; | ||
107 | } | 106 | } |
108 | 107 | ||
109 | #endif /* !SMP */ | 108 | #endif /* !SMP */ |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index 4a68125b6de6..ad293760f6eb 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -47,6 +47,8 @@ extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, struct r | |||
47 | extern int rpc_unlink(struct dentry *); | 47 | extern int rpc_unlink(struct dentry *); |
48 | extern struct vfsmount *rpc_get_mount(void); | 48 | extern struct vfsmount *rpc_get_mount(void); |
49 | extern void rpc_put_mount(void); | 49 | extern void rpc_put_mount(void); |
50 | extern int register_rpc_pipefs(void); | ||
51 | extern void unregister_rpc_pipefs(void); | ||
50 | 52 | ||
51 | #endif | 53 | #endif |
52 | #endif | 54 | #endif |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index fa89ce6ce076..34f7590506fa 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -244,6 +244,8 @@ void xprt_disconnect(struct rpc_xprt *xprt); | |||
244 | */ | 244 | */ |
245 | struct rpc_xprt * xs_setup_udp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); | 245 | struct rpc_xprt * xs_setup_udp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); |
246 | struct rpc_xprt * xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); | 246 | struct rpc_xprt * xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); |
247 | int init_socket_xprt(void); | ||
248 | void cleanup_socket_xprt(void); | ||
247 | 249 | ||
248 | /* | 250 | /* |
249 | * Reserved bit positions in xprt->state | 251 | * Reserved bit positions in xprt->state |
diff --git a/include/linux/task_io_accounting_ops.h b/include/linux/task_io_accounting_ops.h index 1218733ec6b5..ff46c6fad79d 100644 --- a/include/linux/task_io_accounting_ops.h +++ b/include/linux/task_io_accounting_ops.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #ifndef __TASK_IO_ACCOUNTING_OPS_INCLUDED | 4 | #ifndef __TASK_IO_ACCOUNTING_OPS_INCLUDED |
5 | #define __TASK_IO_ACCOUNTING_OPS_INCLUDED | 5 | #define __TASK_IO_ACCOUNTING_OPS_INCLUDED |
6 | 6 | ||
7 | #include <linux/sched.h> | ||
8 | |||
7 | #ifdef CONFIG_TASK_IO_ACCOUNTING | 9 | #ifdef CONFIG_TASK_IO_ACCOUNTING |
8 | static inline void task_io_account_read(size_t bytes) | 10 | static inline void task_io_account_read(size_t bytes) |
9 | { | 11 | { |
diff --git a/include/linux/timer.h b/include/linux/timer.h index e0c5c16c992f..c661710d3627 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -69,6 +69,12 @@ extern int __mod_timer(struct timer_list *timer, unsigned long expires); | |||
69 | extern int mod_timer(struct timer_list *timer, unsigned long expires); | 69 | extern int mod_timer(struct timer_list *timer, unsigned long expires); |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * The jiffies value which is added to now, when there is no timer | ||
73 | * in the timer wheel: | ||
74 | */ | ||
75 | #define NEXT_TIMER_MAX_DELTA ((1UL << 30) - 1) | ||
76 | |||
77 | /* | ||
72 | * Return when the next timer-wheel timeout occurs (in absolute jiffies), | 78 | * Return when the next timer-wheel timeout occurs (in absolute jiffies), |
73 | * locks the timer base: | 79 | * locks the timer base: |
74 | */ | 80 | */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index a25c2afa67e1..e7560389079c 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -267,8 +267,6 @@ struct v4l2_pix_format | |||
267 | __u32 sizeimage; | 267 | __u32 sizeimage; |
268 | enum v4l2_colorspace colorspace; | 268 | enum v4l2_colorspace colorspace; |
269 | __u32 priv; /* private data, depends on pixelformat */ | 269 | __u32 priv; /* private data, depends on pixelformat */ |
270 | __u32 left; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */ | ||
271 | __u32 top; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */ | ||
272 | }; | 270 | }; |
273 | 271 | ||
274 | /* Pixel format FOURCC depth Description */ | 272 | /* Pixel format FOURCC depth Description */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index d555f31c0746..ce0719a2cfeb 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -122,7 +122,7 @@ extern struct workqueue_struct *__create_workqueue(const char *name, | |||
122 | int singlethread, | 122 | int singlethread, |
123 | int freezeable); | 123 | int freezeable); |
124 | #define create_workqueue(name) __create_workqueue((name), 0, 0) | 124 | #define create_workqueue(name) __create_workqueue((name), 0, 0) |
125 | #define create_freezeable_workqueue(name) __create_workqueue((name), 0, 1) | 125 | #define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1) |
126 | #define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0) | 126 | #define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0) |
127 | 127 | ||
128 | extern void destroy_workqueue(struct workqueue_struct *wq); | 128 | extern void destroy_workqueue(struct workqueue_struct *wq); |
@@ -160,7 +160,7 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
160 | { | 160 | { |
161 | int ret; | 161 | int ret; |
162 | 162 | ||
163 | ret = del_timer(&work->timer); | 163 | ret = del_timer_sync(&work->timer); |
164 | if (ret) | 164 | if (ret) |
165 | work_clear_pending(&work->work); | 165 | work_clear_pending(&work->work); |
166 | return ret; | 166 | return ret; |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 050915b59576..4ef4d22e5e43 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #ifndef WRITEBACK_H | 4 | #ifndef WRITEBACK_H |
5 | #define WRITEBACK_H | 5 | #define WRITEBACK_H |
6 | 6 | ||
7 | #include <linux/sched.h> | ||
8 | |||
7 | struct backing_dev_info; | 9 | struct backing_dev_info; |
8 | 10 | ||
9 | extern spinlock_t inode_lock; | 11 | extern spinlock_t inode_lock; |