diff options
Diffstat (limited to 'include/linux')
77 files changed, 1341 insertions, 634 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b926afe8c03e..3da73f5f0ae9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -116,11 +116,12 @@ extern unsigned long acpi_realmode_flags; | |||
116 | 116 | ||
117 | int acpi_register_gsi (struct device *dev, u32 gsi, int triggering, int polarity); | 117 | int acpi_register_gsi (struct device *dev, u32 gsi, int triggering, int polarity); |
118 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 118 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
119 | int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi); | ||
119 | 120 | ||
120 | #ifdef CONFIG_X86_IO_APIC | 121 | #ifdef CONFIG_X86_IO_APIC |
121 | extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity); | 122 | extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity); |
122 | #else | 123 | #else |
123 | #define acpi_get_override_irq(bus, trigger, polarity) (-1) | 124 | #define acpi_get_override_irq(gsi, trigger, polarity) (-1) |
124 | #endif | 125 | #endif |
125 | /* | 126 | /* |
126 | * This function undoes the effect of one call to acpi_register_gsi(). | 127 | * This function undoes the effect of one call to acpi_register_gsi(). |
diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h new file mode 100644 index 000000000000..f7dd576dd5a4 --- /dev/null +++ b/include/linux/ahci_platform.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * AHCI SATA platform driver | ||
3 | * | ||
4 | * Copyright 2004-2005 Red Hat, Inc. | ||
5 | * Jeff Garzik <jgarzik@pobox.com> | ||
6 | * Copyright 2010 MontaVista Software, LLC. | ||
7 | * Anton Vorontsov <avorontsov@ru.mvista.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2, or (at your option) | ||
12 | * any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef _AHCI_PLATFORM_H | ||
16 | #define _AHCI_PLATFORM_H | ||
17 | |||
18 | struct device; | ||
19 | struct ata_port_info; | ||
20 | |||
21 | struct ahci_platform_data { | ||
22 | int (*init)(struct device *dev); | ||
23 | void (*exit)(struct device *dev); | ||
24 | const struct ata_port_info *ata_port_info; | ||
25 | unsigned int force_port_map; | ||
26 | unsigned int mask_port_map; | ||
27 | }; | ||
28 | |||
29 | #endif /* _AHCI_PLATFORM_H */ | ||
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h index 6b4241748dda..7e466fe72025 100644 --- a/include/linux/amba/mmci.h +++ b/include/linux/amba/mmci.h | |||
@@ -6,8 +6,29 @@ | |||
6 | 6 | ||
7 | #include <linux/mmc/host.h> | 7 | #include <linux/mmc/host.h> |
8 | 8 | ||
9 | /** | ||
10 | * struct mmci_platform_data - platform configuration for the MMCI | ||
11 | * (also known as PL180) block. | ||
12 | * @f_max: the maximum operational frequency for this host in this | ||
13 | * platform configuration. When this is specified it takes precedence | ||
14 | * over the module parameter for the same frequency. | ||
15 | * @ocr_mask: available voltages on the 4 pins from the block, this | ||
16 | * is ignored if a regulator is used, see the MMC_VDD_* masks in | ||
17 | * mmc/host.h | ||
18 | * @translate_vdd: a callback function to translate a MMC_VDD_* | ||
19 | * mask into a value to be binary or:ed and written into the | ||
20 | * MMCIPWR register of the block | ||
21 | * @status: if no GPIO read function was given to the block in | ||
22 | * gpio_wp (below) this function will be called to determine | ||
23 | * whether a card is present in the MMC slot or not | ||
24 | * @gpio_wp: read this GPIO pin to see if the card is write protected | ||
25 | * @gpio_cd: read this GPIO pin to detect card insertion | ||
26 | * @capabilities: the capabilities of the block as implemented in | ||
27 | * this platform, signify anything MMC_CAP_* from mmc/host.h | ||
28 | */ | ||
9 | struct mmci_platform_data { | 29 | struct mmci_platform_data { |
10 | unsigned int ocr_mask; /* available voltages */ | 30 | unsigned int f_max; |
31 | unsigned int ocr_mask; | ||
11 | u32 (*translate_vdd)(struct device *, unsigned int); | 32 | u32 (*translate_vdd)(struct device *, unsigned int); |
12 | unsigned int (*status)(struct device *); | 33 | unsigned int (*status)(struct device *); |
13 | int gpio_wp; | 34 | int gpio_wp; |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 700c5b9b3583..fe6e681a9d74 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -467,7 +467,7 @@ enum ata_ioctls { | |||
467 | 467 | ||
468 | /* core structures */ | 468 | /* core structures */ |
469 | 469 | ||
470 | struct ata_prd { | 470 | struct ata_bmdma_prd { |
471 | __le32 addr; | 471 | __le32 addr; |
472 | __le32 flags_len; | 472 | __le32 flags_len; |
473 | }; | 473 | }; |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index b796eab5ca75..fc68053378ce 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -10,6 +10,11 @@ | |||
10 | #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) | 10 | #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | extern unsigned int __sw_hweight8(unsigned int w); | ||
14 | extern unsigned int __sw_hweight16(unsigned int w); | ||
15 | extern unsigned int __sw_hweight32(unsigned int w); | ||
16 | extern unsigned long __sw_hweight64(__u64 w); | ||
17 | |||
13 | /* | 18 | /* |
14 | * Include this here because some architectures need generic_ffs/fls in | 19 | * Include this here because some architectures need generic_ffs/fls in |
15 | * scope | 20 | * scope |
@@ -44,31 +49,6 @@ static inline unsigned long hweight_long(unsigned long w) | |||
44 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); | 49 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); |
45 | } | 50 | } |
46 | 51 | ||
47 | /* | ||
48 | * Clearly slow versions of the hweightN() functions, their benefit is | ||
49 | * of course compile time evaluation of constant arguments. | ||
50 | */ | ||
51 | #define HWEIGHT8(w) \ | ||
52 | ( BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + \ | ||
53 | (!!((w) & (1ULL << 0))) + \ | ||
54 | (!!((w) & (1ULL << 1))) + \ | ||
55 | (!!((w) & (1ULL << 2))) + \ | ||
56 | (!!((w) & (1ULL << 3))) + \ | ||
57 | (!!((w) & (1ULL << 4))) + \ | ||
58 | (!!((w) & (1ULL << 5))) + \ | ||
59 | (!!((w) & (1ULL << 6))) + \ | ||
60 | (!!((w) & (1ULL << 7))) ) | ||
61 | |||
62 | #define HWEIGHT16(w) (HWEIGHT8(w) + HWEIGHT8((w) >> 8)) | ||
63 | #define HWEIGHT32(w) (HWEIGHT16(w) + HWEIGHT16((w) >> 16)) | ||
64 | #define HWEIGHT64(w) (HWEIGHT32(w) + HWEIGHT32((w) >> 32)) | ||
65 | |||
66 | /* | ||
67 | * Type invariant version that simply casts things to the | ||
68 | * largest type. | ||
69 | */ | ||
70 | #define HWEIGHT(w) HWEIGHT64((u64)(w)) | ||
71 | |||
72 | /** | 52 | /** |
73 | * rol32 - rotate a 32-bit value left | 53 | * rol32 - rotate a 32-bit value left |
74 | * @word: value to rotate | 54 | * @word: value to rotate |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 4bca8b60cdf7..5ea3c60c160c 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -273,7 +273,6 @@ static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift) | |||
273 | } | 273 | } |
274 | 274 | ||
275 | 275 | ||
276 | /* used to install a new clocksource */ | ||
277 | extern int clocksource_register(struct clocksource*); | 276 | extern int clocksource_register(struct clocksource*); |
278 | extern void clocksource_unregister(struct clocksource*); | 277 | extern void clocksource_unregister(struct clocksource*); |
279 | extern void clocksource_touch_watchdog(void); | 278 | extern void clocksource_touch_watchdog(void); |
@@ -287,6 +286,24 @@ extern void clocksource_mark_unstable(struct clocksource *cs); | |||
287 | extern void | 286 | extern void |
288 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); | 287 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); |
289 | 288 | ||
289 | /* | ||
290 | * Don't call __clocksource_register_scale directly, use | ||
291 | * clocksource_register_hz/khz | ||
292 | */ | ||
293 | extern int | ||
294 | __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq); | ||
295 | |||
296 | static inline int clocksource_register_hz(struct clocksource *cs, u32 hz) | ||
297 | { | ||
298 | return __clocksource_register_scale(cs, 1, hz); | ||
299 | } | ||
300 | |||
301 | static inline int clocksource_register_khz(struct clocksource *cs, u32 khz) | ||
302 | { | ||
303 | return __clocksource_register_scale(cs, 1000, khz); | ||
304 | } | ||
305 | |||
306 | |||
290 | static inline void | 307 | static inline void |
291 | clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) | 308 | clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) |
292 | { | 309 | { |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 4de02b10007f..9f15150ce8d6 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -278,6 +278,27 @@ struct freq_attr { | |||
278 | ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count); | 278 | ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count); |
279 | }; | 279 | }; |
280 | 280 | ||
281 | #define cpufreq_freq_attr_ro(_name) \ | ||
282 | static struct freq_attr _name = \ | ||
283 | __ATTR(_name, 0444, show_##_name, NULL) | ||
284 | |||
285 | #define cpufreq_freq_attr_ro_perm(_name, _perm) \ | ||
286 | static struct freq_attr _name = \ | ||
287 | __ATTR(_name, _perm, show_##_name, NULL) | ||
288 | |||
289 | #define cpufreq_freq_attr_ro_old(_name) \ | ||
290 | static struct freq_attr _name##_old = \ | ||
291 | __ATTR(_name, 0444, show_##_name##_old, NULL) | ||
292 | |||
293 | #define cpufreq_freq_attr_rw(_name) \ | ||
294 | static struct freq_attr _name = \ | ||
295 | __ATTR(_name, 0644, show_##_name, store_##_name) | ||
296 | |||
297 | #define cpufreq_freq_attr_rw_old(_name) \ | ||
298 | static struct freq_attr _name##_old = \ | ||
299 | __ATTR(_name, 0644, show_##_name##_old, store_##_name##_old) | ||
300 | |||
301 | |||
281 | struct global_attr { | 302 | struct global_attr { |
282 | struct attribute attr; | 303 | struct attribute attr; |
283 | ssize_t (*show)(struct kobject *kobj, | 304 | ssize_t (*show)(struct kobject *kobj, |
@@ -286,6 +307,15 @@ struct global_attr { | |||
286 | const char *c, size_t count); | 307 | const char *c, size_t count); |
287 | }; | 308 | }; |
288 | 309 | ||
310 | #define define_one_global_ro(_name) \ | ||
311 | static struct global_attr _name = \ | ||
312 | __ATTR(_name, 0444, show_##_name, NULL) | ||
313 | |||
314 | #define define_one_global_rw(_name) \ | ||
315 | static struct global_attr _name = \ | ||
316 | __ATTR(_name, 0644, show_##_name, store_##_name) | ||
317 | |||
318 | |||
289 | /********************************************************************* | 319 | /********************************************************************* |
290 | * CPUFREQ 2.6. INTERFACE * | 320 | * CPUFREQ 2.6. INTERFACE * |
291 | *********************************************************************/ | 321 | *********************************************************************/ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index a5740fc4d04b..a73454aec333 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -21,8 +21,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */ | |||
21 | extern int cpuset_init(void); | 21 | extern int cpuset_init(void); |
22 | extern void cpuset_init_smp(void); | 22 | extern void cpuset_init_smp(void); |
23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); | 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
24 | extern void cpuset_cpus_allowed_locked(struct task_struct *p, | 24 | extern int cpuset_cpus_allowed_fallback(struct task_struct *p); |
25 | struct cpumask *mask); | ||
26 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
27 | #define cpuset_current_mems_allowed (current->mems_allowed) | 26 | #define cpuset_current_mems_allowed (current->mems_allowed) |
28 | void cpuset_init_current_mems_allowed(void); | 27 | void cpuset_init_current_mems_allowed(void); |
@@ -69,9 +68,6 @@ struct seq_file; | |||
69 | extern void cpuset_task_status_allowed(struct seq_file *m, | 68 | extern void cpuset_task_status_allowed(struct seq_file *m, |
70 | struct task_struct *task); | 69 | struct task_struct *task); |
71 | 70 | ||
72 | extern void cpuset_lock(void); | ||
73 | extern void cpuset_unlock(void); | ||
74 | |||
75 | extern int cpuset_mem_spread_node(void); | 71 | extern int cpuset_mem_spread_node(void); |
76 | 72 | ||
77 | static inline int cpuset_do_page_mem_spread(void) | 73 | static inline int cpuset_do_page_mem_spread(void) |
@@ -105,10 +101,11 @@ static inline void cpuset_cpus_allowed(struct task_struct *p, | |||
105 | { | 101 | { |
106 | cpumask_copy(mask, cpu_possible_mask); | 102 | cpumask_copy(mask, cpu_possible_mask); |
107 | } | 103 | } |
108 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, | 104 | |
109 | struct cpumask *mask) | 105 | static inline int cpuset_cpus_allowed_fallback(struct task_struct *p) |
110 | { | 106 | { |
111 | cpumask_copy(mask, cpu_possible_mask); | 107 | cpumask_copy(&p->cpus_allowed, cpu_possible_mask); |
108 | return cpumask_any(cpu_active_mask); | ||
112 | } | 109 | } |
113 | 110 | ||
114 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | 111 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) |
@@ -157,9 +154,6 @@ static inline void cpuset_task_status_allowed(struct seq_file *m, | |||
157 | { | 154 | { |
158 | } | 155 | } |
159 | 156 | ||
160 | static inline void cpuset_lock(void) {} | ||
161 | static inline void cpuset_unlock(void) {} | ||
162 | |||
163 | static inline int cpuset_mem_spread_node(void) | 157 | static inline int cpuset_mem_spread_node(void) |
164 | { | 158 | { |
165 | return 0; | 159 | return 0; |
diff --git a/include/linux/debugobjects.h b/include/linux/debugobjects.h index 8c243aaa86a7..597692f1fc8d 100644 --- a/include/linux/debugobjects.h +++ b/include/linux/debugobjects.h | |||
@@ -20,12 +20,14 @@ struct debug_obj_descr; | |||
20 | * struct debug_obj - representaion of an tracked object | 20 | * struct debug_obj - representaion of an tracked object |
21 | * @node: hlist node to link the object into the tracker list | 21 | * @node: hlist node to link the object into the tracker list |
22 | * @state: tracked object state | 22 | * @state: tracked object state |
23 | * @astate: current active state | ||
23 | * @object: pointer to the real object | 24 | * @object: pointer to the real object |
24 | * @descr: pointer to an object type specific debug description structure | 25 | * @descr: pointer to an object type specific debug description structure |
25 | */ | 26 | */ |
26 | struct debug_obj { | 27 | struct debug_obj { |
27 | struct hlist_node node; | 28 | struct hlist_node node; |
28 | enum debug_obj_state state; | 29 | enum debug_obj_state state; |
30 | unsigned int astate; | ||
29 | void *object; | 31 | void *object; |
30 | struct debug_obj_descr *descr; | 32 | struct debug_obj_descr *descr; |
31 | }; | 33 | }; |
@@ -60,6 +62,15 @@ extern void debug_object_deactivate(void *addr, struct debug_obj_descr *descr); | |||
60 | extern void debug_object_destroy (void *addr, struct debug_obj_descr *descr); | 62 | extern void debug_object_destroy (void *addr, struct debug_obj_descr *descr); |
61 | extern void debug_object_free (void *addr, struct debug_obj_descr *descr); | 63 | extern void debug_object_free (void *addr, struct debug_obj_descr *descr); |
62 | 64 | ||
65 | /* | ||
66 | * Active state: | ||
67 | * - Set at 0 upon initialization. | ||
68 | * - Must return to 0 before deactivation. | ||
69 | */ | ||
70 | extern void | ||
71 | debug_object_active_state(void *addr, struct debug_obj_descr *descr, | ||
72 | unsigned int expect, unsigned int next); | ||
73 | |||
63 | extern void debug_objects_early_init(void); | 74 | extern void debug_objects_early_init(void); |
64 | extern void debug_objects_mem_init(void); | 75 | extern void debug_objects_mem_init(void); |
65 | #else | 76 | #else |
diff --git a/include/linux/device.h b/include/linux/device.h index 182192892d45..241b96bcd7ad 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -451,6 +451,10 @@ struct device { | |||
451 | 451 | ||
452 | static inline const char *dev_name(const struct device *dev) | 452 | static inline const char *dev_name(const struct device *dev) |
453 | { | 453 | { |
454 | /* Use the init name until the kobject becomes available */ | ||
455 | if (dev->init_name) | ||
456 | return dev->init_name; | ||
457 | |||
454 | return kobject_name(&dev->kobj); | 458 | return kobject_name(&dev->kobj); |
455 | } | 459 | } |
456 | 460 | ||
diff --git a/include/linux/elf.h b/include/linux/elf.h index 597858418051..4d608014753a 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -394,6 +394,7 @@ typedef struct elf64_shdr { | |||
394 | #define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */ | 394 | #define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */ |
395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ | 395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ |
396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ | 396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ |
397 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ | ||
397 | 398 | ||
398 | 399 | ||
399 | /* Note header in a PT_NOTE section */ | 400 | /* Note header in a PT_NOTE section */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 44f35aea2f1f..948bd2bfb1de 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2362,6 +2362,8 @@ extern void simple_release_fs(struct vfsmount **mount, int *count); | |||
2362 | 2362 | ||
2363 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, | 2363 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, |
2364 | loff_t *ppos, const void *from, size_t available); | 2364 | loff_t *ppos, const void *from, size_t available); |
2365 | extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos, | ||
2366 | const void __user *from, size_t count); | ||
2365 | 2367 | ||
2366 | extern int simple_fsync(struct file *, struct dentry *, int); | 2368 | extern int simple_fsync(struct file *, struct dentry *, int); |
2367 | 2369 | ||
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 01e6adea07ec..41e46330d9be 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -82,9 +82,13 @@ void clear_ftrace_function(void); | |||
82 | extern void ftrace_stub(unsigned long a0, unsigned long a1); | 82 | extern void ftrace_stub(unsigned long a0, unsigned long a1); |
83 | 83 | ||
84 | #else /* !CONFIG_FUNCTION_TRACER */ | 84 | #else /* !CONFIG_FUNCTION_TRACER */ |
85 | # define register_ftrace_function(ops) do { } while (0) | 85 | /* |
86 | # define unregister_ftrace_function(ops) do { } while (0) | 86 | * (un)register_ftrace_function must be a macro since the ops parameter |
87 | # define clear_ftrace_function(ops) do { } while (0) | 87 | * must not be evaluated. |
88 | */ | ||
89 | #define register_ftrace_function(ops) ({ 0; }) | ||
90 | #define unregister_ftrace_function(ops) ({ 0; }) | ||
91 | static inline void clear_ftrace_function(void) { } | ||
88 | static inline void ftrace_kill(void) { } | 92 | static inline void ftrace_kill(void) { } |
89 | static inline void ftrace_stop(void) { } | 93 | static inline void ftrace_stop(void) { } |
90 | static inline void ftrace_start(void) { } | 94 | static inline void ftrace_start(void) { } |
@@ -237,11 +241,13 @@ extern int skip_trace(unsigned long ip); | |||
237 | extern void ftrace_disable_daemon(void); | 241 | extern void ftrace_disable_daemon(void); |
238 | extern void ftrace_enable_daemon(void); | 242 | extern void ftrace_enable_daemon(void); |
239 | #else | 243 | #else |
240 | # define skip_trace(ip) ({ 0; }) | 244 | static inline int skip_trace(unsigned long ip) { return 0; } |
241 | # define ftrace_force_update() ({ 0; }) | 245 | static inline int ftrace_force_update(void) { return 0; } |
242 | # define ftrace_set_filter(buf, len, reset) do { } while (0) | 246 | static inline void ftrace_set_filter(unsigned char *buf, int len, int reset) |
243 | # define ftrace_disable_daemon() do { } while (0) | 247 | { |
244 | # define ftrace_enable_daemon() do { } while (0) | 248 | } |
249 | static inline void ftrace_disable_daemon(void) { } | ||
250 | static inline void ftrace_enable_daemon(void) { } | ||
245 | static inline void ftrace_release_mod(struct module *mod) {} | 251 | static inline void ftrace_release_mod(struct module *mod) {} |
246 | static inline int register_ftrace_command(struct ftrace_func_command *cmd) | 252 | static inline int register_ftrace_command(struct ftrace_func_command *cmd) |
247 | { | 253 | { |
@@ -314,16 +320,16 @@ static inline void __ftrace_enabled_restore(int enabled) | |||
314 | extern void time_hardirqs_on(unsigned long a0, unsigned long a1); | 320 | extern void time_hardirqs_on(unsigned long a0, unsigned long a1); |
315 | extern void time_hardirqs_off(unsigned long a0, unsigned long a1); | 321 | extern void time_hardirqs_off(unsigned long a0, unsigned long a1); |
316 | #else | 322 | #else |
317 | # define time_hardirqs_on(a0, a1) do { } while (0) | 323 | static inline void time_hardirqs_on(unsigned long a0, unsigned long a1) { } |
318 | # define time_hardirqs_off(a0, a1) do { } while (0) | 324 | static inline void time_hardirqs_off(unsigned long a0, unsigned long a1) { } |
319 | #endif | 325 | #endif |
320 | 326 | ||
321 | #ifdef CONFIG_PREEMPT_TRACER | 327 | #ifdef CONFIG_PREEMPT_TRACER |
322 | extern void trace_preempt_on(unsigned long a0, unsigned long a1); | 328 | extern void trace_preempt_on(unsigned long a0, unsigned long a1); |
323 | extern void trace_preempt_off(unsigned long a0, unsigned long a1); | 329 | extern void trace_preempt_off(unsigned long a0, unsigned long a1); |
324 | #else | 330 | #else |
325 | # define trace_preempt_on(a0, a1) do { } while (0) | 331 | static inline void trace_preempt_on(unsigned long a0, unsigned long a1) { } |
326 | # define trace_preempt_off(a0, a1) do { } while (0) | 332 | static inline void trace_preempt_off(unsigned long a0, unsigned long a1) { } |
327 | #endif | 333 | #endif |
328 | 334 | ||
329 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 335 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
@@ -352,6 +358,10 @@ struct ftrace_graph_ret { | |||
352 | int depth; | 358 | int depth; |
353 | }; | 359 | }; |
354 | 360 | ||
361 | /* Type of the callback handlers for tracing function graph*/ | ||
362 | typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */ | ||
363 | typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */ | ||
364 | |||
355 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 365 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
356 | 366 | ||
357 | /* for init task */ | 367 | /* for init task */ |
@@ -400,10 +410,6 @@ extern char __irqentry_text_end[]; | |||
400 | 410 | ||
401 | #define FTRACE_RETFUNC_DEPTH 50 | 411 | #define FTRACE_RETFUNC_DEPTH 50 |
402 | #define FTRACE_RETSTACK_ALLOC_SIZE 32 | 412 | #define FTRACE_RETSTACK_ALLOC_SIZE 32 |
403 | /* Type of the callback handlers for tracing function graph*/ | ||
404 | typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */ | ||
405 | typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */ | ||
406 | |||
407 | extern int register_ftrace_graph(trace_func_graph_ret_t retfunc, | 413 | extern int register_ftrace_graph(trace_func_graph_ret_t retfunc, |
408 | trace_func_graph_ent_t entryfunc); | 414 | trace_func_graph_ent_t entryfunc); |
409 | 415 | ||
@@ -441,6 +447,13 @@ static inline void unpause_graph_tracing(void) | |||
441 | static inline void ftrace_graph_init_task(struct task_struct *t) { } | 447 | static inline void ftrace_graph_init_task(struct task_struct *t) { } |
442 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } | 448 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } |
443 | 449 | ||
450 | static inline int register_ftrace_graph(trace_func_graph_ret_t retfunc, | ||
451 | trace_func_graph_ent_t entryfunc) | ||
452 | { | ||
453 | return -1; | ||
454 | } | ||
455 | static inline void unregister_ftrace_graph(void) { } | ||
456 | |||
444 | static inline int task_curr_ret_stack(struct task_struct *tsk) | 457 | static inline int task_curr_ret_stack(struct task_struct *tsk) |
445 | { | 458 | { |
446 | return -1; | 459 | return -1; |
@@ -492,7 +505,9 @@ static inline int test_tsk_trace_graph(struct task_struct *tsk) | |||
492 | return tsk->trace & TSK_TRACE_FL_GRAPH; | 505 | return tsk->trace & TSK_TRACE_FL_GRAPH; |
493 | } | 506 | } |
494 | 507 | ||
495 | extern int ftrace_dump_on_oops; | 508 | enum ftrace_dump_mode; |
509 | |||
510 | extern enum ftrace_dump_mode ftrace_dump_on_oops; | ||
496 | 511 | ||
497 | #ifdef CONFIG_PREEMPT | 512 | #ifdef CONFIG_PREEMPT |
498 | #define INIT_TRACE_RECURSION .trace_recursion = 0, | 513 | #define INIT_TRACE_RECURSION .trace_recursion = 0, |
@@ -504,18 +519,6 @@ extern int ftrace_dump_on_oops; | |||
504 | #define INIT_TRACE_RECURSION | 519 | #define INIT_TRACE_RECURSION |
505 | #endif | 520 | #endif |
506 | 521 | ||
507 | #ifdef CONFIG_HW_BRANCH_TRACER | ||
508 | |||
509 | void trace_hw_branch(u64 from, u64 to); | ||
510 | void trace_hw_branch_oops(void); | ||
511 | |||
512 | #else /* CONFIG_HW_BRANCH_TRACER */ | ||
513 | |||
514 | static inline void trace_hw_branch(u64 from, u64 to) {} | ||
515 | static inline void trace_hw_branch_oops(void) {} | ||
516 | |||
517 | #endif /* CONFIG_HW_BRANCH_TRACER */ | ||
518 | |||
519 | #ifdef CONFIG_FTRACE_SYSCALLS | 522 | #ifdef CONFIG_FTRACE_SYSCALLS |
520 | 523 | ||
521 | unsigned long arch_syscall_addr(int nr); | 524 | unsigned long arch_syscall_addr(int nr); |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index c0f4b364c711..39e71b0a3bfd 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -58,6 +58,7 @@ struct trace_iterator { | |||
58 | /* The below is zeroed out in pipe_read */ | 58 | /* The below is zeroed out in pipe_read */ |
59 | struct trace_seq seq; | 59 | struct trace_seq seq; |
60 | struct trace_entry *ent; | 60 | struct trace_entry *ent; |
61 | unsigned long lost_events; | ||
61 | int leftover; | 62 | int leftover; |
62 | int cpu; | 63 | int cpu; |
63 | u64 ts; | 64 | u64 ts; |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 5d86fb2309d2..fd0c1b857d3d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -422,6 +422,8 @@ extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, | |||
422 | 422 | ||
423 | extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta, | 423 | extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta, |
424 | const enum hrtimer_mode mode); | 424 | const enum hrtimer_mode mode); |
425 | extern int schedule_hrtimeout_range_clock(ktime_t *expires, | ||
426 | unsigned long delta, const enum hrtimer_mode mode, int clock); | ||
425 | extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode); | 427 | extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode); |
426 | 428 | ||
427 | /* Soft interrupt function to run the hrtimer queues: */ | 429 | /* Soft interrupt function to run the hrtimer queues: */ |
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index c70d27af03f9..a2d6ea49ec56 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
@@ -9,9 +9,22 @@ enum { | |||
9 | }; | 9 | }; |
10 | 10 | ||
11 | enum { | 11 | enum { |
12 | HW_BREAKPOINT_R = 1, | 12 | HW_BREAKPOINT_EMPTY = 0, |
13 | HW_BREAKPOINT_W = 2, | 13 | HW_BREAKPOINT_R = 1, |
14 | HW_BREAKPOINT_X = 4, | 14 | HW_BREAKPOINT_W = 2, |
15 | HW_BREAKPOINT_RW = HW_BREAKPOINT_R | HW_BREAKPOINT_W, | ||
16 | HW_BREAKPOINT_X = 4, | ||
17 | HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, | ||
18 | }; | ||
19 | |||
20 | enum bp_type_idx { | ||
21 | TYPE_INST = 0, | ||
22 | #ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS | ||
23 | TYPE_DATA = 0, | ||
24 | #else | ||
25 | TYPE_DATA = 1, | ||
26 | #endif | ||
27 | TYPE_MAX | ||
15 | }; | 28 | }; |
16 | 29 | ||
17 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
@@ -34,6 +47,12 @@ static inline void hw_breakpoint_init(struct perf_event_attr *attr) | |||
34 | attr->sample_period = 1; | 47 | attr->sample_period = 1; |
35 | } | 48 | } |
36 | 49 | ||
50 | static inline void ptrace_breakpoint_init(struct perf_event_attr *attr) | ||
51 | { | ||
52 | hw_breakpoint_init(attr); | ||
53 | attr->exclude_kernel = 1; | ||
54 | } | ||
55 | |||
37 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) | 56 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) |
38 | { | 57 | { |
39 | return bp->attr.bp_addr; | 58 | return bp->attr.bp_addr; |
diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h new file mode 100644 index 000000000000..78ebf507ce56 --- /dev/null +++ b/include/linux/i2c-omap.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef __I2C_OMAP_H__ | ||
2 | #define __I2C_OMAP_H__ | ||
3 | |||
4 | struct omap_i2c_bus_platform_data { | ||
5 | u32 clkrate; | ||
6 | void (*set_mpu_wkup_lat)(struct device *dev, long set); | ||
7 | }; | ||
8 | |||
9 | #endif | ||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index ebd90ce58ca2..6de90bfc6acd 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -496,7 +496,7 @@ struct twl4030_madc_platform_data { | |||
496 | int irq_line; | 496 | int irq_line; |
497 | }; | 497 | }; |
498 | 498 | ||
499 | /* Boards have uniqe mappings of {row, col} --> keycode. | 499 | /* Boards have unique mappings of {row, col} --> keycode. |
500 | * Column and row are 8 bits each, but range only from 0..7. | 500 | * Column and row are 8 bits each, but range only from 0..7. |
501 | * a PERSISTENT_KEY is "always on" and never reported. | 501 | * a PERSISTENT_KEY is "always on" and never reported. |
502 | */ | 502 | */ |
@@ -664,15 +664,15 @@ static inline int twl4030charger_usb_en(int enable) { return 0; } | |||
664 | #define TWL4030_REG_VUSB3V1 19 | 664 | #define TWL4030_REG_VUSB3V1 19 |
665 | 665 | ||
666 | /* TWL6030 SMPS/LDO's */ | 666 | /* TWL6030 SMPS/LDO's */ |
667 | /* EXTERNAL dc-to-dc buck convertor contollable via SR */ | 667 | /* EXTERNAL dc-to-dc buck convertor controllable via SR */ |
668 | #define TWL6030_REG_VDD1 30 | 668 | #define TWL6030_REG_VDD1 30 |
669 | #define TWL6030_REG_VDD2 31 | 669 | #define TWL6030_REG_VDD2 31 |
670 | #define TWL6030_REG_VDD3 32 | 670 | #define TWL6030_REG_VDD3 32 |
671 | 671 | ||
672 | /* Non SR compliant dc-to-dc buck convertors */ | 672 | /* Non SR compliant dc-to-dc buck convertors */ |
673 | #define TWL6030_REG_VMEM 33 | 673 | #define TWL6030_REG_VMEM 33 |
674 | #define TWL6030_REG_V2V1 34 | 674 | #define TWL6030_REG_V2V1 34 |
675 | #define TWL6030_REG_V1V29 35 | 675 | #define TWL6030_REG_V1V29 35 |
676 | #define TWL6030_REG_V1V8 36 | 676 | #define TWL6030_REG_V1V8 36 |
677 | 677 | ||
678 | /* EXTERNAL LDOs */ | 678 | /* EXTERNAL LDOs */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index b1ed1cd8e2a8..7996fc2c9ba9 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -49,7 +49,6 @@ extern struct group_info init_groups; | |||
49 | { .first = &init_task.pids[PIDTYPE_PGID].node }, \ | 49 | { .first = &init_task.pids[PIDTYPE_PGID].node }, \ |
50 | { .first = &init_task.pids[PIDTYPE_SID].node }, \ | 50 | { .first = &init_task.pids[PIDTYPE_SID].node }, \ |
51 | }, \ | 51 | }, \ |
52 | .rcu = RCU_HEAD_INIT, \ | ||
53 | .level = 0, \ | 52 | .level = 0, \ |
54 | .numbers = { { \ | 53 | .numbers = { { \ |
55 | .nr = 0, \ | 54 | .nr = 0, \ |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 75f3f00ac1e5..5137db3317f9 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -39,7 +39,8 @@ | |||
39 | * These flags used only by the kernel as part of the | 39 | * These flags used only by the kernel as part of the |
40 | * irq handling routines. | 40 | * irq handling routines. |
41 | * | 41 | * |
42 | * IRQF_DISABLED - keep irqs disabled when calling the action handler | 42 | * IRQF_DISABLED - keep irqs disabled when calling the action handler. |
43 | * DEPRECATED. This flag is a NOOP and scheduled to be removed | ||
43 | * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator | 44 | * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator |
44 | * IRQF_SHARED - allow sharing the irq among several devices | 45 | * IRQF_SHARED - allow sharing the irq among several devices |
45 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur | 46 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur |
@@ -77,6 +78,18 @@ enum { | |||
77 | IRQTF_AFFINITY, | 78 | IRQTF_AFFINITY, |
78 | }; | 79 | }; |
79 | 80 | ||
81 | /** | ||
82 | * These values can be returned by request_any_context_irq() and | ||
83 | * describe the context the interrupt will be run in. | ||
84 | * | ||
85 | * IRQC_IS_HARDIRQ - interrupt runs in hardirq context | ||
86 | * IRQC_IS_NESTED - interrupt runs in a nested threaded context | ||
87 | */ | ||
88 | enum { | ||
89 | IRQC_IS_HARDIRQ = 0, | ||
90 | IRQC_IS_NESTED, | ||
91 | }; | ||
92 | |||
80 | typedef irqreturn_t (*irq_handler_t)(int, void *); | 93 | typedef irqreturn_t (*irq_handler_t)(int, void *); |
81 | 94 | ||
82 | /** | 95 | /** |
@@ -120,6 +133,10 @@ request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, | |||
120 | return request_threaded_irq(irq, handler, NULL, flags, name, dev); | 133 | return request_threaded_irq(irq, handler, NULL, flags, name, dev); |
121 | } | 134 | } |
122 | 135 | ||
136 | extern int __must_check | ||
137 | request_any_context_irq(unsigned int irq, irq_handler_t handler, | ||
138 | unsigned long flags, const char *name, void *dev_id); | ||
139 | |||
123 | extern void exit_irq_thread(void); | 140 | extern void exit_irq_thread(void); |
124 | #else | 141 | #else |
125 | 142 | ||
@@ -141,6 +158,13 @@ request_threaded_irq(unsigned int irq, irq_handler_t handler, | |||
141 | return request_irq(irq, handler, flags, name, dev); | 158 | return request_irq(irq, handler, flags, name, dev); |
142 | } | 159 | } |
143 | 160 | ||
161 | static inline int __must_check | ||
162 | request_any_context_irq(unsigned int irq, irq_handler_t handler, | ||
163 | unsigned long flags, const char *name, void *dev_id) | ||
164 | { | ||
165 | return request_irq(irq, handler, flags, name, dev_id); | ||
166 | } | ||
167 | |||
144 | static inline void exit_irq_thread(void) { } | 168 | static inline void exit_irq_thread(void) { } |
145 | #endif | 169 | #endif |
146 | 170 | ||
@@ -209,6 +233,7 @@ extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask); | |||
209 | extern int irq_can_set_affinity(unsigned int irq); | 233 | extern int irq_can_set_affinity(unsigned int irq); |
210 | extern int irq_select_affinity(unsigned int irq); | 234 | extern int irq_select_affinity(unsigned int irq); |
211 | 235 | ||
236 | extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m); | ||
212 | #else /* CONFIG_SMP */ | 237 | #else /* CONFIG_SMP */ |
213 | 238 | ||
214 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) | 239 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) |
@@ -223,6 +248,11 @@ static inline int irq_can_set_affinity(unsigned int irq) | |||
223 | 248 | ||
224 | static inline int irq_select_affinity(unsigned int irq) { return 0; } | 249 | static inline int irq_select_affinity(unsigned int irq) { return 0; } |
225 | 250 | ||
251 | static inline int irq_set_affinity_hint(unsigned int irq, | ||
252 | const struct cpumask *m) | ||
253 | { | ||
254 | return -EINVAL; | ||
255 | } | ||
226 | #endif /* CONFIG_SMP && CONFIG_GENERIC_HARDIRQS */ | 256 | #endif /* CONFIG_SMP && CONFIG_GENERIC_HARDIRQS */ |
227 | 257 | ||
228 | #ifdef CONFIG_GENERIC_HARDIRQS | 258 | #ifdef CONFIG_GENERIC_HARDIRQS |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 3af4ffd591b9..be22ad83689c 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
@@ -37,9 +37,9 @@ struct iommu_ops { | |||
37 | int (*attach_dev)(struct iommu_domain *domain, struct device *dev); | 37 | int (*attach_dev)(struct iommu_domain *domain, struct device *dev); |
38 | void (*detach_dev)(struct iommu_domain *domain, struct device *dev); | 38 | void (*detach_dev)(struct iommu_domain *domain, struct device *dev); |
39 | int (*map)(struct iommu_domain *domain, unsigned long iova, | 39 | int (*map)(struct iommu_domain *domain, unsigned long iova, |
40 | phys_addr_t paddr, size_t size, int prot); | 40 | phys_addr_t paddr, int gfp_order, int prot); |
41 | void (*unmap)(struct iommu_domain *domain, unsigned long iova, | 41 | int (*unmap)(struct iommu_domain *domain, unsigned long iova, |
42 | size_t size); | 42 | int gfp_order); |
43 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, | 43 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, |
44 | unsigned long iova); | 44 | unsigned long iova); |
45 | int (*domain_has_cap)(struct iommu_domain *domain, | 45 | int (*domain_has_cap)(struct iommu_domain *domain, |
@@ -56,10 +56,10 @@ extern int iommu_attach_device(struct iommu_domain *domain, | |||
56 | struct device *dev); | 56 | struct device *dev); |
57 | extern void iommu_detach_device(struct iommu_domain *domain, | 57 | extern void iommu_detach_device(struct iommu_domain *domain, |
58 | struct device *dev); | 58 | struct device *dev); |
59 | extern int iommu_map_range(struct iommu_domain *domain, unsigned long iova, | 59 | extern int iommu_map(struct iommu_domain *domain, unsigned long iova, |
60 | phys_addr_t paddr, size_t size, int prot); | 60 | phys_addr_t paddr, int gfp_order, int prot); |
61 | extern void iommu_unmap_range(struct iommu_domain *domain, unsigned long iova, | 61 | extern int iommu_unmap(struct iommu_domain *domain, unsigned long iova, |
62 | size_t size); | 62 | int gfp_order); |
63 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 63 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, |
64 | unsigned long iova); | 64 | unsigned long iova); |
65 | extern int iommu_domain_has_cap(struct iommu_domain *domain, | 65 | extern int iommu_domain_has_cap(struct iommu_domain *domain, |
@@ -96,16 +96,16 @@ static inline void iommu_detach_device(struct iommu_domain *domain, | |||
96 | { | 96 | { |
97 | } | 97 | } |
98 | 98 | ||
99 | static inline int iommu_map_range(struct iommu_domain *domain, | 99 | static inline int iommu_map(struct iommu_domain *domain, unsigned long iova, |
100 | unsigned long iova, phys_addr_t paddr, | 100 | phys_addr_t paddr, int gfp_order, int prot) |
101 | size_t size, int prot) | ||
102 | { | 101 | { |
103 | return -ENODEV; | 102 | return -ENODEV; |
104 | } | 103 | } |
105 | 104 | ||
106 | static inline void iommu_unmap_range(struct iommu_domain *domain, | 105 | static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova, |
107 | unsigned long iova, size_t size) | 106 | int gfp_order) |
108 | { | 107 | { |
108 | return -ENODEV; | ||
109 | } | 109 | } |
110 | 110 | ||
111 | static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 111 | static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 707ab122e2e6..c03243ad84b4 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -195,6 +195,7 @@ struct irq_desc { | |||
195 | raw_spinlock_t lock; | 195 | raw_spinlock_t lock; |
196 | #ifdef CONFIG_SMP | 196 | #ifdef CONFIG_SMP |
197 | cpumask_var_t affinity; | 197 | cpumask_var_t affinity; |
198 | const struct cpumask *affinity_hint; | ||
198 | unsigned int node; | 199 | unsigned int node; |
199 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 200 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
200 | cpumask_var_t pending_mask; | 201 | cpumask_var_t pending_mask; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9365227dbaf6..9fb1c1299032 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -490,6 +490,13 @@ static inline void tracing_off(void) { } | |||
490 | static inline void tracing_off_permanent(void) { } | 490 | static inline void tracing_off_permanent(void) { } |
491 | static inline int tracing_is_on(void) { return 0; } | 491 | static inline int tracing_is_on(void) { return 0; } |
492 | #endif | 492 | #endif |
493 | |||
494 | enum ftrace_dump_mode { | ||
495 | DUMP_NONE, | ||
496 | DUMP_ALL, | ||
497 | DUMP_ORIG, | ||
498 | }; | ||
499 | |||
493 | #ifdef CONFIG_TRACING | 500 | #ifdef CONFIG_TRACING |
494 | extern void tracing_start(void); | 501 | extern void tracing_start(void); |
495 | extern void tracing_stop(void); | 502 | extern void tracing_stop(void); |
@@ -571,7 +578,7 @@ __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap); | |||
571 | extern int | 578 | extern int |
572 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); | 579 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); |
573 | 580 | ||
574 | extern void ftrace_dump(void); | 581 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); |
575 | #else | 582 | #else |
576 | static inline void | 583 | static inline void |
577 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } | 584 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } |
@@ -592,7 +599,7 @@ ftrace_vprintk(const char *fmt, va_list ap) | |||
592 | { | 599 | { |
593 | return 0; | 600 | return 0; |
594 | } | 601 | } |
595 | static inline void ftrace_dump(void) { } | 602 | static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } |
596 | #endif /* CONFIG_TRACING */ | 603 | #endif /* CONFIG_TRACING */ |
597 | 604 | ||
598 | /* | 605 | /* |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index e117b1aee69c..9fad0527344f 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -201,7 +201,7 @@ static inline __must_check unsigned int kfifo_avail(struct kfifo *fifo) | |||
201 | * @n: the length of the data to be added. | 201 | * @n: the length of the data to be added. |
202 | * @lock: pointer to the spinlock to use for locking. | 202 | * @lock: pointer to the spinlock to use for locking. |
203 | * | 203 | * |
204 | * This function copies at most @len bytes from the @from buffer into | 204 | * This function copies at most @n bytes from the @from buffer into |
205 | * the FIFO depending on the free space, and returns the number of | 205 | * the FIFO depending on the free space, and returns the number of |
206 | * bytes copied. | 206 | * bytes copied. |
207 | */ | 207 | */ |
@@ -227,7 +227,7 @@ static inline unsigned int kfifo_in_locked(struct kfifo *fifo, | |||
227 | * @n: the size of the destination buffer. | 227 | * @n: the size of the destination buffer. |
228 | * @lock: pointer to the spinlock to use for locking. | 228 | * @lock: pointer to the spinlock to use for locking. |
229 | * | 229 | * |
230 | * This function copies at most @len bytes from the FIFO into the | 230 | * This function copies at most @n bytes from the FIFO into the |
231 | * @to buffer and returns the number of copied bytes. | 231 | * @to buffer and returns the number of copied bytes. |
232 | */ | 232 | */ |
233 | static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo, | 233 | static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo, |
diff --git a/include/linux/kobj_map.h b/include/linux/kobj_map.h index 73717ed9ea79..18ca75ffcc5a 100644 --- a/include/linux/kobj_map.h +++ b/include/linux/kobj_map.h | |||
@@ -1,3 +1,10 @@ | |||
1 | /* | ||
2 | * kobj_map.h | ||
3 | */ | ||
4 | |||
5 | #ifndef _KOBJ_MAP_H_ | ||
6 | #define _KOBJ_MAP_H_ | ||
7 | |||
1 | #include <linux/mutex.h> | 8 | #include <linux/mutex.h> |
2 | 9 | ||
3 | typedef struct kobject *kobj_probe_t(dev_t, int *, void *); | 10 | typedef struct kobject *kobj_probe_t(dev_t, int *, void *); |
@@ -8,3 +15,5 @@ int kobj_map(struct kobj_map *, dev_t, unsigned long, struct module *, | |||
8 | void kobj_unmap(struct kobj_map *, dev_t, unsigned long); | 15 | void kobj_unmap(struct kobj_map *, dev_t, unsigned long); |
9 | struct kobject *kobj_lookup(struct kobj_map *, dev_t, int *); | 16 | struct kobject *kobj_lookup(struct kobj_map *, dev_t, int *); |
10 | struct kobj_map *kobj_map_init(kobj_probe_t *, struct mutex *); | 17 | struct kobj_map *kobj_map_init(kobj_probe_t *, struct mutex *); |
18 | |||
19 | #endif /* _KOBJ_MAP_H_ */ | ||
diff --git a/include/linux/kref.h b/include/linux/kref.h index b0cb0ebad9e6..baf4b9e4b194 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * kref.c - library routines for handling generic reference counted objects | 2 | * kref.h - library routines for handling generic reference counted objects |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> | 4 | * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> |
5 | * Copyright (C) 2004 IBM Corp. | 5 | * Copyright (C) 2004 IBM Corp. |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index ce5983225be4..e1ceaa9b36bb 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -130,7 +130,7 @@ static inline ktime_t timeval_to_ktime(struct timeval tv) | |||
130 | /* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */ | 130 | /* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */ |
131 | #define ktime_to_ns(kt) ((kt).tv64) | 131 | #define ktime_to_ns(kt) ((kt).tv64) |
132 | 132 | ||
133 | #else | 133 | #else /* !((BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)) */ |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Helper macros/inlines to get the ktime_t math right in the timespec | 136 | * Helper macros/inlines to get the ktime_t math right in the timespec |
@@ -275,7 +275,7 @@ static inline s64 ktime_to_ns(const ktime_t kt) | |||
275 | return (s64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec; | 275 | return (s64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec; |
276 | } | 276 | } |
277 | 277 | ||
278 | #endif | 278 | #endif /* !((BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)) */ |
279 | 279 | ||
280 | /** | 280 | /** |
281 | * ktime_equal - Compares two ktime_t variables to see if they are equal | 281 | * ktime_equal - Compares two ktime_t variables to see if they are equal |
@@ -295,6 +295,12 @@ static inline s64 ktime_to_us(const ktime_t kt) | |||
295 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; | 295 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; |
296 | } | 296 | } |
297 | 297 | ||
298 | static inline s64 ktime_to_ms(const ktime_t kt) | ||
299 | { | ||
300 | struct timeval tv = ktime_to_timeval(kt); | ||
301 | return (s64) tv.tv_sec * MSEC_PER_SEC + tv.tv_usec / USEC_PER_MSEC; | ||
302 | } | ||
303 | |||
298 | static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) | 304 | static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) |
299 | { | 305 | { |
300 | return ktime_to_us(ktime_sub(later, earlier)); | 306 | return ktime_to_us(ktime_sub(later, earlier)); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index b2f2003b92e5..ee84e7e12039 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -202,12 +202,6 @@ enum { | |||
202 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity | 202 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity |
203 | * led */ | 203 | * led */ |
204 | 204 | ||
205 | /* The following flag belongs to ap->pflags but is kept in | ||
206 | * ap->flags because it's referenced in many LLDs and will be | ||
207 | * removed in not-too-distant future. | ||
208 | */ | ||
209 | ATA_FLAG_DISABLED = (1 << 23), /* port is disabled, ignore it */ | ||
210 | |||
211 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ | 205 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ |
212 | 206 | ||
213 | 207 | ||
@@ -256,12 +250,13 @@ enum { | |||
256 | ATA_TMOUT_INTERNAL_QUICK = 5000, | 250 | ATA_TMOUT_INTERNAL_QUICK = 5000, |
257 | ATA_TMOUT_MAX_PARK = 30000, | 251 | ATA_TMOUT_MAX_PARK = 30000, |
258 | 252 | ||
259 | /* FIXME: GoVault needs 2s but we can't afford that without | 253 | /* |
260 | * parallel probing. 800ms is enough for iVDR disk | 254 | * GoVault needs 2s and iVDR disk HHD424020F7SV00 800ms. 2s |
261 | * HHD424020F7SV00. Increase to 2secs when parallel probing | 255 | * is too much without parallel probing. Use 2s if parallel |
262 | * is in place. | 256 | * probing is available, 800ms otherwise. |
263 | */ | 257 | */ |
264 | ATA_TMOUT_FF_WAIT = 800, | 258 | ATA_TMOUT_FF_WAIT_LONG = 2000, |
259 | ATA_TMOUT_FF_WAIT = 800, | ||
265 | 260 | ||
266 | /* Spec mandates to wait for ">= 2ms" before checking status | 261 | /* Spec mandates to wait for ">= 2ms" before checking status |
267 | * after reset. We wait 150ms, because that was the magic | 262 | * after reset. We wait 150ms, because that was the magic |
@@ -721,15 +716,15 @@ struct ata_port { | |||
721 | unsigned int print_id; /* user visible unique port ID */ | 716 | unsigned int print_id; /* user visible unique port ID */ |
722 | unsigned int port_no; /* 0 based port no. inside the host */ | 717 | unsigned int port_no; /* 0 based port no. inside the host */ |
723 | 718 | ||
724 | struct ata_prd *prd; /* our SG list */ | ||
725 | dma_addr_t prd_dma; /* and its DMA mapping */ | ||
726 | |||
727 | #ifdef CONFIG_ATA_SFF | 719 | #ifdef CONFIG_ATA_SFF |
728 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ | 720 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ |
729 | #endif /* CONFIG_ATA_SFF */ | ||
730 | |||
731 | u8 ctl; /* cache of ATA control register */ | 721 | u8 ctl; /* cache of ATA control register */ |
732 | u8 last_ctl; /* Cache last written value */ | 722 | u8 last_ctl; /* Cache last written value */ |
723 | struct delayed_work sff_pio_task; | ||
724 | struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */ | ||
725 | dma_addr_t bmdma_prd_dma; /* and its DMA mapping */ | ||
726 | #endif /* CONFIG_ATA_SFF */ | ||
727 | |||
733 | unsigned int pio_mask; | 728 | unsigned int pio_mask; |
734 | unsigned int mwdma_mask; | 729 | unsigned int mwdma_mask; |
735 | unsigned int udma_mask; | 730 | unsigned int udma_mask; |
@@ -751,8 +746,6 @@ struct ata_port { | |||
751 | struct ata_host *host; | 746 | struct ata_host *host; |
752 | struct device *dev; | 747 | struct device *dev; |
753 | 748 | ||
754 | void *port_task_data; | ||
755 | struct delayed_work port_task; | ||
756 | struct delayed_work hotplug_task; | 749 | struct delayed_work hotplug_task; |
757 | struct work_struct scsi_rescan_task; | 750 | struct work_struct scsi_rescan_task; |
758 | 751 | ||
@@ -849,6 +842,7 @@ struct ata_port_operations { | |||
849 | * SFF / taskfile oriented ops | 842 | * SFF / taskfile oriented ops |
850 | */ | 843 | */ |
851 | void (*sff_dev_select)(struct ata_port *ap, unsigned int device); | 844 | void (*sff_dev_select)(struct ata_port *ap, unsigned int device); |
845 | void (*sff_set_devctl)(struct ata_port *ap, u8 ctl); | ||
852 | u8 (*sff_check_status)(struct ata_port *ap); | 846 | u8 (*sff_check_status)(struct ata_port *ap); |
853 | u8 (*sff_check_altstatus)(struct ata_port *ap); | 847 | u8 (*sff_check_altstatus)(struct ata_port *ap); |
854 | void (*sff_tf_load)(struct ata_port *ap, const struct ata_taskfile *tf); | 848 | void (*sff_tf_load)(struct ata_port *ap, const struct ata_taskfile *tf); |
@@ -857,16 +851,15 @@ struct ata_port_operations { | |||
857 | const struct ata_taskfile *tf); | 851 | const struct ata_taskfile *tf); |
858 | unsigned int (*sff_data_xfer)(struct ata_device *dev, | 852 | unsigned int (*sff_data_xfer)(struct ata_device *dev, |
859 | unsigned char *buf, unsigned int buflen, int rw); | 853 | unsigned char *buf, unsigned int buflen, int rw); |
860 | u8 (*sff_irq_on)(struct ata_port *); | 854 | void (*sff_irq_on)(struct ata_port *); |
861 | bool (*sff_irq_check)(struct ata_port *); | 855 | bool (*sff_irq_check)(struct ata_port *); |
862 | void (*sff_irq_clear)(struct ata_port *); | 856 | void (*sff_irq_clear)(struct ata_port *); |
857 | void (*sff_drain_fifo)(struct ata_queued_cmd *qc); | ||
863 | 858 | ||
864 | void (*bmdma_setup)(struct ata_queued_cmd *qc); | 859 | void (*bmdma_setup)(struct ata_queued_cmd *qc); |
865 | void (*bmdma_start)(struct ata_queued_cmd *qc); | 860 | void (*bmdma_start)(struct ata_queued_cmd *qc); |
866 | void (*bmdma_stop)(struct ata_queued_cmd *qc); | 861 | void (*bmdma_stop)(struct ata_queued_cmd *qc); |
867 | u8 (*bmdma_status)(struct ata_port *ap); | 862 | u8 (*bmdma_status)(struct ata_port *ap); |
868 | |||
869 | void (*drain_fifo)(struct ata_queued_cmd *qc); | ||
870 | #endif /* CONFIG_ATA_SFF */ | 863 | #endif /* CONFIG_ATA_SFF */ |
871 | 864 | ||
872 | ssize_t (*em_show)(struct ata_port *ap, char *buf); | 865 | ssize_t (*em_show)(struct ata_port *ap, char *buf); |
@@ -935,7 +928,6 @@ static inline int ata_port_is_dummy(struct ata_port *ap) | |||
935 | return ap->ops == &ata_dummy_port_ops; | 928 | return ap->ops == &ata_dummy_port_ops; |
936 | } | 929 | } |
937 | 930 | ||
938 | extern void ata_port_probe(struct ata_port *); | ||
939 | extern int sata_set_spd(struct ata_link *link); | 931 | extern int sata_set_spd(struct ata_link *link); |
940 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); | 932 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); |
941 | extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline, | 933 | extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline, |
@@ -950,7 +942,6 @@ extern int sata_link_hardreset(struct ata_link *link, | |||
950 | extern int sata_std_hardreset(struct ata_link *link, unsigned int *class, | 942 | extern int sata_std_hardreset(struct ata_link *link, unsigned int *class, |
951 | unsigned long deadline); | 943 | unsigned long deadline); |
952 | extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); | 944 | extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); |
953 | extern void ata_port_disable(struct ata_port *); | ||
954 | 945 | ||
955 | extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); | 946 | extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); |
956 | extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, | 947 | extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, |
@@ -1006,7 +997,6 @@ extern unsigned long ata_xfer_mode2mask(u8 xfer_mode); | |||
1006 | extern int ata_xfer_mode2shift(unsigned long xfer_mode); | 997 | extern int ata_xfer_mode2shift(unsigned long xfer_mode); |
1007 | extern const char *ata_mode_string(unsigned long xfer_mask); | 998 | extern const char *ata_mode_string(unsigned long xfer_mask); |
1008 | extern unsigned long ata_id_xfermask(const u16 *id); | 999 | extern unsigned long ata_id_xfermask(const u16 *id); |
1009 | extern int ata_port_start(struct ata_port *ap); | ||
1010 | extern int ata_std_qc_defer(struct ata_queued_cmd *qc); | 1000 | extern int ata_std_qc_defer(struct ata_queued_cmd *qc); |
1011 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | 1001 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); |
1012 | extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, | 1002 | extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, |
@@ -1039,9 +1029,6 @@ extern int ata_cable_sata(struct ata_port *ap); | |||
1039 | extern int ata_cable_ignore(struct ata_port *ap); | 1029 | extern int ata_cable_ignore(struct ata_port *ap); |
1040 | extern int ata_cable_unknown(struct ata_port *ap); | 1030 | extern int ata_cable_unknown(struct ata_port *ap); |
1041 | 1031 | ||
1042 | extern void ata_pio_queue_task(struct ata_port *ap, void *data, | ||
1043 | unsigned long delay); | ||
1044 | |||
1045 | /* Timing helpers */ | 1032 | /* Timing helpers */ |
1046 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); | 1033 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); |
1047 | extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode); | 1034 | extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode); |
@@ -1443,7 +1430,11 @@ static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf) | |||
1443 | { | 1430 | { |
1444 | memset(tf, 0, sizeof(*tf)); | 1431 | memset(tf, 0, sizeof(*tf)); |
1445 | 1432 | ||
1433 | #ifdef CONFIG_ATA_SFF | ||
1446 | tf->ctl = dev->link->ap->ctl; | 1434 | tf->ctl = dev->link->ap->ctl; |
1435 | #else | ||
1436 | tf->ctl = ATA_DEVCTL_OBS; | ||
1437 | #endif | ||
1447 | if (dev->devno == 0) | 1438 | if (dev->devno == 0) |
1448 | tf->device = ATA_DEVICE_OBS; | 1439 | tf->device = ATA_DEVICE_OBS; |
1449 | else | 1440 | else |
@@ -1578,8 +1569,6 @@ extern const struct ata_port_operations ata_bmdma32_port_ops; | |||
1578 | .sg_tablesize = LIBATA_MAX_PRD, \ | 1569 | .sg_tablesize = LIBATA_MAX_PRD, \ |
1579 | .dma_boundary = ATA_DMA_BOUNDARY | 1570 | .dma_boundary = ATA_DMA_BOUNDARY |
1580 | 1571 | ||
1581 | extern void ata_sff_qc_prep(struct ata_queued_cmd *qc); | ||
1582 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); | ||
1583 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); | 1572 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1584 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1573 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1585 | extern void ata_sff_pause(struct ata_port *ap); | 1574 | extern void ata_sff_pause(struct ata_port *ap); |
@@ -1597,10 +1586,11 @@ extern unsigned int ata_sff_data_xfer32(struct ata_device *dev, | |||
1597 | unsigned char *buf, unsigned int buflen, int rw); | 1586 | unsigned char *buf, unsigned int buflen, int rw); |
1598 | extern unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, | 1587 | extern unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, |
1599 | unsigned char *buf, unsigned int buflen, int rw); | 1588 | unsigned char *buf, unsigned int buflen, int rw); |
1600 | extern u8 ata_sff_irq_on(struct ata_port *ap); | 1589 | extern void ata_sff_irq_on(struct ata_port *ap); |
1601 | extern void ata_sff_irq_clear(struct ata_port *ap); | 1590 | extern void ata_sff_irq_clear(struct ata_port *ap); |
1602 | extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, | 1591 | extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, |
1603 | u8 status, int in_wq); | 1592 | u8 status, int in_wq); |
1593 | extern void ata_sff_queue_pio_task(struct ata_port *ap, unsigned long delay); | ||
1604 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); | 1594 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); |
1605 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); | 1595 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); |
1606 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, | 1596 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, |
@@ -1621,21 +1611,8 @@ extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, | |||
1621 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); | 1611 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); |
1622 | extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); | 1612 | extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); |
1623 | extern void ata_sff_error_handler(struct ata_port *ap); | 1613 | extern void ata_sff_error_handler(struct ata_port *ap); |
1624 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); | ||
1625 | extern int ata_sff_port_start(struct ata_port *ap); | ||
1626 | extern int ata_sff_port_start32(struct ata_port *ap); | ||
1627 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); | 1614 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); |
1628 | extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev, | ||
1629 | unsigned long xfer_mask); | ||
1630 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); | ||
1631 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); | ||
1632 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | ||
1633 | extern u8 ata_bmdma_status(struct ata_port *ap); | ||
1634 | extern void ata_bus_reset(struct ata_port *ap); | ||
1635 | |||
1636 | #ifdef CONFIG_PCI | 1615 | #ifdef CONFIG_PCI |
1637 | extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); | ||
1638 | extern int ata_pci_bmdma_init(struct ata_host *host); | ||
1639 | extern int ata_pci_sff_init_host(struct ata_host *host); | 1616 | extern int ata_pci_sff_init_host(struct ata_host *host); |
1640 | extern int ata_pci_sff_prepare_host(struct pci_dev *pdev, | 1617 | extern int ata_pci_sff_prepare_host(struct pci_dev *pdev, |
1641 | const struct ata_port_info * const * ppi, | 1618 | const struct ata_port_info * const * ppi, |
@@ -1648,6 +1625,23 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1648 | struct scsi_host_template *sht, void *host_priv, int hflags); | 1625 | struct scsi_host_template *sht, void *host_priv, int hflags); |
1649 | #endif /* CONFIG_PCI */ | 1626 | #endif /* CONFIG_PCI */ |
1650 | 1627 | ||
1628 | extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc); | ||
1629 | extern unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc); | ||
1630 | extern void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc); | ||
1631 | extern void ata_bmdma_error_handler(struct ata_port *ap); | ||
1632 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); | ||
1633 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); | ||
1634 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); | ||
1635 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | ||
1636 | extern u8 ata_bmdma_status(struct ata_port *ap); | ||
1637 | extern int ata_bmdma_port_start(struct ata_port *ap); | ||
1638 | extern int ata_bmdma_port_start32(struct ata_port *ap); | ||
1639 | |||
1640 | #ifdef CONFIG_PCI | ||
1641 | extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); | ||
1642 | extern void ata_pci_bmdma_init(struct ata_host *host); | ||
1643 | #endif /* CONFIG_PCI */ | ||
1644 | |||
1651 | /** | 1645 | /** |
1652 | * ata_sff_busy_wait - Wait for a port status register | 1646 | * ata_sff_busy_wait - Wait for a port status register |
1653 | * @ap: Port to wait for. | 1647 | * @ap: Port to wait for. |
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h index f78f83d7663f..6907251d5200 100644 --- a/include/linux/lsm_audit.h +++ b/include/linux/lsm_audit.h | |||
@@ -33,7 +33,7 @@ struct common_audit_data { | |||
33 | #define LSM_AUDIT_DATA_IPC 4 | 33 | #define LSM_AUDIT_DATA_IPC 4 |
34 | #define LSM_AUDIT_DATA_TASK 5 | 34 | #define LSM_AUDIT_DATA_TASK 5 |
35 | #define LSM_AUDIT_DATA_KEY 6 | 35 | #define LSM_AUDIT_DATA_KEY 6 |
36 | #define LSM_AUDIT_NO_AUDIT 7 | 36 | #define LSM_AUDIT_DATA_NONE 7 |
37 | #define LSM_AUDIT_DATA_KMOD 8 | 37 | #define LSM_AUDIT_DATA_KMOD 8 |
38 | struct task_struct *tsk; | 38 | struct task_struct *tsk; |
39 | union { | 39 | union { |
diff --git a/include/linux/meye.h b/include/linux/meye.h index 12010ace1f04..0dd49954f746 100644 --- a/include/linux/meye.h +++ b/include/linux/meye.h | |||
@@ -44,17 +44,17 @@ struct meye_params { | |||
44 | }; | 44 | }; |
45 | 45 | ||
46 | /* query the extended parameters */ | 46 | /* query the extended parameters */ |
47 | #define MEYEIOC_G_PARAMS _IOR ('v', BASE_VIDIOCPRIVATE+0, struct meye_params) | 47 | #define MEYEIOC_G_PARAMS _IOR ('v', BASE_VIDIOC_PRIVATE+0, struct meye_params) |
48 | /* set the extended parameters */ | 48 | /* set the extended parameters */ |
49 | #define MEYEIOC_S_PARAMS _IOW ('v', BASE_VIDIOCPRIVATE+1, struct meye_params) | 49 | #define MEYEIOC_S_PARAMS _IOW ('v', BASE_VIDIOC_PRIVATE+1, struct meye_params) |
50 | /* queue a buffer for mjpeg capture */ | 50 | /* queue a buffer for mjpeg capture */ |
51 | #define MEYEIOC_QBUF_CAPT _IOW ('v', BASE_VIDIOCPRIVATE+2, int) | 51 | #define MEYEIOC_QBUF_CAPT _IOW ('v', BASE_VIDIOC_PRIVATE+2, int) |
52 | /* sync a previously queued mjpeg buffer */ | 52 | /* sync a previously queued mjpeg buffer */ |
53 | #define MEYEIOC_SYNC _IOWR('v', BASE_VIDIOCPRIVATE+3, int) | 53 | #define MEYEIOC_SYNC _IOWR('v', BASE_VIDIOC_PRIVATE+3, int) |
54 | /* get a still uncompressed snapshot */ | 54 | /* get a still uncompressed snapshot */ |
55 | #define MEYEIOC_STILLCAPT _IO ('v', BASE_VIDIOCPRIVATE+4) | 55 | #define MEYEIOC_STILLCAPT _IO ('v', BASE_VIDIOC_PRIVATE+4) |
56 | /* get a jpeg compressed snapshot */ | 56 | /* get a jpeg compressed snapshot */ |
57 | #define MEYEIOC_STILLJCAPT _IOR ('v', BASE_VIDIOCPRIVATE+5, int) | 57 | #define MEYEIOC_STILLJCAPT _IOR ('v', BASE_VIDIOC_PRIVATE+5, int) |
58 | 58 | ||
59 | /* V4L2 private controls */ | 59 | /* V4L2 private controls */ |
60 | #define V4L2_CID_AGC V4L2_CID_PRIVATE_BASE | 60 | #define V4L2_CID_AGC V4L2_CID_PRIVATE_BASE |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index e92d1bfdb330..7a7f9c1e679a 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -123,8 +123,8 @@ enum { | |||
123 | MLX4_OPCODE_RDMA_READ = 0x10, | 123 | MLX4_OPCODE_RDMA_READ = 0x10, |
124 | MLX4_OPCODE_ATOMIC_CS = 0x11, | 124 | MLX4_OPCODE_ATOMIC_CS = 0x11, |
125 | MLX4_OPCODE_ATOMIC_FA = 0x12, | 125 | MLX4_OPCODE_ATOMIC_FA = 0x12, |
126 | MLX4_OPCODE_ATOMIC_MASK_CS = 0x14, | 126 | MLX4_OPCODE_MASKED_ATOMIC_CS = 0x14, |
127 | MLX4_OPCODE_ATOMIC_MASK_FA = 0x15, | 127 | MLX4_OPCODE_MASKED_ATOMIC_FA = 0x15, |
128 | MLX4_OPCODE_BIND_MW = 0x18, | 128 | MLX4_OPCODE_BIND_MW = 0x18, |
129 | MLX4_OPCODE_FMR = 0x19, | 129 | MLX4_OPCODE_FMR = 0x19, |
130 | MLX4_OPCODE_LOCAL_INVAL = 0x1b, | 130 | MLX4_OPCODE_LOCAL_INVAL = 0x1b, |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 9f29d86e5dc9..7abe64326f72 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -285,6 +285,13 @@ struct mlx4_wqe_atomic_seg { | |||
285 | __be64 compare; | 285 | __be64 compare; |
286 | }; | 286 | }; |
287 | 287 | ||
288 | struct mlx4_wqe_masked_atomic_seg { | ||
289 | __be64 swap_add; | ||
290 | __be64 compare; | ||
291 | __be64 swap_add_mask; | ||
292 | __be64 compare_mask; | ||
293 | }; | ||
294 | |||
288 | struct mlx4_wqe_data_seg { | 295 | struct mlx4_wqe_data_seg { |
289 | __be32 byte_count; | 296 | __be32 byte_count; |
290 | __be32 lkey; | 297 | __be32 lkey; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 462acaf36f3a..fb19bb92b809 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -19,7 +19,6 @@ struct anon_vma; | |||
19 | struct file_ra_state; | 19 | struct file_ra_state; |
20 | struct user_struct; | 20 | struct user_struct; |
21 | struct writeback_control; | 21 | struct writeback_control; |
22 | struct rlimit; | ||
23 | 22 | ||
24 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ | 23 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ |
25 | extern unsigned long max_mapnr; | 24 | extern unsigned long max_mapnr; |
@@ -1449,9 +1448,6 @@ int vmemmap_populate_basepages(struct page *start_page, | |||
1449 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); | 1448 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); |
1450 | void vmemmap_populate_print_last(void); | 1449 | void vmemmap_populate_print_last(void); |
1451 | 1450 | ||
1452 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, | ||
1453 | size_t size); | ||
1454 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); | ||
1455 | 1451 | ||
1456 | enum mf_flags { | 1452 | enum mf_flags { |
1457 | MF_COUNT_INCREASED = 1 << 0, | 1453 | MF_COUNT_INCREASED = 1 << 0, |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index f58e9d836f32..56fde4364e4c 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -474,4 +474,13 @@ struct platform_device_id { | |||
474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
475 | }; | 475 | }; |
476 | 476 | ||
477 | struct zorro_device_id { | ||
478 | __u32 id; /* Device ID or ZORRO_WILDCARD */ | ||
479 | kernel_ulong_t driver_data; /* Data private to the driver */ | ||
480 | }; | ||
481 | |||
482 | #define ZORRO_WILDCARD (0xffffffff) /* not official */ | ||
483 | |||
484 | #define ZORRO_DEVICE_MODALIAS_FMT "zorro:i%08X" | ||
485 | |||
477 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 486 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 515d53ae6a79..6914fcad4673 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -465,8 +465,7 @@ static inline void __module_get(struct module *module) | |||
465 | if (module) { | 465 | if (module) { |
466 | preempt_disable(); | 466 | preempt_disable(); |
467 | __this_cpu_inc(module->refptr->incs); | 467 | __this_cpu_inc(module->refptr->incs); |
468 | trace_module_get(module, _THIS_IP_, | 468 | trace_module_get(module, _THIS_IP_); |
469 | __this_cpu_read(module->refptr->incs)); | ||
470 | preempt_enable(); | 469 | preempt_enable(); |
471 | } | 470 | } |
472 | } | 471 | } |
@@ -480,8 +479,7 @@ static inline int try_module_get(struct module *module) | |||
480 | 479 | ||
481 | if (likely(module_is_live(module))) { | 480 | if (likely(module_is_live(module))) { |
482 | __this_cpu_inc(module->refptr->incs); | 481 | __this_cpu_inc(module->refptr->incs); |
483 | trace_module_get(module, _THIS_IP_, | 482 | trace_module_get(module, _THIS_IP_); |
484 | __this_cpu_read(module->refptr->incs)); | ||
485 | } else | 483 | } else |
486 | ret = 0; | 484 | ret = 0; |
487 | 485 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index fa8b47637997..3857517f1ca5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/if_link.h> | 31 | #include <linux/if_link.h> |
32 | 32 | ||
33 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
34 | #include <linux/pm_qos_params.h> | ||
34 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
35 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
36 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
@@ -711,6 +712,9 @@ struct net_device { | |||
711 | * the interface. | 712 | * the interface. |
712 | */ | 713 | */ |
713 | char name[IFNAMSIZ]; | 714 | char name[IFNAMSIZ]; |
715 | |||
716 | struct pm_qos_request_list *pm_qos_req; | ||
717 | |||
714 | /* device name hash chain */ | 718 | /* device name hash chain */ |
715 | struct hlist_node name_hlist; | 719 | struct hlist_node name_hlist; |
716 | /* snmp alias */ | 720 | /* snmp alias */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 07ce4609fe50..77c2ae53431c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -356,6 +356,20 @@ extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struc | |||
356 | extern u64 nfs_compat_user_ino64(u64 fileid); | 356 | extern u64 nfs_compat_user_ino64(u64 fileid); |
357 | extern void nfs_fattr_init(struct nfs_fattr *fattr); | 357 | extern void nfs_fattr_init(struct nfs_fattr *fattr); |
358 | 358 | ||
359 | extern struct nfs_fattr *nfs_alloc_fattr(void); | ||
360 | |||
361 | static inline void nfs_free_fattr(const struct nfs_fattr *fattr) | ||
362 | { | ||
363 | kfree(fattr); | ||
364 | } | ||
365 | |||
366 | extern struct nfs_fh *nfs_alloc_fhandle(void); | ||
367 | |||
368 | static inline void nfs_free_fhandle(const struct nfs_fh *fh) | ||
369 | { | ||
370 | kfree(fh); | ||
371 | } | ||
372 | |||
359 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ | 373 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ |
360 | extern __be32 root_nfs_parse_addr(char *name); /*__init*/ | 374 | extern __be32 root_nfs_parse_addr(char *name); /*__init*/ |
361 | extern unsigned long nfs_inc_attr_generation_counter(void); | 375 | extern unsigned long nfs_inc_attr_generation_counter(void); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index e82957acea56..d6e10a4c06e5 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -44,7 +44,6 @@ struct nfs_client { | |||
44 | 44 | ||
45 | #ifdef CONFIG_NFS_V4 | 45 | #ifdef CONFIG_NFS_V4 |
46 | u64 cl_clientid; /* constant */ | 46 | u64 cl_clientid; /* constant */ |
47 | nfs4_verifier cl_confirm; | ||
48 | unsigned long cl_state; | 47 | unsigned long cl_state; |
49 | 48 | ||
50 | struct rb_root cl_openowner_id; | 49 | struct rb_root cl_openowner_id; |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 89b28812ec24..51914d7d6cc4 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -386,8 +386,8 @@ struct nfs_removeargs { | |||
386 | 386 | ||
387 | struct nfs_removeres { | 387 | struct nfs_removeres { |
388 | const struct nfs_server *server; | 388 | const struct nfs_server *server; |
389 | struct nfs_fattr *dir_attr; | ||
389 | struct nfs4_change_info cinfo; | 390 | struct nfs4_change_info cinfo; |
390 | struct nfs_fattr dir_attr; | ||
391 | struct nfs4_sequence_res seq_res; | 391 | struct nfs4_sequence_res seq_res; |
392 | }; | 392 | }; |
393 | 393 | ||
@@ -824,6 +824,11 @@ struct nfs4_setclientid { | |||
824 | u32 sc_cb_ident; | 824 | u32 sc_cb_ident; |
825 | }; | 825 | }; |
826 | 826 | ||
827 | struct nfs4_setclientid_res { | ||
828 | u64 clientid; | ||
829 | nfs4_verifier confirm; | ||
830 | }; | ||
831 | |||
827 | struct nfs4_statfs_arg { | 832 | struct nfs4_statfs_arg { |
828 | const struct nfs_fh * fh; | 833 | const struct nfs_fh * fh; |
829 | const u32 * bitmask; | 834 | const u32 * bitmask; |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 65e333afaee4..80d55bbc5365 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -40,12 +40,12 @@ struct nfs_fhbase_old { | |||
40 | * This is the new flexible, extensible style NFSv2/v3 file handle. | 40 | * This is the new flexible, extensible style NFSv2/v3 file handle. |
41 | * by Neil Brown <neilb@cse.unsw.edu.au> - March 2000 | 41 | * by Neil Brown <neilb@cse.unsw.edu.au> - March 2000 |
42 | * | 42 | * |
43 | * The file handle is seens as a list of 4byte words. | 43 | * The file handle starts with a sequence of four-byte words. |
44 | * The first word contains a version number (1) and four descriptor bytes | 44 | * The first word contains a version number (1) and three descriptor bytes |
45 | * that tell how the remaining 3 variable length fields should be handled. | 45 | * that tell how the remaining 3 variable length fields should be handled. |
46 | * These three bytes are auth_type, fsid_type and fileid_type. | 46 | * These three bytes are auth_type, fsid_type and fileid_type. |
47 | * | 47 | * |
48 | * All 4byte values are in host-byte-order. | 48 | * All four-byte values are in host-byte-order. |
49 | * | 49 | * |
50 | * The auth_type field specifies how the filehandle can be authenticated | 50 | * The auth_type field specifies how the filehandle can be authenticated |
51 | * This might allow a file to be confirmed to be in a writable part of a | 51 | * This might allow a file to be confirmed to be in a writable part of a |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index c8e375440403..3fd5c82e0e18 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -203,8 +203,19 @@ struct perf_event_attr { | |||
203 | enable_on_exec : 1, /* next exec enables */ | 203 | enable_on_exec : 1, /* next exec enables */ |
204 | task : 1, /* trace fork/exit */ | 204 | task : 1, /* trace fork/exit */ |
205 | watermark : 1, /* wakeup_watermark */ | 205 | watermark : 1, /* wakeup_watermark */ |
206 | 206 | /* | |
207 | __reserved_1 : 49; | 207 | * precise_ip: |
208 | * | ||
209 | * 0 - SAMPLE_IP can have arbitrary skid | ||
210 | * 1 - SAMPLE_IP must have constant skid | ||
211 | * 2 - SAMPLE_IP requested to have 0 skid | ||
212 | * 3 - SAMPLE_IP must have 0 skid | ||
213 | * | ||
214 | * See also PERF_RECORD_MISC_EXACT_IP | ||
215 | */ | ||
216 | precise_ip : 2, /* skid constraint */ | ||
217 | |||
218 | __reserved_1 : 47; | ||
208 | 219 | ||
209 | union { | 220 | union { |
210 | __u32 wakeup_events; /* wakeup every n events */ | 221 | __u32 wakeup_events; /* wakeup every n events */ |
@@ -287,11 +298,24 @@ struct perf_event_mmap_page { | |||
287 | __u64 data_tail; /* user-space written tail */ | 298 | __u64 data_tail; /* user-space written tail */ |
288 | }; | 299 | }; |
289 | 300 | ||
290 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) | 301 | #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) |
291 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) | 302 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) |
292 | #define PERF_RECORD_MISC_KERNEL (1 << 0) | 303 | #define PERF_RECORD_MISC_KERNEL (1 << 0) |
293 | #define PERF_RECORD_MISC_USER (2 << 0) | 304 | #define PERF_RECORD_MISC_USER (2 << 0) |
294 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) | 305 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) |
306 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) | ||
307 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) | ||
308 | |||
309 | /* | ||
310 | * Indicates that the content of PERF_SAMPLE_IP points to | ||
311 | * the actual instruction that triggered the event. See also | ||
312 | * perf_event_attr::precise_ip. | ||
313 | */ | ||
314 | #define PERF_RECORD_MISC_EXACT_IP (1 << 14) | ||
315 | /* | ||
316 | * Reserve the last bit to indicate some extended misc field | ||
317 | */ | ||
318 | #define PERF_RECORD_MISC_EXT_RESERVED (1 << 15) | ||
295 | 319 | ||
296 | struct perf_event_header { | 320 | struct perf_event_header { |
297 | __u32 type; | 321 | __u32 type; |
@@ -439,6 +463,12 @@ enum perf_callchain_context { | |||
439 | # include <asm/perf_event.h> | 463 | # include <asm/perf_event.h> |
440 | #endif | 464 | #endif |
441 | 465 | ||
466 | struct perf_guest_info_callbacks { | ||
467 | int (*is_in_guest) (void); | ||
468 | int (*is_user_mode) (void); | ||
469 | unsigned long (*get_guest_ip) (void); | ||
470 | }; | ||
471 | |||
442 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 472 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
443 | #include <asm/hw_breakpoint.h> | 473 | #include <asm/hw_breakpoint.h> |
444 | #endif | 474 | #endif |
@@ -468,6 +498,17 @@ struct perf_raw_record { | |||
468 | void *data; | 498 | void *data; |
469 | }; | 499 | }; |
470 | 500 | ||
501 | struct perf_branch_entry { | ||
502 | __u64 from; | ||
503 | __u64 to; | ||
504 | __u64 flags; | ||
505 | }; | ||
506 | |||
507 | struct perf_branch_stack { | ||
508 | __u64 nr; | ||
509 | struct perf_branch_entry entries[0]; | ||
510 | }; | ||
511 | |||
471 | struct task_struct; | 512 | struct task_struct; |
472 | 513 | ||
473 | /** | 514 | /** |
@@ -506,6 +547,8 @@ struct hw_perf_event { | |||
506 | 547 | ||
507 | struct perf_event; | 548 | struct perf_event; |
508 | 549 | ||
550 | #define PERF_EVENT_TXN_STARTED 1 | ||
551 | |||
509 | /** | 552 | /** |
510 | * struct pmu - generic performance monitoring unit | 553 | * struct pmu - generic performance monitoring unit |
511 | */ | 554 | */ |
@@ -516,6 +559,16 @@ struct pmu { | |||
516 | void (*stop) (struct perf_event *event); | 559 | void (*stop) (struct perf_event *event); |
517 | void (*read) (struct perf_event *event); | 560 | void (*read) (struct perf_event *event); |
518 | void (*unthrottle) (struct perf_event *event); | 561 | void (*unthrottle) (struct perf_event *event); |
562 | |||
563 | /* | ||
564 | * group events scheduling is treated as a transaction, | ||
565 | * add group events as a whole and perform one schedulability test. | ||
566 | * If test fails, roll back the whole group | ||
567 | */ | ||
568 | |||
569 | void (*start_txn) (const struct pmu *pmu); | ||
570 | void (*cancel_txn) (const struct pmu *pmu); | ||
571 | int (*commit_txn) (const struct pmu *pmu); | ||
519 | }; | 572 | }; |
520 | 573 | ||
521 | /** | 574 | /** |
@@ -571,6 +624,14 @@ enum perf_group_flag { | |||
571 | PERF_GROUP_SOFTWARE = 0x1, | 624 | PERF_GROUP_SOFTWARE = 0x1, |
572 | }; | 625 | }; |
573 | 626 | ||
627 | #define SWEVENT_HLIST_BITS 8 | ||
628 | #define SWEVENT_HLIST_SIZE (1 << SWEVENT_HLIST_BITS) | ||
629 | |||
630 | struct swevent_hlist { | ||
631 | struct hlist_head heads[SWEVENT_HLIST_SIZE]; | ||
632 | struct rcu_head rcu_head; | ||
633 | }; | ||
634 | |||
574 | /** | 635 | /** |
575 | * struct perf_event - performance event kernel representation: | 636 | * struct perf_event - performance event kernel representation: |
576 | */ | 637 | */ |
@@ -579,6 +640,7 @@ struct perf_event { | |||
579 | struct list_head group_entry; | 640 | struct list_head group_entry; |
580 | struct list_head event_entry; | 641 | struct list_head event_entry; |
581 | struct list_head sibling_list; | 642 | struct list_head sibling_list; |
643 | struct hlist_node hlist_entry; | ||
582 | int nr_siblings; | 644 | int nr_siblings; |
583 | int group_flags; | 645 | int group_flags; |
584 | struct perf_event *group_leader; | 646 | struct perf_event *group_leader; |
@@ -726,6 +788,9 @@ struct perf_cpu_context { | |||
726 | int active_oncpu; | 788 | int active_oncpu; |
727 | int max_pertask; | 789 | int max_pertask; |
728 | int exclusive; | 790 | int exclusive; |
791 | struct swevent_hlist *swevent_hlist; | ||
792 | struct mutex hlist_mutex; | ||
793 | int hlist_refcount; | ||
729 | 794 | ||
730 | /* | 795 | /* |
731 | * Recursion avoidance: | 796 | * Recursion avoidance: |
@@ -769,9 +834,6 @@ extern void perf_disable(void); | |||
769 | extern void perf_enable(void); | 834 | extern void perf_enable(void); |
770 | extern int perf_event_task_disable(void); | 835 | extern int perf_event_task_disable(void); |
771 | extern int perf_event_task_enable(void); | 836 | extern int perf_event_task_enable(void); |
772 | extern int hw_perf_group_sched_in(struct perf_event *group_leader, | ||
773 | struct perf_cpu_context *cpuctx, | ||
774 | struct perf_event_context *ctx); | ||
775 | extern void perf_event_update_userpage(struct perf_event *event); | 837 | extern void perf_event_update_userpage(struct perf_event *event); |
776 | extern int perf_event_release_kernel(struct perf_event *event); | 838 | extern int perf_event_release_kernel(struct perf_event *event); |
777 | extern struct perf_event * | 839 | extern struct perf_event * |
@@ -902,6 +964,10 @@ static inline void perf_event_mmap(struct vm_area_struct *vma) | |||
902 | __perf_event_mmap(vma); | 964 | __perf_event_mmap(vma); |
903 | } | 965 | } |
904 | 966 | ||
967 | extern struct perf_guest_info_callbacks *perf_guest_cbs; | ||
968 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | ||
969 | extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | ||
970 | |||
905 | extern void perf_event_comm(struct task_struct *tsk); | 971 | extern void perf_event_comm(struct task_struct *tsk); |
906 | extern void perf_event_fork(struct task_struct *tsk); | 972 | extern void perf_event_fork(struct task_struct *tsk); |
907 | 973 | ||
@@ -971,6 +1037,11 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, | |||
971 | static inline void | 1037 | static inline void |
972 | perf_bp_event(struct perf_event *event, void *data) { } | 1038 | perf_bp_event(struct perf_event *event, void *data) { } |
973 | 1039 | ||
1040 | static inline int perf_register_guest_info_callbacks | ||
1041 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | ||
1042 | static inline int perf_unregister_guest_info_callbacks | ||
1043 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | ||
1044 | |||
974 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 1045 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
975 | static inline void perf_event_comm(struct task_struct *tsk) { } | 1046 | static inline void perf_event_comm(struct task_struct *tsk) { } |
976 | static inline void perf_event_fork(struct task_struct *tsk) { } | 1047 | static inline void perf_event_fork(struct task_struct *tsk) { } |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 212da17d06af..5417944d3687 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -44,12 +44,14 @@ extern int platform_get_irq_byname(struct platform_device *, const char *); | |||
44 | extern int platform_add_devices(struct platform_device **, int); | 44 | extern int platform_add_devices(struct platform_device **, int); |
45 | 45 | ||
46 | extern struct platform_device *platform_device_register_simple(const char *, int id, | 46 | extern struct platform_device *platform_device_register_simple(const char *, int id, |
47 | struct resource *, unsigned int); | 47 | const struct resource *, unsigned int); |
48 | extern struct platform_device *platform_device_register_data(struct device *, | 48 | extern struct platform_device *platform_device_register_data(struct device *, |
49 | const char *, int, const void *, size_t); | 49 | const char *, int, const void *, size_t); |
50 | 50 | ||
51 | extern struct platform_device *platform_device_alloc(const char *name, int id); | 51 | extern struct platform_device *platform_device_alloc(const char *name, int id); |
52 | extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num); | 52 | extern int platform_device_add_resources(struct platform_device *pdev, |
53 | const struct resource *res, | ||
54 | unsigned int num); | ||
53 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); | 55 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); |
54 | extern int platform_device_add(struct platform_device *pdev); | 56 | extern int platform_device_add(struct platform_device *pdev); |
55 | extern void platform_device_del(struct platform_device *pdev); | 57 | extern void platform_device_del(struct platform_device *pdev); |
diff --git a/include/linux/pm_qos_params.h b/include/linux/pm_qos_params.h index d74f75ed1e47..8ba440e5eb7f 100644 --- a/include/linux/pm_qos_params.h +++ b/include/linux/pm_qos_params.h | |||
@@ -14,12 +14,14 @@ | |||
14 | #define PM_QOS_NUM_CLASSES 4 | 14 | #define PM_QOS_NUM_CLASSES 4 |
15 | #define PM_QOS_DEFAULT_VALUE -1 | 15 | #define PM_QOS_DEFAULT_VALUE -1 |
16 | 16 | ||
17 | int pm_qos_add_requirement(int qos, char *name, s32 value); | 17 | struct pm_qos_request_list; |
18 | int pm_qos_update_requirement(int qos, char *name, s32 new_value); | ||
19 | void pm_qos_remove_requirement(int qos, char *name); | ||
20 | 18 | ||
21 | int pm_qos_requirement(int qos); | 19 | struct pm_qos_request_list *pm_qos_add_request(int pm_qos_class, s32 value); |
20 | void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req, | ||
21 | s32 new_value); | ||
22 | void pm_qos_remove_request(struct pm_qos_request_list *pm_qos_req); | ||
22 | 23 | ||
23 | int pm_qos_add_notifier(int qos, struct notifier_block *notifier); | 24 | int pm_qos_request(int pm_qos_class); |
24 | int pm_qos_remove_notifier(int qos, struct notifier_block *notifier); | 25 | int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier); |
26 | int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier); | ||
25 | 27 | ||
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index b776db737244..6e81888c6222 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -30,6 +30,9 @@ extern void pm_runtime_enable(struct device *dev); | |||
30 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); | 30 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); |
31 | extern void pm_runtime_allow(struct device *dev); | 31 | extern void pm_runtime_allow(struct device *dev); |
32 | extern void pm_runtime_forbid(struct device *dev); | 32 | extern void pm_runtime_forbid(struct device *dev); |
33 | extern int pm_generic_runtime_idle(struct device *dev); | ||
34 | extern int pm_generic_runtime_suspend(struct device *dev); | ||
35 | extern int pm_generic_runtime_resume(struct device *dev); | ||
33 | 36 | ||
34 | static inline bool pm_children_suspended(struct device *dev) | 37 | static inline bool pm_children_suspended(struct device *dev) |
35 | { | 38 | { |
@@ -96,6 +99,10 @@ static inline bool device_run_wake(struct device *dev) { return false; } | |||
96 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 99 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
97 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | 100 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } |
98 | 101 | ||
102 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } | ||
103 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } | ||
104 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } | ||
105 | |||
99 | #endif /* !CONFIG_PM_RUNTIME */ | 106 | #endif /* !CONFIG_PM_RUNTIME */ |
100 | 107 | ||
101 | static inline int pm_runtime_get(struct device *dev) | 108 | static inline int pm_runtime_get(struct device *dev) |
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h index 0aae7776185e..22d64c18056c 100644 --- a/include/linux/pm_wakeup.h +++ b/include/linux/pm_wakeup.h | |||
@@ -25,32 +25,34 @@ | |||
25 | # error "please don't include this file directly" | 25 | # error "please don't include this file directly" |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | #ifdef CONFIG_PM | 30 | #ifdef CONFIG_PM |
29 | 31 | ||
30 | /* changes to device_may_wakeup take effect on the next pm state change. | 32 | /* changes to device_may_wakeup take effect on the next pm state change. |
31 | * by default, devices should wakeup if they can. | 33 | * by default, devices should wakeup if they can. |
32 | */ | 34 | */ |
33 | static inline void device_init_wakeup(struct device *dev, int val) | 35 | static inline void device_init_wakeup(struct device *dev, bool val) |
34 | { | 36 | { |
35 | dev->power.can_wakeup = dev->power.should_wakeup = !!val; | 37 | dev->power.can_wakeup = dev->power.should_wakeup = val; |
36 | } | 38 | } |
37 | 39 | ||
38 | static inline void device_set_wakeup_capable(struct device *dev, int val) | 40 | static inline void device_set_wakeup_capable(struct device *dev, bool capable) |
39 | { | 41 | { |
40 | dev->power.can_wakeup = !!val; | 42 | dev->power.can_wakeup = capable; |
41 | } | 43 | } |
42 | 44 | ||
43 | static inline int device_can_wakeup(struct device *dev) | 45 | static inline bool device_can_wakeup(struct device *dev) |
44 | { | 46 | { |
45 | return dev->power.can_wakeup; | 47 | return dev->power.can_wakeup; |
46 | } | 48 | } |
47 | 49 | ||
48 | static inline void device_set_wakeup_enable(struct device *dev, int val) | 50 | static inline void device_set_wakeup_enable(struct device *dev, bool enable) |
49 | { | 51 | { |
50 | dev->power.should_wakeup = !!val; | 52 | dev->power.should_wakeup = enable; |
51 | } | 53 | } |
52 | 54 | ||
53 | static inline int device_may_wakeup(struct device *dev) | 55 | static inline bool device_may_wakeup(struct device *dev) |
54 | { | 56 | { |
55 | return dev->power.can_wakeup && dev->power.should_wakeup; | 57 | return dev->power.can_wakeup && dev->power.should_wakeup; |
56 | } | 58 | } |
@@ -58,20 +60,28 @@ static inline int device_may_wakeup(struct device *dev) | |||
58 | #else /* !CONFIG_PM */ | 60 | #else /* !CONFIG_PM */ |
59 | 61 | ||
60 | /* For some reason the next two routines work even without CONFIG_PM */ | 62 | /* For some reason the next two routines work even without CONFIG_PM */ |
61 | static inline void device_init_wakeup(struct device *dev, int val) | 63 | static inline void device_init_wakeup(struct device *dev, bool val) |
62 | { | 64 | { |
63 | dev->power.can_wakeup = !!val; | 65 | dev->power.can_wakeup = val; |
64 | } | 66 | } |
65 | 67 | ||
66 | static inline void device_set_wakeup_capable(struct device *dev, int val) { } | 68 | static inline void device_set_wakeup_capable(struct device *dev, bool capable) |
69 | { | ||
70 | } | ||
67 | 71 | ||
68 | static inline int device_can_wakeup(struct device *dev) | 72 | static inline bool device_can_wakeup(struct device *dev) |
69 | { | 73 | { |
70 | return dev->power.can_wakeup; | 74 | return dev->power.can_wakeup; |
71 | } | 75 | } |
72 | 76 | ||
73 | #define device_set_wakeup_enable(dev, val) do {} while (0) | 77 | static inline void device_set_wakeup_enable(struct device *dev, bool enable) |
74 | #define device_may_wakeup(dev) 0 | 78 | { |
79 | } | ||
80 | |||
81 | static inline bool device_may_wakeup(struct device *dev) | ||
82 | { | ||
83 | return false; | ||
84 | } | ||
75 | 85 | ||
76 | #endif /* !CONFIG_PM */ | 86 | #endif /* !CONFIG_PM */ |
77 | 87 | ||
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index e1fb60729979..4272521e29e9 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -345,18 +345,6 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, | |||
345 | #define arch_ptrace_stop(code, info) do { } while (0) | 345 | #define arch_ptrace_stop(code, info) do { } while (0) |
346 | #endif | 346 | #endif |
347 | 347 | ||
348 | #ifndef arch_ptrace_untrace | ||
349 | /* | ||
350 | * Do machine-specific work before untracing child. | ||
351 | * | ||
352 | * This is called for a normal detach as well as from ptrace_exit() | ||
353 | * when the tracing task dies. | ||
354 | * | ||
355 | * Called with write_lock(&tasklist_lock) held. | ||
356 | */ | ||
357 | #define arch_ptrace_untrace(task) do { } while (0) | ||
358 | #endif | ||
359 | |||
360 | extern int task_current_syscall(struct task_struct *target, long *callno, | 348 | extern int task_current_syscall(struct task_struct *target, long *callno, |
361 | unsigned long args[6], unsigned int maxargs, | 349 | unsigned long args[6], unsigned int maxargs, |
362 | unsigned long *sp, unsigned long *pc); | 350 | unsigned long *sp, unsigned long *pc); |
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 5210a5c60877..fe1872e5b37e 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
@@ -110,6 +110,7 @@ struct rb_node | |||
110 | struct rb_root | 110 | struct rb_root |
111 | { | 111 | { |
112 | struct rb_node *rb_node; | 112 | struct rb_node *rb_node; |
113 | void (*augment_cb)(struct rb_node *node); | ||
113 | }; | 114 | }; |
114 | 115 | ||
115 | 116 | ||
@@ -129,7 +130,9 @@ static inline void rb_set_color(struct rb_node *rb, int color) | |||
129 | rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; | 130 | rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; |
130 | } | 131 | } |
131 | 132 | ||
132 | #define RB_ROOT (struct rb_root) { NULL, } | 133 | #define RB_ROOT (struct rb_root) { NULL, NULL, } |
134 | #define RB_AUGMENT_ROOT(x) (struct rb_root) { NULL, x} | ||
135 | |||
133 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) | 136 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) |
134 | 137 | ||
135 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) | 138 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index db266bbed23f..b653b4aaa8a6 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -56,8 +56,6 @@ struct rcu_head { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | /* Exported common interfaces */ | 58 | /* Exported common interfaces */ |
59 | extern void synchronize_rcu_bh(void); | ||
60 | extern void synchronize_sched(void); | ||
61 | extern void rcu_barrier(void); | 59 | extern void rcu_barrier(void); |
62 | extern void rcu_barrier_bh(void); | 60 | extern void rcu_barrier_bh(void); |
63 | extern void rcu_barrier_sched(void); | 61 | extern void rcu_barrier_sched(void); |
@@ -66,8 +64,6 @@ extern int sched_expedited_torture_stats(char *page); | |||
66 | 64 | ||
67 | /* Internal to kernel */ | 65 | /* Internal to kernel */ |
68 | extern void rcu_init(void); | 66 | extern void rcu_init(void); |
69 | extern int rcu_scheduler_active; | ||
70 | extern void rcu_scheduler_starting(void); | ||
71 | 67 | ||
72 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 68 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
73 | #include <linux/rcutree.h> | 69 | #include <linux/rcutree.h> |
@@ -83,6 +79,14 @@ extern void rcu_scheduler_starting(void); | |||
83 | (ptr)->next = NULL; (ptr)->func = NULL; \ | 79 | (ptr)->next = NULL; (ptr)->func = NULL; \ |
84 | } while (0) | 80 | } while (0) |
85 | 81 | ||
82 | static inline void init_rcu_head_on_stack(struct rcu_head *head) | ||
83 | { | ||
84 | } | ||
85 | |||
86 | static inline void destroy_rcu_head_on_stack(struct rcu_head *head) | ||
87 | { | ||
88 | } | ||
89 | |||
86 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 90 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
87 | 91 | ||
88 | extern struct lockdep_map rcu_lock_map; | 92 | extern struct lockdep_map rcu_lock_map; |
@@ -106,12 +110,13 @@ extern int debug_lockdep_rcu_enabled(void); | |||
106 | /** | 110 | /** |
107 | * rcu_read_lock_held - might we be in RCU read-side critical section? | 111 | * rcu_read_lock_held - might we be in RCU read-side critical section? |
108 | * | 112 | * |
109 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | 113 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an RCU |
110 | * an RCU read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 114 | * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC, |
111 | * this assumes we are in an RCU read-side critical section unless it can | 115 | * this assumes we are in an RCU read-side critical section unless it can |
112 | * prove otherwise. | 116 | * prove otherwise. |
113 | * | 117 | * |
114 | * Check rcu_scheduler_active to prevent false positives during boot. | 118 | * Check debug_lockdep_rcu_enabled() to prevent false positives during boot |
119 | * and while lockdep is disabled. | ||
115 | */ | 120 | */ |
116 | static inline int rcu_read_lock_held(void) | 121 | static inline int rcu_read_lock_held(void) |
117 | { | 122 | { |
@@ -129,13 +134,15 @@ extern int rcu_read_lock_bh_held(void); | |||
129 | /** | 134 | /** |
130 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? | 135 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? |
131 | * | 136 | * |
132 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in an | 137 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an |
133 | * RCU-sched read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 138 | * RCU-sched read-side critical section. In absence of |
134 | * this assumes we are in an RCU-sched read-side critical section unless it | 139 | * CONFIG_DEBUG_LOCK_ALLOC, this assumes we are in an RCU-sched read-side |
135 | * can prove otherwise. Note that disabling of preemption (including | 140 | * critical section unless it can prove otherwise. Note that disabling |
136 | * disabling irqs) counts as an RCU-sched read-side critical section. | 141 | * of preemption (including disabling irqs) counts as an RCU-sched |
142 | * read-side critical section. | ||
137 | * | 143 | * |
138 | * Check rcu_scheduler_active to prevent false positives during boot. | 144 | * Check debug_lockdep_rcu_enabled() to prevent false positives during boot |
145 | * and while lockdep is disabled. | ||
139 | */ | 146 | */ |
140 | #ifdef CONFIG_PREEMPT | 147 | #ifdef CONFIG_PREEMPT |
141 | static inline int rcu_read_lock_sched_held(void) | 148 | static inline int rcu_read_lock_sched_held(void) |
@@ -177,7 +184,7 @@ static inline int rcu_read_lock_bh_held(void) | |||
177 | #ifdef CONFIG_PREEMPT | 184 | #ifdef CONFIG_PREEMPT |
178 | static inline int rcu_read_lock_sched_held(void) | 185 | static inline int rcu_read_lock_sched_held(void) |
179 | { | 186 | { |
180 | return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled(); | 187 | return preempt_count() != 0 || irqs_disabled(); |
181 | } | 188 | } |
182 | #else /* #ifdef CONFIG_PREEMPT */ | 189 | #else /* #ifdef CONFIG_PREEMPT */ |
183 | static inline int rcu_read_lock_sched_held(void) | 190 | static inline int rcu_read_lock_sched_held(void) |
@@ -192,6 +199,15 @@ static inline int rcu_read_lock_sched_held(void) | |||
192 | 199 | ||
193 | extern int rcu_my_thread_group_empty(void); | 200 | extern int rcu_my_thread_group_empty(void); |
194 | 201 | ||
202 | #define __do_rcu_dereference_check(c) \ | ||
203 | do { \ | ||
204 | static bool __warned; \ | ||
205 | if (debug_lockdep_rcu_enabled() && !__warned && !(c)) { \ | ||
206 | __warned = true; \ | ||
207 | lockdep_rcu_dereference(__FILE__, __LINE__); \ | ||
208 | } \ | ||
209 | } while (0) | ||
210 | |||
195 | /** | 211 | /** |
196 | * rcu_dereference_check - rcu_dereference with debug checking | 212 | * rcu_dereference_check - rcu_dereference with debug checking |
197 | * @p: The pointer to read, prior to dereferencing | 213 | * @p: The pointer to read, prior to dereferencing |
@@ -221,8 +237,7 @@ extern int rcu_my_thread_group_empty(void); | |||
221 | */ | 237 | */ |
222 | #define rcu_dereference_check(p, c) \ | 238 | #define rcu_dereference_check(p, c) \ |
223 | ({ \ | 239 | ({ \ |
224 | if (debug_lockdep_rcu_enabled() && !(c)) \ | 240 | __do_rcu_dereference_check(c); \ |
225 | lockdep_rcu_dereference(__FILE__, __LINE__); \ | ||
226 | rcu_dereference_raw(p); \ | 241 | rcu_dereference_raw(p); \ |
227 | }) | 242 | }) |
228 | 243 | ||
@@ -239,8 +254,7 @@ extern int rcu_my_thread_group_empty(void); | |||
239 | */ | 254 | */ |
240 | #define rcu_dereference_protected(p, c) \ | 255 | #define rcu_dereference_protected(p, c) \ |
241 | ({ \ | 256 | ({ \ |
242 | if (debug_lockdep_rcu_enabled() && !(c)) \ | 257 | __do_rcu_dereference_check(c); \ |
243 | lockdep_rcu_dereference(__FILE__, __LINE__); \ | ||
244 | (p); \ | 258 | (p); \ |
245 | }) | 259 | }) |
246 | 260 | ||
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index a5195875480a..e2e893144a84 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -29,6 +29,10 @@ | |||
29 | 29 | ||
30 | void rcu_sched_qs(int cpu); | 30 | void rcu_sched_qs(int cpu); |
31 | void rcu_bh_qs(int cpu); | 31 | void rcu_bh_qs(int cpu); |
32 | static inline void rcu_note_context_switch(int cpu) | ||
33 | { | ||
34 | rcu_sched_qs(cpu); | ||
35 | } | ||
32 | 36 | ||
33 | #define __rcu_read_lock() preempt_disable() | 37 | #define __rcu_read_lock() preempt_disable() |
34 | #define __rcu_read_unlock() preempt_enable() | 38 | #define __rcu_read_unlock() preempt_enable() |
@@ -60,8 +64,6 @@ static inline long rcu_batches_completed_bh(void) | |||
60 | return 0; | 64 | return 0; |
61 | } | 65 | } |
62 | 66 | ||
63 | extern int rcu_expedited_torture_stats(char *page); | ||
64 | |||
65 | static inline void rcu_force_quiescent_state(void) | 67 | static inline void rcu_force_quiescent_state(void) |
66 | { | 68 | { |
67 | } | 69 | } |
@@ -74,7 +76,17 @@ static inline void rcu_sched_force_quiescent_state(void) | |||
74 | { | 76 | { |
75 | } | 77 | } |
76 | 78 | ||
77 | #define synchronize_rcu synchronize_sched | 79 | extern void synchronize_sched(void); |
80 | |||
81 | static inline void synchronize_rcu(void) | ||
82 | { | ||
83 | synchronize_sched(); | ||
84 | } | ||
85 | |||
86 | static inline void synchronize_rcu_bh(void) | ||
87 | { | ||
88 | synchronize_sched(); | ||
89 | } | ||
78 | 90 | ||
79 | static inline void synchronize_rcu_expedited(void) | 91 | static inline void synchronize_rcu_expedited(void) |
80 | { | 92 | { |
@@ -114,4 +126,17 @@ static inline int rcu_preempt_depth(void) | |||
114 | return 0; | 126 | return 0; |
115 | } | 127 | } |
116 | 128 | ||
129 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
130 | |||
131 | extern int rcu_scheduler_active __read_mostly; | ||
132 | extern void rcu_scheduler_starting(void); | ||
133 | |||
134 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
135 | |||
136 | static inline void rcu_scheduler_starting(void) | ||
137 | { | ||
138 | } | ||
139 | |||
140 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
141 | |||
117 | #endif /* __LINUX_RCUTINY_H */ | 142 | #endif /* __LINUX_RCUTINY_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 42cc3a04779e..c0ed1c056f29 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -34,8 +34,8 @@ struct notifier_block; | |||
34 | 34 | ||
35 | extern void rcu_sched_qs(int cpu); | 35 | extern void rcu_sched_qs(int cpu); |
36 | extern void rcu_bh_qs(int cpu); | 36 | extern void rcu_bh_qs(int cpu); |
37 | extern void rcu_note_context_switch(int cpu); | ||
37 | extern int rcu_needs_cpu(int cpu); | 38 | extern int rcu_needs_cpu(int cpu); |
38 | extern int rcu_expedited_torture_stats(char *page); | ||
39 | 39 | ||
40 | #ifdef CONFIG_TREE_PREEMPT_RCU | 40 | #ifdef CONFIG_TREE_PREEMPT_RCU |
41 | 41 | ||
@@ -86,6 +86,8 @@ static inline void __rcu_read_unlock_bh(void) | |||
86 | 86 | ||
87 | extern void call_rcu_sched(struct rcu_head *head, | 87 | extern void call_rcu_sched(struct rcu_head *head, |
88 | void (*func)(struct rcu_head *rcu)); | 88 | void (*func)(struct rcu_head *rcu)); |
89 | extern void synchronize_rcu_bh(void); | ||
90 | extern void synchronize_sched(void); | ||
89 | extern void synchronize_rcu_expedited(void); | 91 | extern void synchronize_rcu_expedited(void); |
90 | 92 | ||
91 | static inline void synchronize_rcu_bh_expedited(void) | 93 | static inline void synchronize_rcu_bh_expedited(void) |
@@ -120,4 +122,7 @@ static inline int rcu_blocking_is_gp(void) | |||
120 | return num_online_cpus() == 1; | 122 | return num_online_cpus() == 1; |
121 | } | 123 | } |
122 | 124 | ||
125 | extern void rcu_scheduler_starting(void); | ||
126 | extern int rcu_scheduler_active __read_mostly; | ||
127 | |||
123 | #endif /* __LINUX_RCUTREE_H */ | 128 | #endif /* __LINUX_RCUTREE_H */ |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 5fcc31ed5771..25b4f686d918 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -120,12 +120,16 @@ int ring_buffer_write(struct ring_buffer *buffer, | |||
120 | unsigned long length, void *data); | 120 | unsigned long length, void *data); |
121 | 121 | ||
122 | struct ring_buffer_event * | 122 | struct ring_buffer_event * |
123 | ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts); | 123 | ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts, |
124 | unsigned long *lost_events); | ||
124 | struct ring_buffer_event * | 125 | struct ring_buffer_event * |
125 | ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts); | 126 | ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, |
127 | unsigned long *lost_events); | ||
126 | 128 | ||
127 | struct ring_buffer_iter * | 129 | struct ring_buffer_iter * |
128 | ring_buffer_read_start(struct ring_buffer *buffer, int cpu); | 130 | ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu); |
131 | void ring_buffer_read_prepare_sync(void); | ||
132 | void ring_buffer_read_start(struct ring_buffer_iter *iter); | ||
129 | void ring_buffer_read_finish(struct ring_buffer_iter *iter); | 133 | void ring_buffer_read_finish(struct ring_buffer_iter *iter); |
130 | 134 | ||
131 | struct ring_buffer_event * | 135 | struct ring_buffer_event * |
diff --git a/include/linux/rtc-v3020.h b/include/linux/rtc-v3020.h index 8ba646e610d9..e55d82cebf80 100644 --- a/include/linux/rtc-v3020.h +++ b/include/linux/rtc-v3020.h | |||
@@ -15,7 +15,7 @@ | |||
15 | struct v3020_platform_data { | 15 | struct v3020_platform_data { |
16 | int leftshift; /* (1<<(leftshift)) & readl() */ | 16 | int leftshift; /* (1<<(leftshift)) & readl() */ |
17 | 17 | ||
18 | int use_gpio:1; | 18 | unsigned int use_gpio:1; |
19 | unsigned int gpio_cs; | 19 | unsigned int gpio_cs; |
20 | unsigned int gpio_wr; | 20 | unsigned int gpio_wr; |
21 | unsigned int gpio_rd; | 21 | unsigned int gpio_rd; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2b7b81df78b3..b55e988988b5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -99,7 +99,6 @@ struct futex_pi_state; | |||
99 | struct robust_list_head; | 99 | struct robust_list_head; |
100 | struct bio_list; | 100 | struct bio_list; |
101 | struct fs_struct; | 101 | struct fs_struct; |
102 | struct bts_context; | ||
103 | struct perf_event_context; | 102 | struct perf_event_context; |
104 | 103 | ||
105 | /* | 104 | /* |
@@ -275,11 +274,17 @@ extern cpumask_var_t nohz_cpu_mask; | |||
275 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 274 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
276 | extern int select_nohz_load_balancer(int cpu); | 275 | extern int select_nohz_load_balancer(int cpu); |
277 | extern int get_nohz_load_balancer(void); | 276 | extern int get_nohz_load_balancer(void); |
277 | extern int nohz_ratelimit(int cpu); | ||
278 | #else | 278 | #else |
279 | static inline int select_nohz_load_balancer(int cpu) | 279 | static inline int select_nohz_load_balancer(int cpu) |
280 | { | 280 | { |
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | |||
284 | static inline int nohz_ratelimit(int cpu) | ||
285 | { | ||
286 | return 0; | ||
287 | } | ||
283 | #endif | 288 | #endif |
284 | 289 | ||
285 | /* | 290 | /* |
@@ -954,6 +959,7 @@ struct sched_domain { | |||
954 | char *name; | 959 | char *name; |
955 | #endif | 960 | #endif |
956 | 961 | ||
962 | unsigned int span_weight; | ||
957 | /* | 963 | /* |
958 | * Span of all CPUs in this domain. | 964 | * Span of all CPUs in this domain. |
959 | * | 965 | * |
@@ -1026,12 +1032,17 @@ struct sched_domain; | |||
1026 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ | 1032 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ |
1027 | #define WF_FORK 0x02 /* child wakeup after fork */ | 1033 | #define WF_FORK 0x02 /* child wakeup after fork */ |
1028 | 1034 | ||
1035 | #define ENQUEUE_WAKEUP 1 | ||
1036 | #define ENQUEUE_WAKING 2 | ||
1037 | #define ENQUEUE_HEAD 4 | ||
1038 | |||
1039 | #define DEQUEUE_SLEEP 1 | ||
1040 | |||
1029 | struct sched_class { | 1041 | struct sched_class { |
1030 | const struct sched_class *next; | 1042 | const struct sched_class *next; |
1031 | 1043 | ||
1032 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup, | 1044 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); |
1033 | bool head); | 1045 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); |
1034 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); | ||
1035 | void (*yield_task) (struct rq *rq); | 1046 | void (*yield_task) (struct rq *rq); |
1036 | 1047 | ||
1037 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); | 1048 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); |
@@ -1040,7 +1051,8 @@ struct sched_class { | |||
1040 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 1051 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
1041 | 1052 | ||
1042 | #ifdef CONFIG_SMP | 1053 | #ifdef CONFIG_SMP |
1043 | int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); | 1054 | int (*select_task_rq)(struct rq *rq, struct task_struct *p, |
1055 | int sd_flag, int flags); | ||
1044 | 1056 | ||
1045 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1057 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
1046 | void (*post_schedule) (struct rq *this_rq); | 1058 | void (*post_schedule) (struct rq *this_rq); |
@@ -1077,36 +1089,8 @@ struct load_weight { | |||
1077 | unsigned long weight, inv_weight; | 1089 | unsigned long weight, inv_weight; |
1078 | }; | 1090 | }; |
1079 | 1091 | ||
1080 | /* | ||
1081 | * CFS stats for a schedulable entity (task, task-group etc) | ||
1082 | * | ||
1083 | * Current field usage histogram: | ||
1084 | * | ||
1085 | * 4 se->block_start | ||
1086 | * 4 se->run_node | ||
1087 | * 4 se->sleep_start | ||
1088 | * 6 se->load.weight | ||
1089 | */ | ||
1090 | struct sched_entity { | ||
1091 | struct load_weight load; /* for load-balancing */ | ||
1092 | struct rb_node run_node; | ||
1093 | struct list_head group_node; | ||
1094 | unsigned int on_rq; | ||
1095 | |||
1096 | u64 exec_start; | ||
1097 | u64 sum_exec_runtime; | ||
1098 | u64 vruntime; | ||
1099 | u64 prev_sum_exec_runtime; | ||
1100 | |||
1101 | u64 last_wakeup; | ||
1102 | u64 avg_overlap; | ||
1103 | |||
1104 | u64 nr_migrations; | ||
1105 | |||
1106 | u64 start_runtime; | ||
1107 | u64 avg_wakeup; | ||
1108 | |||
1109 | #ifdef CONFIG_SCHEDSTATS | 1092 | #ifdef CONFIG_SCHEDSTATS |
1093 | struct sched_statistics { | ||
1110 | u64 wait_start; | 1094 | u64 wait_start; |
1111 | u64 wait_max; | 1095 | u64 wait_max; |
1112 | u64 wait_count; | 1096 | u64 wait_count; |
@@ -1138,6 +1122,24 @@ struct sched_entity { | |||
1138 | u64 nr_wakeups_affine_attempts; | 1122 | u64 nr_wakeups_affine_attempts; |
1139 | u64 nr_wakeups_passive; | 1123 | u64 nr_wakeups_passive; |
1140 | u64 nr_wakeups_idle; | 1124 | u64 nr_wakeups_idle; |
1125 | }; | ||
1126 | #endif | ||
1127 | |||
1128 | struct sched_entity { | ||
1129 | struct load_weight load; /* for load-balancing */ | ||
1130 | struct rb_node run_node; | ||
1131 | struct list_head group_node; | ||
1132 | unsigned int on_rq; | ||
1133 | |||
1134 | u64 exec_start; | ||
1135 | u64 sum_exec_runtime; | ||
1136 | u64 vruntime; | ||
1137 | u64 prev_sum_exec_runtime; | ||
1138 | |||
1139 | u64 nr_migrations; | ||
1140 | |||
1141 | #ifdef CONFIG_SCHEDSTATS | ||
1142 | struct sched_statistics statistics; | ||
1141 | #endif | 1143 | #endif |
1142 | 1144 | ||
1143 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1145 | #ifdef CONFIG_FAIR_GROUP_SCHED |
@@ -1272,12 +1274,6 @@ struct task_struct { | |||
1272 | struct list_head ptraced; | 1274 | struct list_head ptraced; |
1273 | struct list_head ptrace_entry; | 1275 | struct list_head ptrace_entry; |
1274 | 1276 | ||
1275 | /* | ||
1276 | * This is the tracer handle for the ptrace BTS extension. | ||
1277 | * This field actually belongs to the ptracer task. | ||
1278 | */ | ||
1279 | struct bts_context *bts; | ||
1280 | |||
1281 | /* PID/PID hash table linkage. */ | 1277 | /* PID/PID hash table linkage. */ |
1282 | struct pid_link pids[PIDTYPE_MAX]; | 1278 | struct pid_link pids[PIDTYPE_MAX]; |
1283 | struct list_head thread_group; | 1279 | struct list_head thread_group; |
@@ -1846,6 +1842,7 @@ extern void sched_clock_idle_sleep_event(void); | |||
1846 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1842 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |
1847 | 1843 | ||
1848 | #ifdef CONFIG_HOTPLUG_CPU | 1844 | #ifdef CONFIG_HOTPLUG_CPU |
1845 | extern void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p); | ||
1849 | extern void idle_task_exit(void); | 1846 | extern void idle_task_exit(void); |
1850 | #else | 1847 | #else |
1851 | static inline void idle_task_exit(void) {} | 1848 | static inline void idle_task_exit(void) {} |
@@ -2122,10 +2119,8 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
2122 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2119 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
2123 | 2120 | ||
2124 | #ifdef CONFIG_SMP | 2121 | #ifdef CONFIG_SMP |
2125 | extern void wait_task_context_switch(struct task_struct *p); | ||
2126 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 2122 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
2127 | #else | 2123 | #else |
2128 | static inline void wait_task_context_switch(struct task_struct *p) {} | ||
2129 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 2124 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
2130 | long match_state) | 2125 | long match_state) |
2131 | { | 2126 | { |
diff --git a/include/linux/security.h b/include/linux/security.h index 3158dd982d27..0c8819170463 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -267,49 +267,16 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
267 | * @orig the original mount data copied from userspace. | 267 | * @orig the original mount data copied from userspace. |
268 | * @copy copied data which will be passed to the security module. | 268 | * @copy copied data which will be passed to the security module. |
269 | * Returns 0 if the copy was successful. | 269 | * Returns 0 if the copy was successful. |
270 | * @sb_check_sb: | ||
271 | * Check permission before the device with superblock @mnt->sb is mounted | ||
272 | * on the mount point named by @nd. | ||
273 | * @mnt contains the vfsmount for device being mounted. | ||
274 | * @path contains the path for the mount point. | ||
275 | * Return 0 if permission is granted. | ||
276 | * @sb_umount: | 270 | * @sb_umount: |
277 | * Check permission before the @mnt file system is unmounted. | 271 | * Check permission before the @mnt file system is unmounted. |
278 | * @mnt contains the mounted file system. | 272 | * @mnt contains the mounted file system. |
279 | * @flags contains the unmount flags, e.g. MNT_FORCE. | 273 | * @flags contains the unmount flags, e.g. MNT_FORCE. |
280 | * Return 0 if permission is granted. | 274 | * Return 0 if permission is granted. |
281 | * @sb_umount_close: | ||
282 | * Close any files in the @mnt mounted filesystem that are held open by | ||
283 | * the security module. This hook is called during an umount operation | ||
284 | * prior to checking whether the filesystem is still busy. | ||
285 | * @mnt contains the mounted filesystem. | ||
286 | * @sb_umount_busy: | ||
287 | * Handle a failed umount of the @mnt mounted filesystem, e.g. re-opening | ||
288 | * any files that were closed by umount_close. This hook is called during | ||
289 | * an umount operation if the umount fails after a call to the | ||
290 | * umount_close hook. | ||
291 | * @mnt contains the mounted filesystem. | ||
292 | * @sb_post_remount: | ||
293 | * Update the security module's state when a filesystem is remounted. | ||
294 | * This hook is only called if the remount was successful. | ||
295 | * @mnt contains the mounted file system. | ||
296 | * @flags contains the new filesystem flags. | ||
297 | * @data contains the filesystem-specific data. | ||
298 | * @sb_post_addmount: | ||
299 | * Update the security module's state when a filesystem is mounted. | ||
300 | * This hook is called any time a mount is successfully grafetd to | ||
301 | * the tree. | ||
302 | * @mnt contains the mounted filesystem. | ||
303 | * @mountpoint contains the path for the mount point. | ||
304 | * @sb_pivotroot: | 275 | * @sb_pivotroot: |
305 | * Check permission before pivoting the root filesystem. | 276 | * Check permission before pivoting the root filesystem. |
306 | * @old_path contains the path for the new location of the current root (put_old). | 277 | * @old_path contains the path for the new location of the current root (put_old). |
307 | * @new_path contains the path for the new root (new_root). | 278 | * @new_path contains the path for the new root (new_root). |
308 | * Return 0 if permission is granted. | 279 | * Return 0 if permission is granted. |
309 | * @sb_post_pivotroot: | ||
310 | * Update module state after a successful pivot. | ||
311 | * @old_path contains the path for the old root. | ||
312 | * @new_path contains the path for the new root. | ||
313 | * @sb_set_mnt_opts: | 280 | * @sb_set_mnt_opts: |
314 | * Set the security relevant mount options used for a superblock | 281 | * Set the security relevant mount options used for a superblock |
315 | * @sb the superblock to set security mount options for | 282 | * @sb the superblock to set security mount options for |
@@ -511,12 +478,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
511 | * @mnt is the vfsmount where the dentry was looked up | 478 | * @mnt is the vfsmount where the dentry was looked up |
512 | * @dentry contains the dentry structure for the file. | 479 | * @dentry contains the dentry structure for the file. |
513 | * Return 0 if permission is granted. | 480 | * Return 0 if permission is granted. |
514 | * @inode_delete: | ||
515 | * @inode contains the inode structure for deleted inode. | ||
516 | * This hook is called when a deleted inode is released (i.e. an inode | ||
517 | * with no hard links has its use count drop to zero). A security module | ||
518 | * can use this hook to release any persistent label associated with the | ||
519 | * inode. | ||
520 | * @inode_setxattr: | 481 | * @inode_setxattr: |
521 | * Check permission before setting the extended attributes | 482 | * Check permission before setting the extended attributes |
522 | * @value identified by @name for @dentry. | 483 | * @value identified by @name for @dentry. |
@@ -691,10 +652,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
691 | * @old points to the original credentials. | 652 | * @old points to the original credentials. |
692 | * @gfp indicates the atomicity of any memory allocations. | 653 | * @gfp indicates the atomicity of any memory allocations. |
693 | * Prepare a new set of credentials by copying the data from the old set. | 654 | * Prepare a new set of credentials by copying the data from the old set. |
694 | * @cred_commit: | ||
695 | * @new points to the new credentials. | ||
696 | * @old points to the original credentials. | ||
697 | * Install a new set of credentials. | ||
698 | * @cred_transfer: | 655 | * @cred_transfer: |
699 | * @new points to the new credentials. | 656 | * @new points to the new credentials. |
700 | * @old points to the original credentials. | 657 | * @old points to the original credentials. |
@@ -717,18 +674,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
717 | * userspace to load a kernel module with the given name. | 674 | * userspace to load a kernel module with the given name. |
718 | * @kmod_name name of the module requested by the kernel | 675 | * @kmod_name name of the module requested by the kernel |
719 | * Return 0 if successful. | 676 | * Return 0 if successful. |
720 | * @task_setuid: | ||
721 | * Check permission before setting one or more of the user identity | ||
722 | * attributes of the current process. The @flags parameter indicates | ||
723 | * which of the set*uid system calls invoked this hook and how to | ||
724 | * interpret the @id0, @id1, and @id2 parameters. See the LSM_SETID | ||
725 | * definitions at the beginning of this file for the @flags values and | ||
726 | * their meanings. | ||
727 | * @id0 contains a uid. | ||
728 | * @id1 contains a uid. | ||
729 | * @id2 contains a uid. | ||
730 | * @flags contains one of the LSM_SETID_* values. | ||
731 | * Return 0 if permission is granted. | ||
732 | * @task_fix_setuid: | 677 | * @task_fix_setuid: |
733 | * Update the module's state after setting one or more of the user | 678 | * Update the module's state after setting one or more of the user |
734 | * identity attributes of the current process. The @flags parameter | 679 | * identity attributes of the current process. The @flags parameter |
@@ -738,18 +683,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
738 | * @old is the set of credentials that are being replaces | 683 | * @old is the set of credentials that are being replaces |
739 | * @flags contains one of the LSM_SETID_* values. | 684 | * @flags contains one of the LSM_SETID_* values. |
740 | * Return 0 on success. | 685 | * Return 0 on success. |
741 | * @task_setgid: | ||
742 | * Check permission before setting one or more of the group identity | ||
743 | * attributes of the current process. The @flags parameter indicates | ||
744 | * which of the set*gid system calls invoked this hook and how to | ||
745 | * interpret the @id0, @id1, and @id2 parameters. See the LSM_SETID | ||
746 | * definitions at the beginning of this file for the @flags values and | ||
747 | * their meanings. | ||
748 | * @id0 contains a gid. | ||
749 | * @id1 contains a gid. | ||
750 | * @id2 contains a gid. | ||
751 | * @flags contains one of the LSM_SETID_* values. | ||
752 | * Return 0 if permission is granted. | ||
753 | * @task_setpgid: | 686 | * @task_setpgid: |
754 | * Check permission before setting the process group identifier of the | 687 | * Check permission before setting the process group identifier of the |
755 | * process @p to @pgid. | 688 | * process @p to @pgid. |
@@ -771,11 +704,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
771 | * @p contains the task_struct for the process and place is into @secid. | 704 | * @p contains the task_struct for the process and place is into @secid. |
772 | * In case of failure, @secid will be set to zero. | 705 | * In case of failure, @secid will be set to zero. |
773 | * | 706 | * |
774 | * @task_setgroups: | ||
775 | * Check permission before setting the supplementary group set of the | ||
776 | * current process. | ||
777 | * @group_info contains the new group information. | ||
778 | * Return 0 if permission is granted. | ||
779 | * @task_setnice: | 707 | * @task_setnice: |
780 | * Check permission before setting the nice value of @p to @nice. | 708 | * Check permission before setting the nice value of @p to @nice. |
781 | * @p contains the task_struct of process. | 709 | * @p contains the task_struct of process. |
@@ -1139,13 +1067,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1139 | * Return the length of the string (including terminating NUL) or -ve if | 1067 | * Return the length of the string (including terminating NUL) or -ve if |
1140 | * an error. | 1068 | * an error. |
1141 | * May also return 0 (and a NULL buffer pointer) if there is no label. | 1069 | * May also return 0 (and a NULL buffer pointer) if there is no label. |
1142 | * @key_session_to_parent: | ||
1143 | * Forcibly assign the session keyring from a process to its parent | ||
1144 | * process. | ||
1145 | * @cred: Pointer to process's credentials | ||
1146 | * @parent_cred: Pointer to parent process's credentials | ||
1147 | * @keyring: Proposed new session keyring | ||
1148 | * Return 0 if permission is granted, -ve error otherwise. | ||
1149 | * | 1070 | * |
1150 | * Security hooks affecting all System V IPC operations. | 1071 | * Security hooks affecting all System V IPC operations. |
1151 | * | 1072 | * |
@@ -1333,13 +1254,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1333 | * @cap contains the capability <include/linux/capability.h>. | 1254 | * @cap contains the capability <include/linux/capability.h>. |
1334 | * @audit: Whether to write an audit message or not | 1255 | * @audit: Whether to write an audit message or not |
1335 | * Return 0 if the capability is granted for @tsk. | 1256 | * Return 0 if the capability is granted for @tsk. |
1336 | * @acct: | ||
1337 | * Check permission before enabling or disabling process accounting. If | ||
1338 | * accounting is being enabled, then @file refers to the open file used to | ||
1339 | * store accounting records. If accounting is being disabled, then @file | ||
1340 | * is NULL. | ||
1341 | * @file contains the file structure for the accounting file (may be NULL). | ||
1342 | * Return 0 if permission is granted. | ||
1343 | * @sysctl: | 1257 | * @sysctl: |
1344 | * Check permission before accessing the @table sysctl variable in the | 1258 | * Check permission before accessing the @table sysctl variable in the |
1345 | * manner specified by @op. | 1259 | * manner specified by @op. |
@@ -1462,7 +1376,6 @@ struct security_operations { | |||
1462 | const kernel_cap_t *permitted); | 1376 | const kernel_cap_t *permitted); |
1463 | int (*capable) (struct task_struct *tsk, const struct cred *cred, | 1377 | int (*capable) (struct task_struct *tsk, const struct cred *cred, |
1464 | int cap, int audit); | 1378 | int cap, int audit); |
1465 | int (*acct) (struct file *file); | ||
1466 | int (*sysctl) (struct ctl_table *table, int op); | 1379 | int (*sysctl) (struct ctl_table *table, int op); |
1467 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1380 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
1468 | int (*quota_on) (struct dentry *dentry); | 1381 | int (*quota_on) (struct dentry *dentry); |
@@ -1484,18 +1397,9 @@ struct security_operations { | |||
1484 | int (*sb_statfs) (struct dentry *dentry); | 1397 | int (*sb_statfs) (struct dentry *dentry); |
1485 | int (*sb_mount) (char *dev_name, struct path *path, | 1398 | int (*sb_mount) (char *dev_name, struct path *path, |
1486 | char *type, unsigned long flags, void *data); | 1399 | char *type, unsigned long flags, void *data); |
1487 | int (*sb_check_sb) (struct vfsmount *mnt, struct path *path); | ||
1488 | int (*sb_umount) (struct vfsmount *mnt, int flags); | 1400 | int (*sb_umount) (struct vfsmount *mnt, int flags); |
1489 | void (*sb_umount_close) (struct vfsmount *mnt); | ||
1490 | void (*sb_umount_busy) (struct vfsmount *mnt); | ||
1491 | void (*sb_post_remount) (struct vfsmount *mnt, | ||
1492 | unsigned long flags, void *data); | ||
1493 | void (*sb_post_addmount) (struct vfsmount *mnt, | ||
1494 | struct path *mountpoint); | ||
1495 | int (*sb_pivotroot) (struct path *old_path, | 1401 | int (*sb_pivotroot) (struct path *old_path, |
1496 | struct path *new_path); | 1402 | struct path *new_path); |
1497 | void (*sb_post_pivotroot) (struct path *old_path, | ||
1498 | struct path *new_path); | ||
1499 | int (*sb_set_mnt_opts) (struct super_block *sb, | 1403 | int (*sb_set_mnt_opts) (struct super_block *sb, |
1500 | struct security_mnt_opts *opts); | 1404 | struct security_mnt_opts *opts); |
1501 | void (*sb_clone_mnt_opts) (const struct super_block *oldsb, | 1405 | void (*sb_clone_mnt_opts) (const struct super_block *oldsb, |
@@ -1544,7 +1448,6 @@ struct security_operations { | |||
1544 | int (*inode_permission) (struct inode *inode, int mask); | 1448 | int (*inode_permission) (struct inode *inode, int mask); |
1545 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); | 1449 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); |
1546 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); | 1450 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); |
1547 | void (*inode_delete) (struct inode *inode); | ||
1548 | int (*inode_setxattr) (struct dentry *dentry, const char *name, | 1451 | int (*inode_setxattr) (struct dentry *dentry, const char *name, |
1549 | const void *value, size_t size, int flags); | 1452 | const void *value, size_t size, int flags); |
1550 | void (*inode_post_setxattr) (struct dentry *dentry, const char *name, | 1453 | void (*inode_post_setxattr) (struct dentry *dentry, const char *name, |
@@ -1585,20 +1488,16 @@ struct security_operations { | |||
1585 | void (*cred_free) (struct cred *cred); | 1488 | void (*cred_free) (struct cred *cred); |
1586 | int (*cred_prepare)(struct cred *new, const struct cred *old, | 1489 | int (*cred_prepare)(struct cred *new, const struct cred *old, |
1587 | gfp_t gfp); | 1490 | gfp_t gfp); |
1588 | void (*cred_commit)(struct cred *new, const struct cred *old); | ||
1589 | void (*cred_transfer)(struct cred *new, const struct cred *old); | 1491 | void (*cred_transfer)(struct cred *new, const struct cred *old); |
1590 | int (*kernel_act_as)(struct cred *new, u32 secid); | 1492 | int (*kernel_act_as)(struct cred *new, u32 secid); |
1591 | int (*kernel_create_files_as)(struct cred *new, struct inode *inode); | 1493 | int (*kernel_create_files_as)(struct cred *new, struct inode *inode); |
1592 | int (*kernel_module_request)(char *kmod_name); | 1494 | int (*kernel_module_request)(char *kmod_name); |
1593 | int (*task_setuid) (uid_t id0, uid_t id1, uid_t id2, int flags); | ||
1594 | int (*task_fix_setuid) (struct cred *new, const struct cred *old, | 1495 | int (*task_fix_setuid) (struct cred *new, const struct cred *old, |
1595 | int flags); | 1496 | int flags); |
1596 | int (*task_setgid) (gid_t id0, gid_t id1, gid_t id2, int flags); | ||
1597 | int (*task_setpgid) (struct task_struct *p, pid_t pgid); | 1497 | int (*task_setpgid) (struct task_struct *p, pid_t pgid); |
1598 | int (*task_getpgid) (struct task_struct *p); | 1498 | int (*task_getpgid) (struct task_struct *p); |
1599 | int (*task_getsid) (struct task_struct *p); | 1499 | int (*task_getsid) (struct task_struct *p); |
1600 | void (*task_getsecid) (struct task_struct *p, u32 *secid); | 1500 | void (*task_getsecid) (struct task_struct *p, u32 *secid); |
1601 | int (*task_setgroups) (struct group_info *group_info); | ||
1602 | int (*task_setnice) (struct task_struct *p, int nice); | 1501 | int (*task_setnice) (struct task_struct *p, int nice); |
1603 | int (*task_setioprio) (struct task_struct *p, int ioprio); | 1502 | int (*task_setioprio) (struct task_struct *p, int ioprio); |
1604 | int (*task_getioprio) (struct task_struct *p); | 1503 | int (*task_getioprio) (struct task_struct *p); |
@@ -1728,9 +1627,6 @@ struct security_operations { | |||
1728 | const struct cred *cred, | 1627 | const struct cred *cred, |
1729 | key_perm_t perm); | 1628 | key_perm_t perm); |
1730 | int (*key_getsecurity)(struct key *key, char **_buffer); | 1629 | int (*key_getsecurity)(struct key *key, char **_buffer); |
1731 | int (*key_session_to_parent)(const struct cred *cred, | ||
1732 | const struct cred *parent_cred, | ||
1733 | struct key *key); | ||
1734 | #endif /* CONFIG_KEYS */ | 1630 | #endif /* CONFIG_KEYS */ |
1735 | 1631 | ||
1736 | #ifdef CONFIG_AUDIT | 1632 | #ifdef CONFIG_AUDIT |
@@ -1761,7 +1657,6 @@ int security_capset(struct cred *new, const struct cred *old, | |||
1761 | int security_capable(int cap); | 1657 | int security_capable(int cap); |
1762 | int security_real_capable(struct task_struct *tsk, int cap); | 1658 | int security_real_capable(struct task_struct *tsk, int cap); |
1763 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); | 1659 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); |
1764 | int security_acct(struct file *file); | ||
1765 | int security_sysctl(struct ctl_table *table, int op); | 1660 | int security_sysctl(struct ctl_table *table, int op); |
1766 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1661 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
1767 | int security_quota_on(struct dentry *dentry); | 1662 | int security_quota_on(struct dentry *dentry); |
@@ -1783,14 +1678,8 @@ int security_sb_show_options(struct seq_file *m, struct super_block *sb); | |||
1783 | int security_sb_statfs(struct dentry *dentry); | 1678 | int security_sb_statfs(struct dentry *dentry); |
1784 | int security_sb_mount(char *dev_name, struct path *path, | 1679 | int security_sb_mount(char *dev_name, struct path *path, |
1785 | char *type, unsigned long flags, void *data); | 1680 | char *type, unsigned long flags, void *data); |
1786 | int security_sb_check_sb(struct vfsmount *mnt, struct path *path); | ||
1787 | int security_sb_umount(struct vfsmount *mnt, int flags); | 1681 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1788 | void security_sb_umount_close(struct vfsmount *mnt); | ||
1789 | void security_sb_umount_busy(struct vfsmount *mnt); | ||
1790 | void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data); | ||
1791 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint); | ||
1792 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); | 1682 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
1793 | void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); | ||
1794 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); | 1683 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); |
1795 | void security_sb_clone_mnt_opts(const struct super_block *oldsb, | 1684 | void security_sb_clone_mnt_opts(const struct super_block *oldsb, |
1796 | struct super_block *newsb); | 1685 | struct super_block *newsb); |
@@ -1816,7 +1705,6 @@ int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd); | |||
1816 | int security_inode_permission(struct inode *inode, int mask); | 1705 | int security_inode_permission(struct inode *inode, int mask); |
1817 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); | 1706 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); |
1818 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); | 1707 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); |
1819 | void security_inode_delete(struct inode *inode); | ||
1820 | int security_inode_setxattr(struct dentry *dentry, const char *name, | 1708 | int security_inode_setxattr(struct dentry *dentry, const char *name, |
1821 | const void *value, size_t size, int flags); | 1709 | const void *value, size_t size, int flags); |
1822 | void security_inode_post_setxattr(struct dentry *dentry, const char *name, | 1710 | void security_inode_post_setxattr(struct dentry *dentry, const char *name, |
@@ -1850,20 +1738,16 @@ int security_task_create(unsigned long clone_flags); | |||
1850 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); | 1738 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); |
1851 | void security_cred_free(struct cred *cred); | 1739 | void security_cred_free(struct cred *cred); |
1852 | int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp); | 1740 | int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp); |
1853 | void security_commit_creds(struct cred *new, const struct cred *old); | ||
1854 | void security_transfer_creds(struct cred *new, const struct cred *old); | 1741 | void security_transfer_creds(struct cred *new, const struct cred *old); |
1855 | int security_kernel_act_as(struct cred *new, u32 secid); | 1742 | int security_kernel_act_as(struct cred *new, u32 secid); |
1856 | int security_kernel_create_files_as(struct cred *new, struct inode *inode); | 1743 | int security_kernel_create_files_as(struct cred *new, struct inode *inode); |
1857 | int security_kernel_module_request(char *kmod_name); | 1744 | int security_kernel_module_request(char *kmod_name); |
1858 | int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags); | ||
1859 | int security_task_fix_setuid(struct cred *new, const struct cred *old, | 1745 | int security_task_fix_setuid(struct cred *new, const struct cred *old, |
1860 | int flags); | 1746 | int flags); |
1861 | int security_task_setgid(gid_t id0, gid_t id1, gid_t id2, int flags); | ||
1862 | int security_task_setpgid(struct task_struct *p, pid_t pgid); | 1747 | int security_task_setpgid(struct task_struct *p, pid_t pgid); |
1863 | int security_task_getpgid(struct task_struct *p); | 1748 | int security_task_getpgid(struct task_struct *p); |
1864 | int security_task_getsid(struct task_struct *p); | 1749 | int security_task_getsid(struct task_struct *p); |
1865 | void security_task_getsecid(struct task_struct *p, u32 *secid); | 1750 | void security_task_getsecid(struct task_struct *p, u32 *secid); |
1866 | int security_task_setgroups(struct group_info *group_info); | ||
1867 | int security_task_setnice(struct task_struct *p, int nice); | 1751 | int security_task_setnice(struct task_struct *p, int nice); |
1868 | int security_task_setioprio(struct task_struct *p, int ioprio); | 1752 | int security_task_setioprio(struct task_struct *p, int ioprio); |
1869 | int security_task_getioprio(struct task_struct *p); | 1753 | int security_task_getioprio(struct task_struct *p); |
@@ -1990,11 +1874,6 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap) | |||
1990 | return ret; | 1874 | return ret; |
1991 | } | 1875 | } |
1992 | 1876 | ||
1993 | static inline int security_acct(struct file *file) | ||
1994 | { | ||
1995 | return 0; | ||
1996 | } | ||
1997 | |||
1998 | static inline int security_sysctl(struct ctl_table *table, int op) | 1877 | static inline int security_sysctl(struct ctl_table *table, int op) |
1999 | { | 1878 | { |
2000 | return 0; | 1879 | return 0; |
@@ -2099,41 +1978,17 @@ static inline int security_sb_mount(char *dev_name, struct path *path, | |||
2099 | return 0; | 1978 | return 0; |
2100 | } | 1979 | } |
2101 | 1980 | ||
2102 | static inline int security_sb_check_sb(struct vfsmount *mnt, | ||
2103 | struct path *path) | ||
2104 | { | ||
2105 | return 0; | ||
2106 | } | ||
2107 | |||
2108 | static inline int security_sb_umount(struct vfsmount *mnt, int flags) | 1981 | static inline int security_sb_umount(struct vfsmount *mnt, int flags) |
2109 | { | 1982 | { |
2110 | return 0; | 1983 | return 0; |
2111 | } | 1984 | } |
2112 | 1985 | ||
2113 | static inline void security_sb_umount_close(struct vfsmount *mnt) | ||
2114 | { } | ||
2115 | |||
2116 | static inline void security_sb_umount_busy(struct vfsmount *mnt) | ||
2117 | { } | ||
2118 | |||
2119 | static inline void security_sb_post_remount(struct vfsmount *mnt, | ||
2120 | unsigned long flags, void *data) | ||
2121 | { } | ||
2122 | |||
2123 | static inline void security_sb_post_addmount(struct vfsmount *mnt, | ||
2124 | struct path *mountpoint) | ||
2125 | { } | ||
2126 | |||
2127 | static inline int security_sb_pivotroot(struct path *old_path, | 1986 | static inline int security_sb_pivotroot(struct path *old_path, |
2128 | struct path *new_path) | 1987 | struct path *new_path) |
2129 | { | 1988 | { |
2130 | return 0; | 1989 | return 0; |
2131 | } | 1990 | } |
2132 | 1991 | ||
2133 | static inline void security_sb_post_pivotroot(struct path *old_path, | ||
2134 | struct path *new_path) | ||
2135 | { } | ||
2136 | |||
2137 | static inline int security_sb_set_mnt_opts(struct super_block *sb, | 1992 | static inline int security_sb_set_mnt_opts(struct super_block *sb, |
2138 | struct security_mnt_opts *opts) | 1993 | struct security_mnt_opts *opts) |
2139 | { | 1994 | { |
@@ -2249,9 +2104,6 @@ static inline int security_inode_getattr(struct vfsmount *mnt, | |||
2249 | return 0; | 2104 | return 0; |
2250 | } | 2105 | } |
2251 | 2106 | ||
2252 | static inline void security_inode_delete(struct inode *inode) | ||
2253 | { } | ||
2254 | |||
2255 | static inline int security_inode_setxattr(struct dentry *dentry, | 2107 | static inline int security_inode_setxattr(struct dentry *dentry, |
2256 | const char *name, const void *value, size_t size, int flags) | 2108 | const char *name, const void *value, size_t size, int flags) |
2257 | { | 2109 | { |
@@ -2398,11 +2250,6 @@ static inline int security_prepare_creds(struct cred *new, | |||
2398 | return 0; | 2250 | return 0; |
2399 | } | 2251 | } |
2400 | 2252 | ||
2401 | static inline void security_commit_creds(struct cred *new, | ||
2402 | const struct cred *old) | ||
2403 | { | ||
2404 | } | ||
2405 | |||
2406 | static inline void security_transfer_creds(struct cred *new, | 2253 | static inline void security_transfer_creds(struct cred *new, |
2407 | const struct cred *old) | 2254 | const struct cred *old) |
2408 | { | 2255 | { |
@@ -2424,12 +2271,6 @@ static inline int security_kernel_module_request(char *kmod_name) | |||
2424 | return 0; | 2271 | return 0; |
2425 | } | 2272 | } |
2426 | 2273 | ||
2427 | static inline int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, | ||
2428 | int flags) | ||
2429 | { | ||
2430 | return 0; | ||
2431 | } | ||
2432 | |||
2433 | static inline int security_task_fix_setuid(struct cred *new, | 2274 | static inline int security_task_fix_setuid(struct cred *new, |
2434 | const struct cred *old, | 2275 | const struct cred *old, |
2435 | int flags) | 2276 | int flags) |
@@ -2437,12 +2278,6 @@ static inline int security_task_fix_setuid(struct cred *new, | |||
2437 | return cap_task_fix_setuid(new, old, flags); | 2278 | return cap_task_fix_setuid(new, old, flags); |
2438 | } | 2279 | } |
2439 | 2280 | ||
2440 | static inline int security_task_setgid(gid_t id0, gid_t id1, gid_t id2, | ||
2441 | int flags) | ||
2442 | { | ||
2443 | return 0; | ||
2444 | } | ||
2445 | |||
2446 | static inline int security_task_setpgid(struct task_struct *p, pid_t pgid) | 2281 | static inline int security_task_setpgid(struct task_struct *p, pid_t pgid) |
2447 | { | 2282 | { |
2448 | return 0; | 2283 | return 0; |
@@ -2463,11 +2298,6 @@ static inline void security_task_getsecid(struct task_struct *p, u32 *secid) | |||
2463 | *secid = 0; | 2298 | *secid = 0; |
2464 | } | 2299 | } |
2465 | 2300 | ||
2466 | static inline int security_task_setgroups(struct group_info *group_info) | ||
2467 | { | ||
2468 | return 0; | ||
2469 | } | ||
2470 | |||
2471 | static inline int security_task_setnice(struct task_struct *p, int nice) | 2301 | static inline int security_task_setnice(struct task_struct *p, int nice) |
2472 | { | 2302 | { |
2473 | return cap_task_setnice(p, nice); | 2303 | return cap_task_setnice(p, nice); |
@@ -3064,9 +2894,6 @@ void security_key_free(struct key *key); | |||
3064 | int security_key_permission(key_ref_t key_ref, | 2894 | int security_key_permission(key_ref_t key_ref, |
3065 | const struct cred *cred, key_perm_t perm); | 2895 | const struct cred *cred, key_perm_t perm); |
3066 | int security_key_getsecurity(struct key *key, char **_buffer); | 2896 | int security_key_getsecurity(struct key *key, char **_buffer); |
3067 | int security_key_session_to_parent(const struct cred *cred, | ||
3068 | const struct cred *parent_cred, | ||
3069 | struct key *key); | ||
3070 | 2897 | ||
3071 | #else | 2898 | #else |
3072 | 2899 | ||
@@ -3094,13 +2921,6 @@ static inline int security_key_getsecurity(struct key *key, char **_buffer) | |||
3094 | return 0; | 2921 | return 0; |
3095 | } | 2922 | } |
3096 | 2923 | ||
3097 | static inline int security_key_session_to_parent(const struct cred *cred, | ||
3098 | const struct cred *parent_cred, | ||
3099 | struct key *key) | ||
3100 | { | ||
3101 | return 0; | ||
3102 | } | ||
3103 | |||
3104 | #endif | 2924 | #endif |
3105 | #endif /* CONFIG_KEYS */ | 2925 | #endif /* CONFIG_KEYS */ |
3106 | 2926 | ||
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 193d4bfe42ff..f5364a1de68b 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -33,8 +33,8 @@ struct plat_sci_port { | |||
33 | char *clk; /* clock string */ | 33 | char *clk; /* clock string */ |
34 | struct device *dma_dev; | 34 | struct device *dma_dev; |
35 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | 35 | #ifdef CONFIG_SERIAL_SH_SCI_DMA |
36 | enum sh_dmae_slave_chan_id dma_slave_tx; | 36 | unsigned int dma_slave_tx; |
37 | enum sh_dmae_slave_chan_id dma_slave_rx; | 37 | unsigned int dma_slave_rx; |
38 | #endif | 38 | #endif |
39 | }; | 39 | }; |
40 | 40 | ||
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h new file mode 100644 index 000000000000..1636d1e2a5f1 --- /dev/null +++ b/include/linux/sh_clk.h | |||
@@ -0,0 +1,150 @@ | |||
1 | #ifndef __SH_CLOCK_H | ||
2 | #define __SH_CLOCK_H | ||
3 | |||
4 | #include <linux/list.h> | ||
5 | #include <linux/seq_file.h> | ||
6 | #include <linux/cpufreq.h> | ||
7 | #include <linux/clk.h> | ||
8 | #include <linux/err.h> | ||
9 | |||
10 | struct clk; | ||
11 | |||
12 | struct clk_ops { | ||
13 | void (*init)(struct clk *clk); | ||
14 | int (*enable)(struct clk *clk); | ||
15 | void (*disable)(struct clk *clk); | ||
16 | unsigned long (*recalc)(struct clk *clk); | ||
17 | int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id); | ||
18 | int (*set_parent)(struct clk *clk, struct clk *parent); | ||
19 | long (*round_rate)(struct clk *clk, unsigned long rate); | ||
20 | }; | ||
21 | |||
22 | struct clk { | ||
23 | struct list_head node; | ||
24 | const char *name; | ||
25 | int id; | ||
26 | |||
27 | struct clk *parent; | ||
28 | struct clk_ops *ops; | ||
29 | |||
30 | struct list_head children; | ||
31 | struct list_head sibling; /* node for children */ | ||
32 | |||
33 | int usecount; | ||
34 | |||
35 | unsigned long rate; | ||
36 | unsigned long flags; | ||
37 | |||
38 | void __iomem *enable_reg; | ||
39 | unsigned int enable_bit; | ||
40 | |||
41 | unsigned long arch_flags; | ||
42 | void *priv; | ||
43 | struct dentry *dentry; | ||
44 | struct cpufreq_frequency_table *freq_table; | ||
45 | }; | ||
46 | |||
47 | #define CLK_ENABLE_ON_INIT (1 << 0) | ||
48 | |||
49 | /* drivers/sh/clk.c */ | ||
50 | unsigned long followparent_recalc(struct clk *); | ||
51 | void recalculate_root_clocks(void); | ||
52 | void propagate_rate(struct clk *); | ||
53 | int clk_reparent(struct clk *child, struct clk *parent); | ||
54 | int clk_register(struct clk *); | ||
55 | void clk_unregister(struct clk *); | ||
56 | void clk_enable_init_clocks(void); | ||
57 | |||
58 | /** | ||
59 | * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter | ||
60 | * @clk: clock source | ||
61 | * @rate: desired clock rate in Hz | ||
62 | * @algo_id: algorithm id to be passed down to ops->set_rate | ||
63 | * | ||
64 | * Returns success (0) or negative errno. | ||
65 | */ | ||
66 | int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id); | ||
67 | |||
68 | enum clk_sh_algo_id { | ||
69 | NO_CHANGE = 0, | ||
70 | |||
71 | IUS_N1_N1, | ||
72 | IUS_322, | ||
73 | IUS_522, | ||
74 | IUS_N11, | ||
75 | |||
76 | SB_N1, | ||
77 | |||
78 | SB3_N1, | ||
79 | SB3_32, | ||
80 | SB3_43, | ||
81 | SB3_54, | ||
82 | |||
83 | BP_N1, | ||
84 | |||
85 | IP_N1, | ||
86 | }; | ||
87 | |||
88 | struct clk_div_mult_table { | ||
89 | unsigned int *divisors; | ||
90 | unsigned int nr_divisors; | ||
91 | unsigned int *multipliers; | ||
92 | unsigned int nr_multipliers; | ||
93 | }; | ||
94 | |||
95 | struct cpufreq_frequency_table; | ||
96 | void clk_rate_table_build(struct clk *clk, | ||
97 | struct cpufreq_frequency_table *freq_table, | ||
98 | int nr_freqs, | ||
99 | struct clk_div_mult_table *src_table, | ||
100 | unsigned long *bitmap); | ||
101 | |||
102 | long clk_rate_table_round(struct clk *clk, | ||
103 | struct cpufreq_frequency_table *freq_table, | ||
104 | unsigned long rate); | ||
105 | |||
106 | int clk_rate_table_find(struct clk *clk, | ||
107 | struct cpufreq_frequency_table *freq_table, | ||
108 | unsigned long rate); | ||
109 | |||
110 | #define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \ | ||
111 | { \ | ||
112 | .parent = _parent, \ | ||
113 | .enable_reg = (void __iomem *)_enable_reg, \ | ||
114 | .enable_bit = _enable_bit, \ | ||
115 | .flags = _flags, \ | ||
116 | } | ||
117 | |||
118 | int sh_clk_mstp32_register(struct clk *clks, int nr); | ||
119 | |||
120 | #define SH_CLK_DIV4(_parent, _reg, _shift, _div_bitmap, _flags) \ | ||
121 | { \ | ||
122 | .parent = _parent, \ | ||
123 | .enable_reg = (void __iomem *)_reg, \ | ||
124 | .enable_bit = _shift, \ | ||
125 | .arch_flags = _div_bitmap, \ | ||
126 | .flags = _flags, \ | ||
127 | } | ||
128 | |||
129 | struct clk_div4_table { | ||
130 | struct clk_div_mult_table *div_mult_table; | ||
131 | void (*kick)(struct clk *clk); | ||
132 | }; | ||
133 | |||
134 | int sh_clk_div4_register(struct clk *clks, int nr, | ||
135 | struct clk_div4_table *table); | ||
136 | int sh_clk_div4_enable_register(struct clk *clks, int nr, | ||
137 | struct clk_div4_table *table); | ||
138 | int sh_clk_div4_reparent_register(struct clk *clks, int nr, | ||
139 | struct clk_div4_table *table); | ||
140 | |||
141 | #define SH_CLK_DIV6(_parent, _reg, _flags) \ | ||
142 | { \ | ||
143 | .parent = _parent, \ | ||
144 | .enable_reg = (void __iomem *)_reg, \ | ||
145 | .flags = _flags, \ | ||
146 | } | ||
147 | |||
148 | int sh_clk_div6_register(struct clk *clks, int nr); | ||
149 | |||
150 | #endif /* __SH_CLOCK_H */ | ||
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h new file mode 100644 index 000000000000..b08cd4efa15c --- /dev/null +++ b/include/linux/sh_dma.h | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | * Header for the new SH dmaengine driver | ||
3 | * | ||
4 | * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef SH_DMA_H | ||
11 | #define SH_DMA_H | ||
12 | |||
13 | #include <linux/list.h> | ||
14 | #include <linux/dmaengine.h> | ||
15 | |||
16 | /* Used by slave DMA clients to request DMA to/from a specific peripheral */ | ||
17 | struct sh_dmae_slave { | ||
18 | unsigned int slave_id; /* Set by the platform */ | ||
19 | struct device *dma_dev; /* Set by the platform */ | ||
20 | const struct sh_dmae_slave_config *config; /* Set by the driver */ | ||
21 | }; | ||
22 | |||
23 | struct sh_dmae_regs { | ||
24 | u32 sar; /* SAR / source address */ | ||
25 | u32 dar; /* DAR / destination address */ | ||
26 | u32 tcr; /* TCR / transfer count */ | ||
27 | }; | ||
28 | |||
29 | struct sh_desc { | ||
30 | struct sh_dmae_regs hw; | ||
31 | struct list_head node; | ||
32 | struct dma_async_tx_descriptor async_tx; | ||
33 | enum dma_data_direction direction; | ||
34 | dma_cookie_t cookie; | ||
35 | size_t partial; | ||
36 | int chunks; | ||
37 | int mark; | ||
38 | }; | ||
39 | |||
40 | struct sh_dmae_slave_config { | ||
41 | unsigned int slave_id; | ||
42 | dma_addr_t addr; | ||
43 | u32 chcr; | ||
44 | char mid_rid; | ||
45 | }; | ||
46 | |||
47 | struct sh_dmae_channel { | ||
48 | unsigned int offset; | ||
49 | unsigned int dmars; | ||
50 | unsigned int dmars_bit; | ||
51 | }; | ||
52 | |||
53 | struct sh_dmae_pdata { | ||
54 | const struct sh_dmae_slave_config *slave; | ||
55 | int slave_num; | ||
56 | const struct sh_dmae_channel *channel; | ||
57 | int channel_num; | ||
58 | unsigned int ts_low_shift; | ||
59 | unsigned int ts_low_mask; | ||
60 | unsigned int ts_high_shift; | ||
61 | unsigned int ts_high_mask; | ||
62 | const unsigned int *ts_shift; | ||
63 | int ts_shift_num; | ||
64 | u16 dmaor_init; | ||
65 | }; | ||
66 | |||
67 | /* DMA register */ | ||
68 | #define SAR 0x00 | ||
69 | #define DAR 0x04 | ||
70 | #define TCR 0x08 | ||
71 | #define CHCR 0x0C | ||
72 | #define DMAOR 0x40 | ||
73 | |||
74 | /* DMAOR definitions */ | ||
75 | #define DMAOR_AE 0x00000004 | ||
76 | #define DMAOR_NMIF 0x00000002 | ||
77 | #define DMAOR_DME 0x00000001 | ||
78 | |||
79 | /* Definitions for the SuperH DMAC */ | ||
80 | #define REQ_L 0x00000000 | ||
81 | #define REQ_E 0x00080000 | ||
82 | #define RACK_H 0x00000000 | ||
83 | #define RACK_L 0x00040000 | ||
84 | #define ACK_R 0x00000000 | ||
85 | #define ACK_W 0x00020000 | ||
86 | #define ACK_H 0x00000000 | ||
87 | #define ACK_L 0x00010000 | ||
88 | #define DM_INC 0x00004000 | ||
89 | #define DM_DEC 0x00008000 | ||
90 | #define DM_FIX 0x0000c000 | ||
91 | #define SM_INC 0x00001000 | ||
92 | #define SM_DEC 0x00002000 | ||
93 | #define SM_FIX 0x00003000 | ||
94 | #define RS_IN 0x00000200 | ||
95 | #define RS_OUT 0x00000300 | ||
96 | #define TS_BLK 0x00000040 | ||
97 | #define TM_BUR 0x00000020 | ||
98 | #define CHCR_DE 0x00000001 | ||
99 | #define CHCR_TE 0x00000002 | ||
100 | #define CHCR_IE 0x00000004 | ||
101 | |||
102 | #endif | ||
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 51d288d8ac88..0d6cd38e673d 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __SH_INTC_H | 1 | #ifndef __SH_INTC_H |
2 | #define __SH_INTC_H | 2 | #define __SH_INTC_H |
3 | 3 | ||
4 | #include <linux/ioport.h> | ||
5 | |||
4 | typedef unsigned char intc_enum; | 6 | typedef unsigned char intc_enum; |
5 | 7 | ||
6 | struct intc_vect { | 8 | struct intc_vect { |
@@ -21,6 +23,9 @@ struct intc_group { | |||
21 | struct intc_mask_reg { | 23 | struct intc_mask_reg { |
22 | unsigned long set_reg, clr_reg, reg_width; | 24 | unsigned long set_reg, clr_reg, reg_width; |
23 | intc_enum enum_ids[32]; | 25 | intc_enum enum_ids[32]; |
26 | #ifdef CONFIG_INTC_BALANCING | ||
27 | unsigned long dist_reg; | ||
28 | #endif | ||
24 | #ifdef CONFIG_SMP | 29 | #ifdef CONFIG_SMP |
25 | unsigned long smp; | 30 | unsigned long smp; |
26 | #endif | 31 | #endif |
@@ -39,8 +44,14 @@ struct intc_sense_reg { | |||
39 | intc_enum enum_ids[16]; | 44 | intc_enum enum_ids[16]; |
40 | }; | 45 | }; |
41 | 46 | ||
47 | #ifdef CONFIG_INTC_BALANCING | ||
48 | #define INTC_SMP_BALANCING(reg) .dist_reg = (reg) | ||
49 | #else | ||
50 | #define INTC_SMP_BALANCING(reg) | ||
51 | #endif | ||
52 | |||
42 | #ifdef CONFIG_SMP | 53 | #ifdef CONFIG_SMP |
43 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) | 54 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) |
44 | #else | 55 | #else |
45 | #define INTC_SMP(stride, nr) | 56 | #define INTC_SMP(stride, nr) |
46 | #endif | 57 | #endif |
@@ -71,6 +82,8 @@ struct intc_hw_desc { | |||
71 | 82 | ||
72 | struct intc_desc { | 83 | struct intc_desc { |
73 | char *name; | 84 | char *name; |
85 | struct resource *resource; | ||
86 | unsigned int num_resources; | ||
74 | intc_enum force_enable; | 87 | intc_enum force_enable; |
75 | intc_enum force_disable; | 88 | intc_enum force_disable; |
76 | struct intc_hw_desc hw; | 89 | struct intc_hw_desc hw; |
@@ -92,9 +105,18 @@ struct intc_desc symbol __initdata = { \ | |||
92 | prio_regs, sense_regs, ack_regs), \ | 105 | prio_regs, sense_regs, ack_regs), \ |
93 | } | 106 | } |
94 | 107 | ||
95 | void __init register_intc_controller(struct intc_desc *desc); | 108 | int __init register_intc_controller(struct intc_desc *desc); |
96 | int intc_set_priority(unsigned int irq, unsigned int prio); | 109 | int intc_set_priority(unsigned int irq, unsigned int prio); |
97 | 110 | ||
111 | #ifdef CONFIG_INTC_USERIMASK | ||
112 | int register_intc_userimask(unsigned long addr); | ||
113 | #else | ||
114 | static inline int register_intc_userimask(unsigned long addr) | ||
115 | { | ||
116 | return 0; | ||
117 | } | ||
118 | #endif | ||
119 | |||
98 | int reserve_irq_vector(unsigned int irq); | 120 | int reserve_irq_vector(unsigned int irq); |
99 | void reserve_irq_legacy(void); | 121 | void reserve_irq_legacy(void); |
100 | 122 | ||
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 4d5ecb222af9..4d5d2f546dbf 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
@@ -27,6 +27,8 @@ | |||
27 | #ifndef _LINUX_SRCU_H | 27 | #ifndef _LINUX_SRCU_H |
28 | #define _LINUX_SRCU_H | 28 | #define _LINUX_SRCU_H |
29 | 29 | ||
30 | #include <linux/mutex.h> | ||
31 | |||
30 | struct srcu_struct_array { | 32 | struct srcu_struct_array { |
31 | int c[2]; | 33 | int c[2]; |
32 | }; | 34 | }; |
@@ -84,8 +86,8 @@ long srcu_batches_completed(struct srcu_struct *sp); | |||
84 | /** | 86 | /** |
85 | * srcu_read_lock_held - might we be in SRCU read-side critical section? | 87 | * srcu_read_lock_held - might we be in SRCU read-side critical section? |
86 | * | 88 | * |
87 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | 89 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU |
88 | * an SRCU read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 90 | * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC, |
89 | * this assumes we are in an SRCU read-side critical section unless it can | 91 | * this assumes we are in an SRCU read-side critical section unless it can |
90 | * prove otherwise. | 92 | * prove otherwise. |
91 | */ | 93 | */ |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index baba3a23a814..6b524a0d02e4 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
@@ -1,13 +1,101 @@ | |||
1 | #ifndef _LINUX_STOP_MACHINE | 1 | #ifndef _LINUX_STOP_MACHINE |
2 | #define _LINUX_STOP_MACHINE | 2 | #define _LINUX_STOP_MACHINE |
3 | /* "Bogolock": stop the entire machine, disable interrupts. This is a | 3 | |
4 | very heavy lock, which is equivalent to grabbing every spinlock | ||
5 | (and more). So the "read" side to such a lock is anything which | ||
6 | disables preeempt. */ | ||
7 | #include <linux/cpu.h> | 4 | #include <linux/cpu.h> |
8 | #include <linux/cpumask.h> | 5 | #include <linux/cpumask.h> |
6 | #include <linux/list.h> | ||
9 | #include <asm/system.h> | 7 | #include <asm/system.h> |
10 | 8 | ||
9 | /* | ||
10 | * stop_cpu[s]() is simplistic per-cpu maximum priority cpu | ||
11 | * monopolization mechanism. The caller can specify a non-sleeping | ||
12 | * function to be executed on a single or multiple cpus preempting all | ||
13 | * other processes and monopolizing those cpus until it finishes. | ||
14 | * | ||
15 | * Resources for this mechanism are preallocated when a cpu is brought | ||
16 | * up and requests are guaranteed to be served as long as the target | ||
17 | * cpus are online. | ||
18 | */ | ||
19 | typedef int (*cpu_stop_fn_t)(void *arg); | ||
20 | |||
21 | #ifdef CONFIG_SMP | ||
22 | |||
23 | struct cpu_stop_work { | ||
24 | struct list_head list; /* cpu_stopper->works */ | ||
25 | cpu_stop_fn_t fn; | ||
26 | void *arg; | ||
27 | struct cpu_stop_done *done; | ||
28 | }; | ||
29 | |||
30 | int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg); | ||
31 | void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg, | ||
32 | struct cpu_stop_work *work_buf); | ||
33 | int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); | ||
34 | int try_stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); | ||
35 | |||
36 | #else /* CONFIG_SMP */ | ||
37 | |||
38 | #include <linux/workqueue.h> | ||
39 | |||
40 | struct cpu_stop_work { | ||
41 | struct work_struct work; | ||
42 | cpu_stop_fn_t fn; | ||
43 | void *arg; | ||
44 | }; | ||
45 | |||
46 | static inline int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) | ||
47 | { | ||
48 | int ret = -ENOENT; | ||
49 | preempt_disable(); | ||
50 | if (cpu == smp_processor_id()) | ||
51 | ret = fn(arg); | ||
52 | preempt_enable(); | ||
53 | return ret; | ||
54 | } | ||
55 | |||
56 | static void stop_one_cpu_nowait_workfn(struct work_struct *work) | ||
57 | { | ||
58 | struct cpu_stop_work *stwork = | ||
59 | container_of(work, struct cpu_stop_work, work); | ||
60 | preempt_disable(); | ||
61 | stwork->fn(stwork->arg); | ||
62 | preempt_enable(); | ||
63 | } | ||
64 | |||
65 | static inline void stop_one_cpu_nowait(unsigned int cpu, | ||
66 | cpu_stop_fn_t fn, void *arg, | ||
67 | struct cpu_stop_work *work_buf) | ||
68 | { | ||
69 | if (cpu == smp_processor_id()) { | ||
70 | INIT_WORK(&work_buf->work, stop_one_cpu_nowait_workfn); | ||
71 | work_buf->fn = fn; | ||
72 | work_buf->arg = arg; | ||
73 | schedule_work(&work_buf->work); | ||
74 | } | ||
75 | } | ||
76 | |||
77 | static inline int stop_cpus(const struct cpumask *cpumask, | ||
78 | cpu_stop_fn_t fn, void *arg) | ||
79 | { | ||
80 | if (cpumask_test_cpu(raw_smp_processor_id(), cpumask)) | ||
81 | return stop_one_cpu(raw_smp_processor_id(), fn, arg); | ||
82 | return -ENOENT; | ||
83 | } | ||
84 | |||
85 | static inline int try_stop_cpus(const struct cpumask *cpumask, | ||
86 | cpu_stop_fn_t fn, void *arg) | ||
87 | { | ||
88 | return stop_cpus(cpumask, fn, arg); | ||
89 | } | ||
90 | |||
91 | #endif /* CONFIG_SMP */ | ||
92 | |||
93 | /* | ||
94 | * stop_machine "Bogolock": stop the entire machine, disable | ||
95 | * interrupts. This is a very heavy lock, which is equivalent to | ||
96 | * grabbing every spinlock (and more). So the "read" side to such a | ||
97 | * lock is anything which disables preeempt. | ||
98 | */ | ||
11 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) | 99 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) |
12 | 100 | ||
13 | /** | 101 | /** |
@@ -36,24 +124,7 @@ int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | |||
36 | */ | 124 | */ |
37 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | 125 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); |
38 | 126 | ||
39 | /** | 127 | #else /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
40 | * stop_machine_create: create all stop_machine threads | ||
41 | * | ||
42 | * Description: This causes all stop_machine threads to be created before | ||
43 | * stop_machine actually gets called. This can be used by subsystems that | ||
44 | * need a non failing stop_machine infrastructure. | ||
45 | */ | ||
46 | int stop_machine_create(void); | ||
47 | |||
48 | /** | ||
49 | * stop_machine_destroy: destroy all stop_machine threads | ||
50 | * | ||
51 | * Description: This causes all stop_machine threads which were created with | ||
52 | * stop_machine_create to be destroyed again. | ||
53 | */ | ||
54 | void stop_machine_destroy(void); | ||
55 | |||
56 | #else | ||
57 | 128 | ||
58 | static inline int stop_machine(int (*fn)(void *), void *data, | 129 | static inline int stop_machine(int (*fn)(void *), void *data, |
59 | const struct cpumask *cpus) | 130 | const struct cpumask *cpus) |
@@ -65,8 +136,5 @@ static inline int stop_machine(int (*fn)(void *), void *data, | |||
65 | return ret; | 136 | return ret; |
66 | } | 137 | } |
67 | 138 | ||
68 | static inline int stop_machine_create(void) { return 0; } | 139 | #endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
69 | static inline void stop_machine_destroy(void) { } | 140 | #endif /* _LINUX_STOP_MACHINE */ |
70 | |||
71 | #endif /* CONFIG_SMP */ | ||
72 | #endif /* _LINUX_STOP_MACHINE */ | ||
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 996df4dac7d4..87d7ec0bf779 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -54,6 +54,7 @@ struct rpc_cred { | |||
54 | #define RPCAUTH_CRED_NEW 0 | 54 | #define RPCAUTH_CRED_NEW 0 |
55 | #define RPCAUTH_CRED_UPTODATE 1 | 55 | #define RPCAUTH_CRED_UPTODATE 1 |
56 | #define RPCAUTH_CRED_HASHED 2 | 56 | #define RPCAUTH_CRED_HASHED 2 |
57 | #define RPCAUTH_CRED_NEGATIVE 3 | ||
57 | 58 | ||
58 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 | 59 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 |
59 | 60 | ||
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h index d48d4e605f74..671538d25bc1 100644 --- a/include/linux/sunrpc/auth_gss.h +++ b/include/linux/sunrpc/auth_gss.h | |||
@@ -82,6 +82,7 @@ struct gss_cred { | |||
82 | enum rpc_gss_svc gc_service; | 82 | enum rpc_gss_svc gc_service; |
83 | struct gss_cl_ctx *gc_ctx; | 83 | struct gss_cl_ctx *gc_ctx; |
84 | struct gss_upcall_msg *gc_upcall; | 84 | struct gss_upcall_msg *gc_upcall; |
85 | unsigned long gc_upcall_timestamp; | ||
85 | unsigned char gc_machine_cred : 1; | 86 | unsigned char gc_machine_cred : 1; |
86 | }; | 87 | }; |
87 | 88 | ||
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index 03f33330ece2..5d8048beb051 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
@@ -35,7 +35,8 @@ int gss_import_sec_context( | |||
35 | const void* input_token, | 35 | const void* input_token, |
36 | size_t bufsize, | 36 | size_t bufsize, |
37 | struct gss_api_mech *mech, | 37 | struct gss_api_mech *mech, |
38 | struct gss_ctx **ctx_id); | 38 | struct gss_ctx **ctx_id, |
39 | gfp_t gfp_mask); | ||
39 | u32 gss_get_mic( | 40 | u32 gss_get_mic( |
40 | struct gss_ctx *ctx_id, | 41 | struct gss_ctx *ctx_id, |
41 | struct xdr_buf *message, | 42 | struct xdr_buf *message, |
@@ -80,6 +81,8 @@ struct gss_api_mech { | |||
80 | /* pseudoflavors supported by this mechanism: */ | 81 | /* pseudoflavors supported by this mechanism: */ |
81 | int gm_pf_num; | 82 | int gm_pf_num; |
82 | struct pf_desc * gm_pfs; | 83 | struct pf_desc * gm_pfs; |
84 | /* Should the following be a callback operation instead? */ | ||
85 | const char *gm_upcall_enctypes; | ||
83 | }; | 86 | }; |
84 | 87 | ||
85 | /* and must provide the following operations: */ | 88 | /* and must provide the following operations: */ |
@@ -87,7 +90,8 @@ struct gss_api_ops { | |||
87 | int (*gss_import_sec_context)( | 90 | int (*gss_import_sec_context)( |
88 | const void *input_token, | 91 | const void *input_token, |
89 | size_t bufsize, | 92 | size_t bufsize, |
90 | struct gss_ctx *ctx_id); | 93 | struct gss_ctx *ctx_id, |
94 | gfp_t gfp_mask); | ||
91 | u32 (*gss_get_mic)( | 95 | u32 (*gss_get_mic)( |
92 | struct gss_ctx *ctx_id, | 96 | struct gss_ctx *ctx_id, |
93 | struct xdr_buf *message, | 97 | struct xdr_buf *message, |
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h index e7bbdba474d5..5af2931cf58d 100644 --- a/include/linux/sunrpc/gss_krb5.h +++ b/include/linux/sunrpc/gss_krb5.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Adapted from MIT Kerberos 5-1.2.1 lib/include/krb5.h, | 4 | * Adapted from MIT Kerberos 5-1.2.1 lib/include/krb5.h, |
5 | * lib/gssapi/krb5/gssapiP_krb5.h, and others | 5 | * lib/gssapi/krb5/gssapiP_krb5.h, and others |
6 | * | 6 | * |
7 | * Copyright (c) 2000 The Regents of the University of Michigan. | 7 | * Copyright (c) 2000-2008 The Regents of the University of Michigan. |
8 | * All rights reserved. | 8 | * All rights reserved. |
9 | * | 9 | * |
10 | * Andy Adamson <andros@umich.edu> | 10 | * Andy Adamson <andros@umich.edu> |
@@ -36,17 +36,86 @@ | |||
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/crypto.h> | ||
39 | #include <linux/sunrpc/auth_gss.h> | 40 | #include <linux/sunrpc/auth_gss.h> |
40 | #include <linux/sunrpc/gss_err.h> | 41 | #include <linux/sunrpc/gss_err.h> |
41 | #include <linux/sunrpc/gss_asn1.h> | 42 | #include <linux/sunrpc/gss_asn1.h> |
42 | 43 | ||
44 | /* Length of constant used in key derivation */ | ||
45 | #define GSS_KRB5_K5CLENGTH (5) | ||
46 | |||
47 | /* Maximum key length (in bytes) for the supported crypto algorithms*/ | ||
48 | #define GSS_KRB5_MAX_KEYLEN (32) | ||
49 | |||
50 | /* Maximum checksum function output for the supported crypto algorithms */ | ||
51 | #define GSS_KRB5_MAX_CKSUM_LEN (20) | ||
52 | |||
53 | /* Maximum blocksize for the supported crypto algorithms */ | ||
54 | #define GSS_KRB5_MAX_BLOCKSIZE (16) | ||
55 | |||
56 | struct krb5_ctx; | ||
57 | |||
58 | struct gss_krb5_enctype { | ||
59 | const u32 etype; /* encryption (key) type */ | ||
60 | const u32 ctype; /* checksum type */ | ||
61 | const char *name; /* "friendly" name */ | ||
62 | const char *encrypt_name; /* crypto encrypt name */ | ||
63 | const char *cksum_name; /* crypto checksum name */ | ||
64 | const u16 signalg; /* signing algorithm */ | ||
65 | const u16 sealalg; /* sealing algorithm */ | ||
66 | const u32 blocksize; /* encryption blocksize */ | ||
67 | const u32 conflen; /* confounder length | ||
68 | (normally the same as | ||
69 | the blocksize) */ | ||
70 | const u32 cksumlength; /* checksum length */ | ||
71 | const u32 keyed_cksum; /* is it a keyed cksum? */ | ||
72 | const u32 keybytes; /* raw key len, in bytes */ | ||
73 | const u32 keylength; /* final key len, in bytes */ | ||
74 | u32 (*encrypt) (struct crypto_blkcipher *tfm, | ||
75 | void *iv, void *in, void *out, | ||
76 | int length); /* encryption function */ | ||
77 | u32 (*decrypt) (struct crypto_blkcipher *tfm, | ||
78 | void *iv, void *in, void *out, | ||
79 | int length); /* decryption function */ | ||
80 | u32 (*mk_key) (const struct gss_krb5_enctype *gk5e, | ||
81 | struct xdr_netobj *in, | ||
82 | struct xdr_netobj *out); /* complete key generation */ | ||
83 | u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset, | ||
84 | struct xdr_buf *buf, int ec, | ||
85 | struct page **pages); /* v2 encryption function */ | ||
86 | u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, | ||
87 | struct xdr_buf *buf, u32 *headskip, | ||
88 | u32 *tailskip); /* v2 decryption function */ | ||
89 | }; | ||
90 | |||
91 | /* krb5_ctx flags definitions */ | ||
92 | #define KRB5_CTX_FLAG_INITIATOR 0x00000001 | ||
93 | #define KRB5_CTX_FLAG_CFX 0x00000002 | ||
94 | #define KRB5_CTX_FLAG_ACCEPTOR_SUBKEY 0x00000004 | ||
95 | |||
43 | struct krb5_ctx { | 96 | struct krb5_ctx { |
44 | int initiate; /* 1 = initiating, 0 = accepting */ | 97 | int initiate; /* 1 = initiating, 0 = accepting */ |
98 | u32 enctype; | ||
99 | u32 flags; | ||
100 | const struct gss_krb5_enctype *gk5e; /* enctype-specific info */ | ||
45 | struct crypto_blkcipher *enc; | 101 | struct crypto_blkcipher *enc; |
46 | struct crypto_blkcipher *seq; | 102 | struct crypto_blkcipher *seq; |
103 | struct crypto_blkcipher *acceptor_enc; | ||
104 | struct crypto_blkcipher *initiator_enc; | ||
105 | struct crypto_blkcipher *acceptor_enc_aux; | ||
106 | struct crypto_blkcipher *initiator_enc_aux; | ||
107 | u8 Ksess[GSS_KRB5_MAX_KEYLEN]; /* session key */ | ||
108 | u8 cksum[GSS_KRB5_MAX_KEYLEN]; | ||
47 | s32 endtime; | 109 | s32 endtime; |
48 | u32 seq_send; | 110 | u32 seq_send; |
111 | u64 seq_send64; | ||
49 | struct xdr_netobj mech_used; | 112 | struct xdr_netobj mech_used; |
113 | u8 initiator_sign[GSS_KRB5_MAX_KEYLEN]; | ||
114 | u8 acceptor_sign[GSS_KRB5_MAX_KEYLEN]; | ||
115 | u8 initiator_seal[GSS_KRB5_MAX_KEYLEN]; | ||
116 | u8 acceptor_seal[GSS_KRB5_MAX_KEYLEN]; | ||
117 | u8 initiator_integ[GSS_KRB5_MAX_KEYLEN]; | ||
118 | u8 acceptor_integ[GSS_KRB5_MAX_KEYLEN]; | ||
50 | }; | 119 | }; |
51 | 120 | ||
52 | extern spinlock_t krb5_seq_lock; | 121 | extern spinlock_t krb5_seq_lock; |
@@ -57,6 +126,18 @@ extern spinlock_t krb5_seq_lock; | |||
57 | #define KG_TOK_MIC_MSG 0x0101 | 126 | #define KG_TOK_MIC_MSG 0x0101 |
58 | #define KG_TOK_WRAP_MSG 0x0201 | 127 | #define KG_TOK_WRAP_MSG 0x0201 |
59 | 128 | ||
129 | #define KG2_TOK_INITIAL 0x0101 | ||
130 | #define KG2_TOK_RESPONSE 0x0202 | ||
131 | #define KG2_TOK_MIC 0x0404 | ||
132 | #define KG2_TOK_WRAP 0x0504 | ||
133 | |||
134 | #define KG2_TOKEN_FLAG_SENTBYACCEPTOR 0x01 | ||
135 | #define KG2_TOKEN_FLAG_SEALED 0x02 | ||
136 | #define KG2_TOKEN_FLAG_ACCEPTORSUBKEY 0x04 | ||
137 | |||
138 | #define KG2_RESP_FLAG_ERROR 0x0001 | ||
139 | #define KG2_RESP_FLAG_DELEG_OK 0x0002 | ||
140 | |||
60 | enum sgn_alg { | 141 | enum sgn_alg { |
61 | SGN_ALG_DES_MAC_MD5 = 0x0000, | 142 | SGN_ALG_DES_MAC_MD5 = 0x0000, |
62 | SGN_ALG_MD2_5 = 0x0001, | 143 | SGN_ALG_MD2_5 = 0x0001, |
@@ -81,6 +162,9 @@ enum seal_alg { | |||
81 | #define CKSUMTYPE_RSA_MD5_DES 0x0008 | 162 | #define CKSUMTYPE_RSA_MD5_DES 0x0008 |
82 | #define CKSUMTYPE_NIST_SHA 0x0009 | 163 | #define CKSUMTYPE_NIST_SHA 0x0009 |
83 | #define CKSUMTYPE_HMAC_SHA1_DES3 0x000c | 164 | #define CKSUMTYPE_HMAC_SHA1_DES3 0x000c |
165 | #define CKSUMTYPE_HMAC_SHA1_96_AES128 0x000f | ||
166 | #define CKSUMTYPE_HMAC_SHA1_96_AES256 0x0010 | ||
167 | #define CKSUMTYPE_HMAC_MD5_ARCFOUR -138 /* Microsoft md5 hmac cksumtype */ | ||
84 | 168 | ||
85 | /* from gssapi_err_krb5.h */ | 169 | /* from gssapi_err_krb5.h */ |
86 | #define KG_CCACHE_NOMATCH (39756032L) | 170 | #define KG_CCACHE_NOMATCH (39756032L) |
@@ -111,11 +195,56 @@ enum seal_alg { | |||
111 | #define ENCTYPE_DES3_CBC_RAW 0x0006 /* DES-3 cbc mode raw */ | 195 | #define ENCTYPE_DES3_CBC_RAW 0x0006 /* DES-3 cbc mode raw */ |
112 | #define ENCTYPE_DES_HMAC_SHA1 0x0008 | 196 | #define ENCTYPE_DES_HMAC_SHA1 0x0008 |
113 | #define ENCTYPE_DES3_CBC_SHA1 0x0010 | 197 | #define ENCTYPE_DES3_CBC_SHA1 0x0010 |
198 | #define ENCTYPE_AES128_CTS_HMAC_SHA1_96 0x0011 | ||
199 | #define ENCTYPE_AES256_CTS_HMAC_SHA1_96 0x0012 | ||
200 | #define ENCTYPE_ARCFOUR_HMAC 0x0017 | ||
201 | #define ENCTYPE_ARCFOUR_HMAC_EXP 0x0018 | ||
114 | #define ENCTYPE_UNKNOWN 0x01ff | 202 | #define ENCTYPE_UNKNOWN 0x01ff |
115 | 203 | ||
116 | s32 | 204 | /* |
117 | make_checksum(char *, char *header, int hdrlen, struct xdr_buf *body, | 205 | * Constants used for key derivation |
118 | int body_offset, struct xdr_netobj *cksum); | 206 | */ |
207 | /* for 3DES */ | ||
208 | #define KG_USAGE_SEAL (22) | ||
209 | #define KG_USAGE_SIGN (23) | ||
210 | #define KG_USAGE_SEQ (24) | ||
211 | |||
212 | /* from rfc3961 */ | ||
213 | #define KEY_USAGE_SEED_CHECKSUM (0x99) | ||
214 | #define KEY_USAGE_SEED_ENCRYPTION (0xAA) | ||
215 | #define KEY_USAGE_SEED_INTEGRITY (0x55) | ||
216 | |||
217 | /* from rfc4121 */ | ||
218 | #define KG_USAGE_ACCEPTOR_SEAL (22) | ||
219 | #define KG_USAGE_ACCEPTOR_SIGN (23) | ||
220 | #define KG_USAGE_INITIATOR_SEAL (24) | ||
221 | #define KG_USAGE_INITIATOR_SIGN (25) | ||
222 | |||
223 | /* | ||
224 | * This compile-time check verifies that we will not exceed the | ||
225 | * slack space allotted by the client and server auth_gss code | ||
226 | * before they call gss_wrap(). | ||
227 | */ | ||
228 | #define GSS_KRB5_MAX_SLACK_NEEDED \ | ||
229 | (GSS_KRB5_TOK_HDR_LEN /* gss token header */ \ | ||
230 | + GSS_KRB5_MAX_CKSUM_LEN /* gss token checksum */ \ | ||
231 | + GSS_KRB5_MAX_BLOCKSIZE /* confounder */ \ | ||
232 | + GSS_KRB5_MAX_BLOCKSIZE /* possible padding */ \ | ||
233 | + GSS_KRB5_TOK_HDR_LEN /* encrypted hdr in v2 token */\ | ||
234 | + GSS_KRB5_MAX_CKSUM_LEN /* encryption hmac */ \ | ||
235 | + 4 + 4 /* RPC verifier */ \ | ||
236 | + GSS_KRB5_TOK_HDR_LEN \ | ||
237 | + GSS_KRB5_MAX_CKSUM_LEN) | ||
238 | |||
239 | u32 | ||
240 | make_checksum(struct krb5_ctx *kctx, char *header, int hdrlen, | ||
241 | struct xdr_buf *body, int body_offset, u8 *cksumkey, | ||
242 | unsigned int usage, struct xdr_netobj *cksumout); | ||
243 | |||
244 | u32 | ||
245 | make_checksum_v2(struct krb5_ctx *, char *header, int hdrlen, | ||
246 | struct xdr_buf *body, int body_offset, u8 *key, | ||
247 | unsigned int usage, struct xdr_netobj *cksum); | ||
119 | 248 | ||
120 | u32 gss_get_mic_kerberos(struct gss_ctx *, struct xdr_buf *, | 249 | u32 gss_get_mic_kerberos(struct gss_ctx *, struct xdr_buf *, |
121 | struct xdr_netobj *); | 250 | struct xdr_netobj *); |
@@ -149,11 +278,54 @@ gss_decrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *inbuf, | |||
149 | int offset); | 278 | int offset); |
150 | 279 | ||
151 | s32 | 280 | s32 |
152 | krb5_make_seq_num(struct crypto_blkcipher *key, | 281 | krb5_make_seq_num(struct krb5_ctx *kctx, |
282 | struct crypto_blkcipher *key, | ||
153 | int direction, | 283 | int direction, |
154 | u32 seqnum, unsigned char *cksum, unsigned char *buf); | 284 | u32 seqnum, unsigned char *cksum, unsigned char *buf); |
155 | 285 | ||
156 | s32 | 286 | s32 |
157 | krb5_get_seq_num(struct crypto_blkcipher *key, | 287 | krb5_get_seq_num(struct krb5_ctx *kctx, |
158 | unsigned char *cksum, | 288 | unsigned char *cksum, |
159 | unsigned char *buf, int *direction, u32 *seqnum); | 289 | unsigned char *buf, int *direction, u32 *seqnum); |
290 | |||
291 | int | ||
292 | xdr_extend_head(struct xdr_buf *buf, unsigned int base, unsigned int shiftlen); | ||
293 | |||
294 | u32 | ||
295 | krb5_derive_key(const struct gss_krb5_enctype *gk5e, | ||
296 | const struct xdr_netobj *inkey, | ||
297 | struct xdr_netobj *outkey, | ||
298 | const struct xdr_netobj *in_constant, | ||
299 | gfp_t gfp_mask); | ||
300 | |||
301 | u32 | ||
302 | gss_krb5_des3_make_key(const struct gss_krb5_enctype *gk5e, | ||
303 | struct xdr_netobj *randombits, | ||
304 | struct xdr_netobj *key); | ||
305 | |||
306 | u32 | ||
307 | gss_krb5_aes_make_key(const struct gss_krb5_enctype *gk5e, | ||
308 | struct xdr_netobj *randombits, | ||
309 | struct xdr_netobj *key); | ||
310 | |||
311 | u32 | ||
312 | gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset, | ||
313 | struct xdr_buf *buf, int ec, | ||
314 | struct page **pages); | ||
315 | |||
316 | u32 | ||
317 | gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset, | ||
318 | struct xdr_buf *buf, u32 *plainoffset, | ||
319 | u32 *plainlen); | ||
320 | |||
321 | int | ||
322 | krb5_rc4_setup_seq_key(struct krb5_ctx *kctx, | ||
323 | struct crypto_blkcipher *cipher, | ||
324 | unsigned char *cksum); | ||
325 | |||
326 | int | ||
327 | krb5_rc4_setup_enc_key(struct krb5_ctx *kctx, | ||
328 | struct crypto_blkcipher *cipher, | ||
329 | s32 seqnum); | ||
330 | void | ||
331 | gss_krb5_make_confounder(char *p, u32 conflen); | ||
diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h index 77f78e56c481..b6edbc0ea83d 100644 --- a/include/linux/sunrpc/metrics.h +++ b/include/linux/sunrpc/metrics.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define _LINUX_SUNRPC_METRICS_H | 26 | #define _LINUX_SUNRPC_METRICS_H |
27 | 27 | ||
28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
29 | #include <linux/ktime.h> | ||
29 | 30 | ||
30 | #define RPC_IOSTATS_VERS "1.0" | 31 | #define RPC_IOSTATS_VERS "1.0" |
31 | 32 | ||
@@ -58,9 +59,9 @@ struct rpc_iostats { | |||
58 | * and the total time the request spent from init to release | 59 | * and the total time the request spent from init to release |
59 | * are measured. | 60 | * are measured. |
60 | */ | 61 | */ |
61 | unsigned long long om_queue, /* jiffies queued for xmit */ | 62 | ktime_t om_queue, /* queued for xmit */ |
62 | om_rtt, /* jiffies for RPC RTT */ | 63 | om_rtt, /* RPC RTT */ |
63 | om_execute; /* jiffies for RPC execution */ | 64 | om_execute; /* RPC execution */ |
64 | } ____cacheline_aligned; | 65 | } ____cacheline_aligned; |
65 | 66 | ||
66 | struct rpc_task; | 67 | struct rpc_task; |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 7bc7fd5291ce..7be4f3a6d246 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define _LINUX_SUNRPC_SCHED_H_ | 10 | #define _LINUX_SUNRPC_SCHED_H_ |
11 | 11 | ||
12 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
13 | #include <linux/ktime.h> | ||
13 | #include <linux/sunrpc/types.h> | 14 | #include <linux/sunrpc/types.h> |
14 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
15 | #include <linux/wait.h> | 16 | #include <linux/wait.h> |
@@ -40,21 +41,15 @@ struct rpc_wait { | |||
40 | * This is the RPC task struct | 41 | * This is the RPC task struct |
41 | */ | 42 | */ |
42 | struct rpc_task { | 43 | struct rpc_task { |
43 | #ifdef RPC_DEBUG | ||
44 | unsigned long tk_magic; /* 0xf00baa */ | ||
45 | #endif | ||
46 | atomic_t tk_count; /* Reference count */ | 44 | atomic_t tk_count; /* Reference count */ |
47 | struct list_head tk_task; /* global list of tasks */ | 45 | struct list_head tk_task; /* global list of tasks */ |
48 | struct rpc_clnt * tk_client; /* RPC client */ | 46 | struct rpc_clnt * tk_client; /* RPC client */ |
49 | struct rpc_rqst * tk_rqstp; /* RPC request */ | 47 | struct rpc_rqst * tk_rqstp; /* RPC request */ |
50 | int tk_status; /* result of last operation */ | ||
51 | 48 | ||
52 | /* | 49 | /* |
53 | * RPC call state | 50 | * RPC call state |
54 | */ | 51 | */ |
55 | struct rpc_message tk_msg; /* RPC call info */ | 52 | struct rpc_message tk_msg; /* RPC call info */ |
56 | __u8 tk_garb_retry; | ||
57 | __u8 tk_cred_retry; | ||
58 | 53 | ||
59 | /* | 54 | /* |
60 | * callback to be executed after waking up | 55 | * callback to be executed after waking up |
@@ -67,7 +62,6 @@ struct rpc_task { | |||
67 | void * tk_calldata; | 62 | void * tk_calldata; |
68 | 63 | ||
69 | unsigned long tk_timeout; /* timeout for rpc_sleep() */ | 64 | unsigned long tk_timeout; /* timeout for rpc_sleep() */ |
70 | unsigned short tk_flags; /* misc flags */ | ||
71 | unsigned long tk_runstate; /* Task run status */ | 65 | unsigned long tk_runstate; /* Task run status */ |
72 | struct workqueue_struct *tk_workqueue; /* Normally rpciod, but could | 66 | struct workqueue_struct *tk_workqueue; /* Normally rpciod, but could |
73 | * be any workqueue | 67 | * be any workqueue |
@@ -78,17 +72,19 @@ struct rpc_task { | |||
78 | struct rpc_wait tk_wait; /* RPC wait */ | 72 | struct rpc_wait tk_wait; /* RPC wait */ |
79 | } u; | 73 | } u; |
80 | 74 | ||
81 | unsigned short tk_timeouts; /* maj timeouts */ | 75 | ktime_t tk_start; /* RPC task init timestamp */ |
82 | size_t tk_bytes_sent; /* total bytes sent */ | ||
83 | unsigned long tk_start; /* RPC task init timestamp */ | ||
84 | long tk_rtt; /* round-trip time (jiffies) */ | ||
85 | 76 | ||
86 | pid_t tk_owner; /* Process id for batching tasks */ | 77 | pid_t tk_owner; /* Process id for batching tasks */ |
87 | unsigned char tk_priority : 2;/* Task priority */ | 78 | int tk_status; /* result of last operation */ |
79 | unsigned short tk_flags; /* misc flags */ | ||
80 | unsigned short tk_timeouts; /* maj timeouts */ | ||
88 | 81 | ||
89 | #ifdef RPC_DEBUG | 82 | #ifdef RPC_DEBUG |
90 | unsigned short tk_pid; /* debugging aid */ | 83 | unsigned short tk_pid; /* debugging aid */ |
91 | #endif | 84 | #endif |
85 | unsigned char tk_priority : 2,/* Task priority */ | ||
86 | tk_garb_retry : 2, | ||
87 | tk_cred_retry : 2; | ||
92 | }; | 88 | }; |
93 | #define tk_xprt tk_client->cl_xprt | 89 | #define tk_xprt tk_client->cl_xprt |
94 | 90 | ||
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index f5cc0898bc53..35cf2e8cd7c6 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -1,7 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * include/linux/sunrpc/xdr.h | 2 | * XDR standard data types and function declarations |
3 | * | 3 | * |
4 | * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de> | 4 | * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de> |
5 | * | ||
6 | * Based on: | ||
7 | * RFC 4506 "XDR: External Data Representation Standard", May 2006 | ||
5 | */ | 8 | */ |
6 | 9 | ||
7 | #ifndef _SUNRPC_XDR_H_ | 10 | #ifndef _SUNRPC_XDR_H_ |
@@ -62,7 +65,6 @@ struct xdr_buf { | |||
62 | 65 | ||
63 | unsigned int buflen, /* Total length of storage buffer */ | 66 | unsigned int buflen, /* Total length of storage buffer */ |
64 | len; /* Length of XDR encoded message */ | 67 | len; /* Length of XDR encoded message */ |
65 | |||
66 | }; | 68 | }; |
67 | 69 | ||
68 | /* | 70 | /* |
@@ -178,7 +180,7 @@ struct xdr_array2_desc { | |||
178 | }; | 180 | }; |
179 | 181 | ||
180 | extern int xdr_decode_array2(struct xdr_buf *buf, unsigned int base, | 182 | extern int xdr_decode_array2(struct xdr_buf *buf, unsigned int base, |
181 | struct xdr_array2_desc *desc); | 183 | struct xdr_array2_desc *desc); |
182 | extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base, | 184 | extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base, |
183 | struct xdr_array2_desc *desc); | 185 | struct xdr_array2_desc *desc); |
184 | 186 | ||
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 6f9457a75b8f..b51470302399 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/socket.h> | 13 | #include <linux/socket.h> |
14 | #include <linux/in.h> | 14 | #include <linux/in.h> |
15 | #include <linux/kref.h> | 15 | #include <linux/kref.h> |
16 | #include <linux/ktime.h> | ||
16 | #include <linux/sunrpc/sched.h> | 17 | #include <linux/sunrpc/sched.h> |
17 | #include <linux/sunrpc/xdr.h> | 18 | #include <linux/sunrpc/xdr.h> |
18 | #include <linux/sunrpc/msg_prot.h> | 19 | #include <linux/sunrpc/msg_prot.h> |
@@ -65,8 +66,6 @@ struct rpc_rqst { | |||
65 | struct rpc_task * rq_task; /* RPC task data */ | 66 | struct rpc_task * rq_task; /* RPC task data */ |
66 | __be32 rq_xid; /* request XID */ | 67 | __be32 rq_xid; /* request XID */ |
67 | int rq_cong; /* has incremented xprt->cong */ | 68 | int rq_cong; /* has incremented xprt->cong */ |
68 | int rq_reply_bytes_recvd; /* number of reply */ | ||
69 | /* bytes received */ | ||
70 | u32 rq_seqno; /* gss seq no. used on req. */ | 69 | u32 rq_seqno; /* gss seq no. used on req. */ |
71 | int rq_enc_pages_num; | 70 | int rq_enc_pages_num; |
72 | struct page **rq_enc_pages; /* scratch pages for use by | 71 | struct page **rq_enc_pages; /* scratch pages for use by |
@@ -77,12 +76,16 @@ struct rpc_rqst { | |||
77 | __u32 * rq_buffer; /* XDR encode buffer */ | 76 | __u32 * rq_buffer; /* XDR encode buffer */ |
78 | size_t rq_callsize, | 77 | size_t rq_callsize, |
79 | rq_rcvsize; | 78 | rq_rcvsize; |
79 | size_t rq_xmit_bytes_sent; /* total bytes sent */ | ||
80 | size_t rq_reply_bytes_recvd; /* total reply bytes */ | ||
81 | /* received */ | ||
80 | 82 | ||
81 | struct xdr_buf rq_private_buf; /* The receive buffer | 83 | struct xdr_buf rq_private_buf; /* The receive buffer |
82 | * used in the softirq. | 84 | * used in the softirq. |
83 | */ | 85 | */ |
84 | unsigned long rq_majortimeo; /* major timeout alarm */ | 86 | unsigned long rq_majortimeo; /* major timeout alarm */ |
85 | unsigned long rq_timeout; /* Current timeout value */ | 87 | unsigned long rq_timeout; /* Current timeout value */ |
88 | ktime_t rq_rtt; /* round-trip time */ | ||
86 | unsigned int rq_retries; /* # of retries */ | 89 | unsigned int rq_retries; /* # of retries */ |
87 | unsigned int rq_connect_cookie; | 90 | unsigned int rq_connect_cookie; |
88 | /* A cookie used to track the | 91 | /* A cookie used to track the |
@@ -94,7 +97,7 @@ struct rpc_rqst { | |||
94 | */ | 97 | */ |
95 | u32 rq_bytes_sent; /* Bytes we have sent */ | 98 | u32 rq_bytes_sent; /* Bytes we have sent */ |
96 | 99 | ||
97 | unsigned long rq_xtime; /* when transmitted */ | 100 | ktime_t rq_xtime; /* transmit time stamp */ |
98 | int rq_ntrans; | 101 | int rq_ntrans; |
99 | 102 | ||
100 | #if defined(CONFIG_NFS_V4_1) | 103 | #if defined(CONFIG_NFS_V4_1) |
@@ -174,8 +177,7 @@ struct rpc_xprt { | |||
174 | /* | 177 | /* |
175 | * Connection of transports | 178 | * Connection of transports |
176 | */ | 179 | */ |
177 | unsigned long connect_timeout, | 180 | unsigned long bind_timeout, |
178 | bind_timeout, | ||
179 | reestablish_timeout; | 181 | reestablish_timeout; |
180 | unsigned int connect_cookie; /* A cookie that gets bumped | 182 | unsigned int connect_cookie; /* A cookie that gets bumped |
181 | every time the transport | 183 | every time the transport |
@@ -294,7 +296,6 @@ void xprt_set_retrans_timeout_rtt(struct rpc_task *task); | |||
294 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); | 296 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); |
295 | void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action); | 297 | void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action); |
296 | void xprt_write_space(struct rpc_xprt *xprt); | 298 | void xprt_write_space(struct rpc_xprt *xprt); |
297 | void xprt_update_rtt(struct rpc_task *task); | ||
298 | void xprt_adjust_cwnd(struct rpc_task *task, int result); | 299 | void xprt_adjust_cwnd(struct rpc_task *task, int result); |
299 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid); | 300 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid); |
300 | void xprt_complete_rqst(struct rpc_task *task, int copied); | 301 | void xprt_complete_rqst(struct rpc_task *task, int copied); |
diff --git a/include/linux/tick.h b/include/linux/tick.h index d2ae79e21be3..b232ccc0ee29 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -42,6 +42,7 @@ enum tick_nohz_mode { | |||
42 | * @idle_waketime: Time when the idle was interrupted | 42 | * @idle_waketime: Time when the idle was interrupted |
43 | * @idle_exittime: Time when the idle state was left | 43 | * @idle_exittime: Time when the idle state was left |
44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped | 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped |
45 | * @iowait_sleeptime: Sum of the time slept in idle with sched tick stopped, with IO outstanding | ||
45 | * @sleep_length: Duration of the current idle sleep | 46 | * @sleep_length: Duration of the current idle sleep |
46 | * @do_timer_lst: CPU was the last one doing do_timer before going idle | 47 | * @do_timer_lst: CPU was the last one doing do_timer before going idle |
47 | */ | 48 | */ |
@@ -60,7 +61,7 @@ struct tick_sched { | |||
60 | ktime_t idle_waketime; | 61 | ktime_t idle_waketime; |
61 | ktime_t idle_exittime; | 62 | ktime_t idle_exittime; |
62 | ktime_t idle_sleeptime; | 63 | ktime_t idle_sleeptime; |
63 | ktime_t idle_lastupdate; | 64 | ktime_t iowait_sleeptime; |
64 | ktime_t sleep_length; | 65 | ktime_t sleep_length; |
65 | unsigned long last_jiffies; | 66 | unsigned long last_jiffies; |
66 | unsigned long next_jiffies; | 67 | unsigned long next_jiffies; |
@@ -124,6 +125,7 @@ extern void tick_nohz_stop_sched_tick(int inidle); | |||
124 | extern void tick_nohz_restart_sched_tick(void); | 125 | extern void tick_nohz_restart_sched_tick(void); |
125 | extern ktime_t tick_nohz_get_sleep_length(void); | 126 | extern ktime_t tick_nohz_get_sleep_length(void); |
126 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); | 127 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); |
128 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); | ||
127 | # else | 129 | # else |
128 | static inline void tick_nohz_stop_sched_tick(int inidle) { } | 130 | static inline void tick_nohz_stop_sched_tick(int inidle) { } |
129 | static inline void tick_nohz_restart_sched_tick(void) { } | 131 | static inline void tick_nohz_restart_sched_tick(void) { } |
@@ -134,6 +136,7 @@ static inline ktime_t tick_nohz_get_sleep_length(void) | |||
134 | return len; | 136 | return len; |
135 | } | 137 | } |
136 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } | 138 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } |
139 | static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; } | ||
137 | # endif /* !NO_HZ */ | 140 | # endif /* !NO_HZ */ |
138 | 141 | ||
139 | #endif | 142 | #endif |
diff --git a/include/linux/time.h b/include/linux/time.h index 6e026e45a179..ea3559f0b3f2 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -150,7 +150,6 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | |||
150 | extern int timekeeping_valid_for_hres(void); | 150 | extern int timekeeping_valid_for_hres(void); |
151 | extern u64 timekeeping_max_deferment(void); | 151 | extern u64 timekeeping_max_deferment(void); |
152 | extern void update_wall_time(void); | 152 | extern void update_wall_time(void); |
153 | extern void update_xtime_cache(u64 nsec); | ||
154 | extern void timekeeping_leap_insert(int leapsecond); | 153 | extern void timekeeping_leap_insert(int leapsecond); |
155 | 154 | ||
156 | struct tms; | 155 | struct tms; |
diff --git a/include/linux/timer.h b/include/linux/timer.h index a2d1eb6cb3f0..ea965b857a50 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -10,13 +10,19 @@ | |||
10 | struct tvec_base; | 10 | struct tvec_base; |
11 | 11 | ||
12 | struct timer_list { | 12 | struct timer_list { |
13 | /* | ||
14 | * All fields that change during normal runtime grouped to the | ||
15 | * same cacheline | ||
16 | */ | ||
13 | struct list_head entry; | 17 | struct list_head entry; |
14 | unsigned long expires; | 18 | unsigned long expires; |
19 | struct tvec_base *base; | ||
15 | 20 | ||
16 | void (*function)(unsigned long); | 21 | void (*function)(unsigned long); |
17 | unsigned long data; | 22 | unsigned long data; |
18 | 23 | ||
19 | struct tvec_base *base; | 24 | int slack; |
25 | |||
20 | #ifdef CONFIG_TIMER_STATS | 26 | #ifdef CONFIG_TIMER_STATS |
21 | void *start_site; | 27 | void *start_site; |
22 | char start_comm[16]; | 28 | char start_comm[16]; |
@@ -165,6 +171,8 @@ extern int mod_timer(struct timer_list *timer, unsigned long expires); | |||
165 | extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); | 171 | extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); |
166 | extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires); | 172 | extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires); |
167 | 173 | ||
174 | extern void set_timer_slack(struct timer_list *time, int slack_hz); | ||
175 | |||
168 | #define TIMER_NOT_PINNED 0 | 176 | #define TIMER_NOT_PINNED 0 |
169 | #define TIMER_PINNED 1 | 177 | #define TIMER_PINNED 1 |
170 | /* | 178 | /* |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 7a082b32d8e1..32d852f8cbe4 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -232,13 +232,11 @@ struct timex { | |||
232 | */ | 232 | */ |
233 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ | 233 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ |
234 | extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ | 234 | extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ |
235 | extern int tickadj; /* amount of adjustment per tick */ | ||
236 | 235 | ||
237 | /* | 236 | /* |
238 | * phase-lock loop variables | 237 | * phase-lock loop variables |
239 | */ | 238 | */ |
240 | extern int time_status; /* clock synchronization status bits */ | 239 | extern int time_status; /* clock synchronization status bits */ |
241 | extern long time_adjust; /* The amount of adjtime left */ | ||
242 | 240 | ||
243 | extern void ntp_init(void); | 241 | extern void ntp_init(void); |
244 | extern void ntp_clear(void); | 242 | extern void ntp_clear(void); |
@@ -271,9 +269,6 @@ extern void second_overflow(void); | |||
271 | extern void update_ntp_one_tick(void); | 269 | extern void update_ntp_one_tick(void); |
272 | extern int do_adjtimex(struct timex *); | 270 | extern int do_adjtimex(struct timex *); |
273 | 271 | ||
274 | /* Don't use! Compatibility define for existing users. */ | ||
275 | #define tickadj (500/HZ ? : 1) | ||
276 | |||
277 | int read_current_timer(unsigned long *timer_val); | 272 | int read_current_timer(unsigned long *timer_val); |
278 | 273 | ||
279 | /* The clock frequency of the i8253/i8254 PIT */ | 274 | /* The clock frequency of the i8253/i8254 PIT */ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 78b4bd3be496..1d85f9a6a199 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -33,6 +33,65 @@ struct tracepoint { | |||
33 | * Keep in sync with vmlinux.lds.h. | 33 | * Keep in sync with vmlinux.lds.h. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | /* | ||
37 | * Connect a probe to a tracepoint. | ||
38 | * Internal API, should not be used directly. | ||
39 | */ | ||
40 | extern int tracepoint_probe_register(const char *name, void *probe); | ||
41 | |||
42 | /* | ||
43 | * Disconnect a probe from a tracepoint. | ||
44 | * Internal API, should not be used directly. | ||
45 | */ | ||
46 | extern int tracepoint_probe_unregister(const char *name, void *probe); | ||
47 | |||
48 | extern int tracepoint_probe_register_noupdate(const char *name, void *probe); | ||
49 | extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe); | ||
50 | extern void tracepoint_probe_update_all(void); | ||
51 | |||
52 | struct tracepoint_iter { | ||
53 | struct module *module; | ||
54 | struct tracepoint *tracepoint; | ||
55 | }; | ||
56 | |||
57 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); | ||
58 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); | ||
59 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); | ||
60 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); | ||
61 | extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, | ||
62 | struct tracepoint *begin, struct tracepoint *end); | ||
63 | |||
64 | /* | ||
65 | * tracepoint_synchronize_unregister must be called between the last tracepoint | ||
66 | * probe unregistration and the end of module exit to make sure there is no | ||
67 | * caller executing a probe when it is freed. | ||
68 | */ | ||
69 | static inline void tracepoint_synchronize_unregister(void) | ||
70 | { | ||
71 | synchronize_sched(); | ||
72 | } | ||
73 | |||
74 | #define PARAMS(args...) args | ||
75 | |||
76 | #ifdef CONFIG_TRACEPOINTS | ||
77 | extern void tracepoint_update_probe_range(struct tracepoint *begin, | ||
78 | struct tracepoint *end); | ||
79 | #else | ||
80 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, | ||
81 | struct tracepoint *end) | ||
82 | { } | ||
83 | #endif /* CONFIG_TRACEPOINTS */ | ||
84 | |||
85 | #endif /* _LINUX_TRACEPOINT_H */ | ||
86 | |||
87 | /* | ||
88 | * Note: we keep the TRACE_EVENT and DECLARE_TRACE outside the include | ||
89 | * file ifdef protection. | ||
90 | * This is due to the way trace events work. If a file includes two | ||
91 | * trace event headers under one "CREATE_TRACE_POINTS" the first include | ||
92 | * will override the TRACE_EVENT and break the second include. | ||
93 | */ | ||
94 | |||
36 | #ifndef DECLARE_TRACE | 95 | #ifndef DECLARE_TRACE |
37 | 96 | ||
38 | #define TP_PROTO(args...) args | 97 | #define TP_PROTO(args...) args |
@@ -96,9 +155,6 @@ struct tracepoint { | |||
96 | #define EXPORT_TRACEPOINT_SYMBOL(name) \ | 155 | #define EXPORT_TRACEPOINT_SYMBOL(name) \ |
97 | EXPORT_SYMBOL(__tracepoint_##name) | 156 | EXPORT_SYMBOL(__tracepoint_##name) |
98 | 157 | ||
99 | extern void tracepoint_update_probe_range(struct tracepoint *begin, | ||
100 | struct tracepoint *end); | ||
101 | |||
102 | #else /* !CONFIG_TRACEPOINTS */ | 158 | #else /* !CONFIG_TRACEPOINTS */ |
103 | #define DECLARE_TRACE(name, proto, args) \ | 159 | #define DECLARE_TRACE(name, proto, args) \ |
104 | static inline void _do_trace_##name(struct tracepoint *tp, proto) \ | 160 | static inline void _do_trace_##name(struct tracepoint *tp, proto) \ |
@@ -119,61 +175,9 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin, | |||
119 | #define EXPORT_TRACEPOINT_SYMBOL_GPL(name) | 175 | #define EXPORT_TRACEPOINT_SYMBOL_GPL(name) |
120 | #define EXPORT_TRACEPOINT_SYMBOL(name) | 176 | #define EXPORT_TRACEPOINT_SYMBOL(name) |
121 | 177 | ||
122 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, | ||
123 | struct tracepoint *end) | ||
124 | { } | ||
125 | #endif /* CONFIG_TRACEPOINTS */ | 178 | #endif /* CONFIG_TRACEPOINTS */ |
126 | #endif /* DECLARE_TRACE */ | 179 | #endif /* DECLARE_TRACE */ |
127 | 180 | ||
128 | /* | ||
129 | * Connect a probe to a tracepoint. | ||
130 | * Internal API, should not be used directly. | ||
131 | */ | ||
132 | extern int tracepoint_probe_register(const char *name, void *probe); | ||
133 | |||
134 | /* | ||
135 | * Disconnect a probe from a tracepoint. | ||
136 | * Internal API, should not be used directly. | ||
137 | */ | ||
138 | extern int tracepoint_probe_unregister(const char *name, void *probe); | ||
139 | |||
140 | extern int tracepoint_probe_register_noupdate(const char *name, void *probe); | ||
141 | extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe); | ||
142 | extern void tracepoint_probe_update_all(void); | ||
143 | |||
144 | struct tracepoint_iter { | ||
145 | struct module *module; | ||
146 | struct tracepoint *tracepoint; | ||
147 | }; | ||
148 | |||
149 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); | ||
150 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); | ||
151 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); | ||
152 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); | ||
153 | extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, | ||
154 | struct tracepoint *begin, struct tracepoint *end); | ||
155 | |||
156 | /* | ||
157 | * tracepoint_synchronize_unregister must be called between the last tracepoint | ||
158 | * probe unregistration and the end of module exit to make sure there is no | ||
159 | * caller executing a probe when it is freed. | ||
160 | */ | ||
161 | static inline void tracepoint_synchronize_unregister(void) | ||
162 | { | ||
163 | synchronize_sched(); | ||
164 | } | ||
165 | |||
166 | #define PARAMS(args...) args | ||
167 | |||
168 | #endif /* _LINUX_TRACEPOINT_H */ | ||
169 | |||
170 | /* | ||
171 | * Note: we keep the TRACE_EVENT outside the include file ifdef protection. | ||
172 | * This is due to the way trace events work. If a file includes two | ||
173 | * trace event headers under one "CREATE_TRACE_POINTS" the first include | ||
174 | * will override the TRACE_EVENT and break the second include. | ||
175 | */ | ||
176 | |||
177 | #ifndef TRACE_EVENT | 181 | #ifndef TRACE_EVENT |
178 | /* | 182 | /* |
179 | * For use with the TRACE_EVENT macro: | 183 | * For use with the TRACE_EVENT macro: |
diff --git a/include/linux/types.h b/include/linux/types.h index c42724f8c802..23d237a075e2 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -188,12 +188,12 @@ typedef u32 phys_addr_t; | |||
188 | typedef phys_addr_t resource_size_t; | 188 | typedef phys_addr_t resource_size_t; |
189 | 189 | ||
190 | typedef struct { | 190 | typedef struct { |
191 | volatile int counter; | 191 | int counter; |
192 | } atomic_t; | 192 | } atomic_t; |
193 | 193 | ||
194 | #ifdef CONFIG_64BIT | 194 | #ifdef CONFIG_64BIT |
195 | typedef struct { | 195 | typedef struct { |
196 | volatile long counter; | 196 | long counter; |
197 | } atomic64_t; | 197 | } atomic64_t; |
198 | #endif | 198 | #endif |
199 | 199 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 3793d168b44d..047f7e6edb86 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -160,16 +160,6 @@ enum v4l2_buf_type { | |||
160 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 160 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
161 | }; | 161 | }; |
162 | 162 | ||
163 | enum v4l2_ctrl_type { | ||
164 | V4L2_CTRL_TYPE_INTEGER = 1, | ||
165 | V4L2_CTRL_TYPE_BOOLEAN = 2, | ||
166 | V4L2_CTRL_TYPE_MENU = 3, | ||
167 | V4L2_CTRL_TYPE_BUTTON = 4, | ||
168 | V4L2_CTRL_TYPE_INTEGER64 = 5, | ||
169 | V4L2_CTRL_TYPE_CTRL_CLASS = 6, | ||
170 | V4L2_CTRL_TYPE_STRING = 7, | ||
171 | }; | ||
172 | |||
173 | enum v4l2_tuner_type { | 163 | enum v4l2_tuner_type { |
174 | V4L2_TUNER_RADIO = 1, | 164 | V4L2_TUNER_RADIO = 1, |
175 | V4L2_TUNER_ANALOG_TV = 2, | 165 | V4L2_TUNER_ANALOG_TV = 2, |
@@ -294,6 +284,8 @@ struct v4l2_pix_format { | |||
294 | 284 | ||
295 | /* Grey formats */ | 285 | /* Grey formats */ |
296 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ | 286 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ |
287 | #define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ | ||
288 | #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ | ||
297 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ | 289 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ |
298 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ | 290 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
299 | 291 | ||
@@ -369,6 +361,7 @@ struct v4l2_pix_format { | |||
369 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | 361 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ |
370 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ | 362 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
371 | #define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ | 363 | #define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ |
364 | #define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ | ||
372 | 365 | ||
373 | /* | 366 | /* |
374 | * F O R M A T E N U M E R A T I O N | 367 | * F O R M A T E N U M E R A T I O N |
@@ -549,6 +542,8 @@ struct v4l2_buffer { | |||
549 | #define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ | 542 | #define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ |
550 | #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ | 543 | #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ |
551 | #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ | 544 | #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ |
545 | /* Buffer is ready, but the data contained within is corrupted. */ | ||
546 | #define V4L2_BUF_FLAG_ERROR 0x0040 | ||
552 | #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ | 547 | #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ |
553 | #define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ | 548 | #define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ |
554 | 549 | ||
@@ -939,6 +934,16 @@ struct v4l2_ext_controls { | |||
939 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) | 934 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
940 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) | 935 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) |
941 | 936 | ||
937 | enum v4l2_ctrl_type { | ||
938 | V4L2_CTRL_TYPE_INTEGER = 1, | ||
939 | V4L2_CTRL_TYPE_BOOLEAN = 2, | ||
940 | V4L2_CTRL_TYPE_MENU = 3, | ||
941 | V4L2_CTRL_TYPE_BUTTON = 4, | ||
942 | V4L2_CTRL_TYPE_INTEGER64 = 5, | ||
943 | V4L2_CTRL_TYPE_CTRL_CLASS = 6, | ||
944 | V4L2_CTRL_TYPE_STRING = 7, | ||
945 | }; | ||
946 | |||
942 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ | 947 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ |
943 | struct v4l2_queryctrl { | 948 | struct v4l2_queryctrl { |
944 | __u32 id; | 949 | __u32 id; |
@@ -1023,14 +1028,24 @@ enum v4l2_colorfx { | |||
1023 | V4L2_COLORFX_NONE = 0, | 1028 | V4L2_COLORFX_NONE = 0, |
1024 | V4L2_COLORFX_BW = 1, | 1029 | V4L2_COLORFX_BW = 1, |
1025 | V4L2_COLORFX_SEPIA = 2, | 1030 | V4L2_COLORFX_SEPIA = 2, |
1031 | V4L2_COLORFX_NEGATIVE = 3, | ||
1032 | V4L2_COLORFX_EMBOSS = 4, | ||
1033 | V4L2_COLORFX_SKETCH = 5, | ||
1034 | V4L2_COLORFX_SKY_BLUE = 6, | ||
1035 | V4L2_COLORFX_GRASS_GREEN = 7, | ||
1036 | V4L2_COLORFX_SKIN_WHITEN = 8, | ||
1037 | V4L2_COLORFX_VIVID = 9, | ||
1026 | }; | 1038 | }; |
1027 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | 1039 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) |
1028 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | 1040 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) |
1029 | 1041 | ||
1030 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) | 1042 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) |
1031 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) | 1043 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) |
1044 | |||
1045 | #define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36) | ||
1046 | |||
1032 | /* last CID + 1 */ | 1047 | /* last CID + 1 */ |
1033 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) | 1048 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+37) |
1034 | 1049 | ||
1035 | /* MPEG-class control IDs defined by V4L2 */ | 1050 | /* MPEG-class control IDs defined by V4L2 */ |
1036 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 1051 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
@@ -1276,6 +1291,9 @@ enum v4l2_exposure_auto_type { | |||
1276 | 1291 | ||
1277 | #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) | 1292 | #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) |
1278 | 1293 | ||
1294 | #define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) | ||
1295 | #define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) | ||
1296 | |||
1279 | /* FM Modulator class control IDs */ | 1297 | /* FM Modulator class control IDs */ |
1280 | #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) | 1298 | #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) |
1281 | #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) | 1299 | #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) |
@@ -1621,6 +1639,38 @@ struct v4l2_streamparm { | |||
1621 | }; | 1639 | }; |
1622 | 1640 | ||
1623 | /* | 1641 | /* |
1642 | * E V E N T S | ||
1643 | */ | ||
1644 | |||
1645 | #define V4L2_EVENT_ALL 0 | ||
1646 | #define V4L2_EVENT_VSYNC 1 | ||
1647 | #define V4L2_EVENT_EOS 2 | ||
1648 | #define V4L2_EVENT_PRIVATE_START 0x08000000 | ||
1649 | |||
1650 | /* Payload for V4L2_EVENT_VSYNC */ | ||
1651 | struct v4l2_event_vsync { | ||
1652 | /* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */ | ||
1653 | __u8 field; | ||
1654 | } __attribute__ ((packed)); | ||
1655 | |||
1656 | struct v4l2_event { | ||
1657 | __u32 type; | ||
1658 | union { | ||
1659 | struct v4l2_event_vsync vsync; | ||
1660 | __u8 data[64]; | ||
1661 | } u; | ||
1662 | __u32 pending; | ||
1663 | __u32 sequence; | ||
1664 | struct timespec timestamp; | ||
1665 | __u32 reserved[9]; | ||
1666 | }; | ||
1667 | |||
1668 | struct v4l2_event_subscription { | ||
1669 | __u32 type; | ||
1670 | __u32 reserved[7]; | ||
1671 | }; | ||
1672 | |||
1673 | /* | ||
1624 | * A D V A N C E D D E B U G G I N G | 1674 | * A D V A N C E D D E B U G G I N G |
1625 | * | 1675 | * |
1626 | * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! | 1676 | * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! |
@@ -1742,6 +1792,9 @@ struct v4l2_dbg_chip_ident { | |||
1742 | #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset) | 1792 | #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset) |
1743 | #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) | 1793 | #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) |
1744 | #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) | 1794 | #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) |
1795 | #define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event) | ||
1796 | #define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription) | ||
1797 | #define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription) | ||
1745 | 1798 | ||
1746 | /* Reminder: when adding new ioctls please add support for them to | 1799 | /* Reminder: when adding new ioctls please add support for them to |
1747 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 1800 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
diff --git a/include/linux/wait.h b/include/linux/wait.h index a48e16b77d5e..76d96d035ea0 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -127,12 +127,26 @@ static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) | |||
127 | /* | 127 | /* |
128 | * Used for wake-one threads: | 128 | * Used for wake-one threads: |
129 | */ | 129 | */ |
130 | static inline void __add_wait_queue_exclusive(wait_queue_head_t *q, | ||
131 | wait_queue_t *wait) | ||
132 | { | ||
133 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
134 | __add_wait_queue(q, wait); | ||
135 | } | ||
136 | |||
130 | static inline void __add_wait_queue_tail(wait_queue_head_t *head, | 137 | static inline void __add_wait_queue_tail(wait_queue_head_t *head, |
131 | wait_queue_t *new) | 138 | wait_queue_t *new) |
132 | { | 139 | { |
133 | list_add_tail(&new->task_list, &head->task_list); | 140 | list_add_tail(&new->task_list, &head->task_list); |
134 | } | 141 | } |
135 | 142 | ||
143 | static inline void __add_wait_queue_tail_exclusive(wait_queue_head_t *q, | ||
144 | wait_queue_t *wait) | ||
145 | { | ||
146 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
147 | __add_wait_queue_tail(q, wait); | ||
148 | } | ||
149 | |||
136 | static inline void __remove_wait_queue(wait_queue_head_t *head, | 150 | static inline void __remove_wait_queue(wait_queue_head_t *head, |
137 | wait_queue_t *old) | 151 | wait_queue_t *old) |
138 | { | 152 | { |
@@ -404,25 +418,6 @@ do { \ | |||
404 | }) | 418 | }) |
405 | 419 | ||
406 | /* | 420 | /* |
407 | * Must be called with the spinlock in the wait_queue_head_t held. | ||
408 | */ | ||
409 | static inline void add_wait_queue_exclusive_locked(wait_queue_head_t *q, | ||
410 | wait_queue_t * wait) | ||
411 | { | ||
412 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
413 | __add_wait_queue_tail(q, wait); | ||
414 | } | ||
415 | |||
416 | /* | ||
417 | * Must be called with the spinlock in the wait_queue_head_t held. | ||
418 | */ | ||
419 | static inline void remove_wait_queue_locked(wait_queue_head_t *q, | ||
420 | wait_queue_t * wait) | ||
421 | { | ||
422 | __remove_wait_queue(q, wait); | ||
423 | } | ||
424 | |||
425 | /* | ||
426 | * These are the old interfaces to sleep waiting for an event. | 421 | * These are the old interfaces to sleep waiting for an event. |
427 | * They are racy. DO NOT use them, use the wait_event* interfaces above. | 422 | * They are racy. DO NOT use them, use the wait_event* interfaces above. |
428 | * We plan to remove these interfaces. | 423 | * We plan to remove these interfaces. |
diff --git a/include/linux/zorro.h b/include/linux/zorro.h index 913bfc226dda..7bf9db525e9e 100644 --- a/include/linux/zorro.h +++ b/include/linux/zorro.h | |||
@@ -38,8 +38,6 @@ | |||
38 | typedef __u32 zorro_id; | 38 | typedef __u32 zorro_id; |
39 | 39 | ||
40 | 40 | ||
41 | #define ZORRO_WILDCARD (0xffffffff) /* not official */ | ||
42 | |||
43 | /* Include the ID list */ | 41 | /* Include the ID list */ |
44 | #include <linux/zorro_ids.h> | 42 | #include <linux/zorro_ids.h> |
45 | 43 | ||
@@ -116,6 +114,7 @@ struct ConfigDev { | |||
116 | 114 | ||
117 | #include <linux/init.h> | 115 | #include <linux/init.h> |
118 | #include <linux/ioport.h> | 116 | #include <linux/ioport.h> |
117 | #include <linux/mod_devicetable.h> | ||
119 | 118 | ||
120 | #include <asm/zorro.h> | 119 | #include <asm/zorro.h> |
121 | 120 | ||
@@ -142,29 +141,10 @@ struct zorro_dev { | |||
142 | * Zorro bus | 141 | * Zorro bus |
143 | */ | 142 | */ |
144 | 143 | ||
145 | struct zorro_bus { | ||
146 | struct list_head devices; /* list of devices on this bus */ | ||
147 | unsigned int num_resources; /* number of resources */ | ||
148 | struct resource resources[4]; /* address space routed to this bus */ | ||
149 | struct device dev; | ||
150 | char name[10]; | ||
151 | }; | ||
152 | |||
153 | extern struct zorro_bus zorro_bus; /* single Zorro bus */ | ||
154 | extern struct bus_type zorro_bus_type; | 144 | extern struct bus_type zorro_bus_type; |
155 | 145 | ||
156 | 146 | ||
157 | /* | 147 | /* |
158 | * Zorro device IDs | ||
159 | */ | ||
160 | |||
161 | struct zorro_device_id { | ||
162 | zorro_id id; /* Device ID or ZORRO_WILDCARD */ | ||
163 | unsigned long driver_data; /* Data private to the driver */ | ||
164 | }; | ||
165 | |||
166 | |||
167 | /* | ||
168 | * Zorro device drivers | 148 | * Zorro device drivers |
169 | */ | 149 | */ |
170 | 150 | ||