diff options
Diffstat (limited to 'include')
35 files changed, 433 insertions, 183 deletions
diff --git a/include/asm-frv/swab.h b/include/asm-frv/swab.h index afb3396ba5ed..f305834b4799 100644 --- a/include/asm-frv/swab.h +++ b/include/asm-frv/swab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ASM_SWAB_H | 1 | #ifndef _ASM_SWAB_H |
2 | #define _ASM_SWAB_H | 2 | #define _ASM_SWAB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 6 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
7 | # define __SWAB_64_THRU_32__ | 7 | # define __SWAB_64_THRU_32__ |
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/asm-m32r/swab.h b/include/asm-m32r/swab.h index 97973e101825..54dab001d6d1 100644 --- a/include/asm-m32r/swab.h +++ b/include/asm-m32r/swab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ASM_M32R_SWAB_H | 1 | #ifndef _ASM_M32R_SWAB_H |
2 | #define _ASM_M32R_SWAB_H | 2 | #define _ASM_M32R_SWAB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 6 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
7 | # define __SWAB_64_THRU_32__ | 7 | # define __SWAB_64_THRU_32__ |
diff --git a/include/asm-mn10300/swab.h b/include/asm-mn10300/swab.h index 4504d1b4b477..bd818a820ca8 100644 --- a/include/asm-mn10300/swab.h +++ b/include/asm-mn10300/swab.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef _ASM_SWAB_H | 11 | #ifndef _ASM_SWAB_H |
12 | #define _ASM_SWAB_H | 12 | #define _ASM_SWAB_H |
13 | 13 | ||
14 | #include <asm/types.h> | 14 | #include <linux/types.h> |
15 | 15 | ||
16 | #ifdef __GNUC__ | 16 | #ifdef __GNUC__ |
17 | 17 | ||
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/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/coda_psdev.h b/include/linux/coda_psdev.h index 07ae8f846055..5b5d4731f956 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #define CODA_PSDEV_MAJOR 67 | 6 | #define CODA_PSDEV_MAJOR 67 |
7 | #define MAX_CODADEVS 5 /* how many do we allow */ | 7 | #define MAX_CODADEVS 5 /* how many do we allow */ |
8 | 8 | ||
9 | #ifdef __KERNEL__ | ||
9 | struct kstatfs; | 10 | struct kstatfs; |
10 | 11 | ||
11 | /* communication pending/processing queues */ | 12 | /* communication pending/processing queues */ |
@@ -24,7 +25,6 @@ static inline struct venus_comm *coda_vcp(struct super_block *sb) | |||
24 | return (struct venus_comm *)((sb)->s_fs_info); | 25 | return (struct venus_comm *)((sb)->s_fs_info); |
25 | } | 26 | } |
26 | 27 | ||
27 | |||
28 | /* upcalls */ | 28 | /* upcalls */ |
29 | int venus_rootfid(struct super_block *sb, struct CodaFid *fidp); | 29 | int venus_rootfid(struct super_block *sb, struct CodaFid *fidp); |
30 | int venus_getattr(struct super_block *sb, struct CodaFid *fid, | 30 | int venus_getattr(struct super_block *sb, struct CodaFid *fid, |
@@ -64,6 +64,12 @@ int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb); | |||
64 | int venus_fsync(struct super_block *sb, struct CodaFid *fid); | 64 | int venus_fsync(struct super_block *sb, struct CodaFid *fid); |
65 | int venus_statfs(struct dentry *dentry, struct kstatfs *sfs); | 65 | int venus_statfs(struct dentry *dentry, struct kstatfs *sfs); |
66 | 66 | ||
67 | /* | ||
68 | * Statistics | ||
69 | */ | ||
70 | |||
71 | extern struct venus_comm coda_comms[]; | ||
72 | #endif /* __KERNEL__ */ | ||
67 | 73 | ||
68 | /* messages between coda filesystem in kernel and Venus */ | 74 | /* messages between coda filesystem in kernel and Venus */ |
69 | struct upc_req { | 75 | struct upc_req { |
@@ -82,11 +88,4 @@ struct upc_req { | |||
82 | #define REQ_WRITE 0x4 | 88 | #define REQ_WRITE 0x4 |
83 | #define REQ_ABORT 0x8 | 89 | #define REQ_ABORT 0x8 |
84 | 90 | ||
85 | |||
86 | /* | ||
87 | * Statistics | ||
88 | */ | ||
89 | |||
90 | extern struct venus_comm coda_comms[]; | ||
91 | |||
92 | #endif | 91 | #endif |
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/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/in6.h b/include/linux/in6.h index bc492048c349..718bf21c5754 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -44,11 +44,11 @@ struct in6_addr | |||
44 | * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined | 44 | * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined |
45 | * in network byte order, not in host byte order as are the IPv4 equivalents | 45 | * in network byte order, not in host byte order as are the IPv4 equivalents |
46 | */ | 46 | */ |
47 | #ifdef __KERNEL__ | ||
47 | extern const struct in6_addr in6addr_any; | 48 | extern const struct in6_addr in6addr_any; |
48 | #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } | 49 | #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } |
49 | extern const struct in6_addr in6addr_loopback; | 50 | extern const struct in6_addr in6addr_loopback; |
50 | #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } | 51 | #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } |
51 | #ifdef __KERNEL__ | ||
52 | extern const struct in6_addr in6addr_linklocal_allnodes; | 52 | extern const struct in6_addr in6addr_linklocal_allnodes; |
53 | #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ | 53 | #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ |
54 | { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } | 54 | { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,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/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 e8ddc98b8405..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, |
@@ -1305,5 +1304,6 @@ void vmemmap_populate_print_last(void); | |||
1305 | 1304 | ||
1306 | extern void *alloc_locked_buffer(size_t size); | 1305 | extern void *alloc_locked_buffer(size_t size); |
1307 | extern void free_locked_buffer(void *buffer, size_t size); | 1306 | extern void free_locked_buffer(void *buffer, size_t size); |
1307 | extern void release_locked_buffer(void *buffer, size_t size); | ||
1308 | #endif /* __KERNEL__ */ | 1308 | #endif /* __KERNEL__ */ |
1309 | #endif /* _LINUX_MM_H */ | 1309 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/nubus.h b/include/linux/nubus.h index 7382af374731..e137b3c486a7 100644 --- a/include/linux/nubus.h +++ b/include/linux/nubus.h | |||
@@ -237,6 +237,7 @@ struct nubus_dirent | |||
237 | int mask; | 237 | int mask; |
238 | }; | 238 | }; |
239 | 239 | ||
240 | #ifdef __KERNEL__ | ||
240 | struct nubus_board { | 241 | struct nubus_board { |
241 | struct nubus_board* next; | 242 | struct nubus_board* next; |
242 | struct nubus_dev* first_dev; | 243 | struct nubus_dev* first_dev; |
@@ -351,6 +352,7 @@ void nubus_get_rsrc_mem(void* dest, | |||
351 | void nubus_get_rsrc_str(void* dest, | 352 | void nubus_get_rsrc_str(void* dest, |
352 | const struct nubus_dirent *dirent, | 353 | const struct nubus_dirent *dirent, |
353 | int maxlen); | 354 | int maxlen); |
355 | #endif /* __KERNEL__ */ | ||
354 | 356 | ||
355 | /* We'd like to get rid of this eventually. Only daynaport.c uses it now. */ | 357 | /* We'd like to get rid of this eventually. Only daynaport.c uses it now. */ |
356 | static inline void *nubus_slot_addr(int slot) | 358 | static inline void *nubus_slot_addr(int slot) |
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/pkt_sched.h b/include/linux/pkt_sched.h index b2648e8e4987..d51a2b3e221e 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -515,7 +515,7 @@ enum | |||
515 | 515 | ||
516 | struct tc_drr_stats | 516 | struct tc_drr_stats |
517 | { | 517 | { |
518 | u32 deficit; | 518 | __u32 deficit; |
519 | }; | 519 | }; |
520 | 520 | ||
521 | #endif | 521 | #endif |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index bc5114d35e99..e356c99f0659 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -28,8 +28,6 @@ | |||
28 | #include <linux/reiserfs_fs_sb.h> | 28 | #include <linux/reiserfs_fs_sb.h> |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | struct fid; | ||
32 | |||
33 | /* | 31 | /* |
34 | * include/linux/reiser_fs.h | 32 | * include/linux/reiser_fs.h |
35 | * | 33 | * |
@@ -37,6 +35,33 @@ struct fid; | |||
37 | * | 35 | * |
38 | */ | 36 | */ |
39 | 37 | ||
38 | /* ioctl's command */ | ||
39 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) | ||
40 | /* define following flags to be the same as in ext2, so that chattr(1), | ||
41 | lsattr(1) will work with us. */ | ||
42 | #define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS | ||
43 | #define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS | ||
44 | #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION | ||
45 | #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION | ||
46 | |||
47 | #ifdef __KERNEL__ | ||
48 | /* the 32 bit compat definitions with int argument */ | ||
49 | #define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int) | ||
50 | #define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
51 | #define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
52 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
53 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
54 | |||
55 | /* Locking primitives */ | ||
56 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | ||
57 | would evolve into real per-fs locks */ | ||
58 | #define reiserfs_write_lock( sb ) lock_kernel() | ||
59 | #define reiserfs_write_unlock( sb ) unlock_kernel() | ||
60 | |||
61 | /* xattr stuff */ | ||
62 | #define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem) | ||
63 | struct fid; | ||
64 | |||
40 | /* in reading the #defines, it may help to understand that they employ | 65 | /* in reading the #defines, it may help to understand that they employ |
41 | the following abbreviations: | 66 | the following abbreviations: |
42 | 67 | ||
@@ -698,6 +723,7 @@ static inline void cpu_key_k_offset_dec(struct cpu_key *key) | |||
698 | /* object identifier for root dir */ | 723 | /* object identifier for root dir */ |
699 | #define REISERFS_ROOT_OBJECTID 2 | 724 | #define REISERFS_ROOT_OBJECTID 2 |
700 | #define REISERFS_ROOT_PARENT_OBJECTID 1 | 725 | #define REISERFS_ROOT_PARENT_OBJECTID 1 |
726 | |||
701 | extern struct reiserfs_key root_key; | 727 | extern struct reiserfs_key root_key; |
702 | 728 | ||
703 | /* | 729 | /* |
@@ -1540,7 +1566,6 @@ struct reiserfs_iget_args { | |||
1540 | /* FUNCTION DECLARATIONS */ | 1566 | /* FUNCTION DECLARATIONS */ |
1541 | /***************************************************************************/ | 1567 | /***************************************************************************/ |
1542 | 1568 | ||
1543 | /*#ifdef __KERNEL__*/ | ||
1544 | #define get_journal_desc_magic(bh) (bh->b_data + bh->b_size - 12) | 1569 | #define get_journal_desc_magic(bh) (bh->b_data + bh->b_size - 12) |
1545 | 1570 | ||
1546 | #define journal_trans_half(blocksize) \ | 1571 | #define journal_trans_half(blocksize) \ |
@@ -2178,29 +2203,6 @@ long reiserfs_compat_ioctl(struct file *filp, | |||
2178 | unsigned int cmd, unsigned long arg); | 2203 | unsigned int cmd, unsigned long arg); |
2179 | int reiserfs_unpack(struct inode *inode, struct file *filp); | 2204 | int reiserfs_unpack(struct inode *inode, struct file *filp); |
2180 | 2205 | ||
2181 | /* ioctl's command */ | ||
2182 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) | ||
2183 | /* define following flags to be the same as in ext2, so that chattr(1), | ||
2184 | lsattr(1) will work with us. */ | ||
2185 | #define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS | ||
2186 | #define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS | ||
2187 | #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION | ||
2188 | #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION | ||
2189 | |||
2190 | /* the 32 bit compat definitions with int argument */ | ||
2191 | #define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int) | ||
2192 | #define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
2193 | #define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
2194 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
2195 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
2196 | |||
2197 | /* Locking primitives */ | ||
2198 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | ||
2199 | would evolve into real per-fs locks */ | ||
2200 | #define reiserfs_write_lock( sb ) lock_kernel() | ||
2201 | #define reiserfs_write_unlock( sb ) unlock_kernel() | ||
2202 | |||
2203 | /* xattr stuff */ | ||
2204 | #define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem) | ||
2205 | 2206 | ||
2207 | #endif /* __KERNEL__ */ | ||
2206 | #endif /* _LINUX_REISER_FS_H */ | 2208 | #endif /* _LINUX_REISER_FS_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2127e959e0f4..f0a50b20e8a0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -443,7 +443,6 @@ struct pacct_struct { | |||
443 | * @utime: time spent in user mode, in &cputime_t units | 443 | * @utime: time spent in user mode, in &cputime_t units |
444 | * @stime: time spent in kernel mode, in &cputime_t units | 444 | * @stime: time spent in kernel mode, in &cputime_t units |
445 | * @sum_exec_runtime: total time spent on the CPU, in nanoseconds | 445 | * @sum_exec_runtime: total time spent on the CPU, in nanoseconds |
446 | * @lock: lock for fields in this struct | ||
447 | * | 446 | * |
448 | * This structure groups together three kinds of CPU time that are | 447 | * This structure groups together three kinds of CPU time that are |
449 | * tracked for threads and thread groups. Most things considering | 448 | * tracked for threads and thread groups. Most things considering |
@@ -454,23 +453,33 @@ struct task_cputime { | |||
454 | cputime_t utime; | 453 | cputime_t utime; |
455 | cputime_t stime; | 454 | cputime_t stime; |
456 | unsigned long long sum_exec_runtime; | 455 | unsigned long long sum_exec_runtime; |
457 | spinlock_t lock; | ||
458 | }; | 456 | }; |
459 | /* Alternate field names when used to cache expirations. */ | 457 | /* Alternate field names when used to cache expirations. */ |
460 | #define prof_exp stime | 458 | #define prof_exp stime |
461 | #define virt_exp utime | 459 | #define virt_exp utime |
462 | #define sched_exp sum_exec_runtime | 460 | #define sched_exp sum_exec_runtime |
463 | 461 | ||
462 | #define INIT_CPUTIME \ | ||
463 | (struct task_cputime) { \ | ||
464 | .utime = cputime_zero, \ | ||
465 | .stime = cputime_zero, \ | ||
466 | .sum_exec_runtime = 0, \ | ||
467 | } | ||
468 | |||
464 | /** | 469 | /** |
465 | * struct thread_group_cputime - thread group interval timer counts | 470 | * struct thread_group_cputimer - thread group interval timer counts |
466 | * @totals: thread group interval timers; substructure for | 471 | * @cputime: thread group interval timers. |
467 | * 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. | ||
468 | * | 475 | * |
469 | * This structure contains the version of task_cputime, above, that is | 476 | * This structure contains the version of task_cputime, above, that is |
470 | * used for thread group CPU clock calculations. | 477 | * used for thread group CPU timer calculations. |
471 | */ | 478 | */ |
472 | struct thread_group_cputime { | 479 | struct thread_group_cputimer { |
473 | struct task_cputime totals; | 480 | struct task_cputime cputime; |
481 | int running; | ||
482 | spinlock_t lock; | ||
474 | }; | 483 | }; |
475 | 484 | ||
476 | /* | 485 | /* |
@@ -519,10 +528,10 @@ struct signal_struct { | |||
519 | cputime_t it_prof_incr, it_virt_incr; | 528 | cputime_t it_prof_incr, it_virt_incr; |
520 | 529 | ||
521 | /* | 530 | /* |
522 | * Thread group totals for process CPU clocks. | 531 | * Thread group totals for process CPU timers. |
523 | * See thread_group_cputime(), et al, for details. | 532 | * See thread_group_cputimer(), et al, for details. |
524 | */ | 533 | */ |
525 | struct thread_group_cputime cputime; | 534 | struct thread_group_cputimer cputimer; |
526 | 535 | ||
527 | /* Earliest-expiration cache. */ | 536 | /* Earliest-expiration cache. */ |
528 | struct task_cputime cputime_expires; | 537 | struct task_cputime cputime_expires; |
@@ -559,7 +568,7 @@ struct signal_struct { | |||
559 | * Live threads maintain their own counters and add to these | 568 | * Live threads maintain their own counters and add to these |
560 | * in __exit_signal, except for the group leader. | 569 | * in __exit_signal, except for the group leader. |
561 | */ | 570 | */ |
562 | cputime_t cutime, cstime; | 571 | cputime_t utime, stime, cutime, cstime; |
563 | cputime_t gtime; | 572 | cputime_t gtime; |
564 | cputime_t cgtime; | 573 | cputime_t cgtime; |
565 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 574 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
@@ -568,6 +577,14 @@ struct signal_struct { | |||
568 | struct task_io_accounting ioac; | 577 | struct task_io_accounting ioac; |
569 | 578 | ||
570 | /* | 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 | /* | ||
571 | * 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, |
572 | * because there is no reader checking a limit that actually needs | 589 | * because there is no reader checking a limit that actually needs |
573 | * 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 |
@@ -1161,10 +1178,9 @@ struct task_struct { | |||
1161 | pid_t pid; | 1178 | pid_t pid; |
1162 | pid_t tgid; | 1179 | pid_t tgid; |
1163 | 1180 | ||
1164 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
1165 | /* Canary value for the -fstack-protector gcc feature */ | 1181 | /* Canary value for the -fstack-protector gcc feature */ |
1166 | unsigned long stack_canary; | 1182 | unsigned long stack_canary; |
1167 | #endif | 1183 | |
1168 | /* | 1184 | /* |
1169 | * pointers to (original) parent process, youngest child, younger sibling, | 1185 | * pointers to (original) parent process, youngest child, younger sibling, |
1170 | * older sibling, respectively. (p->father can be replaced with | 1186 | * older sibling, respectively. (p->father can be replaced with |
@@ -2070,6 +2086,19 @@ static inline int object_is_on_stack(void *obj) | |||
2070 | 2086 | ||
2071 | extern void thread_info_cache_init(void); | 2087 | extern void thread_info_cache_init(void); |
2072 | 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 | |||
2073 | /* set thread flags in other task's structures | 2102 | /* set thread flags in other task's structures |
2074 | * - see asm/thread_info.h for TIF_xxxx flags available | 2103 | * - see asm/thread_info.h for TIF_xxxx flags available |
2075 | */ | 2104 | */ |
@@ -2183,27 +2212,14 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
2183 | /* | 2212 | /* |
2184 | * Thread group CPU time accounting. | 2213 | * Thread group CPU time accounting. |
2185 | */ | 2214 | */ |
2186 | 2215 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | |
2187 | static inline | 2216 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); |
2188 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times) | ||
2189 | { | ||
2190 | struct task_cputime *totals = &tsk->signal->cputime.totals; | ||
2191 | unsigned long flags; | ||
2192 | |||
2193 | spin_lock_irqsave(&totals->lock, flags); | ||
2194 | *times = *totals; | ||
2195 | spin_unlock_irqrestore(&totals->lock, flags); | ||
2196 | } | ||
2197 | 2217 | ||
2198 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2218 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
2199 | { | 2219 | { |
2200 | sig->cputime.totals = (struct task_cputime){ | 2220 | sig->cputimer.cputime = INIT_CPUTIME; |
2201 | .utime = cputime_zero, | 2221 | spin_lock_init(&sig->cputimer.lock); |
2202 | .stime = cputime_zero, | 2222 | sig->cputimer.running = 0; |
2203 | .sum_exec_runtime = 0, | ||
2204 | }; | ||
2205 | |||
2206 | spin_lock_init(&sig->cputime.totals.lock); | ||
2207 | } | 2223 | } |
2208 | 2224 | ||
2209 | 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/socket.h b/include/linux/socket.h index 20fc4bbfca42..afc01909a428 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -24,10 +24,12 @@ struct __kernel_sockaddr_storage { | |||
24 | #include <linux/types.h> /* pid_t */ | 24 | #include <linux/types.h> /* pid_t */ |
25 | #include <linux/compiler.h> /* __user */ | 25 | #include <linux/compiler.h> /* __user */ |
26 | 26 | ||
27 | #ifdef CONFIG_PROC_FS | 27 | #ifdef __KERNEL__ |
28 | # ifdef CONFIG_PROC_FS | ||
28 | struct seq_file; | 29 | struct seq_file; |
29 | extern void socket_seq_show(struct seq_file *seq); | 30 | extern void socket_seq_show(struct seq_file *seq); |
30 | #endif | 31 | # endif |
32 | #endif /* __KERNEL__ */ | ||
31 | 33 | ||
32 | typedef unsigned short sa_family_t; | 34 | typedef unsigned short sa_family_t; |
33 | 35 | ||
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index 523d069c862c..1904afedb82f 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h | |||
@@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table { | |||
1045 | */ | 1045 | */ |
1046 | #define LOCL_STARTAUDIO 1 | 1046 | #define LOCL_STARTAUDIO 1 |
1047 | 1047 | ||
1048 | #if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) | 1048 | #if !defined(__KERNEL__) || defined(USE_SEQ_MACROS) |
1049 | /* | 1049 | /* |
1050 | * Some convenience macros to simplify programming of the | 1050 | * Some convenience macros to simplify programming of the |
1051 | * /dev/sequencer interface | 1051 | * /dev/sequencer interface |
1052 | * | 1052 | * |
1053 | * These macros define the API which should be used when possible. | 1053 | * This is a legacy interface for applications written against |
1054 | * the OSSlib-3.8 style interface. It is no longer possible | ||
1055 | * to actually link against OSSlib with this header, but we | ||
1056 | * still provide these macros for programs using them. | ||
1057 | * | ||
1058 | * If you want to use OSSlib, it is recommended that you get | ||
1059 | * the GPL version of OSS-4.x and build against that version | ||
1060 | * of the header. | ||
1061 | * | ||
1062 | * We redefine the extern keyword so that make headers_check | ||
1063 | * does not complain about SEQ_USE_EXTBUF. | ||
1054 | */ | 1064 | */ |
1055 | #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() | 1065 | #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() |
1056 | 1066 | ||
1057 | void seqbuf_dump(void); /* This function must be provided by programs */ | 1067 | void seqbuf_dump(void); /* This function must be provided by programs */ |
1058 | 1068 | ||
1059 | extern int OSS_init(int seqfd, int buflen); | ||
1060 | extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen); | ||
1061 | extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen); | ||
1062 | extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen); | ||
1063 | extern void OSS_patch_caching(int dev, int chn, int patch, | ||
1064 | int fd, unsigned char *buf, int buflen); | ||
1065 | extern void OSS_drum_caching(int dev, int chn, int patch, | ||
1066 | int fd, unsigned char *buf, int buflen); | ||
1067 | extern void OSS_write_patch(int fd, unsigned char *buf, int len); | ||
1068 | extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | ||
1069 | |||
1070 | #define SEQ_PM_DEFINES int __foo_bar___ | 1069 | #define SEQ_PM_DEFINES int __foo_bar___ |
1071 | #ifdef OSSLIB | 1070 | |
1072 | # define SEQ_USE_EXTBUF() \ | 1071 | #define SEQ_LOAD_GMINSTR(dev, instr) |
1073 | extern unsigned char *_seqbuf; \ | 1072 | #define SEQ_LOAD_GMDRUM(dev, drum) |
1074 | extern int _seqbuflen;extern int _seqbufptr | 1073 | |
1075 | # define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len | 1074 | #define _SEQ_EXTERN extern |
1076 | # define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen) | 1075 | #define SEQ_USE_EXTBUF() \ |
1077 | # define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen) | 1076 | _SEQ_EXTERN unsigned char _seqbuf[]; \ |
1078 | # define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen) | 1077 | _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr |
1079 | |||
1080 | # define SEQ_LOAD_GMINSTR(dev, instr) \ | ||
1081 | OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen) | ||
1082 | # define SEQ_LOAD_GMDRUM(dev, drum) \ | ||
1083 | OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen) | ||
1084 | #else /* !OSSLIB */ | ||
1085 | |||
1086 | # define SEQ_LOAD_GMINSTR(dev, instr) | ||
1087 | # define SEQ_LOAD_GMDRUM(dev, drum) | ||
1088 | |||
1089 | # define SEQ_USE_EXTBUF() \ | ||
1090 | extern unsigned char _seqbuf[]; \ | ||
1091 | extern int _seqbuflen;extern int _seqbufptr | ||
1092 | 1078 | ||
1093 | #ifndef USE_SIMPLE_MACROS | 1079 | #ifndef USE_SIMPLE_MACROS |
1094 | /* Sample seqbuf_dump() implementation: | 1080 | /* Sample seqbuf_dump() implementation: |
@@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
1131 | */ | 1117 | */ |
1132 | #define _SEQ_NEEDBUF(len) /* empty */ | 1118 | #define _SEQ_NEEDBUF(len) /* empty */ |
1133 | #endif | 1119 | #endif |
1134 | #endif /* !OSSLIB */ | ||
1135 | 1120 | ||
1136 | #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ | 1121 | #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ |
1137 | _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ | 1122 | _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ |
@@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
1215 | _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) | 1200 | _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) |
1216 | 1201 | ||
1217 | #define SEQ_SET_PATCH SEQ_PGM_CHANGE | 1202 | #define SEQ_SET_PATCH SEQ_PGM_CHANGE |
1218 | #ifdef OSSLIB | 1203 | #define SEQ_PGM_CHANGE(dev, chn, patch) \ |
1219 | # define SEQ_PGM_CHANGE(dev, chn, patch) \ | ||
1220 | {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \ | ||
1221 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);} | ||
1222 | #else | ||
1223 | # define SEQ_PGM_CHANGE(dev, chn, patch) \ | ||
1224 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) | 1204 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) |
1225 | #endif | ||
1226 | 1205 | ||
1227 | #define SEQ_CONTROL(dev, chn, controller, value) \ | 1206 | #define SEQ_CONTROL(dev, chn, controller, value) \ |
1228 | _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) | 1207 | _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) |
@@ -1300,19 +1279,12 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
1300 | /* | 1279 | /* |
1301 | * Patch loading. | 1280 | * Patch loading. |
1302 | */ | 1281 | */ |
1303 | #ifdef OSSLIB | 1282 | #define SEQ_WRPATCH(patchx, len) \ |
1304 | # define SEQ_WRPATCH(patchx, len) \ | ||
1305 | OSS_write_patch(seqfd, (char*)(patchx), len) | ||
1306 | # define SEQ_WRPATCH2(patchx, len) \ | ||
1307 | OSS_write_patch2(seqfd, (char*)(patchx), len) | ||
1308 | #else | ||
1309 | # define SEQ_WRPATCH(patchx, len) \ | ||
1310 | {if (_seqbufptr) SEQ_DUMPBUF();\ | 1283 | {if (_seqbufptr) SEQ_DUMPBUF();\ |
1311 | if (write(seqfd, (char*)(patchx), len)==-1) \ | 1284 | if (write(seqfd, (char*)(patchx), len)==-1) \ |
1312 | perror("Write patch: /dev/sequencer");} | 1285 | perror("Write patch: /dev/sequencer");} |
1313 | # define SEQ_WRPATCH2(patchx, len) \ | 1286 | #define SEQ_WRPATCH2(patchx, len) \ |
1314 | (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) | 1287 | (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) |
1315 | #endif | ||
1316 | 1288 | ||
1317 | #endif | 1289 | #endif |
1318 | #endif | 1290 | #endif |
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/types.h b/include/linux/types.h index 712ca53bc348..fca82ed55f49 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef _LINUX_TYPES_H | 1 | #ifndef _LINUX_TYPES_H |
2 | #define _LINUX_TYPES_H | 2 | #define _LINUX_TYPES_H |
3 | 3 | ||
4 | #include <asm/types.h> | ||
5 | |||
6 | #ifndef __ASSEMBLY__ | ||
4 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
5 | 8 | ||
6 | #define DECLARE_BITMAP(name,bits) \ | 9 | #define DECLARE_BITMAP(name,bits) \ |
@@ -9,7 +12,6 @@ | |||
9 | #endif | 12 | #endif |
10 | 13 | ||
11 | #include <linux/posix_types.h> | 14 | #include <linux/posix_types.h> |
12 | #include <asm/types.h> | ||
13 | 15 | ||
14 | #ifndef __KERNEL_STRICT_NAMES | 16 | #ifndef __KERNEL_STRICT_NAMES |
15 | 17 | ||
@@ -212,5 +214,5 @@ struct ustat { | |||
212 | }; | 214 | }; |
213 | 215 | ||
214 | #endif /* __KERNEL__ */ | 216 | #endif /* __KERNEL__ */ |
215 | 217 | #endif /* __ASSEMBLY__ */ | |
216 | #endif /* _LINUX_TYPES_H */ | 218 | #endif /* _LINUX_TYPES_H */ |
diff --git a/include/net/sock.h b/include/net/sock.h index 5a3a151bd730..ce3b5b622683 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1308,7 +1308,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1308 | 1308 | ||
1309 | static inline gfp_t gfp_any(void) | 1309 | static inline gfp_t gfp_any(void) |
1310 | { | 1310 | { |
1311 | return in_atomic() ? GFP_ATOMIC : GFP_KERNEL; | 1311 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; |
1312 | } | 1312 | } |
1313 | 1313 | ||
1314 | static inline long sock_rcvtimeo(const struct sock *sk, int noblock) | 1314 | static inline long sock_rcvtimeo(const struct sock *sk, int noblock) |