diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-10-13 09:43:54 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-10-13 09:43:54 -0400 |
commit | b160292cc216a50fd0cd386b0bda2cd48352c73b (patch) | |
tree | ef07cf98f91353ee4c9ec1e1ca7a2a5d9d4b538a /include/linux | |
parent | b37bde147890c8fea8369a5a4e230dabdea4ebfb (diff) | |
parent | bbf25010f1a6b761914430f5fca081ec8c7accd1 (diff) |
Merge Linux 2.6.23
Diffstat (limited to 'include/linux')
30 files changed, 160 insertions, 102 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index ad7f71a81b0a..818cc3a50e6b 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -7,6 +7,7 @@ header-y += raid/ | |||
7 | header-y += spi/ | 7 | header-y += spi/ |
8 | header-y += sunrpc/ | 8 | header-y += sunrpc/ |
9 | header-y += tc_act/ | 9 | header-y += tc_act/ |
10 | header-y += tc_ematch/ | ||
10 | header-y += netfilter/ | 11 | header-y += netfilter/ |
11 | header-y += netfilter_arp/ | 12 | header-y += netfilter_arp/ |
12 | header-y += netfilter_bridge/ | 13 | header-y += netfilter_bridge/ |
diff --git a/include/linux/aer.h b/include/linux/aer.h index 509656286e53..bcf236d825e8 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -15,11 +15,26 @@ extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); | |||
15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); | 15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); |
16 | extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); | 16 | extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); |
17 | #else | 17 | #else |
18 | #define pci_enable_pcie_error_reporting(dev) (-EINVAL) | 18 | static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev) |
19 | #define pci_find_aer_capability(dev) (0) | 19 | { |
20 | #define pci_disable_pcie_error_reporting(dev) (-EINVAL) | 20 | return -EINVAL; |
21 | #define pci_cleanup_aer_uncorrect_error_status(dev) (-EINVAL) | 21 | } |
22 | #define pci_cleanup_aer_correct_error_status(dev) (-EINVAL) | 22 | static inline int pci_find_aer_capability(struct pci_dev *dev) |
23 | { | ||
24 | return 0; | ||
25 | } | ||
26 | static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev) | ||
27 | { | ||
28 | return -EINVAL; | ||
29 | } | ||
30 | static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) | ||
31 | { | ||
32 | return -EINVAL; | ||
33 | } | ||
34 | static inline int pci_cleanup_aer_correct_error_status(struct pci_dev *dev) | ||
35 | { | ||
36 | return -EINVAL; | ||
37 | } | ||
23 | #endif | 38 | #endif |
24 | 39 | ||
25 | #endif //_AER_H_ | 40 | #endif //_AER_H_ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 23a22df039d8..c043c1ccf1c5 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -73,6 +73,19 @@ enum { | |||
73 | ATA_PIO5 = ATA_PIO4 | (1 << 5), | 73 | ATA_PIO5 = ATA_PIO4 | (1 << 5), |
74 | ATA_PIO6 = ATA_PIO5 | (1 << 6), | 74 | ATA_PIO6 = ATA_PIO5 | (1 << 6), |
75 | 75 | ||
76 | ATA_SWDMA0 = (1 << 0), | ||
77 | ATA_SWDMA1 = ATA_SWDMA0 | (1 << 1), | ||
78 | ATA_SWDMA2 = ATA_SWDMA1 | (1 << 2), | ||
79 | |||
80 | ATA_SWDMA2_ONLY = (1 << 2), | ||
81 | |||
82 | ATA_MWDMA0 = (1 << 0), | ||
83 | ATA_MWDMA1 = ATA_MWDMA0 | (1 << 1), | ||
84 | ATA_MWDMA2 = ATA_MWDMA1 | (1 << 2), | ||
85 | |||
86 | ATA_MWDMA12_ONLY = (1 << 1) | (1 << 2), | ||
87 | ATA_MWDMA2_ONLY = (1 << 2), | ||
88 | |||
76 | ATA_UDMA0 = (1 << 0), | 89 | ATA_UDMA0 = (1 << 0), |
77 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), | 90 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), |
78 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), | 91 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 4bbd8601b8f0..d6579df8dadf 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -63,8 +63,8 @@ | |||
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 */ | 66 | #define AUDIT_TTY_GET 1016 /* Get TTY auditing status */ |
67 | #define AUDIT_TTY_SET 1015 /* Set TTY auditing status */ | 67 | #define AUDIT_TTY_SET 1017 /* Set TTY auditing status */ |
68 | 68 | ||
69 | #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 */ |
70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ | 70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 1d5ded0836ee..0ad72c4cf312 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -126,16 +126,16 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | |||
126 | static inline int cpu_is_offline(int cpu) { return 0; } | 126 | static inline int cpu_is_offline(int cpu) { return 0; } |
127 | #endif /* CONFIG_HOTPLUG_CPU */ | 127 | #endif /* CONFIG_HOTPLUG_CPU */ |
128 | 128 | ||
129 | #ifdef CONFIG_SUSPEND_SMP | 129 | #ifdef CONFIG_PM_SLEEP_SMP |
130 | extern int suspend_cpu_hotplug; | 130 | extern int suspend_cpu_hotplug; |
131 | 131 | ||
132 | extern int disable_nonboot_cpus(void); | 132 | extern int disable_nonboot_cpus(void); |
133 | extern void enable_nonboot_cpus(void); | 133 | extern void enable_nonboot_cpus(void); |
134 | #else | 134 | #else /* !CONFIG_PM_SLEEP_SMP */ |
135 | #define suspend_cpu_hotplug 0 | 135 | #define suspend_cpu_hotplug 0 |
136 | 136 | ||
137 | static inline int disable_nonboot_cpus(void) { return 0; } | 137 | static inline int disable_nonboot_cpus(void) { return 0; } |
138 | static inline void enable_nonboot_cpus(void) {} | 138 | static inline void enable_nonboot_cpus(void) {} |
139 | #endif | 139 | #endif /* !CONFIG_PM_SLEEP_SMP */ |
140 | 140 | ||
141 | #endif /* _LINUX_CPU_H_ */ | 141 | #endif /* _LINUX_CPU_H_ */ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 963051a967d6..3ec6e7ff5fbd 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -32,15 +32,7 @@ | |||
32 | * CPUFREQ NOTIFIER INTERFACE * | 32 | * CPUFREQ NOTIFIER INTERFACE * |
33 | *********************************************************************/ | 33 | *********************************************************************/ |
34 | 34 | ||
35 | #ifdef CONFIG_CPU_FREQ | ||
36 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); | 35 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); |
37 | #else | ||
38 | static inline int cpufreq_register_notifier(struct notifier_block *nb, | ||
39 | unsigned int list) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | #endif | ||
44 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); | 36 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); |
45 | 37 | ||
46 | #define CPUFREQ_TRANSITION_NOTIFIER (0) | 38 | #define CPUFREQ_TRANSITION_NOTIFIER (0) |
@@ -268,22 +260,17 @@ struct freq_attr { | |||
268 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 260 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
269 | int cpufreq_update_policy(unsigned int cpu); | 261 | int cpufreq_update_policy(unsigned int cpu); |
270 | 262 | ||
263 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | ||
264 | unsigned int cpufreq_get(unsigned int cpu); | ||
271 | 265 | ||
272 | /* | 266 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ |
273 | * query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it | ||
274 | */ | ||
275 | #ifdef CONFIG_CPU_FREQ | 267 | #ifdef CONFIG_CPU_FREQ |
276 | unsigned int cpufreq_quick_get(unsigned int cpu); | 268 | unsigned int cpufreq_quick_get(unsigned int cpu); |
277 | unsigned int cpufreq_get(unsigned int cpu); | ||
278 | #else | 269 | #else |
279 | static inline unsigned int cpufreq_quick_get(unsigned int cpu) | 270 | static inline unsigned int cpufreq_quick_get(unsigned int cpu) |
280 | { | 271 | { |
281 | return 0; | 272 | return 0; |
282 | } | 273 | } |
283 | static inline unsigned int cpufreq_get(unsigned int cpu) | ||
284 | { | ||
285 | return 0; | ||
286 | } | ||
287 | #endif | 274 | #endif |
288 | 275 | ||
289 | 276 | ||
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index e6a71c82d204..3a19b032c0eb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -66,11 +66,8 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | |||
66 | * If the arch doesn't supply something else, assume that hugepage | 66 | * If the arch doesn't supply something else, assume that hugepage |
67 | * size aligned regions are ok without further preparation. | 67 | * size aligned regions are ok without further preparation. |
68 | */ | 68 | */ |
69 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, | 69 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) |
70 | pgoff_t pgoff) | ||
71 | { | 70 | { |
72 | if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) | ||
73 | return -EINVAL; | ||
74 | if (len & ~HPAGE_MASK) | 71 | if (len & ~HPAGE_MASK) |
75 | return -EINVAL; | 72 | return -EINVAL; |
76 | if (addr & ~HPAGE_MASK) | 73 | if (addr & ~HPAGE_MASK) |
@@ -78,8 +75,7 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, | |||
78 | return 0; | 75 | return 0; |
79 | } | 76 | } |
80 | #else | 77 | #else |
81 | int prepare_hugepage_range(unsigned long addr, unsigned long len, | 78 | int prepare_hugepage_range(unsigned long addr, unsigned long len); |
82 | pgoff_t pgoff); | ||
83 | #endif | 79 | #endif |
84 | 80 | ||
85 | #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE | 81 | #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE |
@@ -117,7 +113,7 @@ static inline unsigned long hugetlb_total_pages(void) | |||
117 | #define hugetlb_report_meminfo(buf) 0 | 113 | #define hugetlb_report_meminfo(buf) 0 |
118 | #define hugetlb_report_node_meminfo(n, buf) 0 | 114 | #define hugetlb_report_node_meminfo(n, buf) 0 |
119 | #define follow_huge_pmd(mm, addr, pmd, write) NULL | 115 | #define follow_huge_pmd(mm, addr, pmd, write) NULL |
120 | #define prepare_hugepage_range(addr,len,pgoff) (-EINVAL) | 116 | #define prepare_hugepage_range(addr,len) (-EINVAL) |
121 | #define pmd_huge(x) 0 | 117 | #define pmd_huge(x) 0 |
122 | #define is_hugepage_only_range(mm, addr, len) 0 | 118 | #define is_hugepage_only_range(mm, addr, len) 0 |
123 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 119 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
diff --git a/include/linux/ide.h b/include/linux/ide.h index c792b4fd1588..b9f66c10caa0 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1378,6 +1378,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id) | |||
1378 | return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; | 1378 | return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; |
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | static inline int ide_dev_is_sata(struct hd_driveid *id) | ||
1382 | { | ||
1383 | /* | ||
1384 | * See if word 93 is 0 AND drive is at least ATA-5 compatible | ||
1385 | * verifying that word 80 by casting it to a signed type -- | ||
1386 | * this trick allows us to filter out the reserved values of | ||
1387 | * 0x0000 and 0xffff along with the earlier ATA revisions... | ||
1388 | */ | ||
1389 | if (id->hw_config == 0 && (short)id->major_rev_num >= 0x0020) | ||
1390 | return 1; | ||
1391 | return 0; | ||
1392 | } | ||
1393 | |||
1381 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1394 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
1382 | 1395 | ||
1383 | typedef struct ide_pio_timings_s { | 1396 | typedef struct ide_pio_timings_s { |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h index 516203b6fdeb..a7d6a2234b31 100644 --- a/include/linux/if_pppol2tp.h +++ b/include/linux/if_pppol2tp.h | |||
@@ -32,8 +32,8 @@ struct pppol2tp_addr | |||
32 | 32 | ||
33 | struct sockaddr_in addr; /* IP address and port to send to */ | 33 | struct sockaddr_in addr; /* IP address and port to send to */ |
34 | 34 | ||
35 | __be16 s_tunnel, s_session; /* For matching incoming packets */ | 35 | __u16 s_tunnel, s_session; /* For matching incoming packets */ |
36 | __be16 d_tunnel, d_session; /* For sending outgoing packets */ | 36 | __u16 d_tunnel, d_session; /* For sending outgoing packets */ |
37 | }; | 37 | }; |
38 | 38 | ||
39 | /* Socket options: | 39 | /* Socket options: |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index cab741c2d603..f8abfa349ef9 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -86,7 +86,7 @@ extern struct nsproxy init_nsproxy; | |||
86 | .count = ATOMIC_INIT(1), \ | 86 | .count = ATOMIC_INIT(1), \ |
87 | .action = { { { .sa_handler = NULL, } }, }, \ | 87 | .action = { { { .sa_handler = NULL, } }, }, \ |
88 | .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ | 88 | .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ |
89 | .signalfd_list = LIST_HEAD_INIT(sighand.signalfd_list), \ | 89 | .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(sighand.signalfd_wqh), \ |
90 | } | 90 | } |
91 | 91 | ||
92 | extern struct group_info init_groups; | 92 | extern struct group_info init_groups; |
diff --git a/include/linux/input.h b/include/linux/input.h index e02c6a66b2ba..36e00aa6f03b 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -363,6 +363,12 @@ struct input_absinfo { | |||
363 | 363 | ||
364 | #define KEY_UNKNOWN 240 | 364 | #define KEY_UNKNOWN 240 |
365 | 365 | ||
366 | #define KEY_VIDEO_NEXT 241 /* drive next video source */ | ||
367 | #define KEY_VIDEO_PREV 242 /* drive previous video source */ | ||
368 | #define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ | ||
369 | #define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ | ||
370 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ | ||
371 | |||
366 | #define BTN_MISC 0x100 | 372 | #define BTN_MISC 0x100 |
367 | #define BTN_0 0x100 | 373 | #define BTN_0 0x100 |
368 | #define BTN_1 0x101 | 374 | #define BTN_1 0x101 |
@@ -552,6 +558,8 @@ struct input_absinfo { | |||
552 | #define KEY_BRL_DOT6 0x1f6 | 558 | #define KEY_BRL_DOT6 0x1f6 |
553 | #define KEY_BRL_DOT7 0x1f7 | 559 | #define KEY_BRL_DOT7 0x1f7 |
554 | #define KEY_BRL_DOT8 0x1f8 | 560 | #define KEY_BRL_DOT8 0x1f8 |
561 | #define KEY_BRL_DOT9 0x1f9 | ||
562 | #define KEY_BRL_DOT10 0x1fa | ||
555 | 563 | ||
556 | /* We avoid low common keys in module aliases so they don't get huge. */ | 564 | /* We avoid low common keys in module aliases so they don't get huge. */ |
557 | #define KEY_MIN_INTERESTING KEY_MUTE | 565 | #define KEY_MIN_INTERESTING KEY_MUTE |
diff --git a/include/linux/isa.h b/include/linux/isa.h index 1b855335cb11..b0270e3814c8 100644 --- a/include/linux/isa.h +++ b/include/linux/isa.h | |||
@@ -22,7 +22,18 @@ struct isa_driver { | |||
22 | 22 | ||
23 | #define to_isa_driver(x) container_of((x), struct isa_driver, driver) | 23 | #define to_isa_driver(x) container_of((x), struct isa_driver, driver) |
24 | 24 | ||
25 | #ifdef CONFIG_ISA | ||
25 | int isa_register_driver(struct isa_driver *, unsigned int); | 26 | int isa_register_driver(struct isa_driver *, unsigned int); |
26 | void isa_unregister_driver(struct isa_driver *); | 27 | void isa_unregister_driver(struct isa_driver *); |
28 | #else | ||
29 | static inline int isa_register_driver(struct isa_driver *d, unsigned int i) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | static inline void isa_unregister_driver(struct isa_driver *d) | ||
35 | { | ||
36 | } | ||
37 | #endif | ||
27 | 38 | ||
28 | #endif /* __LINUX_ISA_H */ | 39 | #endif /* __LINUX_ISA_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f592df74b3cf..47160fe378c9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -34,6 +34,7 @@ extern const char linux_proc_banner[]; | |||
34 | 34 | ||
35 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | 35 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) |
36 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | 36 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) |
37 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) | ||
37 | 38 | ||
38 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 39 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
39 | 40 | ||
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index de76843bbe8a..7ddbc30aa8e7 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h | |||
@@ -437,8 +437,10 @@ extern unsigned short plain_map[NR_KEYS]; | |||
437 | #define K_BRL_DOT6 K(KT_BRL, 6) | 437 | #define K_BRL_DOT6 K(KT_BRL, 6) |
438 | #define K_BRL_DOT7 K(KT_BRL, 7) | 438 | #define K_BRL_DOT7 K(KT_BRL, 7) |
439 | #define K_BRL_DOT8 K(KT_BRL, 8) | 439 | #define K_BRL_DOT8 K(KT_BRL, 8) |
440 | #define K_BRL_DOT9 K(KT_BRL, 9) | ||
441 | #define K_BRL_DOT10 K(KT_BRL, 10) | ||
440 | 442 | ||
441 | #define NR_BRL 9 | 443 | #define NR_BRL 11 |
442 | 444 | ||
443 | #define MAX_DIACR 256 | 445 | #define MAX_DIACR 256 |
444 | #endif | 446 | #endif |
diff --git a/include/linux/leds.h b/include/linux/leds.h index 421175092ee2..dc1178f6184b 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -13,6 +13,7 @@ | |||
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> | ||
16 | 17 | ||
17 | struct device; | 18 | struct device; |
18 | /* | 19 | /* |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 41978a557318..a67bb9075e9b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -303,6 +303,7 @@ enum { | |||
303 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ | 303 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ |
304 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ | 304 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ |
305 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ | 305 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ |
306 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ | ||
306 | }; | 307 | }; |
307 | 308 | ||
308 | enum hsm_task_states { | 309 | enum hsm_task_states { |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 5bdd656e88cf..a020eb2d4e2a 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, gfp_t gfp_flags); | 162 | unsigned long addr, gfp_t gfp_flags, struct mempolicy **mpol); |
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,7 +256,7 @@ 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, gfp_t gfp_flags) | 259 | unsigned long addr, gfp_t gfp_flags, struct mempolicy **mpol) |
260 | { | 260 | { |
261 | return NODE_DATA(0)->node_zonelists + gfp_zone(gfp_flags); | 261 | return NODE_DATA(0)->node_zonelists + gfp_zone(gfp_flags); |
262 | } | 262 | } |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 0eed0b7ab2df..1dd075eda595 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -88,9 +88,8 @@ struct nf_sockopt_ops | |||
88 | int (*compat_get)(struct sock *sk, int optval, | 88 | int (*compat_get)(struct sock *sk, int optval, |
89 | void __user *user, int *len); | 89 | void __user *user, int *len); |
90 | 90 | ||
91 | /* Number of users inside set() or get(). */ | 91 | /* Use the module struct to lock set/get code in place */ |
92 | unsigned int use; | 92 | struct module *owner; |
93 | struct task_struct *cleanup_task; | ||
94 | }; | 93 | }; |
95 | 94 | ||
96 | /* Each queued (to userspace) skbuff has one of these. */ | 95 | /* Each queued (to userspace) skbuff has one of these. */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 157dcb055b5c..7250eeadd7b5 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -431,6 +431,7 @@ extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int); | |||
431 | extern int nfs_wb_all(struct inode *inode); | 431 | extern int nfs_wb_all(struct inode *inode); |
432 | extern int nfs_wb_page(struct inode *inode, struct page* page); | 432 | extern int nfs_wb_page(struct inode *inode, struct page* page); |
433 | extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); | 433 | extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); |
434 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); | ||
434 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 435 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
435 | extern int nfs_commit_inode(struct inode *, int); | 436 | extern int nfs_commit_inode(struct inode *, int); |
436 | extern struct nfs_write_data *nfs_commit_alloc(void); | 437 | extern struct nfs_write_data *nfs_commit_alloc(void); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index e7d8d4e19a53..038a0dc7273a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -557,6 +557,7 @@ int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | |||
557 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 557 | int pcix_get_max_mmrbc(struct pci_dev *dev); |
558 | int pcix_get_mmrbc(struct pci_dev *dev); | 558 | int pcix_get_mmrbc(struct pci_dev *dev); |
559 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 559 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
560 | int pcie_get_readrq(struct pci_dev *dev); | ||
560 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 561 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
561 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 562 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
562 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 563 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
@@ -578,6 +579,9 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
578 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 579 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
579 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 580 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); |
580 | 581 | ||
582 | /* Functions for PCI Hotplug drivers to use */ | ||
583 | int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||
584 | |||
581 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ | 585 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ |
582 | void pci_bus_assign_resources(struct pci_bus *bus); | 586 | void pci_bus_assign_resources(struct pci_bus *bus); |
583 | void pci_bus_size_bridges(struct pci_bus *bus); | 587 | void pci_bus_size_bridges(struct pci_bus *bus); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 8938d59013c6..55f307ffbf96 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -360,6 +360,9 @@ | |||
360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 | 360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 |
361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 | 361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 |
362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 | 362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 |
363 | #define PCI_DEVICE_ID_ATI_RD580 0x5952 | ||
364 | #define PCI_DEVICE_ID_ATI_RX790 0x5957 | ||
365 | #define PCI_DEVICE_ID_ATI_RS690 0x7910 | ||
363 | /* ATI IXP Chipset */ | 366 | /* ATI IXP Chipset */ |
364 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 | 367 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 |
365 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 | 368 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 |
@@ -371,10 +374,9 @@ | |||
371 | #define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 | 374 | #define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 |
372 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a | 375 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a |
373 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 | 376 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 |
374 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 | 377 | #define PCI_DEVICE_ID_ATI_SBX00_SMBUS 0x4385 |
375 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 378 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
376 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 | 379 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 |
377 | #define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395 | ||
378 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c | 380 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c |
379 | 381 | ||
380 | #define PCI_VENDOR_ID_VLSI 0x1004 | 382 | #define PCI_VENDOR_ID_VLSI 0x1004 |
@@ -1287,6 +1289,7 @@ | |||
1287 | #define PCI_DEVICE_ID_VIA_VT3324 0x0324 | 1289 | #define PCI_DEVICE_ID_VIA_VT3324 0x0324 |
1288 | #define PCI_DEVICE_ID_VIA_VT3336 0x0336 | 1290 | #define PCI_DEVICE_ID_VIA_VT3336 0x0336 |
1289 | #define PCI_DEVICE_ID_VIA_VT3351 0x0351 | 1291 | #define PCI_DEVICE_ID_VIA_VT3351 0x0351 |
1292 | #define PCI_DEVICE_ID_VIA_VT3364 0x0364 | ||
1290 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 | 1293 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 |
1291 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 | 1294 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 |
1292 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | 1295 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 |
@@ -1340,6 +1343,7 @@ | |||
1340 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 | 1343 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 |
1341 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 | 1344 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 |
1342 | #define PCI_DEVICE_ID_VIA_CX700 0x8324 | 1345 | #define PCI_DEVICE_ID_VIA_CX700 0x8324 |
1346 | #define PCI_DEVICE_ID_VIA_VX800 0x8353 | ||
1343 | #define PCI_DEVICE_ID_VIA_8371_1 0x8391 | 1347 | #define PCI_DEVICE_ID_VIA_8371_1 0x8391 |
1344 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 | 1348 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 |
1345 | #define PCI_DEVICE_ID_VIA_838X_1 0xB188 | 1349 | #define PCI_DEVICE_ID_VIA_838X_1 0xB188 |
@@ -2289,6 +2293,8 @@ | |||
2289 | #define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599 | 2293 | #define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599 |
2290 | #define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a | 2294 | #define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a |
2291 | #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e | 2295 | #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e |
2296 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 | ||
2297 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032 | ||
2292 | #define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 | 2298 | #define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 |
2293 | #define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 | 2299 | #define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 |
2294 | #define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 | 2300 | #define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 |
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 5ad913ff02b2..b7824c215354 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -226,7 +226,7 @@ extern unsigned int pmu_power_flags; | |||
226 | extern void pmu_backlight_init(void); | 226 | extern void pmu_backlight_init(void); |
227 | 227 | ||
228 | /* some code needs to know if the PMU was suspended for hibernation */ | 228 | /* some code needs to know if the PMU was suspended for hibernation */ |
229 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 229 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
230 | extern int pmu_sys_suspended; | 230 | extern int pmu_sys_suspended; |
231 | #else | 231 | #else |
232 | /* if power management is not configured it can't be suspended */ | 232 | /* if power management is not configured it can't be suspended */ |
diff --git a/include/linux/poll.h b/include/linux/poll.h index 27690798623f..16d813b364ef 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) | 21 | #define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) |
22 | #define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) | 22 | #define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) |
23 | 23 | ||
24 | #define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) | ||
25 | |||
24 | struct poll_table_struct; | 26 | struct poll_table_struct; |
25 | 27 | ||
26 | /* | 28 | /* |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index c91476ce314a..dff3192374f8 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -351,6 +351,8 @@ enum | |||
351 | #define RTAX_INITCWND RTAX_INITCWND | 351 | #define RTAX_INITCWND RTAX_INITCWND |
352 | RTAX_FEATURES, | 352 | RTAX_FEATURES, |
353 | #define RTAX_FEATURES RTAX_FEATURES | 353 | #define RTAX_FEATURES RTAX_FEATURES |
354 | RTAX_RTO_MIN, | ||
355 | #define RTAX_RTO_MIN RTAX_RTO_MIN | ||
354 | __RTAX_MAX | 356 | __RTAX_MAX |
355 | }; | 357 | }; |
356 | 358 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 682ef87da6eb..313c6b6e774f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -113,7 +113,7 @@ extern unsigned long avenrun[]; /* Load averages */ | |||
113 | 113 | ||
114 | #define FSHIFT 11 /* nr of bits of precision */ | 114 | #define FSHIFT 11 /* nr of bits of precision */ |
115 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | 115 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ |
116 | #define LOAD_FREQ (5*HZ) /* 5 sec intervals */ | 116 | #define LOAD_FREQ (5*HZ+1) /* 5 sec intervals */ |
117 | #define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */ | 117 | #define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */ |
118 | #define EXP_5 2014 /* 1/exp(5sec/5min) */ | 118 | #define EXP_5 2014 /* 1/exp(5sec/5min) */ |
119 | #define EXP_15 2037 /* 1/exp(5sec/15min) */ | 119 | #define EXP_15 2037 /* 1/exp(5sec/15min) */ |
@@ -438,7 +438,7 @@ struct sighand_struct { | |||
438 | atomic_t count; | 438 | atomic_t count; |
439 | struct k_sigaction action[_NSIG]; | 439 | struct k_sigaction action[_NSIG]; |
440 | spinlock_t siglock; | 440 | spinlock_t siglock; |
441 | struct list_head signalfd_list; | 441 | wait_queue_head_t signalfd_wqh; |
442 | }; | 442 | }; |
443 | 443 | ||
444 | struct pacct_struct { | 444 | struct pacct_struct { |
@@ -593,7 +593,7 @@ struct user_struct { | |||
593 | #endif | 593 | #endif |
594 | 594 | ||
595 | /* Hash table maintenance information */ | 595 | /* Hash table maintenance information */ |
596 | struct list_head uidhash_list; | 596 | struct hlist_node uidhash_node; |
597 | uid_t uid; | 597 | uid_t uid; |
598 | }; | 598 | }; |
599 | 599 | ||
@@ -681,7 +681,7 @@ enum cpu_idle_type { | |||
681 | #define SCHED_LOAD_SHIFT 10 | 681 | #define SCHED_LOAD_SHIFT 10 |
682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | 682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) |
683 | 683 | ||
684 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 1) | 684 | #define SCHED_LOAD_SCALE_FUZZ SCHED_LOAD_SCALE |
685 | 685 | ||
686 | #ifdef CONFIG_SMP | 686 | #ifdef CONFIG_SMP |
687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
@@ -904,6 +904,7 @@ struct sched_entity { | |||
904 | 904 | ||
905 | u64 exec_start; | 905 | u64 exec_start; |
906 | u64 sum_exec_runtime; | 906 | u64 sum_exec_runtime; |
907 | u64 prev_sum_exec_runtime; | ||
907 | u64 wait_start_fair; | 908 | u64 wait_start_fair; |
908 | u64 sleep_start_fair; | 909 | u64 sleep_start_fair; |
909 | 910 | ||
@@ -1388,7 +1389,8 @@ extern void sched_exec(void); | |||
1388 | #define sched_exec() {} | 1389 | #define sched_exec() {} |
1389 | #endif | 1390 | #endif |
1390 | 1391 | ||
1391 | extern void sched_clock_unstable_event(void); | 1392 | extern void sched_clock_idle_sleep_event(void); |
1393 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | ||
1392 | 1394 | ||
1393 | #ifdef CONFIG_HOTPLUG_CPU | 1395 | #ifdef CONFIG_HOTPLUG_CPU |
1394 | extern void idle_task_exit(void); | 1396 | extern void idle_task_exit(void); |
@@ -1398,11 +1400,13 @@ static inline void idle_task_exit(void) {} | |||
1398 | 1400 | ||
1399 | extern void sched_idle_next(void); | 1401 | extern void sched_idle_next(void); |
1400 | 1402 | ||
1401 | extern unsigned int sysctl_sched_granularity; | 1403 | extern unsigned int sysctl_sched_latency; |
1404 | extern unsigned int sysctl_sched_min_granularity; | ||
1402 | extern unsigned int sysctl_sched_wakeup_granularity; | 1405 | extern unsigned int sysctl_sched_wakeup_granularity; |
1403 | extern unsigned int sysctl_sched_batch_wakeup_granularity; | 1406 | extern unsigned int sysctl_sched_batch_wakeup_granularity; |
1404 | extern unsigned int sysctl_sched_stat_granularity; | 1407 | extern unsigned int sysctl_sched_stat_granularity; |
1405 | extern unsigned int sysctl_sched_runtime_limit; | 1408 | extern unsigned int sysctl_sched_runtime_limit; |
1409 | extern unsigned int sysctl_sched_compat_yield; | ||
1406 | extern unsigned int sysctl_sched_child_runs_first; | 1410 | extern unsigned int sysctl_sched_child_runs_first; |
1407 | extern unsigned int sysctl_sched_features; | 1411 | extern unsigned int sysctl_sched_features; |
1408 | 1412 | ||
@@ -1469,6 +1473,7 @@ static inline struct user_struct *get_uid(struct user_struct *u) | |||
1469 | } | 1473 | } |
1470 | extern void free_uid(struct user_struct *); | 1474 | extern void free_uid(struct user_struct *); |
1471 | extern void switch_uid(struct user_struct *); | 1475 | extern void switch_uid(struct user_struct *); |
1476 | extern void release_uids(struct user_namespace *ns); | ||
1472 | 1477 | ||
1473 | #include <asm/current.h> | 1478 | #include <asm/current.h> |
1474 | 1479 | ||
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index 510429495690..4c9ff0910ae0 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
@@ -45,49 +45,17 @@ struct signalfd_siginfo { | |||
45 | #ifdef CONFIG_SIGNALFD | 45 | #ifdef CONFIG_SIGNALFD |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Deliver the signal to listening signalfd. This must be called | 48 | * Deliver the signal to listening signalfd. |
49 | * with the sighand lock held. Same are the following that end up | ||
50 | * calling signalfd_deliver(). | ||
51 | */ | ||
52 | void signalfd_deliver(struct task_struct *tsk, int sig); | ||
53 | |||
54 | /* | ||
55 | * No need to fall inside signalfd_deliver() if no signal listeners | ||
56 | * are available. | ||
57 | */ | 49 | */ |
58 | static inline void signalfd_notify(struct task_struct *tsk, int sig) | 50 | static inline void signalfd_notify(struct task_struct *tsk, int sig) |
59 | { | 51 | { |
60 | if (unlikely(!list_empty(&tsk->sighand->signalfd_list))) | 52 | if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh))) |
61 | signalfd_deliver(tsk, sig); | 53 | wake_up(&tsk->sighand->signalfd_wqh); |
62 | } | ||
63 | |||
64 | /* | ||
65 | * The signal -1 is used to notify the signalfd that the sighand | ||
66 | * is on its way to be detached. | ||
67 | */ | ||
68 | static inline void signalfd_detach_locked(struct task_struct *tsk) | ||
69 | { | ||
70 | if (unlikely(!list_empty(&tsk->sighand->signalfd_list))) | ||
71 | signalfd_deliver(tsk, -1); | ||
72 | } | ||
73 | |||
74 | static inline void signalfd_detach(struct task_struct *tsk) | ||
75 | { | ||
76 | struct sighand_struct *sighand = tsk->sighand; | ||
77 | |||
78 | if (unlikely(!list_empty(&sighand->signalfd_list))) { | ||
79 | spin_lock_irq(&sighand->siglock); | ||
80 | signalfd_deliver(tsk, -1); | ||
81 | spin_unlock_irq(&sighand->siglock); | ||
82 | } | ||
83 | } | 54 | } |
84 | 55 | ||
85 | #else /* CONFIG_SIGNALFD */ | 56 | #else /* CONFIG_SIGNALFD */ |
86 | 57 | ||
87 | #define signalfd_deliver(t, s) do { } while (0) | 58 | static inline void signalfd_notify(struct task_struct *tsk, int sig) { } |
88 | #define signalfd_notify(t, s) do { } while (0) | ||
89 | #define signalfd_detach_locked(t) do { } while (0) | ||
90 | #define signalfd_detach(t) do { } while (0) | ||
91 | 59 | ||
92 | #endif /* CONFIG_SIGNALFD */ | 60 | #endif /* CONFIG_SIGNALFD */ |
93 | 61 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 93c27f71122a..a656cecd373c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1352,6 +1352,22 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len) | |||
1352 | skb_headroom(skb) + len <= skb->hdr_len; | 1352 | skb_headroom(skb) + len <= skb->hdr_len; |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom, | ||
1356 | int cloned) | ||
1357 | { | ||
1358 | int delta = 0; | ||
1359 | |||
1360 | if (headroom < NET_SKB_PAD) | ||
1361 | headroom = NET_SKB_PAD; | ||
1362 | if (headroom > skb_headroom(skb)) | ||
1363 | delta = headroom - skb_headroom(skb); | ||
1364 | |||
1365 | if (delta || cloned) | ||
1366 | return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0, | ||
1367 | GFP_ATOMIC); | ||
1368 | return 0; | ||
1369 | } | ||
1370 | |||
1355 | /** | 1371 | /** |
1356 | * skb_cow - copy header of skb when it is required | 1372 | * skb_cow - copy header of skb when it is required |
1357 | * @skb: buffer to cow | 1373 | * @skb: buffer to cow |
@@ -1366,16 +1382,22 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len) | |||
1366 | */ | 1382 | */ |
1367 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) | 1383 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) |
1368 | { | 1384 | { |
1369 | int delta = (headroom > NET_SKB_PAD ? headroom : NET_SKB_PAD) - | 1385 | return __skb_cow(skb, headroom, skb_cloned(skb)); |
1370 | skb_headroom(skb); | 1386 | } |
1371 | |||
1372 | if (delta < 0) | ||
1373 | delta = 0; | ||
1374 | 1387 | ||
1375 | if (delta || skb_cloned(skb)) | 1388 | /** |
1376 | return pskb_expand_head(skb, (delta + (NET_SKB_PAD-1)) & | 1389 | * skb_cow_head - skb_cow but only making the head writable |
1377 | ~(NET_SKB_PAD-1), 0, GFP_ATOMIC); | 1390 | * @skb: buffer to cow |
1378 | return 0; | 1391 | * @headroom: needed headroom |
1392 | * | ||
1393 | * This function is identical to skb_cow except that we replace the | ||
1394 | * skb_cloned check by skb_header_cloned. It should be used when | ||
1395 | * you only need to push on some header and do not need to modify | ||
1396 | * the data. | ||
1397 | */ | ||
1398 | static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom) | ||
1399 | { | ||
1400 | return __skb_cow(skb, headroom, skb_header_cloned(skb)); | ||
1379 | } | 1401 | } |
1380 | 1402 | ||
1381 | /** | 1403 | /** |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 124270df8734..74962077f632 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -78,7 +78,7 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; | |||
78 | * Sorry that the following has to be that ugly but some versions of GCC | 78 | * Sorry that the following has to be that ugly but some versions of GCC |
79 | * have trouble with constant propagation and loops. | 79 | * have trouble with constant propagation and loops. |
80 | */ | 80 | */ |
81 | static inline int kmalloc_index(size_t size) | 81 | static __always_inline int kmalloc_index(size_t size) |
82 | { | 82 | { |
83 | if (!size) | 83 | if (!size) |
84 | return 0; | 84 | return 0; |
@@ -133,7 +133,7 @@ static inline int kmalloc_index(size_t size) | |||
133 | * This ought to end up with a global pointer to the right cache | 133 | * This ought to end up with a global pointer to the right cache |
134 | * in kmalloc_caches. | 134 | * in kmalloc_caches. |
135 | */ | 135 | */ |
136 | static inline struct kmem_cache *kmalloc_slab(size_t size) | 136 | static __always_inline struct kmem_cache *kmalloc_slab(size_t size) |
137 | { | 137 | { |
138 | int index = kmalloc_index(size); | 138 | int index = kmalloc_index(size); |
139 | 139 | ||
@@ -166,7 +166,7 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
166 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | 166 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); |
167 | void *__kmalloc(size_t size, gfp_t flags); | 167 | void *__kmalloc(size_t size, gfp_t flags); |
168 | 168 | ||
169 | static inline void *kmalloc(size_t size, gfp_t flags) | 169 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
170 | { | 170 | { |
171 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | 171 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { |
172 | struct kmem_cache *s = kmalloc_slab(size); | 172 | struct kmem_cache *s = kmalloc_slab(size); |
@@ -183,7 +183,7 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
183 | 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); | 184 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); |
185 | 185 | ||
186 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 186 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
187 | { | 187 | { |
188 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | 188 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { |
189 | struct kmem_cache *s = kmalloc_slab(size); | 189 | struct kmem_cache *s = kmalloc_slab(size); |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 1101b0ce878f..b5f41d4c2eec 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | struct user_namespace { | 12 | struct user_namespace { |
13 | struct kref kref; | 13 | struct kref kref; |
14 | struct list_head uidhash_table[UIDHASH_SZ]; | 14 | struct hlist_head uidhash_table[UIDHASH_SZ]; |
15 | struct user_struct *root_user; | 15 | struct user_struct *root_user; |
16 | }; | 16 | }; |
17 | 17 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 4ef4d22e5e43..b4af6bcb7b7a 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -127,7 +127,7 @@ int sync_page_range(struct inode *inode, struct address_space *mapping, | |||
127 | loff_t pos, loff_t count); | 127 | loff_t pos, loff_t count); |
128 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, | 128 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, |
129 | loff_t pos, loff_t count); | 129 | loff_t pos, loff_t count); |
130 | void set_page_dirty_balance(struct page *page); | 130 | void set_page_dirty_balance(struct page *page, int page_mkwrite); |
131 | void writeback_set_ratelimit(void); | 131 | void writeback_set_ratelimit(void); |
132 | 132 | ||
133 | /* pdflush.c */ | 133 | /* pdflush.c */ |