diff options
Diffstat (limited to 'include')
40 files changed, 445 insertions, 131 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index a62720a7edc0..ab0b85cf21f3 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -144,6 +144,7 @@ void __iomem *acpi_os_map_memory(acpi_physical_address where, | |||
144 | acpi_size length); | 144 | acpi_size length); |
145 | 145 | ||
146 | void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size); | 146 | void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size); |
147 | void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size); | ||
147 | 148 | ||
148 | #ifdef ACPI_FUTURE_USAGE | 149 | #ifdef ACPI_FUTURE_USAGE |
149 | acpi_status | 150 | acpi_status |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index c8e8cf45830f..cc40102fe2f3 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -130,6 +130,10 @@ acpi_get_table_header(acpi_string signature, | |||
130 | struct acpi_table_header *out_table_header); | 130 | struct acpi_table_header *out_table_header); |
131 | 131 | ||
132 | acpi_status | 132 | acpi_status |
133 | acpi_get_table_with_size(acpi_string signature, | ||
134 | u32 instance, struct acpi_table_header **out_table, | ||
135 | acpi_size *tbl_size); | ||
136 | acpi_status | ||
133 | acpi_get_table(acpi_string signature, | 137 | acpi_get_table(acpi_string signature, |
134 | u32 instance, struct acpi_table_header **out_table); | 138 | u32 instance, struct acpi_table_header **out_table); |
135 | 139 | ||
diff --git a/include/acpi/pdc_intel.h b/include/acpi/pdc_intel.h index e72bfdd887f9..552637b0d051 100644 --- a/include/acpi/pdc_intel.h +++ b/include/acpi/pdc_intel.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define ACPI_PDC_SMP_T_SWCOORD (0x0080) | 14 | #define ACPI_PDC_SMP_T_SWCOORD (0x0080) |
15 | #define ACPI_PDC_C_C1_FFH (0x0100) | 15 | #define ACPI_PDC_C_C1_FFH (0x0100) |
16 | #define ACPI_PDC_C_C2C3_FFH (0x0200) | 16 | #define ACPI_PDC_C_C2C3_FFH (0x0200) |
17 | #define ACPI_PDC_SMP_P_HWCOORD (0x0800) | ||
17 | 18 | ||
18 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ | 19 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ |
19 | ACPI_PDC_C_C1_HALT | \ | 20 | ACPI_PDC_C_C1_HALT | \ |
@@ -22,6 +23,7 @@ | |||
22 | #define ACPI_PDC_EST_CAPABILITY_SWSMP (ACPI_PDC_SMP_C1PT | \ | 23 | #define ACPI_PDC_EST_CAPABILITY_SWSMP (ACPI_PDC_SMP_C1PT | \ |
23 | ACPI_PDC_C_C1_HALT | \ | 24 | ACPI_PDC_C_C1_HALT | \ |
24 | ACPI_PDC_SMP_P_SWCOORD | \ | 25 | ACPI_PDC_SMP_P_SWCOORD | \ |
26 | ACPI_PDC_SMP_P_HWCOORD | \ | ||
25 | ACPI_PDC_P_FFH) | 27 | ACPI_PDC_P_FFH) |
26 | 28 | ||
27 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ | 29 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ |
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index b0e63c672ebd..00f45ff081a6 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -80,4 +80,56 @@ extern void setup_per_cpu_areas(void); | |||
80 | #define DECLARE_PER_CPU(type, name) extern PER_CPU_ATTRIBUTES \ | 80 | #define DECLARE_PER_CPU(type, name) extern PER_CPU_ATTRIBUTES \ |
81 | __typeof__(type) per_cpu_var(name) | 81 | __typeof__(type) per_cpu_var(name) |
82 | 82 | ||
83 | /* | ||
84 | * Optional methods for optimized non-lvalue per-cpu variable access. | ||
85 | * | ||
86 | * @var can be a percpu variable or a field of it and its size should | ||
87 | * equal char, int or long. percpu_read() evaluates to a lvalue and | ||
88 | * all others to void. | ||
89 | * | ||
90 | * These operations are guaranteed to be atomic w.r.t. preemption. | ||
91 | * The generic versions use plain get/put_cpu_var(). Archs are | ||
92 | * encouraged to implement single-instruction alternatives which don't | ||
93 | * require preemption protection. | ||
94 | */ | ||
95 | #ifndef percpu_read | ||
96 | # define percpu_read(var) \ | ||
97 | ({ \ | ||
98 | typeof(per_cpu_var(var)) __tmp_var__; \ | ||
99 | __tmp_var__ = get_cpu_var(var); \ | ||
100 | put_cpu_var(var); \ | ||
101 | __tmp_var__; \ | ||
102 | }) | ||
103 | #endif | ||
104 | |||
105 | #define __percpu_generic_to_op(var, val, op) \ | ||
106 | do { \ | ||
107 | get_cpu_var(var) op val; \ | ||
108 | put_cpu_var(var); \ | ||
109 | } while (0) | ||
110 | |||
111 | #ifndef percpu_write | ||
112 | # define percpu_write(var, val) __percpu_generic_to_op(var, (val), =) | ||
113 | #endif | ||
114 | |||
115 | #ifndef percpu_add | ||
116 | # define percpu_add(var, val) __percpu_generic_to_op(var, (val), +=) | ||
117 | #endif | ||
118 | |||
119 | #ifndef percpu_sub | ||
120 | # define percpu_sub(var, val) __percpu_generic_to_op(var, (val), -=) | ||
121 | #endif | ||
122 | |||
123 | #ifndef percpu_and | ||
124 | # define percpu_and(var, val) __percpu_generic_to_op(var, (val), &=) | ||
125 | #endif | ||
126 | |||
127 | #ifndef percpu_or | ||
128 | # define percpu_or(var, val) __percpu_generic_to_op(var, (val), |=) | ||
129 | #endif | ||
130 | |||
131 | #ifndef percpu_xor | ||
132 | # define percpu_xor(var, val) __percpu_generic_to_op(var, (val), ^=) | ||
133 | #endif | ||
134 | |||
83 | #endif /* _ASM_GENERIC_PERCPU_H_ */ | 135 | #endif /* _ASM_GENERIC_PERCPU_H_ */ |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 79a7ff925bf8..4ce48e878530 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -9,7 +9,7 @@ extern char __bss_start[], __bss_stop[]; | |||
9 | extern char __init_begin[], __init_end[]; | 9 | extern char __init_begin[], __init_end[]; |
10 | extern char _sinittext[], _einittext[]; | 10 | extern char _sinittext[], _einittext[]; |
11 | extern char _end[]; | 11 | extern char _end[]; |
12 | extern char __per_cpu_start[], __per_cpu_end[]; | 12 | extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[]; |
13 | extern char __kprobes_text_start[], __kprobes_text_end[]; | 13 | extern char __kprobes_text_start[], __kprobes_text_end[]; |
14 | extern char __initdata_begin[], __initdata_end[]; | 14 | extern char __initdata_begin[], __initdata_end[]; |
15 | extern char __start_rodata[], __end_rodata[]; | 15 | extern char __start_rodata[], __end_rodata[]; |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index c61fab1dd2f8..5406e70aba86 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -430,12 +430,59 @@ | |||
430 | *(.initcall7.init) \ | 430 | *(.initcall7.init) \ |
431 | *(.initcall7s.init) | 431 | *(.initcall7s.init) |
432 | 432 | ||
433 | /** | ||
434 | * PERCPU_VADDR - define output section for percpu area | ||
435 | * @vaddr: explicit base address (optional) | ||
436 | * @phdr: destination PHDR (optional) | ||
437 | * | ||
438 | * Macro which expands to output section for percpu area. If @vaddr | ||
439 | * is not blank, it specifies explicit base address and all percpu | ||
440 | * symbols will be offset from the given address. If blank, @vaddr | ||
441 | * always equals @laddr + LOAD_OFFSET. | ||
442 | * | ||
443 | * @phdr defines the output PHDR to use if not blank. Be warned that | ||
444 | * output PHDR is sticky. If @phdr is specified, the next output | ||
445 | * section in the linker script will go there too. @phdr should have | ||
446 | * a leading colon. | ||
447 | * | ||
448 | * Note that this macros defines __per_cpu_load as an absolute symbol. | ||
449 | * If there is no need to put the percpu section at a predetermined | ||
450 | * address, use PERCPU(). | ||
451 | */ | ||
452 | #define PERCPU_VADDR(vaddr, phdr) \ | ||
453 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ | ||
454 | .data.percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ | ||
455 | - LOAD_OFFSET) { \ | ||
456 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | ||
457 | *(.data.percpu.first) \ | ||
458 | *(.data.percpu.page_aligned) \ | ||
459 | *(.data.percpu) \ | ||
460 | *(.data.percpu.shared_aligned) \ | ||
461 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ | ||
462 | } phdr \ | ||
463 | . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data.percpu); | ||
464 | |||
465 | /** | ||
466 | * PERCPU - define output section for percpu area, simple version | ||
467 | * @align: required alignment | ||
468 | * | ||
469 | * Align to @align and outputs output section for percpu area. This | ||
470 | * macro doesn't maniuplate @vaddr or @phdr and __per_cpu_load and | ||
471 | * __per_cpu_start will be identical. | ||
472 | * | ||
473 | * This macro is equivalent to ALIGN(align); PERCPU_VADDR( , ) except | ||
474 | * that __per_cpu_load is defined as a relative symbol against | ||
475 | * .data.percpu which is required for relocatable x86_32 | ||
476 | * configuration. | ||
477 | */ | ||
433 | #define PERCPU(align) \ | 478 | #define PERCPU(align) \ |
434 | . = ALIGN(align); \ | 479 | . = ALIGN(align); \ |
435 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | 480 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \ |
436 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \ | 481 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ |
482 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | ||
483 | *(.data.percpu.first) \ | ||
437 | *(.data.percpu.page_aligned) \ | 484 | *(.data.percpu.page_aligned) \ |
438 | *(.data.percpu) \ | 485 | *(.data.percpu) \ |
439 | *(.data.percpu.shared_aligned) \ | 486 | *(.data.percpu.shared_aligned) \ |
440 | } \ | 487 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ |
441 | VMLINUX_SYMBOL(__per_cpu_end) = .; | 488 | } |
diff --git a/include/crypto/hash.h b/include/crypto/hash.h index cd16d6e668ce..d797e119e3d5 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h | |||
@@ -222,7 +222,7 @@ static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm) | |||
222 | 222 | ||
223 | static inline void crypto_free_shash(struct crypto_shash *tfm) | 223 | static inline void crypto_free_shash(struct crypto_shash *tfm) |
224 | { | 224 | { |
225 | crypto_free_tfm(crypto_shash_tfm(tfm)); | 225 | crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); |
226 | } | 226 | } |
227 | 227 | ||
228 | static inline unsigned int crypto_shash_alignmask( | 228 | static inline unsigned int crypto_shash_alignmask( |
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index b3bcf72dc656..912cd52db965 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -261,6 +261,7 @@ typedef struct drm_i915_irq_wait { | |||
261 | #define I915_PARAM_LAST_DISPATCH 3 | 261 | #define I915_PARAM_LAST_DISPATCH 3 |
262 | #define I915_PARAM_CHIPSET_ID 4 | 262 | #define I915_PARAM_CHIPSET_ID 4 |
263 | #define I915_PARAM_HAS_GEM 5 | 263 | #define I915_PARAM_HAS_GEM 5 |
264 | #define I915_PARAM_NUM_FENCES_AVAIL 6 | ||
264 | 265 | ||
265 | typedef struct drm_i915_getparam { | 266 | typedef struct drm_i915_getparam { |
266 | int param; | 267 | int param; |
@@ -272,6 +273,7 @@ typedef struct drm_i915_getparam { | |||
272 | #define I915_SETPARAM_USE_MI_BATCHBUFFER_START 1 | 273 | #define I915_SETPARAM_USE_MI_BATCHBUFFER_START 1 |
273 | #define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2 | 274 | #define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2 |
274 | #define I915_SETPARAM_ALLOW_BATCHBUFFER 3 | 275 | #define I915_SETPARAM_ALLOW_BATCHBUFFER 3 |
276 | #define I915_SETPARAM_NUM_USED_FENCES 4 | ||
275 | 277 | ||
276 | typedef struct drm_i915_setparam { | 278 | typedef struct drm_i915_setparam { |
277 | int param; | 279 | int param; |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 2124c063a7ef..b97cdc516a8f 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -90,7 +90,6 @@ header-y += if_ppp.h | |||
90 | header-y += if_slip.h | 90 | header-y += if_slip.h |
91 | header-y += if_strip.h | 91 | header-y += if_strip.h |
92 | header-y += if_tun.h | 92 | header-y += if_tun.h |
93 | header-y += if_tunnel.h | ||
94 | header-y += in_route.h | 93 | header-y += in_route.h |
95 | header-y += ioctl.h | 94 | header-y += ioctl.h |
96 | header-y += ip6_tunnel.h | 95 | header-y += ip6_tunnel.h |
@@ -236,6 +235,7 @@ unifdef-y += if_phonet.h | |||
236 | unifdef-y += if_pppol2tp.h | 235 | unifdef-y += if_pppol2tp.h |
237 | unifdef-y += if_pppox.h | 236 | unifdef-y += if_pppox.h |
238 | unifdef-y += if_tr.h | 237 | unifdef-y += if_tr.h |
238 | unifdef-y += if_tunnel.h | ||
239 | unifdef-y += if_vlan.h | 239 | unifdef-y += if_vlan.h |
240 | unifdef-y += igmp.h | 240 | unifdef-y += igmp.h |
241 | unifdef-y += inet_diag.h | 241 | unifdef-y += inet_diag.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 6fce2fc2d124..d59f0fa4d772 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -79,6 +79,7 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table); | |||
79 | typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); | 79 | typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
80 | 80 | ||
81 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 81 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
82 | void __init __acpi_unmap_table(char *map, unsigned long size); | ||
82 | int early_acpi_boot_init(void); | 83 | int early_acpi_boot_init(void); |
83 | int acpi_boot_init (void); | 84 | int acpi_boot_init (void); |
84 | int acpi_boot_table_init (void); | 85 | int acpi_boot_table_init (void); |
diff --git a/include/linux/async.h b/include/linux/async.h index c4ecacd0b327..68a9530196f2 100644 --- a/include/linux/async.h +++ b/include/linux/async.h | |||
@@ -17,9 +17,11 @@ typedef u64 async_cookie_t; | |||
17 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); | 17 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); |
18 | 18 | ||
19 | extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); | 19 | extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); |
20 | extern async_cookie_t async_schedule_special(async_func_ptr *ptr, void *data, struct list_head *list); | 20 | extern async_cookie_t async_schedule_domain(async_func_ptr *ptr, void *data, |
21 | struct list_head *list); | ||
21 | extern void async_synchronize_full(void); | 22 | extern void async_synchronize_full(void); |
22 | extern void async_synchronize_full_special(struct list_head *list); | 23 | extern void async_synchronize_full_domain(struct list_head *list); |
23 | extern void async_synchronize_cookie(async_cookie_t cookie); | 24 | extern void async_synchronize_cookie(async_cookie_t cookie); |
24 | extern void async_synchronize_cookie_special(async_cookie_t cookie, struct list_head *list); | 25 | extern void async_synchronize_cookie_domain(async_cookie_t cookie, |
26 | struct list_head *list); | ||
25 | 27 | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index a53318b8cbd0..08a86d5cdf1b 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -731,12 +731,17 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
731 | 731 | ||
732 | static inline int ata_id_is_cfa(const u16 *id) | 732 | static inline int ata_id_is_cfa(const u16 *id) |
733 | { | 733 | { |
734 | if (id[ATA_ID_CONFIG] == 0x848A) /* Standard CF */ | 734 | if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */ |
735 | return 1; | 735 | return 1; |
736 | /* Could be CF hiding as standard ATA */ | 736 | /* |
737 | if (ata_id_major_version(id) >= 3 && | 737 | * CF specs don't require specific value in the word 0 anymore and yet |
738 | id[ATA_ID_COMMAND_SET_1] != 0xFFFF && | 738 | * they forbid to report the ATA version in the word 80 and require the |
739 | (id[ATA_ID_COMMAND_SET_1] & (1 << 2))) | 739 | * CFA feature set support to be indicated in the word 83 in this case. |
740 | * Unfortunately, some cards only follow either of this requirements, | ||
741 | * and while those that don't indicate CFA feature support need some | ||
742 | * sort of quirk list, it seems impractical for the ones that do... | ||
743 | */ | ||
744 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004) | ||
740 | return 1; | 745 | return 1; |
741 | return 0; | 746 | return 0; |
742 | } | 747 | } |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e4e8e117d27d..499900d0cee7 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -378,6 +378,7 @@ struct cgroup_subsys { | |||
378 | * - initiating hotplug events | 378 | * - initiating hotplug events |
379 | */ | 379 | */ |
380 | struct mutex hierarchy_mutex; | 380 | struct mutex hierarchy_mutex; |
381 | struct lock_class_key subsys_key; | ||
381 | 382 | ||
382 | /* | 383 | /* |
383 | * Link to parent, and list entry in parent's children. | 384 | * Link to parent, and list entry in parent's children. |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 3bacd71509fb..1f2e9020acc6 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -552,7 +552,12 @@ struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, | |||
552 | const struct crypto_type *frontend, | 552 | const struct crypto_type *frontend, |
553 | u32 type, u32 mask); | 553 | u32 type, u32 mask); |
554 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); | 554 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); |
555 | void crypto_free_tfm(struct crypto_tfm *tfm); | 555 | void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); |
556 | |||
557 | static inline void crypto_free_tfm(struct crypto_tfm *tfm) | ||
558 | { | ||
559 | return crypto_destroy_tfm(tfm, tfm); | ||
560 | } | ||
556 | 561 | ||
557 | int alg_test(const char *driver, const char *alg, u32 type, u32 mask); | 562 | int alg_test(const char *driver, const char *alg, u32 type, u32 mask); |
558 | 563 | ||
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 3e0f64c335c8..3e68469c1885 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -282,6 +282,18 @@ static inline void dmaengine_put(void) | |||
282 | } | 282 | } |
283 | #endif | 283 | #endif |
284 | 284 | ||
285 | #ifdef CONFIG_NET_DMA | ||
286 | #define net_dmaengine_get() dmaengine_get() | ||
287 | #define net_dmaengine_put() dmaengine_put() | ||
288 | #else | ||
289 | static inline void net_dmaengine_get(void) | ||
290 | { | ||
291 | } | ||
292 | static inline void net_dmaengine_put(void) | ||
293 | { | ||
294 | } | ||
295 | #endif | ||
296 | |||
285 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | 297 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, |
286 | void *dest, void *src, size_t len); | 298 | void *dest, void *src, size_t len); |
287 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | 299 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, |
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 5ca54d77079f..7605c5e9589f 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
@@ -111,6 +111,15 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re | |||
111 | #endif | 111 | #endif |
112 | } | 112 | } |
113 | 113 | ||
114 | static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs) | ||
115 | { | ||
116 | #ifdef ELF_CORE_COPY_KERNEL_REGS | ||
117 | ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs); | ||
118 | #else | ||
119 | elf_core_copy_regs(elfregs, regs); | ||
120 | #endif | ||
121 | } | ||
122 | |||
114 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) | 123 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) |
115 | { | 124 | { |
116 | #ifdef ELF_CORE_COPY_TASK_REGS | 125 | #ifdef ELF_CORE_COPY_TASK_REGS |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 818fe21257e8..31527e17076b 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -960,6 +960,21 @@ extern struct fb_info *registered_fb[FB_MAX]; | |||
960 | extern int num_registered_fb; | 960 | extern int num_registered_fb; |
961 | extern struct class *fb_class; | 961 | extern struct class *fb_class; |
962 | 962 | ||
963 | static inline int lock_fb_info(struct fb_info *info) | ||
964 | { | ||
965 | mutex_lock(&info->lock); | ||
966 | if (!info->fbops) { | ||
967 | mutex_unlock(&info->lock); | ||
968 | return 0; | ||
969 | } | ||
970 | return 1; | ||
971 | } | ||
972 | |||
973 | static inline void unlock_fb_info(struct fb_info *info) | ||
974 | { | ||
975 | mutex_unlock(&info->lock); | ||
976 | } | ||
977 | |||
963 | static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, | 978 | static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, |
964 | u8 *src, u32 s_pitch, u32 height) | 979 | u8 *src, u32 s_pitch, u32 height) |
965 | { | 980 | { |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f1d2fba19ea0..03be7f29ca01 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -33,7 +33,8 @@ unsigned long hugetlb_total_pages(void); | |||
33 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 33 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
34 | unsigned long address, int write_access); | 34 | unsigned long address, int write_access); |
35 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, | 35 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
36 | struct vm_area_struct *vma); | 36 | struct vm_area_struct *vma, |
37 | int acctflags); | ||
37 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 38 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
38 | 39 | ||
39 | extern unsigned long hugepages_treat_as_movable; | 40 | extern unsigned long hugepages_treat_as_movable; |
@@ -138,7 +139,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
138 | 139 | ||
139 | extern const struct file_operations hugetlbfs_file_operations; | 140 | extern const struct file_operations hugetlbfs_file_operations; |
140 | extern struct vm_operations_struct hugetlb_vm_ops; | 141 | extern struct vm_operations_struct hugetlb_vm_ops; |
141 | struct file *hugetlb_file_setup(const char *name, size_t); | 142 | struct file *hugetlb_file_setup(const char *name, size_t, int); |
142 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 143 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
143 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 144 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
144 | 145 | ||
@@ -158,9 +159,9 @@ static inline void set_file_hugepages(struct file *file) | |||
158 | } | 159 | } |
159 | #else /* !CONFIG_HUGETLBFS */ | 160 | #else /* !CONFIG_HUGETLBFS */ |
160 | 161 | ||
161 | #define is_file_hugepages(file) 0 | 162 | #define is_file_hugepages(file) 0 |
162 | #define set_file_hugepages(file) BUG() | 163 | #define set_file_hugepages(file) BUG() |
163 | #define hugetlb_file_setup(name,size) ERR_PTR(-ENOSYS) | 164 | #define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS) |
164 | 165 | ||
165 | #endif /* !CONFIG_HUGETLBFS */ | 166 | #endif /* !CONFIG_HUGETLBFS */ |
166 | 167 | ||
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index aeab2cb32a9c..82c43624c067 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -2,7 +2,10 @@ | |||
2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | |||
6 | #ifdef __KERNEL__ | ||
5 | #include <linux/ip.h> | 7 | #include <linux/ip.h> |
8 | #endif | ||
6 | 9 | ||
7 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) | 10 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) |
8 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) | 11 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index ea0ea1a4c36f..e752d973fa21 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -48,12 +48,11 @@ extern struct fs_struct init_fs; | |||
48 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ | 48 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ |
49 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 49 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
50 | .rlim = INIT_RLIMITS, \ | 50 | .rlim = INIT_RLIMITS, \ |
51 | .cputime = { .totals = { \ | 51 | .cputimer = { \ |
52 | .utime = cputime_zero, \ | 52 | .cputime = INIT_CPUTIME, \ |
53 | .stime = cputime_zero, \ | 53 | .running = 0, \ |
54 | .sum_exec_runtime = 0, \ | 54 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \ |
55 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputime.totals.lock), \ | 55 | }, \ |
56 | }, }, \ | ||
57 | } | 56 | } |
58 | 57 | ||
59 | extern struct nsproxy init_nsproxy; | 58 | extern struct nsproxy init_nsproxy; |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 9127f6b51a39..472f11765f60 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -467,6 +467,7 @@ int show_interrupts(struct seq_file *p, void *v); | |||
467 | struct irq_desc; | 467 | struct irq_desc; |
468 | 468 | ||
469 | extern int early_irq_init(void); | 469 | extern int early_irq_init(void); |
470 | extern int arch_probe_nr_irqs(void); | ||
470 | extern int arch_early_irq_init(void); | 471 | extern int arch_early_irq_init(void); |
471 | extern int arch_init_chip_data(struct irq_desc *desc, int cpu); | 472 | extern int arch_init_chip_data(struct irq_desc *desc, int cpu); |
472 | 473 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index f899b502f186..27a67536511e 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -182,11 +182,11 @@ struct irq_desc { | |||
182 | unsigned int irqs_unhandled; | 182 | unsigned int irqs_unhandled; |
183 | spinlock_t lock; | 183 | spinlock_t lock; |
184 | #ifdef CONFIG_SMP | 184 | #ifdef CONFIG_SMP |
185 | cpumask_t affinity; | 185 | cpumask_var_t affinity; |
186 | unsigned int cpu; | 186 | unsigned int cpu; |
187 | #endif | ||
188 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 187 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
189 | cpumask_t pending_mask; | 188 | cpumask_var_t pending_mask; |
189 | #endif | ||
190 | #endif | 190 | #endif |
191 | #ifdef CONFIG_PROC_FS | 191 | #ifdef CONFIG_PROC_FS |
192 | struct proc_dir_entry *dir; | 192 | struct proc_dir_entry *dir; |
@@ -422,4 +422,84 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | |||
422 | 422 | ||
423 | #endif /* !CONFIG_S390 */ | 423 | #endif /* !CONFIG_S390 */ |
424 | 424 | ||
425 | #ifdef CONFIG_SMP | ||
426 | /** | ||
427 | * init_alloc_desc_masks - allocate cpumasks for irq_desc | ||
428 | * @desc: pointer to irq_desc struct | ||
429 | * @cpu: cpu which will be handling the cpumasks | ||
430 | * @boot: true if need bootmem | ||
431 | * | ||
432 | * Allocates affinity and pending_mask cpumask if required. | ||
433 | * Returns true if successful (or not required). | ||
434 | * Side effect: affinity has all bits set, pending_mask has all bits clear. | ||
435 | */ | ||
436 | static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu, | ||
437 | bool boot) | ||
438 | { | ||
439 | int node; | ||
440 | |||
441 | if (boot) { | ||
442 | alloc_bootmem_cpumask_var(&desc->affinity); | ||
443 | cpumask_setall(desc->affinity); | ||
444 | |||
445 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
446 | alloc_bootmem_cpumask_var(&desc->pending_mask); | ||
447 | cpumask_clear(desc->pending_mask); | ||
448 | #endif | ||
449 | return true; | ||
450 | } | ||
451 | |||
452 | node = cpu_to_node(cpu); | ||
453 | |||
454 | if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node)) | ||
455 | return false; | ||
456 | cpumask_setall(desc->affinity); | ||
457 | |||
458 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
459 | if (!alloc_cpumask_var_node(&desc->pending_mask, GFP_ATOMIC, node)) { | ||
460 | free_cpumask_var(desc->affinity); | ||
461 | return false; | ||
462 | } | ||
463 | cpumask_clear(desc->pending_mask); | ||
464 | #endif | ||
465 | return true; | ||
466 | } | ||
467 | |||
468 | /** | ||
469 | * init_copy_desc_masks - copy cpumasks for irq_desc | ||
470 | * @old_desc: pointer to old irq_desc struct | ||
471 | * @new_desc: pointer to new irq_desc struct | ||
472 | * | ||
473 | * Insures affinity and pending_masks are copied to new irq_desc. | ||
474 | * If !CONFIG_CPUMASKS_OFFSTACK the cpumasks are embedded in the | ||
475 | * irq_desc struct so the copy is redundant. | ||
476 | */ | ||
477 | |||
478 | static inline void init_copy_desc_masks(struct irq_desc *old_desc, | ||
479 | struct irq_desc *new_desc) | ||
480 | { | ||
481 | #ifdef CONFIG_CPUMASKS_OFFSTACK | ||
482 | cpumask_copy(new_desc->affinity, old_desc->affinity); | ||
483 | |||
484 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
485 | cpumask_copy(new_desc->pending_mask, old_desc->pending_mask); | ||
486 | #endif | ||
487 | #endif | ||
488 | } | ||
489 | |||
490 | #else /* !CONFIG_SMP */ | ||
491 | |||
492 | static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu, | ||
493 | bool boot) | ||
494 | { | ||
495 | return true; | ||
496 | } | ||
497 | |||
498 | static inline void init_copy_desc_masks(struct irq_desc *old_desc, | ||
499 | struct irq_desc *new_desc) | ||
500 | { | ||
501 | } | ||
502 | |||
503 | #endif /* CONFIG_SMP */ | ||
504 | |||
425 | #endif /* _LINUX_IRQ_H */ | 505 | #endif /* _LINUX_IRQ_H */ |
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 86af92e9e84c..887477bc2ab0 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | # define for_each_irq_desc_reverse(irq, desc) \ | 21 | # define for_each_irq_desc_reverse(irq, desc) \ |
22 | for (irq = nr_irqs - 1; irq >= 0; irq--) | 22 | for (irq = nr_irqs - 1; irq >= 0; irq--) |
23 | |||
23 | #else /* CONFIG_GENERIC_HARDIRQS */ | 24 | #else /* CONFIG_GENERIC_HARDIRQS */ |
24 | 25 | ||
25 | extern int nr_irqs; | 26 | extern int nr_irqs; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 343df9ef2412..7fa371898e3e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -480,7 +480,8 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
480 | /* | 480 | /* |
481 | * swap - swap value of @a and @b | 481 | * swap - swap value of @a and @b |
482 | */ | 482 | */ |
483 | #define swap(a, b) ({ typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; }) | 483 | #define swap(a, b) \ |
484 | do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) | ||
484 | 485 | ||
485 | /** | 486 | /** |
486 | * container_of - cast a member of a structure out to the containing structure | 487 | * container_of - cast a member of a structure out to the containing structure |
diff --git a/include/linux/libata.h b/include/linux/libata.h index bca3ba25f52a..5d87bc09a1f5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -380,6 +380,7 @@ enum { | |||
380 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands | 380 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands |
381 | not multiple of 16 bytes */ | 381 | not multiple of 16 bytes */ |
382 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ | 382 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ |
383 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | ||
383 | 384 | ||
384 | /* DMA mask for user DMA control: User visible values; DO NOT | 385 | /* DMA mask for user DMA control: User visible values; DO NOT |
385 | renumber */ | 386 | renumber */ |
@@ -580,7 +581,7 @@ struct ata_device { | |||
580 | acpi_handle acpi_handle; | 581 | acpi_handle acpi_handle; |
581 | union acpi_object *gtf_cache; | 582 | union acpi_object *gtf_cache; |
582 | #endif | 583 | #endif |
583 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 584 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
584 | u64 n_sectors; /* size of device, if ATA */ | 585 | u64 n_sectors; /* size of device, if ATA */ |
585 | unsigned int class; /* ATA_DEV_xxx */ | 586 | unsigned int class; /* ATA_DEV_xxx */ |
586 | unsigned long unpark_deadline; | 587 | unsigned long unpark_deadline; |
@@ -605,20 +606,22 @@ struct ata_device { | |||
605 | u16 heads; /* Number of heads */ | 606 | u16 heads; /* Number of heads */ |
606 | u16 sectors; /* Number of sectors per track */ | 607 | u16 sectors; /* Number of sectors per track */ |
607 | 608 | ||
608 | /* error history */ | ||
609 | int spdn_cnt; | ||
610 | struct ata_ering ering; | ||
611 | |||
612 | union { | 609 | union { |
613 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ | 610 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
614 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ | 611 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ |
615 | }; | 612 | }; |
613 | |||
614 | /* error history */ | ||
615 | int spdn_cnt; | ||
616 | /* ering is CLEAR_END, read comment above CLEAR_END */ | ||
617 | struct ata_ering ering; | ||
616 | }; | 618 | }; |
617 | 619 | ||
618 | /* Offset into struct ata_device. Fields above it are maintained | 620 | /* Fields between ATA_DEVICE_CLEAR_BEGIN and ATA_DEVICE_CLEAR_END are |
619 | * acress device init. Fields below are zeroed. | 621 | * cleared to zero on ata_dev_init(). |
620 | */ | 622 | */ |
621 | #define ATA_DEVICE_CLEAR_OFFSET offsetof(struct ata_device, n_sectors) | 623 | #define ATA_DEVICE_CLEAR_BEGIN offsetof(struct ata_device, n_sectors) |
624 | #define ATA_DEVICE_CLEAR_END offsetof(struct ata_device, ering) | ||
622 | 625 | ||
623 | struct ata_eh_info { | 626 | struct ata_eh_info { |
624 | struct ata_device *dev; /* offending device */ | 627 | struct ata_device *dev; /* offending device */ |
diff --git a/include/linux/magic.h b/include/linux/magic.h index 0b4df7eba852..5b4e28bcb788 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -49,4 +49,5 @@ | |||
49 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA | 49 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA |
50 | #define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA | 50 | #define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA |
51 | 51 | ||
52 | #define STACK_END_MAGIC 0x57AC6E9D | ||
52 | #endif /* __LINUX_MAGIC_H__ */ | 53 | #endif /* __LINUX_MAGIC_H__ */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3d7fb44d7d7e..7dc04ff5ab89 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1129,8 +1129,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
1129 | unsigned long flag, unsigned long pgoff); | 1129 | unsigned long flag, unsigned long pgoff); |
1130 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1130 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
1131 | unsigned long len, unsigned long flags, | 1131 | unsigned long len, unsigned long flags, |
1132 | unsigned int vm_flags, unsigned long pgoff, | 1132 | unsigned int vm_flags, unsigned long pgoff); |
1133 | int accountable); | ||
1134 | 1133 | ||
1135 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1134 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, |
1136 | unsigned long len, unsigned long prot, | 1135 | unsigned long len, unsigned long prot, |
diff --git a/include/linux/module.h b/include/linux/module.h index f3b8329eb5b8..145a75528cc1 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -407,7 +407,6 @@ static inline local_t *__module_ref_addr(struct module *mod, int cpu) | |||
407 | static inline void __module_get(struct module *module) | 407 | static inline void __module_get(struct module *module) |
408 | { | 408 | { |
409 | if (module) { | 409 | if (module) { |
410 | BUG_ON(module_refcount(module) == 0); | ||
411 | local_inc(__module_ref_addr(module, get_cpu())); | 410 | local_inc(__module_ref_addr(module, get_cpu())); |
412 | put_cpu(); | 411 | put_cpu(); |
413 | } | 412 | } |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 48890cf3f96e..7bd624bfdcfd 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -684,7 +684,7 @@ int pci_enable_rom(struct pci_dev *pdev); | |||
684 | void pci_disable_rom(struct pci_dev *pdev); | 684 | void pci_disable_rom(struct pci_dev *pdev); |
685 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | 685 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
686 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); | 686 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
687 | size_t pci_get_rom_size(void __iomem *rom, size_t size); | 687 | size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); |
688 | 688 | ||
689 | /* Power management related routines */ | 689 | /* Power management related routines */ |
690 | int pci_save_state(struct pci_dev *dev); | 690 | int pci_save_state(struct pci_dev *dev); |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 9f2a3751873a..3577ffd90d45 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -8,35 +8,46 @@ | |||
8 | 8 | ||
9 | #include <asm/percpu.h> | 9 | #include <asm/percpu.h> |
10 | 10 | ||
11 | #ifndef PER_CPU_BASE_SECTION | ||
12 | #ifdef CONFIG_SMP | ||
13 | #define PER_CPU_BASE_SECTION ".data.percpu" | ||
14 | #else | ||
15 | #define PER_CPU_BASE_SECTION ".data" | ||
16 | #endif | ||
17 | #endif | ||
18 | |||
11 | #ifdef CONFIG_SMP | 19 | #ifdef CONFIG_SMP |
12 | #define DEFINE_PER_CPU(type, name) \ | ||
13 | __attribute__((__section__(".data.percpu"))) \ | ||
14 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | ||
15 | 20 | ||
16 | #ifdef MODULE | 21 | #ifdef MODULE |
17 | #define SHARED_ALIGNED_SECTION ".data.percpu" | 22 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
18 | #else | 23 | #else |
19 | #define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned" | 24 | #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" |
20 | #endif | 25 | #endif |
26 | #define PER_CPU_FIRST_SECTION ".first" | ||
21 | 27 | ||
22 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | 28 | #else |
23 | __attribute__((__section__(SHARED_ALIGNED_SECTION))) \ | ||
24 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ | ||
25 | ____cacheline_aligned_in_smp | ||
26 | 29 | ||
27 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | 30 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
28 | __attribute__((__section__(".data.percpu.page_aligned"))) \ | 31 | #define PER_CPU_FIRST_SECTION "" |
32 | |||
33 | #endif | ||
34 | |||
35 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | ||
36 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | ||
29 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 37 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name |
30 | #else | 38 | |
31 | #define DEFINE_PER_CPU(type, name) \ | 39 | #define DEFINE_PER_CPU(type, name) \ |
32 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 40 | DEFINE_PER_CPU_SECTION(type, name, "") |
33 | 41 | ||
34 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | 42 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ |
35 | DEFINE_PER_CPU(type, name) | 43 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \ |
44 | ____cacheline_aligned_in_smp | ||
36 | 45 | ||
37 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | 46 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ |
38 | DEFINE_PER_CPU(type, name) | 47 | DEFINE_PER_CPU_SECTION(type, name, ".page_aligned") |
39 | #endif | 48 | |
49 | #define DEFINE_PER_CPU_FIRST(type, name) \ | ||
50 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION) | ||
40 | 51 | ||
41 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | 52 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) |
42 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | 53 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5a7c76388731..f0a50b20e8a0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -453,23 +453,33 @@ struct task_cputime { | |||
453 | cputime_t utime; | 453 | cputime_t utime; |
454 | cputime_t stime; | 454 | cputime_t stime; |
455 | unsigned long long sum_exec_runtime; | 455 | unsigned long long sum_exec_runtime; |
456 | spinlock_t lock; | ||
457 | }; | 456 | }; |
458 | /* Alternate field names when used to cache expirations. */ | 457 | /* Alternate field names when used to cache expirations. */ |
459 | #define prof_exp stime | 458 | #define prof_exp stime |
460 | #define virt_exp utime | 459 | #define virt_exp utime |
461 | #define sched_exp sum_exec_runtime | 460 | #define sched_exp sum_exec_runtime |
462 | 461 | ||
462 | #define INIT_CPUTIME \ | ||
463 | (struct task_cputime) { \ | ||
464 | .utime = cputime_zero, \ | ||
465 | .stime = cputime_zero, \ | ||
466 | .sum_exec_runtime = 0, \ | ||
467 | } | ||
468 | |||
463 | /** | 469 | /** |
464 | * struct thread_group_cputime - thread group interval timer counts | 470 | * struct thread_group_cputimer - thread group interval timer counts |
465 | * @totals: thread group interval timers; substructure for | 471 | * @cputime: thread group interval timers. |
466 | * uniprocessor kernel, per-cpu for SMP kernel. | 472 | * @running: non-zero when there are timers running and |
473 | * @cputime receives updates. | ||
474 | * @lock: lock for fields in this struct. | ||
467 | * | 475 | * |
468 | * This structure contains the version of task_cputime, above, that is | 476 | * This structure contains the version of task_cputime, above, that is |
469 | * used for thread group CPU clock calculations. | 477 | * used for thread group CPU timer calculations. |
470 | */ | 478 | */ |
471 | struct thread_group_cputime { | 479 | struct thread_group_cputimer { |
472 | struct task_cputime totals; | 480 | struct task_cputime cputime; |
481 | int running; | ||
482 | spinlock_t lock; | ||
473 | }; | 483 | }; |
474 | 484 | ||
475 | /* | 485 | /* |
@@ -518,10 +528,10 @@ struct signal_struct { | |||
518 | cputime_t it_prof_incr, it_virt_incr; | 528 | cputime_t it_prof_incr, it_virt_incr; |
519 | 529 | ||
520 | /* | 530 | /* |
521 | * Thread group totals for process CPU clocks. | 531 | * Thread group totals for process CPU timers. |
522 | * See thread_group_cputime(), et al, for details. | 532 | * See thread_group_cputimer(), et al, for details. |
523 | */ | 533 | */ |
524 | struct thread_group_cputime cputime; | 534 | struct thread_group_cputimer cputimer; |
525 | 535 | ||
526 | /* Earliest-expiration cache. */ | 536 | /* Earliest-expiration cache. */ |
527 | struct task_cputime cputime_expires; | 537 | struct task_cputime cputime_expires; |
@@ -558,7 +568,7 @@ struct signal_struct { | |||
558 | * Live threads maintain their own counters and add to these | 568 | * Live threads maintain their own counters and add to these |
559 | * in __exit_signal, except for the group leader. | 569 | * in __exit_signal, except for the group leader. |
560 | */ | 570 | */ |
561 | cputime_t cutime, cstime; | 571 | cputime_t utime, stime, cutime, cstime; |
562 | cputime_t gtime; | 572 | cputime_t gtime; |
563 | cputime_t cgtime; | 573 | cputime_t cgtime; |
564 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 574 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
@@ -567,6 +577,14 @@ struct signal_struct { | |||
567 | struct task_io_accounting ioac; | 577 | struct task_io_accounting ioac; |
568 | 578 | ||
569 | /* | 579 | /* |
580 | * Cumulative ns of schedule CPU time fo dead threads in the | ||
581 | * group, not including a zombie group leader, (This only differs | ||
582 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | ||
583 | * other than jiffies.) | ||
584 | */ | ||
585 | unsigned long long sum_sched_runtime; | ||
586 | |||
587 | /* | ||
570 | * We don't bother to synchronize most readers of this at all, | 588 | * We don't bother to synchronize most readers of this at all, |
571 | * because there is no reader checking a limit that actually needs | 589 | * because there is no reader checking a limit that actually needs |
572 | * to get both rlim_cur and rlim_max atomically, and either one | 590 | * to get both rlim_cur and rlim_max atomically, and either one |
@@ -1160,10 +1178,9 @@ struct task_struct { | |||
1160 | pid_t pid; | 1178 | pid_t pid; |
1161 | pid_t tgid; | 1179 | pid_t tgid; |
1162 | 1180 | ||
1163 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
1164 | /* Canary value for the -fstack-protector gcc feature */ | 1181 | /* Canary value for the -fstack-protector gcc feature */ |
1165 | unsigned long stack_canary; | 1182 | unsigned long stack_canary; |
1166 | #endif | 1183 | |
1167 | /* | 1184 | /* |
1168 | * pointers to (original) parent process, youngest child, younger sibling, | 1185 | * pointers to (original) parent process, youngest child, younger sibling, |
1169 | * older sibling, respectively. (p->father can be replaced with | 1186 | * older sibling, respectively. (p->father can be replaced with |
@@ -2069,6 +2086,19 @@ static inline int object_is_on_stack(void *obj) | |||
2069 | 2086 | ||
2070 | extern void thread_info_cache_init(void); | 2087 | extern void thread_info_cache_init(void); |
2071 | 2088 | ||
2089 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
2090 | static inline unsigned long stack_not_used(struct task_struct *p) | ||
2091 | { | ||
2092 | unsigned long *n = end_of_stack(p); | ||
2093 | |||
2094 | do { /* Skip over canary */ | ||
2095 | n++; | ||
2096 | } while (!*n); | ||
2097 | |||
2098 | return (unsigned long)n - (unsigned long)end_of_stack(p); | ||
2099 | } | ||
2100 | #endif | ||
2101 | |||
2072 | /* set thread flags in other task's structures | 2102 | /* set thread flags in other task's structures |
2073 | * - see asm/thread_info.h for TIF_xxxx flags available | 2103 | * - see asm/thread_info.h for TIF_xxxx flags available |
2074 | */ | 2104 | */ |
@@ -2182,27 +2212,14 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
2182 | /* | 2212 | /* |
2183 | * Thread group CPU time accounting. | 2213 | * Thread group CPU time accounting. |
2184 | */ | 2214 | */ |
2185 | 2215 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | |
2186 | static inline | 2216 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); |
2187 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times) | ||
2188 | { | ||
2189 | struct task_cputime *totals = &tsk->signal->cputime.totals; | ||
2190 | unsigned long flags; | ||
2191 | |||
2192 | spin_lock_irqsave(&totals->lock, flags); | ||
2193 | *times = *totals; | ||
2194 | spin_unlock_irqrestore(&totals->lock, flags); | ||
2195 | } | ||
2196 | 2217 | ||
2197 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2218 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
2198 | { | 2219 | { |
2199 | sig->cputime.totals = (struct task_cputime){ | 2220 | sig->cputimer.cputime = INIT_CPUTIME; |
2200 | .utime = cputime_zero, | 2221 | spin_lock_init(&sig->cputimer.lock); |
2201 | .stime = cputime_zero, | 2222 | sig->cputimer.running = 0; |
2202 | .sum_exec_runtime = 0, | ||
2203 | }; | ||
2204 | |||
2205 | spin_lock_init(&sig->cputime.totals.lock); | ||
2206 | } | 2223 | } |
2207 | 2224 | ||
2208 | static inline void thread_group_cputime_free(struct signal_struct *sig) | 2225 | static inline void thread_group_cputime_free(struct signal_struct *sig) |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 715196b09d67..bbacb7baa446 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -176,6 +176,12 @@ static inline void init_call_single_data(void) | |||
176 | #define put_cpu() preempt_enable() | 176 | #define put_cpu() preempt_enable() |
177 | #define put_cpu_no_resched() preempt_enable_no_resched() | 177 | #define put_cpu_no_resched() preempt_enable_no_resched() |
178 | 178 | ||
179 | /* | ||
180 | * Callback to arch code if there's nosmp or maxcpus=0 on the | ||
181 | * boot command line: | ||
182 | */ | ||
183 | extern void arch_disable_smp_support(void); | ||
184 | |||
179 | void smp_setup_processor_id(void); | 185 | void smp_setup_processor_id(void); |
180 | 186 | ||
181 | #endif /* __LINUX_SMP_H */ | 187 | #endif /* __LINUX_SMP_H */ |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index e0c0fccced46..a0c66a2e00ad 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -124,7 +124,12 @@ do { \ | |||
124 | #ifdef CONFIG_GENERIC_LOCKBREAK | 124 | #ifdef CONFIG_GENERIC_LOCKBREAK |
125 | #define spin_is_contended(lock) ((lock)->break_lock) | 125 | #define spin_is_contended(lock) ((lock)->break_lock) |
126 | #else | 126 | #else |
127 | |||
128 | #ifdef __raw_spin_is_contended | ||
127 | #define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock) | 129 | #define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock) |
130 | #else | ||
131 | #define spin_is_contended(lock) (((void)(lock), 0)) | ||
132 | #endif /*__raw_spin_is_contended*/ | ||
128 | #endif | 133 | #endif |
129 | 134 | ||
130 | /** | 135 | /** |
diff --git a/include/linux/stackprotector.h b/include/linux/stackprotector.h new file mode 100644 index 000000000000..6f3e54c704c0 --- /dev/null +++ b/include/linux/stackprotector.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef _LINUX_STACKPROTECTOR_H | ||
2 | #define _LINUX_STACKPROTECTOR_H 1 | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <linux/sched.h> | ||
6 | #include <linux/random.h> | ||
7 | |||
8 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
9 | # include <asm/stackprotector.h> | ||
10 | #else | ||
11 | static inline void boot_init_stack_canary(void) | ||
12 | { | ||
13 | } | ||
14 | #endif | ||
15 | |||
16 | #endif | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 0eda02ff2414..f9f900cfd066 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -95,13 +95,13 @@ struct old_linux_dirent; | |||
95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | 95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) |
96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | 96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) |
97 | 97 | ||
98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | 98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) |
99 | #define SYSCALL_DEFINE1(...) SYSCALL_DEFINEx(1, __VA_ARGS__) | 99 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) |
100 | #define SYSCALL_DEFINE2(...) SYSCALL_DEFINEx(2, __VA_ARGS__) | 100 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) |
101 | #define SYSCALL_DEFINE3(...) SYSCALL_DEFINEx(3, __VA_ARGS__) | 101 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) |
102 | #define SYSCALL_DEFINE4(...) SYSCALL_DEFINEx(4, __VA_ARGS__) | 102 | #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) |
103 | #define SYSCALL_DEFINE5(...) SYSCALL_DEFINEx(5, __VA_ARGS__) | 103 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) |
104 | #define SYSCALL_DEFINE6(...) SYSCALL_DEFINEx(6, __VA_ARGS__) | 104 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) |
105 | 105 | ||
106 | #ifdef CONFIG_PPC64 | 106 | #ifdef CONFIG_PPC64 |
107 | #define SYSCALL_ALIAS(alias, name) \ | 107 | #define SYSCALL_ALIAS(alias, name) \ |
@@ -121,21 +121,21 @@ struct old_linux_dirent; | |||
121 | 121 | ||
122 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name | 122 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name |
123 | #define SYSCALL_DEFINEx(x, name, ...) \ | 123 | #define SYSCALL_DEFINEx(x, name, ...) \ |
124 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)); \ | 124 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \ |
125 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)); \ | 125 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)); \ |
126 | asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__)) \ | 126 | asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__)) \ |
127 | { \ | 127 | { \ |
128 | __SC_TEST##x(__VA_ARGS__); \ | 128 | __SC_TEST##x(__VA_ARGS__); \ |
129 | return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__)); \ | 129 | return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__)); \ |
130 | } \ | 130 | } \ |
131 | SYSCALL_ALIAS(sys_##name, SyS_##name); \ | 131 | SYSCALL_ALIAS(sys##name, SyS##name); \ |
132 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)) | 132 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)) |
133 | 133 | ||
134 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 134 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
135 | 135 | ||
136 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name | 136 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name |
137 | #define SYSCALL_DEFINEx(x, name, ...) \ | 137 | #define SYSCALL_DEFINEx(x, name, ...) \ |
138 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)) | 138 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)) |
139 | 139 | ||
140 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 140 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
141 | 141 | ||
diff --git a/include/linux/topology.h b/include/linux/topology.h index e632d29f0544..a16b9e06f2e5 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -193,5 +193,11 @@ int arch_update_cpu_topology(void); | |||
193 | #ifndef topology_core_siblings | 193 | #ifndef topology_core_siblings |
194 | #define topology_core_siblings(cpu) cpumask_of_cpu(cpu) | 194 | #define topology_core_siblings(cpu) cpumask_of_cpu(cpu) |
195 | #endif | 195 | #endif |
196 | #ifndef topology_thread_cpumask | ||
197 | #define topology_thread_cpumask(cpu) cpumask_of(cpu) | ||
198 | #endif | ||
199 | #ifndef topology_core_cpumask | ||
200 | #define topology_core_cpumask(cpu) cpumask_of(cpu) | ||
201 | #endif | ||
196 | 202 | ||
197 | #endif /* _LINUX_TOPOLOGY_H */ | 203 | #endif /* _LINUX_TOPOLOGY_H */ |
diff --git a/include/linux/wait.h b/include/linux/wait.h index ef609f842fac..a210ede73b56 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -132,6 +132,8 @@ static inline void __remove_wait_queue(wait_queue_head_t *head, | |||
132 | list_del(&old->task_list); | 132 | list_del(&old->task_list); |
133 | } | 133 | } |
134 | 134 | ||
135 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, | ||
136 | int nr_exclusive, int sync, void *key); | ||
135 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); | 137 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
136 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); | 138 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); |
137 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); | 139 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); |
@@ -333,16 +335,19 @@ do { \ | |||
333 | for (;;) { \ | 335 | for (;;) { \ |
334 | prepare_to_wait_exclusive(&wq, &__wait, \ | 336 | prepare_to_wait_exclusive(&wq, &__wait, \ |
335 | TASK_INTERRUPTIBLE); \ | 337 | TASK_INTERRUPTIBLE); \ |
336 | if (condition) \ | 338 | if (condition) { \ |
339 | finish_wait(&wq, &__wait); \ | ||
337 | break; \ | 340 | break; \ |
341 | } \ | ||
338 | if (!signal_pending(current)) { \ | 342 | if (!signal_pending(current)) { \ |
339 | schedule(); \ | 343 | schedule(); \ |
340 | continue; \ | 344 | continue; \ |
341 | } \ | 345 | } \ |
342 | ret = -ERESTARTSYS; \ | 346 | ret = -ERESTARTSYS; \ |
347 | abort_exclusive_wait(&wq, &__wait, \ | ||
348 | TASK_INTERRUPTIBLE, NULL); \ | ||
343 | break; \ | 349 | break; \ |
344 | } \ | 350 | } \ |
345 | finish_wait(&wq, &__wait); \ | ||
346 | } while (0) | 351 | } while (0) |
347 | 352 | ||
348 | #define wait_event_interruptible_exclusive(wq, condition) \ | 353 | #define wait_event_interruptible_exclusive(wq, condition) \ |
@@ -431,6 +436,8 @@ extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, | |||
431 | void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); | 436 | void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); |
432 | void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); | 437 | void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); |
433 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); | 438 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); |
439 | void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | ||
440 | unsigned int mode, void *key); | ||
434 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 441 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
435 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 442 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
436 | 443 | ||
diff --git a/include/video/aty128.h b/include/video/aty128.h index 7079beb005e8..51ac69f05bdc 100644 --- a/include/video/aty128.h +++ b/include/video/aty128.h | |||
@@ -21,9 +21,9 @@ | |||
21 | #define I2C_CNTL_1 0x0094 | 21 | #define I2C_CNTL_1 0x0094 |
22 | #define PALETTE_INDEX 0x00b0 | 22 | #define PALETTE_INDEX 0x00b0 |
23 | #define PALETTE_DATA 0x00b4 | 23 | #define PALETTE_DATA 0x00b4 |
24 | #define CONFIG_CNTL 0x00e0 | 24 | #define CNFG_CNTL 0x00e0 |
25 | #define GEN_RESET_CNTL 0x00f0 | 25 | #define GEN_RESET_CNTL 0x00f0 |
26 | #define CONFIG_MEMSIZE 0x00f8 | 26 | #define CNFG_MEMSIZE 0x00f8 |
27 | #define MEM_CNTL 0x0140 | 27 | #define MEM_CNTL 0x0140 |
28 | #define MEM_POWER_MISC 0x015c | 28 | #define MEM_POWER_MISC 0x015c |
29 | #define AGP_BASE 0x0170 | 29 | #define AGP_BASE 0x0170 |
diff --git a/include/video/mach64.h b/include/video/mach64.h index a8332e528ec1..89e91c0cb737 100644 --- a/include/video/mach64.h +++ b/include/video/mach64.h | |||
@@ -103,7 +103,7 @@ | |||
103 | #define CUR_HORZ_VERT_OFF 0x0070 /* Dword offset 0_1C */ | 103 | #define CUR_HORZ_VERT_OFF 0x0070 /* Dword offset 0_1C */ |
104 | #define CUR2_HORZ_VERT_OFF 0x0070 /* Dword offset 0_1C */ | 104 | #define CUR2_HORZ_VERT_OFF 0x0070 /* Dword offset 0_1C */ |
105 | 105 | ||
106 | #define CONFIG_PANEL_LG 0x0074 /* Dword offset 0_1D (LG) */ | 106 | #define CNFG_PANEL_LG 0x0074 /* Dword offset 0_1D (LG) */ |
107 | 107 | ||
108 | /* General I/O Control */ | 108 | /* General I/O Control */ |
109 | #define GP_IO 0x0078 /* Dword offset 0_1E */ | 109 | #define GP_IO 0x0078 /* Dword offset 0_1E */ |
@@ -146,8 +146,8 @@ | |||
146 | #define CLOCK_SEL_CNTL 0x0090 /* Dword offset 0_24 */ | 146 | #define CLOCK_SEL_CNTL 0x0090 /* Dword offset 0_24 */ |
147 | 147 | ||
148 | /* Configuration */ | 148 | /* Configuration */ |
149 | #define CONFIG_STAT1 0x0094 /* Dword offset 0_25 */ | 149 | #define CNFG_STAT1 0x0094 /* Dword offset 0_25 */ |
150 | #define CONFIG_STAT2 0x0098 /* Dword offset 0_26 */ | 150 | #define CNFG_STAT2 0x0098 /* Dword offset 0_26 */ |
151 | 151 | ||
152 | /* Bus Control */ | 152 | /* Bus Control */ |
153 | #define BUS_CNTL 0x00A0 /* Dword offset 0_28 */ | 153 | #define BUS_CNTL 0x00A0 /* Dword offset 0_28 */ |
@@ -190,9 +190,9 @@ | |||
190 | #define POWER_MANAGEMENT_LG 0x00D8 /* Dword offset 0_36 (LG) */ | 190 | #define POWER_MANAGEMENT_LG 0x00D8 /* Dword offset 0_36 (LG) */ |
191 | 191 | ||
192 | /* Configuration */ | 192 | /* Configuration */ |
193 | #define CONFIG_CNTL 0x00DC /* Dword offset 0_37 (CT, ET, VT) */ | 193 | #define CNFG_CNTL 0x00DC /* Dword offset 0_37 (CT, ET, VT) */ |
194 | #define CONFIG_CHIP_ID 0x00E0 /* Dword offset 0_38 */ | 194 | #define CNFG_CHIP_ID 0x00E0 /* Dword offset 0_38 */ |
195 | #define CONFIG_STAT0 0x00E4 /* Dword offset 0_39 */ | 195 | #define CNFG_STAT0 0x00E4 /* Dword offset 0_39 */ |
196 | 196 | ||
197 | /* Test and Debug */ | 197 | /* Test and Debug */ |
198 | #define CRC_SIG 0x00E8 /* Dword offset 0_3A */ | 198 | #define CRC_SIG 0x00E8 /* Dword offset 0_3A */ |
@@ -851,17 +851,17 @@ | |||
851 | #define PLL_YCLK_CNTL 0x29 | 851 | #define PLL_YCLK_CNTL 0x29 |
852 | #define PM_DYN_CLK_CNTL 0x2A | 852 | #define PM_DYN_CLK_CNTL 0x2A |
853 | 853 | ||
854 | /* CONFIG_CNTL register constants */ | 854 | /* CNFG_CNTL register constants */ |
855 | #define APERTURE_4M_ENABLE 1 | 855 | #define APERTURE_4M_ENABLE 1 |
856 | #define APERTURE_8M_ENABLE 2 | 856 | #define APERTURE_8M_ENABLE 2 |
857 | #define VGA_APERTURE_ENABLE 4 | 857 | #define VGA_APERTURE_ENABLE 4 |
858 | 858 | ||
859 | /* CONFIG_STAT0 register constants (GX, CX) */ | 859 | /* CNFG_STAT0 register constants (GX, CX) */ |
860 | #define CFG_BUS_TYPE 0x00000007 | 860 | #define CFG_BUS_TYPE 0x00000007 |
861 | #define CFG_MEM_TYPE 0x00000038 | 861 | #define CFG_MEM_TYPE 0x00000038 |
862 | #define CFG_INIT_DAC_TYPE 0x00000e00 | 862 | #define CFG_INIT_DAC_TYPE 0x00000e00 |
863 | 863 | ||
864 | /* CONFIG_STAT0 register constants (CT, ET, VT) */ | 864 | /* CNFG_STAT0 register constants (CT, ET, VT) */ |
865 | #define CFG_MEM_TYPE_xT 0x00000007 | 865 | #define CFG_MEM_TYPE_xT 0x00000007 |
866 | 866 | ||
867 | #define ISA 0 | 867 | #define ISA 0 |
@@ -942,7 +942,7 @@ | |||
942 | #define PCI_ATI_VENDOR_ID 0x1002 | 942 | #define PCI_ATI_VENDOR_ID 0x1002 |
943 | 943 | ||
944 | 944 | ||
945 | /* CONFIG_CHIP_ID register constants */ | 945 | /* CNFG_CHIP_ID register constants */ |
946 | #define CFG_CHIP_TYPE 0x0000FFFF | 946 | #define CFG_CHIP_TYPE 0x0000FFFF |
947 | #define CFG_CHIP_CLASS 0x00FF0000 | 947 | #define CFG_CHIP_CLASS 0x00FF0000 |
948 | #define CFG_CHIP_REV 0xFF000000 | 948 | #define CFG_CHIP_REV 0xFF000000 |
@@ -951,7 +951,7 @@ | |||
951 | #define CFG_CHIP_MINOR 0xC0000000 | 951 | #define CFG_CHIP_MINOR 0xC0000000 |
952 | 952 | ||
953 | 953 | ||
954 | /* Chip IDs read from CONFIG_CHIP_ID */ | 954 | /* Chip IDs read from CNFG_CHIP_ID */ |
955 | 955 | ||
956 | /* mach64GX family */ | 956 | /* mach64GX family */ |
957 | #define GX_CHIP_ID 0xD7 /* mach64GX (ATI888GX00) */ | 957 | #define GX_CHIP_ID 0xD7 /* mach64GX (ATI888GX00) */ |
@@ -1254,7 +1254,7 @@ | |||
1254 | #define CRTC2_DISPLAY_DIS 0x00000400 | 1254 | #define CRTC2_DISPLAY_DIS 0x00000400 |
1255 | 1255 | ||
1256 | /* LCD register indices */ | 1256 | /* LCD register indices */ |
1257 | #define CONFIG_PANEL 0x00 | 1257 | #define CNFG_PANEL 0x00 |
1258 | #define LCD_GEN_CNTL 0x01 | 1258 | #define LCD_GEN_CNTL 0x01 |
1259 | #define DSTN_CONTROL 0x02 | 1259 | #define DSTN_CONTROL 0x02 |
1260 | #define HFB_PITCH_ADDR 0x03 | 1260 | #define HFB_PITCH_ADDR 0x03 |
diff --git a/include/video/radeon.h b/include/video/radeon.h index 1cd09cc5b169..e072b16b39ab 100644 --- a/include/video/radeon.h +++ b/include/video/radeon.h | |||
@@ -11,13 +11,13 @@ | |||
11 | #define HI_STAT 0x004C | 11 | #define HI_STAT 0x004C |
12 | #define BUS_CNTL1 0x0034 | 12 | #define BUS_CNTL1 0x0034 |
13 | #define I2C_CNTL_1 0x0094 | 13 | #define I2C_CNTL_1 0x0094 |
14 | #define CONFIG_CNTL 0x00E0 | 14 | #define CNFG_CNTL 0x00E0 |
15 | #define CONFIG_MEMSIZE 0x00F8 | 15 | #define CNFG_MEMSIZE 0x00F8 |
16 | #define CONFIG_APER_0_BASE 0x0100 | 16 | #define CNFG_APER_0_BASE 0x0100 |
17 | #define CONFIG_APER_1_BASE 0x0104 | 17 | #define CNFG_APER_1_BASE 0x0104 |
18 | #define CONFIG_APER_SIZE 0x0108 | 18 | #define CNFG_APER_SIZE 0x0108 |
19 | #define CONFIG_REG_1_BASE 0x010C | 19 | #define CNFG_REG_1_BASE 0x010C |
20 | #define CONFIG_REG_APER_SIZE 0x0110 | 20 | #define CNFG_REG_APER_SIZE 0x0110 |
21 | #define PAD_AGPINPUT_DELAY 0x0164 | 21 | #define PAD_AGPINPUT_DELAY 0x0164 |
22 | #define PAD_CTLR_STRENGTH 0x0168 | 22 | #define PAD_CTLR_STRENGTH 0x0168 |
23 | #define PAD_CTLR_UPDATE 0x016C | 23 | #define PAD_CTLR_UPDATE 0x016C |
@@ -509,7 +509,7 @@ | |||
509 | /* CLOCK_CNTL_INDEX bit constants */ | 509 | /* CLOCK_CNTL_INDEX bit constants */ |
510 | #define PLL_WR_EN 0x00000080 | 510 | #define PLL_WR_EN 0x00000080 |
511 | 511 | ||
512 | /* CONFIG_CNTL bit constants */ | 512 | /* CNFG_CNTL bit constants */ |
513 | #define CFG_VGA_RAM_EN 0x00000100 | 513 | #define CFG_VGA_RAM_EN 0x00000100 |
514 | #define CFG_ATI_REV_ID_MASK (0xf << 16) | 514 | #define CFG_ATI_REV_ID_MASK (0xf << 16) |
515 | #define CFG_ATI_REV_A11 (0 << 16) | 515 | #define CFG_ATI_REV_A11 (0 << 16) |
@@ -980,7 +980,7 @@ | |||
980 | 980 | ||
981 | /* masks */ | 981 | /* masks */ |
982 | 982 | ||
983 | #define CONFIG_MEMSIZE_MASK 0x1f000000 | 983 | #define CNFG_MEMSIZE_MASK 0x1f000000 |
984 | #define MEM_CFG_TYPE 0x40000000 | 984 | #define MEM_CFG_TYPE 0x40000000 |
985 | #define DST_OFFSET_MASK 0x003fffff | 985 | #define DST_OFFSET_MASK 0x003fffff |
986 | #define DST_PITCH_MASK 0x3fc00000 | 986 | #define DST_PITCH_MASK 0x3fc00000 |