diff options
Diffstat (limited to 'include')
56 files changed, 673 insertions, 461 deletions
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h index 46d696b331e7..296c35cfb207 100644 --- a/include/asm-frv/atomic.h +++ b/include/asm-frv/atomic.h | |||
@@ -35,10 +35,6 @@ | |||
35 | #define smp_mb__before_atomic_inc() barrier() | 35 | #define smp_mb__before_atomic_inc() barrier() |
36 | #define smp_mb__after_atomic_inc() barrier() | 36 | #define smp_mb__after_atomic_inc() barrier() |
37 | 37 | ||
38 | typedef struct { | ||
39 | int counter; | ||
40 | } atomic_t; | ||
41 | |||
42 | #define ATOMIC_INIT(i) { (i) } | 38 | #define ATOMIC_INIT(i) { (i) } |
43 | #define atomic_read(v) ((v)->counter) | 39 | #define atomic_read(v) ((v)->counter) |
44 | #define atomic_set(v, i) (((v)->counter) = (i)) | 40 | #define atomic_set(v, i) (((v)->counter) = (i)) |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 8af276361bf2..37b82cb96c89 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -28,6 +28,17 @@ struct bug_entry { | |||
28 | #define BUGFLAG_WARNING (1<<0) | 28 | #define BUGFLAG_WARNING (1<<0) |
29 | #endif /* CONFIG_GENERIC_BUG */ | 29 | #endif /* CONFIG_GENERIC_BUG */ |
30 | 30 | ||
31 | /* | ||
32 | * Don't use BUG() or BUG_ON() unless there's really no way out; one | ||
33 | * example might be detecting data structure corruption in the middle | ||
34 | * of an operation that can't be backed out of. If the (sub)system | ||
35 | * can somehow continue operating, perhaps with reduced functionality, | ||
36 | * it's probably not BUG-worthy. | ||
37 | * | ||
38 | * If you're tempted to BUG(), think again: is completely giving up | ||
39 | * really the *only* solution? There are usually better options, where | ||
40 | * users don't need to reboot ASAP and can mostly shut down cleanly. | ||
41 | */ | ||
31 | #ifndef HAVE_ARCH_BUG | 42 | #ifndef HAVE_ARCH_BUG |
32 | #define BUG() do { \ | 43 | #define BUG() do { \ |
33 | printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ | 44 | printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ |
@@ -39,6 +50,12 @@ struct bug_entry { | |||
39 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0) | 50 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0) |
40 | #endif | 51 | #endif |
41 | 52 | ||
53 | /* | ||
54 | * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report | ||
55 | * significant issues that need prompt attention if they should ever | ||
56 | * appear at runtime. Use the versions with printk format strings | ||
57 | * to provide better diagnostics. | ||
58 | */ | ||
42 | #ifndef __WARN | 59 | #ifndef __WARN |
43 | #ifndef __ASSEMBLY__ | 60 | #ifndef __ASSEMBLY__ |
44 | extern void warn_slowpath(const char *file, const int line, | 61 | extern void warn_slowpath(const char *file, const int line, |
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index 33d7d04e4119..dbd6150763e9 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_GENERIC_LOCAL_H | 2 | #define _ASM_GENERIC_LOCAL_H |
3 | 3 | ||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | #include <linux/hardirq.h> | ||
6 | #include <asm/atomic.h> | 5 | #include <asm/atomic.h> |
7 | #include <asm/types.h> | 6 | #include <asm/types.h> |
8 | 7 | ||
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 36fa286adad5..4c8d0afae711 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h | |||
@@ -69,15 +69,8 @@ | |||
69 | }) | 69 | }) |
70 | #endif /* CONFIG_FLATMEM/DISCONTIGMEM/SPARSEMEM */ | 70 | #endif /* CONFIG_FLATMEM/DISCONTIGMEM/SPARSEMEM */ |
71 | 71 | ||
72 | #ifdef CONFIG_OUT_OF_LINE_PFN_TO_PAGE | ||
73 | struct page; | ||
74 | /* this is useful when inlined pfn_to_page is too big */ | ||
75 | extern struct page *pfn_to_page(unsigned long pfn); | ||
76 | extern unsigned long page_to_pfn(struct page *page); | ||
77 | #else | ||
78 | #define page_to_pfn __page_to_pfn | 72 | #define page_to_pfn __page_to_pfn |
79 | #define pfn_to_page __pfn_to_page | 73 | #define pfn_to_page __pfn_to_page |
80 | #endif /* CONFIG_OUT_OF_LINE_PFN_TO_PAGE */ | ||
81 | 74 | ||
82 | #endif /* __ASSEMBLY__ */ | 75 | #endif /* __ASSEMBLY__ */ |
83 | 76 | ||
diff --git a/include/asm-m32r/atomic.h b/include/asm-m32r/atomic.h index 3a38ffe4a4f4..2eed30f84080 100644 --- a/include/asm-m32r/atomic.h +++ b/include/asm-m32r/atomic.h | |||
@@ -9,6 +9,7 @@ | |||
9 | * Copyright (C) 2004 Hirokazu Takata <takata at linux-m32r.org> | 9 | * Copyright (C) 2004 Hirokazu Takata <takata at linux-m32r.org> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/types.h> | ||
12 | #include <asm/assembler.h> | 13 | #include <asm/assembler.h> |
13 | #include <asm/system.h> | 14 | #include <asm/system.h> |
14 | 15 | ||
@@ -17,13 +18,6 @@ | |||
17 | * resource counting etc.. | 18 | * resource counting etc.. |
18 | */ | 19 | */ |
19 | 20 | ||
20 | /* | ||
21 | * Make sure gcc doesn't try to be clever and move things around | ||
22 | * on us. We need to use _exactly_ the address the user gave us, | ||
23 | * not some alias that contains the same information. | ||
24 | */ | ||
25 | typedef struct { volatile int counter; } atomic_t; | ||
26 | |||
27 | #define ATOMIC_INIT(i) { (i) } | 21 | #define ATOMIC_INIT(i) { (i) } |
28 | 22 | ||
29 | /** | 23 | /** |
diff --git a/include/asm-m68k/atomic.h b/include/asm-m68k/atomic.h index 4915294fea63..eb0ab9d4ee77 100644 --- a/include/asm-m68k/atomic.h +++ b/include/asm-m68k/atomic.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ARCH_M68K_ATOMIC__ | 1 | #ifndef __ARCH_M68K_ATOMIC__ |
2 | #define __ARCH_M68K_ATOMIC__ | 2 | #define __ARCH_M68K_ATOMIC__ |
3 | 3 | ||
4 | 4 | #include <linux/types.h> | |
5 | #include <asm/system.h> | 5 | #include <asm/system.h> |
6 | 6 | ||
7 | /* | 7 | /* |
@@ -13,7 +13,6 @@ | |||
13 | * We do not have SMP m68k systems, so we don't have to deal with that. | 13 | * We do not have SMP m68k systems, so we don't have to deal with that. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | typedef struct { int counter; } atomic_t; | ||
17 | #define ATOMIC_INIT(i) { (i) } | 16 | #define ATOMIC_INIT(i) { (i) } |
18 | 17 | ||
19 | #define atomic_read(v) ((v)->counter) | 18 | #define atomic_read(v) ((v)->counter) |
diff --git a/include/asm-mn10300/atomic.h b/include/asm-mn10300/atomic.h index 27c9690b9574..bc064825f9b1 100644 --- a/include/asm-mn10300/atomic.h +++ b/include/asm-mn10300/atomic.h | |||
@@ -20,15 +20,6 @@ | |||
20 | * resource counting etc.. | 20 | * resource counting etc.. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | ||
24 | * Make sure gcc doesn't try to be clever and move things around | ||
25 | * on us. We need to use _exactly_ the address the user gave us, | ||
26 | * not some alias that contains the same information. | ||
27 | */ | ||
28 | typedef struct { | ||
29 | int counter; | ||
30 | } atomic_t; | ||
31 | |||
32 | #define ATOMIC_INIT(i) { (i) } | 23 | #define ATOMIC_INIT(i) { (i) } |
33 | 24 | ||
34 | #ifdef __KERNEL__ | 25 | #ifdef __KERNEL__ |
diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index b3b23540f14d..67ad67bed8c1 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h | |||
@@ -14,8 +14,7 @@ | |||
14 | #define _XTENSA_ATOMIC_H | 14 | #define _XTENSA_ATOMIC_H |
15 | 15 | ||
16 | #include <linux/stringify.h> | 16 | #include <linux/stringify.h> |
17 | 17 | #include <linux/types.h> | |
18 | typedef struct { volatile int counter; } atomic_t; | ||
19 | 18 | ||
20 | #ifdef __KERNEL__ | 19 | #ifdef __KERNEL__ |
21 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
diff --git a/include/linux/auto_dev-ioctl.h b/include/linux/auto_dev-ioctl.h index f4d05ccd731f..91a773993a5c 100644 --- a/include/linux/auto_dev-ioctl.h +++ b/include/linux/auto_dev-ioctl.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #ifndef _LINUX_AUTO_DEV_IOCTL_H | 10 | #ifndef _LINUX_AUTO_DEV_IOCTL_H |
11 | #define _LINUX_AUTO_DEV_IOCTL_H | 11 | #define _LINUX_AUTO_DEV_IOCTL_H |
12 | 12 | ||
13 | #include <linux/string.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | 15 | ||
15 | #define AUTOFS_DEVICE_NAME "autofs" | 16 | #define AUTOFS_DEVICE_NAME "autofs" |
@@ -25,6 +26,60 @@ | |||
25 | * An ioctl interface for autofs mount point control. | 26 | * An ioctl interface for autofs mount point control. |
26 | */ | 27 | */ |
27 | 28 | ||
29 | struct args_protover { | ||
30 | __u32 version; | ||
31 | }; | ||
32 | |||
33 | struct args_protosubver { | ||
34 | __u32 sub_version; | ||
35 | }; | ||
36 | |||
37 | struct args_openmount { | ||
38 | __u32 devid; | ||
39 | }; | ||
40 | |||
41 | struct args_ready { | ||
42 | __u32 token; | ||
43 | }; | ||
44 | |||
45 | struct args_fail { | ||
46 | __u32 token; | ||
47 | __s32 status; | ||
48 | }; | ||
49 | |||
50 | struct args_setpipefd { | ||
51 | __s32 pipefd; | ||
52 | }; | ||
53 | |||
54 | struct args_timeout { | ||
55 | __u64 timeout; | ||
56 | }; | ||
57 | |||
58 | struct args_requester { | ||
59 | __u32 uid; | ||
60 | __u32 gid; | ||
61 | }; | ||
62 | |||
63 | struct args_expire { | ||
64 | __u32 how; | ||
65 | }; | ||
66 | |||
67 | struct args_askumount { | ||
68 | __u32 may_umount; | ||
69 | }; | ||
70 | |||
71 | struct args_ismountpoint { | ||
72 | union { | ||
73 | struct args_in { | ||
74 | __u32 type; | ||
75 | } in; | ||
76 | struct args_out { | ||
77 | __u32 devid; | ||
78 | __u32 magic; | ||
79 | } out; | ||
80 | }; | ||
81 | }; | ||
82 | |||
28 | /* | 83 | /* |
29 | * All the ioctls use this structure. | 84 | * All the ioctls use this structure. |
30 | * When sending a path size must account for the total length | 85 | * When sending a path size must account for the total length |
@@ -39,20 +94,32 @@ struct autofs_dev_ioctl { | |||
39 | * including this struct */ | 94 | * including this struct */ |
40 | __s32 ioctlfd; /* automount command fd */ | 95 | __s32 ioctlfd; /* automount command fd */ |
41 | 96 | ||
42 | __u32 arg1; /* Command parameters */ | 97 | /* Command parameters */ |
43 | __u32 arg2; | 98 | |
99 | union { | ||
100 | struct args_protover protover; | ||
101 | struct args_protosubver protosubver; | ||
102 | struct args_openmount openmount; | ||
103 | struct args_ready ready; | ||
104 | struct args_fail fail; | ||
105 | struct args_setpipefd setpipefd; | ||
106 | struct args_timeout timeout; | ||
107 | struct args_requester requester; | ||
108 | struct args_expire expire; | ||
109 | struct args_askumount askumount; | ||
110 | struct args_ismountpoint ismountpoint; | ||
111 | }; | ||
44 | 112 | ||
45 | char path[0]; | 113 | char path[0]; |
46 | }; | 114 | }; |
47 | 115 | ||
48 | static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) | 116 | static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) |
49 | { | 117 | { |
118 | memset(in, 0, sizeof(struct autofs_dev_ioctl)); | ||
50 | in->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR; | 119 | in->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR; |
51 | in->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR; | 120 | in->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR; |
52 | in->size = sizeof(struct autofs_dev_ioctl); | 121 | in->size = sizeof(struct autofs_dev_ioctl); |
53 | in->ioctlfd = -1; | 122 | in->ioctlfd = -1; |
54 | in->arg1 = 0; | ||
55 | in->arg2 = 0; | ||
56 | return; | 123 | return; |
57 | } | 124 | } |
58 | 125 | ||
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index 2253716d4b92..55fa478bd639 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
@@ -29,10 +29,64 @@ | |||
29 | #define AUTOFS_EXP_IMMEDIATE 1 | 29 | #define AUTOFS_EXP_IMMEDIATE 1 |
30 | #define AUTOFS_EXP_LEAVES 2 | 30 | #define AUTOFS_EXP_LEAVES 2 |
31 | 31 | ||
32 | #define AUTOFS_TYPE_ANY 0x0000 | 32 | #define AUTOFS_TYPE_ANY 0U |
33 | #define AUTOFS_TYPE_INDIRECT 0x0001 | 33 | #define AUTOFS_TYPE_INDIRECT 1U |
34 | #define AUTOFS_TYPE_DIRECT 0x0002 | 34 | #define AUTOFS_TYPE_DIRECT 2U |
35 | #define AUTOFS_TYPE_OFFSET 0x0004 | 35 | #define AUTOFS_TYPE_OFFSET 4U |
36 | |||
37 | static inline void set_autofs_type_indirect(unsigned int *type) | ||
38 | { | ||
39 | *type = AUTOFS_TYPE_INDIRECT; | ||
40 | return; | ||
41 | } | ||
42 | |||
43 | static inline unsigned int autofs_type_indirect(unsigned int type) | ||
44 | { | ||
45 | return (type == AUTOFS_TYPE_INDIRECT); | ||
46 | } | ||
47 | |||
48 | static inline void set_autofs_type_direct(unsigned int *type) | ||
49 | { | ||
50 | *type = AUTOFS_TYPE_DIRECT; | ||
51 | return; | ||
52 | } | ||
53 | |||
54 | static inline unsigned int autofs_type_direct(unsigned int type) | ||
55 | { | ||
56 | return (type == AUTOFS_TYPE_DIRECT); | ||
57 | } | ||
58 | |||
59 | static inline void set_autofs_type_offset(unsigned int *type) | ||
60 | { | ||
61 | *type = AUTOFS_TYPE_OFFSET; | ||
62 | return; | ||
63 | } | ||
64 | |||
65 | static inline unsigned int autofs_type_offset(unsigned int type) | ||
66 | { | ||
67 | return (type == AUTOFS_TYPE_OFFSET); | ||
68 | } | ||
69 | |||
70 | static inline unsigned int autofs_type_trigger(unsigned int type) | ||
71 | { | ||
72 | return (type == AUTOFS_TYPE_DIRECT || type == AUTOFS_TYPE_OFFSET); | ||
73 | } | ||
74 | |||
75 | /* | ||
76 | * This isn't really a type as we use it to say "no type set" to | ||
77 | * indicate we want to search for "any" mount in the | ||
78 | * autofs_dev_ioctl_ismountpoint() device ioctl function. | ||
79 | */ | ||
80 | static inline void set_autofs_type_any(unsigned int *type) | ||
81 | { | ||
82 | *type = AUTOFS_TYPE_ANY; | ||
83 | return; | ||
84 | } | ||
85 | |||
86 | static inline unsigned int autofs_type_any(unsigned int type) | ||
87 | { | ||
88 | return (type == AUTOFS_TYPE_ANY); | ||
89 | } | ||
36 | 90 | ||
37 | /* Daemon notification packet types */ | 91 | /* Daemon notification packet types */ |
38 | enum autofs_notify { | 92 | enum autofs_notify { |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 6cbfbe297180..77b4a9e46004 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -18,6 +18,7 @@ struct pt_regs; | |||
18 | #define BINPRM_BUF_SIZE 128 | 18 | #define BINPRM_BUF_SIZE 128 |
19 | 19 | ||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | #include <linux/list.h> | ||
21 | 22 | ||
22 | #define CORENAME_MAX_SIZE 128 | 23 | #define CORENAME_MAX_SIZE 128 |
23 | 24 | ||
@@ -106,7 +107,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm, | |||
106 | extern int bprm_mm_init(struct linux_binprm *bprm); | 107 | extern int bprm_mm_init(struct linux_binprm *bprm); |
107 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | 108 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); |
108 | extern void install_exec_creds(struct linux_binprm *bprm); | 109 | extern void install_exec_creds(struct linux_binprm *bprm); |
109 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); | 110 | extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); |
110 | extern int set_binfmt(struct linux_binfmt *new); | 111 | extern int set_binfmt(struct linux_binfmt *new); |
111 | extern void free_bprm(struct linux_binprm *); | 112 | extern void free_bprm(struct linux_binprm *); |
112 | 113 | ||
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 1164963c3a85..08b78c09b09a 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -329,13 +329,7 @@ struct cgroup_subsys { | |||
329 | struct cgroup *cgrp); | 329 | struct cgroup *cgrp); |
330 | void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 330 | void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
331 | void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); | 331 | void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); |
332 | /* | 332 | |
333 | * This routine is called with the task_lock of mm->owner held | ||
334 | */ | ||
335 | void (*mm_owner_changed)(struct cgroup_subsys *ss, | ||
336 | struct cgroup *old, | ||
337 | struct cgroup *new, | ||
338 | struct task_struct *p); | ||
339 | int subsys_id; | 333 | int subsys_id; |
340 | int active; | 334 | int active; |
341 | int disabled; | 335 | int disabled; |
@@ -400,9 +394,6 @@ void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); | |||
400 | int cgroup_scan_tasks(struct cgroup_scanner *scan); | 394 | int cgroup_scan_tasks(struct cgroup_scanner *scan); |
401 | int cgroup_attach_task(struct cgroup *, struct task_struct *); | 395 | int cgroup_attach_task(struct cgroup *, struct task_struct *); |
402 | 396 | ||
403 | void cgroup_mm_owner_callbacks(struct task_struct *old, | ||
404 | struct task_struct *new); | ||
405 | |||
406 | #else /* !CONFIG_CGROUPS */ | 397 | #else /* !CONFIG_CGROUPS */ |
407 | 398 | ||
408 | static inline int cgroup_init_early(void) { return 0; } | 399 | static inline int cgroup_init_early(void) { return 0; } |
@@ -420,9 +411,6 @@ static inline int cgroupstats_build(struct cgroupstats *stats, | |||
420 | return -EINVAL; | 411 | return -EINVAL; |
421 | } | 412 | } |
422 | 413 | ||
423 | static inline void cgroup_mm_owner_callbacks(struct task_struct *old, | ||
424 | struct task_struct *new) {} | ||
425 | |||
426 | #endif /* !CONFIG_CGROUPS */ | 414 | #endif /* !CONFIG_CGROUPS */ |
427 | 415 | ||
428 | #endif /* _LINUX_CGROUP_H */ | 416 | #endif /* _LINUX_CGROUP_H */ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 8e540d32c9fe..51ea2bdea0f9 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -78,6 +78,8 @@ extern int current_cpuset_is_being_rebound(void); | |||
78 | 78 | ||
79 | extern void rebuild_sched_domains(void); | 79 | extern void rebuild_sched_domains(void); |
80 | 80 | ||
81 | extern void cpuset_print_task_mems_allowed(struct task_struct *p); | ||
82 | |||
81 | #else /* !CONFIG_CPUSETS */ | 83 | #else /* !CONFIG_CPUSETS */ |
82 | 84 | ||
83 | static inline int cpuset_init_early(void) { return 0; } | 85 | static inline int cpuset_init_early(void) { return 0; } |
@@ -159,6 +161,10 @@ static inline void rebuild_sched_domains(void) | |||
159 | partition_sched_domains(1, NULL, NULL); | 161 | partition_sched_domains(1, NULL, NULL); |
160 | } | 162 | } |
161 | 163 | ||
164 | static inline void cpuset_print_task_mems_allowed(struct task_struct *p) | ||
165 | { | ||
166 | } | ||
167 | |||
162 | #endif /* !CONFIG_CPUSETS */ | 168 | #endif /* !CONFIG_CPUSETS */ |
163 | 169 | ||
164 | #endif /* _LINUX_CPUSET_H */ | 170 | #endif /* _LINUX_CPUSET_H */ |
diff --git a/include/linux/device.h b/include/linux/device.h index 1a3686d15f98..7d9da4b4993f 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define BUS_ID_SIZE 20 | 28 | #define BUS_ID_SIZE 20 |
29 | 29 | ||
30 | struct device; | 30 | struct device; |
31 | struct device_private; | ||
31 | struct device_driver; | 32 | struct device_driver; |
32 | struct driver_private; | 33 | struct driver_private; |
33 | struct class; | 34 | struct class; |
@@ -65,7 +66,7 @@ struct bus_type { | |||
65 | int (*resume_early)(struct device *dev); | 66 | int (*resume_early)(struct device *dev); |
66 | int (*resume)(struct device *dev); | 67 | int (*resume)(struct device *dev); |
67 | 68 | ||
68 | struct pm_ext_ops *pm; | 69 | struct dev_pm_ops *pm; |
69 | 70 | ||
70 | struct bus_type_private *p; | 71 | struct bus_type_private *p; |
71 | }; | 72 | }; |
@@ -133,7 +134,7 @@ struct device_driver { | |||
133 | int (*resume) (struct device *dev); | 134 | int (*resume) (struct device *dev); |
134 | struct attribute_group **groups; | 135 | struct attribute_group **groups; |
135 | 136 | ||
136 | struct pm_ops *pm; | 137 | struct dev_pm_ops *pm; |
137 | 138 | ||
138 | struct driver_private *p; | 139 | struct driver_private *p; |
139 | }; | 140 | }; |
@@ -198,7 +199,7 @@ struct class { | |||
198 | int (*suspend)(struct device *dev, pm_message_t state); | 199 | int (*suspend)(struct device *dev, pm_message_t state); |
199 | int (*resume)(struct device *dev); | 200 | int (*resume)(struct device *dev); |
200 | 201 | ||
201 | struct pm_ops *pm; | 202 | struct dev_pm_ops *pm; |
202 | struct class_private *p; | 203 | struct class_private *p; |
203 | }; | 204 | }; |
204 | 205 | ||
@@ -291,7 +292,7 @@ struct device_type { | |||
291 | int (*suspend)(struct device *dev, pm_message_t state); | 292 | int (*suspend)(struct device *dev, pm_message_t state); |
292 | int (*resume)(struct device *dev); | 293 | int (*resume)(struct device *dev); |
293 | 294 | ||
294 | struct pm_ops *pm; | 295 | struct dev_pm_ops *pm; |
295 | }; | 296 | }; |
296 | 297 | ||
297 | /* interface for exporting device attributes */ | 298 | /* interface for exporting device attributes */ |
@@ -365,17 +366,15 @@ struct device_dma_parameters { | |||
365 | }; | 366 | }; |
366 | 367 | ||
367 | struct device { | 368 | struct device { |
368 | struct klist klist_children; | ||
369 | struct klist_node knode_parent; /* node in sibling list */ | ||
370 | struct klist_node knode_driver; | ||
371 | struct klist_node knode_bus; | ||
372 | struct device *parent; | 369 | struct device *parent; |
373 | 370 | ||
371 | struct device_private *p; | ||
372 | |||
374 | struct kobject kobj; | 373 | struct kobject kobj; |
375 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 374 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
375 | unsigned uevent_suppress:1; | ||
376 | const char *init_name; /* initial name of the device */ | 376 | const char *init_name; /* initial name of the device */ |
377 | struct device_type *type; | 377 | struct device_type *type; |
378 | unsigned uevent_suppress:1; | ||
379 | 378 | ||
380 | struct semaphore sem; /* semaphore to synchronize calls to | 379 | struct semaphore sem; /* semaphore to synchronize calls to |
381 | * its driver. | 380 | * its driver. |
@@ -408,12 +407,13 @@ struct device { | |||
408 | /* arch specific additions */ | 407 | /* arch specific additions */ |
409 | struct dev_archdata archdata; | 408 | struct dev_archdata archdata; |
410 | 409 | ||
410 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | ||
411 | |||
411 | spinlock_t devres_lock; | 412 | spinlock_t devres_lock; |
412 | struct list_head devres_head; | 413 | struct list_head devres_head; |
413 | 414 | ||
414 | struct klist_node knode_class; | 415 | struct klist_node knode_class; |
415 | struct class *class; | 416 | struct class *class; |
416 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | ||
417 | struct attribute_group **groups; /* optional groups */ | 417 | struct attribute_group **groups; /* optional groups */ |
418 | 418 | ||
419 | void (*release)(struct device *dev); | 419 | void (*release)(struct device *dev); |
@@ -483,6 +483,17 @@ extern int device_rename(struct device *dev, char *new_name); | |||
483 | extern int device_move(struct device *dev, struct device *new_parent); | 483 | extern int device_move(struct device *dev, struct device *new_parent); |
484 | 484 | ||
485 | /* | 485 | /* |
486 | * Root device objects for grouping under /sys/devices | ||
487 | */ | ||
488 | extern struct device *__root_device_register(const char *name, | ||
489 | struct module *owner); | ||
490 | static inline struct device *root_device_register(const char *name) | ||
491 | { | ||
492 | return __root_device_register(name, THIS_MODULE); | ||
493 | } | ||
494 | extern void root_device_unregister(struct device *root); | ||
495 | |||
496 | /* | ||
486 | * Manual binding of a device to driver. See drivers/base/bus.c | 497 | * Manual binding of a device to driver. See drivers/base/bus.c |
487 | * for information on use. | 498 | * for information on use. |
488 | */ | 499 | */ |
@@ -553,13 +564,13 @@ extern const char *dev_driver_string(const struct device *dev); | |||
553 | #define dev_info(dev, format, arg...) \ | 564 | #define dev_info(dev, format, arg...) \ |
554 | dev_printk(KERN_INFO , dev , format , ## arg) | 565 | dev_printk(KERN_INFO , dev , format , ## arg) |
555 | 566 | ||
556 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 567 | #if defined(DEBUG) |
568 | #define dev_dbg(dev, format, arg...) \ | ||
569 | dev_printk(KERN_DEBUG , dev , format , ## arg) | ||
570 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | ||
557 | #define dev_dbg(dev, format, ...) do { \ | 571 | #define dev_dbg(dev, format, ...) do { \ |
558 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ | 572 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ |
559 | } while (0) | 573 | } while (0) |
560 | #elif defined(DEBUG) | ||
561 | #define dev_dbg(dev, format, arg...) \ | ||
562 | dev_printk(KERN_DEBUG , dev , format , ## arg) | ||
563 | #else | 574 | #else |
564 | #define dev_dbg(dev, format, arg...) \ | 575 | #define dev_dbg(dev, format, arg...) \ |
565 | ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; }) | 576 | ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; }) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index fb59673c60b1..d7eba77f666e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1133,7 +1133,6 @@ struct super_block { | |||
1133 | struct rw_semaphore s_umount; | 1133 | struct rw_semaphore s_umount; |
1134 | struct mutex s_lock; | 1134 | struct mutex s_lock; |
1135 | int s_count; | 1135 | int s_count; |
1136 | int s_syncing; | ||
1137 | int s_need_sync_fs; | 1136 | int s_need_sync_fs; |
1138 | atomic_t s_active; | 1137 | atomic_t s_active; |
1139 | #ifdef CONFIG_SECURITY | 1138 | #ifdef CONFIG_SECURITY |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 350fe9767bbc..162e5defe683 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | FUSE: Filesystem in Userspace | 2 | FUSE: Filesystem in Userspace |
3 | Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> | 3 | Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> |
4 | 4 | ||
5 | This program can be distributed under the terms of the GNU GPL. | 5 | This program can be distributed under the terms of the GNU GPL. |
6 | See the file COPYING. | 6 | See the file COPYING. |
@@ -20,29 +20,27 @@ | |||
20 | * | 20 | * |
21 | * 7.10 | 21 | * 7.10 |
22 | * - add nonseekable open flag | 22 | * - add nonseekable open flag |
23 | * | ||
24 | * 7.11 | ||
25 | * - add IOCTL message | ||
26 | * - add unsolicited notification support | ||
27 | * - add POLL message and NOTIFY_POLL notification | ||
23 | */ | 28 | */ |
24 | 29 | ||
25 | #ifndef _LINUX_FUSE_H | 30 | #ifndef _LINUX_FUSE_H |
26 | #define _LINUX_FUSE_H | 31 | #define _LINUX_FUSE_H |
27 | 32 | ||
28 | #include <asm/types.h> | 33 | #include <linux/types.h> |
29 | #include <linux/major.h> | ||
30 | 34 | ||
31 | /** Version number of this interface */ | 35 | /** Version number of this interface */ |
32 | #define FUSE_KERNEL_VERSION 7 | 36 | #define FUSE_KERNEL_VERSION 7 |
33 | 37 | ||
34 | /** Minor version number of this interface */ | 38 | /** Minor version number of this interface */ |
35 | #define FUSE_KERNEL_MINOR_VERSION 10 | 39 | #define FUSE_KERNEL_MINOR_VERSION 11 |
36 | 40 | ||
37 | /** The node ID of the root inode */ | 41 | /** The node ID of the root inode */ |
38 | #define FUSE_ROOT_ID 1 | 42 | #define FUSE_ROOT_ID 1 |
39 | 43 | ||
40 | /** The major number of the fuse character device */ | ||
41 | #define FUSE_MAJOR MISC_MAJOR | ||
42 | |||
43 | /** The minor number of the fuse character device */ | ||
44 | #define FUSE_MINOR 229 | ||
45 | |||
46 | /* Make sure all structures are padded to 64bit boundary, so 32bit | 44 | /* Make sure all structures are padded to 64bit boundary, so 32bit |
47 | userspace works under 64bit kernels */ | 45 | userspace works under 64bit kernels */ |
48 | 46 | ||
@@ -151,6 +149,28 @@ struct fuse_file_lock { | |||
151 | */ | 149 | */ |
152 | #define FUSE_READ_LOCKOWNER (1 << 1) | 150 | #define FUSE_READ_LOCKOWNER (1 << 1) |
153 | 151 | ||
152 | /** | ||
153 | * Ioctl flags | ||
154 | * | ||
155 | * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine | ||
156 | * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed | ||
157 | * FUSE_IOCTL_RETRY: retry with new iovecs | ||
158 | * | ||
159 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs | ||
160 | */ | ||
161 | #define FUSE_IOCTL_COMPAT (1 << 0) | ||
162 | #define FUSE_IOCTL_UNRESTRICTED (1 << 1) | ||
163 | #define FUSE_IOCTL_RETRY (1 << 2) | ||
164 | |||
165 | #define FUSE_IOCTL_MAX_IOV 256 | ||
166 | |||
167 | /** | ||
168 | * Poll flags | ||
169 | * | ||
170 | * FUSE_POLL_SCHEDULE_NOTIFY: request poll notify | ||
171 | */ | ||
172 | #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) | ||
173 | |||
154 | enum fuse_opcode { | 174 | enum fuse_opcode { |
155 | FUSE_LOOKUP = 1, | 175 | FUSE_LOOKUP = 1, |
156 | FUSE_FORGET = 2, /* no reply */ | 176 | FUSE_FORGET = 2, /* no reply */ |
@@ -188,6 +208,13 @@ enum fuse_opcode { | |||
188 | FUSE_INTERRUPT = 36, | 208 | FUSE_INTERRUPT = 36, |
189 | FUSE_BMAP = 37, | 209 | FUSE_BMAP = 37, |
190 | FUSE_DESTROY = 38, | 210 | FUSE_DESTROY = 38, |
211 | FUSE_IOCTL = 39, | ||
212 | FUSE_POLL = 40, | ||
213 | }; | ||
214 | |||
215 | enum fuse_notify_code { | ||
216 | FUSE_NOTIFY_POLL = 1, | ||
217 | FUSE_NOTIFY_CODE_MAX, | ||
191 | }; | 218 | }; |
192 | 219 | ||
193 | /* The read buffer is required to be at least 8k, but may be much larger */ | 220 | /* The read buffer is required to be at least 8k, but may be much larger */ |
@@ -388,6 +415,38 @@ struct fuse_bmap_out { | |||
388 | __u64 block; | 415 | __u64 block; |
389 | }; | 416 | }; |
390 | 417 | ||
418 | struct fuse_ioctl_in { | ||
419 | __u64 fh; | ||
420 | __u32 flags; | ||
421 | __u32 cmd; | ||
422 | __u64 arg; | ||
423 | __u32 in_size; | ||
424 | __u32 out_size; | ||
425 | }; | ||
426 | |||
427 | struct fuse_ioctl_out { | ||
428 | __s32 result; | ||
429 | __u32 flags; | ||
430 | __u32 in_iovs; | ||
431 | __u32 out_iovs; | ||
432 | }; | ||
433 | |||
434 | struct fuse_poll_in { | ||
435 | __u64 fh; | ||
436 | __u64 kh; | ||
437 | __u32 flags; | ||
438 | __u32 padding; | ||
439 | }; | ||
440 | |||
441 | struct fuse_poll_out { | ||
442 | __u32 revents; | ||
443 | __u32 padding; | ||
444 | }; | ||
445 | |||
446 | struct fuse_notify_poll_wakeup_out { | ||
447 | __u64 kh; | ||
448 | }; | ||
449 | |||
391 | struct fuse_in_header { | 450 | struct fuse_in_header { |
392 | __u32 len; | 451 | __u32 len; |
393 | __u32 opcode; | 452 | __u32 opcode; |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index e8003afeffba..dd20cd78faa8 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -69,12 +69,6 @@ struct vm_area_struct; | |||
69 | #define GFP_HIGHUSER_MOVABLE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ | 69 | #define GFP_HIGHUSER_MOVABLE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ |
70 | __GFP_HARDWALL | __GFP_HIGHMEM | \ | 70 | __GFP_HARDWALL | __GFP_HIGHMEM | \ |
71 | __GFP_MOVABLE) | 71 | __GFP_MOVABLE) |
72 | #define GFP_NOFS_PAGECACHE (__GFP_WAIT | __GFP_IO | __GFP_MOVABLE) | ||
73 | #define GFP_USER_PAGECACHE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ | ||
74 | __GFP_HARDWALL | __GFP_MOVABLE) | ||
75 | #define GFP_HIGHUSER_PAGECACHE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ | ||
76 | __GFP_HARDWALL | __GFP_HIGHMEM | \ | ||
77 | __GFP_MOVABLE) | ||
78 | 72 | ||
79 | #ifdef CONFIG_NUMA | 73 | #ifdef CONFIG_NUMA |
80 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 74 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index e1c8afc002c0..f1d2fba19ea0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -233,6 +233,10 @@ static inline unsigned long huge_page_size(struct hstate *h) | |||
233 | return (unsigned long)PAGE_SIZE << h->order; | 233 | return (unsigned long)PAGE_SIZE << h->order; |
234 | } | 234 | } |
235 | 235 | ||
236 | extern unsigned long vma_kernel_pagesize(struct vm_area_struct *vma); | ||
237 | |||
238 | extern unsigned long vma_mmu_pagesize(struct vm_area_struct *vma); | ||
239 | |||
236 | static inline unsigned long huge_page_mask(struct hstate *h) | 240 | static inline unsigned long huge_page_mask(struct hstate *h) |
237 | { | 241 | { |
238 | return h->mask; | 242 | return h->mask; |
@@ -273,6 +277,8 @@ struct hstate {}; | |||
273 | #define hstate_inode(i) NULL | 277 | #define hstate_inode(i) NULL |
274 | #define huge_page_size(h) PAGE_SIZE | 278 | #define huge_page_size(h) PAGE_SIZE |
275 | #define huge_page_mask(h) PAGE_MASK | 279 | #define huge_page_mask(h) PAGE_MASK |
280 | #define vma_kernel_pagesize(v) PAGE_SIZE | ||
281 | #define vma_mmu_pagesize(v) PAGE_SIZE | ||
276 | #define huge_page_order(h) 0 | 282 | #define huge_page_order(h) 0 |
277 | #define huge_page_shift(h) PAGE_SHIFT | 283 | #define huge_page_shift(h) PAGE_SHIFT |
278 | static inline unsigned int pages_per_huge_page(struct hstate *h) | 284 | static inline unsigned int pages_per_huge_page(struct hstate *h) |
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h index a8f84c01f82e..8137f660a5cc 100644 --- a/include/linux/i2c/twl4030.h +++ b/include/linux/i2c/twl4030.h | |||
@@ -234,6 +234,9 @@ struct twl4030_gpio_platform_data { | |||
234 | /* gpio-n should control VMMC(n+1) if BIT(n) in mmc_cd is set */ | 234 | /* gpio-n should control VMMC(n+1) if BIT(n) in mmc_cd is set */ |
235 | u8 mmc_cd; | 235 | u8 mmc_cd; |
236 | 236 | ||
237 | /* if BIT(N) is set, or VMMC(n+1) is linked, debounce GPIO-N */ | ||
238 | u32 debounce; | ||
239 | |||
237 | /* For gpio-N, bit (1 << N) in "pullups" is set if that pullup | 240 | /* For gpio-N, bit (1 << N) in "pullups" is set if that pullup |
238 | * should be enabled. Else, if that bit is set in "pulldowns", | 241 | * should be enabled. Else, if that bit is set in "pulldowns", |
239 | * that pulldown is enabled. Don't waste power by letting any | 242 | * that pulldown is enabled. Don't waste power by letting any |
@@ -307,12 +310,6 @@ int twl4030_sih_setup(int module); | |||
307 | #define TWL4030_VAUX3_DEV_GRP 0x1F | 310 | #define TWL4030_VAUX3_DEV_GRP 0x1F |
308 | #define TWL4030_VAUX3_DEDICATED 0x22 | 311 | #define TWL4030_VAUX3_DEDICATED 0x22 |
309 | 312 | ||
310 | /* | ||
311 | * Exported TWL4030 GPIO APIs | ||
312 | * | ||
313 | * WARNING -- use standard GPIO and IRQ calls instead; these will vanish. | ||
314 | */ | ||
315 | int twl4030_set_gpio_debounce(int gpio, int enable); | ||
316 | 313 | ||
317 | #if defined(CONFIG_TWL4030_BCI_BATTERY) || \ | 314 | #if defined(CONFIG_TWL4030_BCI_BATTERY) || \ |
318 | defined(CONFIG_TWL4030_BCI_BATTERY_MODULE) | 315 | defined(CONFIG_TWL4030_BCI_BATTERY_MODULE) |
diff --git a/include/linux/ide.h b/include/linux/ide.h index db5ef8ae1ab9..3644f6323384 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -32,18 +32,14 @@ | |||
32 | # define SUPPORT_VLB_SYNC 1 | 32 | # define SUPPORT_VLB_SYNC 1 |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | typedef unsigned char byte; /* used everywhere */ | ||
36 | |||
37 | /* | 35 | /* |
38 | * Probably not wise to fiddle with these | 36 | * Probably not wise to fiddle with these |
39 | */ | 37 | */ |
38 | #define IDE_DEFAULT_MAX_FAILURES 1 | ||
40 | #define ERROR_MAX 8 /* Max read/write errors per sector */ | 39 | #define ERROR_MAX 8 /* Max read/write errors per sector */ |
41 | #define ERROR_RESET 3 /* Reset controller every 4th retry */ | 40 | #define ERROR_RESET 3 /* Reset controller every 4th retry */ |
42 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ | 41 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ |
43 | 42 | ||
44 | #define HWIF(drive) ((ide_hwif_t *)((drive)->hwif)) | ||
45 | #define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup)) | ||
46 | |||
47 | /* | 43 | /* |
48 | * Definitions for accessing IDE controller registers | 44 | * Definitions for accessing IDE controller registers |
49 | */ | 45 | */ |
@@ -185,9 +181,6 @@ typedef struct hw_regs_s { | |||
185 | unsigned long config; | 181 | unsigned long config; |
186 | } hw_regs_t; | 182 | } hw_regs_t; |
187 | 183 | ||
188 | void ide_init_port_data(struct hwif_s *, unsigned int); | ||
189 | void ide_init_port_hw(struct hwif_s *, hw_regs_t *); | ||
190 | |||
191 | static inline void ide_std_init_ports(hw_regs_t *hw, | 184 | static inline void ide_std_init_ports(hw_regs_t *hw, |
192 | unsigned long io_addr, | 185 | unsigned long io_addr, |
193 | unsigned long ctl_addr) | 186 | unsigned long ctl_addr) |
@@ -433,18 +426,14 @@ struct ide_atapi_pc { | |||
433 | struct idetape_bh *bh; | 426 | struct idetape_bh *bh; |
434 | char *b_data; | 427 | char *b_data; |
435 | 428 | ||
436 | /* idescsi only for now */ | ||
437 | struct scatterlist *sg; | 429 | struct scatterlist *sg; |
438 | unsigned int sg_cnt; | 430 | unsigned int sg_cnt; |
439 | 431 | ||
440 | struct scsi_cmnd *scsi_cmd; | ||
441 | void (*done) (struct scsi_cmnd *); | ||
442 | |||
443 | unsigned long timeout; | 432 | unsigned long timeout; |
444 | }; | 433 | }; |
445 | 434 | ||
446 | struct ide_devset; | 435 | struct ide_devset; |
447 | struct ide_driver_s; | 436 | struct ide_driver; |
448 | 437 | ||
449 | #ifdef CONFIG_BLK_DEV_IDEACPI | 438 | #ifdef CONFIG_BLK_DEV_IDEACPI |
450 | struct ide_acpi_drive_link; | 439 | struct ide_acpi_drive_link; |
@@ -588,7 +577,6 @@ struct ide_drive_s { | |||
588 | struct request_queue *queue; /* request queue */ | 577 | struct request_queue *queue; /* request queue */ |
589 | 578 | ||
590 | struct request *rq; /* current request */ | 579 | struct request *rq; /* current request */ |
591 | struct ide_drive_s *next; /* circular list of hwgroup drives */ | ||
592 | void *driver_data; /* extra driver data */ | 580 | void *driver_data; /* extra driver data */ |
593 | u16 *id; /* identification info */ | 581 | u16 *id; /* identification info */ |
594 | #ifdef CONFIG_IDE_PROC_FS | 582 | #ifdef CONFIG_IDE_PROC_FS |
@@ -662,6 +650,8 @@ struct ide_drive_s { | |||
662 | int (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *, | 650 | int (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *, |
663 | unsigned int, int); | 651 | unsigned int, int); |
664 | 652 | ||
653 | ide_startstop_t (*irq_handler)(struct ide_drive_s *); | ||
654 | |||
665 | unsigned long atapi_flags; | 655 | unsigned long atapi_flags; |
666 | 656 | ||
667 | struct ide_atapi_pc request_sense_pc; | 657 | struct ide_atapi_pc request_sense_pc; |
@@ -684,7 +674,6 @@ struct ide_tp_ops { | |||
684 | void (*exec_command)(struct hwif_s *, u8); | 674 | void (*exec_command)(struct hwif_s *, u8); |
685 | u8 (*read_status)(struct hwif_s *); | 675 | u8 (*read_status)(struct hwif_s *); |
686 | u8 (*read_altstatus)(struct hwif_s *); | 676 | u8 (*read_altstatus)(struct hwif_s *); |
687 | u8 (*read_sff_dma_status)(struct hwif_s *); | ||
688 | 677 | ||
689 | void (*set_irq)(struct hwif_s *, int); | 678 | void (*set_irq)(struct hwif_s *, int); |
690 | 679 | ||
@@ -745,14 +734,17 @@ struct ide_dma_ops { | |||
745 | int (*dma_test_irq)(struct ide_drive_s *); | 734 | int (*dma_test_irq)(struct ide_drive_s *); |
746 | void (*dma_lost_irq)(struct ide_drive_s *); | 735 | void (*dma_lost_irq)(struct ide_drive_s *); |
747 | void (*dma_timeout)(struct ide_drive_s *); | 736 | void (*dma_timeout)(struct ide_drive_s *); |
737 | /* | ||
738 | * The following method is optional and only required to be | ||
739 | * implemented for the SFF-8038i compatible controllers. | ||
740 | */ | ||
741 | u8 (*dma_sff_read_status)(struct hwif_s *); | ||
748 | }; | 742 | }; |
749 | 743 | ||
750 | struct ide_host; | 744 | struct ide_host; |
751 | 745 | ||
752 | typedef struct hwif_s { | 746 | typedef struct hwif_s { |
753 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | ||
754 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 747 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
755 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ | ||
756 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ | 748 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ |
757 | 749 | ||
758 | struct ide_host *host; | 750 | struct ide_host *host; |
@@ -763,7 +755,7 @@ typedef struct hwif_s { | |||
763 | 755 | ||
764 | unsigned long sata_scr[SATA_NR_PORTS]; | 756 | unsigned long sata_scr[SATA_NR_PORTS]; |
765 | 757 | ||
766 | ide_drive_t drives[MAX_DRIVES]; /* drive info */ | 758 | ide_drive_t *devices[MAX_DRIVES + 1]; |
767 | 759 | ||
768 | u8 major; /* our major number */ | 760 | u8 major; /* our major number */ |
769 | u8 index; /* 0 for ide0; 1 for ide1; ... */ | 761 | u8 index; /* 0 for ide0; 1 for ide1; ... */ |
@@ -829,7 +821,7 @@ typedef struct hwif_s { | |||
829 | unsigned extra_ports; /* number of extra dma ports */ | 821 | unsigned extra_ports; /* number of extra dma ports */ |
830 | 822 | ||
831 | unsigned present : 1; /* this interface exists */ | 823 | unsigned present : 1; /* this interface exists */ |
832 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 824 | unsigned busy : 1; /* serializes devices on a port */ |
833 | 825 | ||
834 | struct device gendev; | 826 | struct device gendev; |
835 | struct device *portdev; | 827 | struct device *portdev; |
@@ -841,19 +833,49 @@ typedef struct hwif_s { | |||
841 | #ifdef CONFIG_BLK_DEV_IDEACPI | 833 | #ifdef CONFIG_BLK_DEV_IDEACPI |
842 | struct ide_acpi_hwif_link *acpidata; | 834 | struct ide_acpi_hwif_link *acpidata; |
843 | #endif | 835 | #endif |
836 | |||
837 | /* IRQ handler, if active */ | ||
838 | ide_startstop_t (*handler)(ide_drive_t *); | ||
839 | |||
840 | /* BOOL: polling active & poll_timeout field valid */ | ||
841 | unsigned int polling : 1; | ||
842 | |||
843 | /* current drive */ | ||
844 | ide_drive_t *cur_dev; | ||
845 | |||
846 | /* current request */ | ||
847 | struct request *rq; | ||
848 | |||
849 | /* failsafe timer */ | ||
850 | struct timer_list timer; | ||
851 | /* timeout value during long polls */ | ||
852 | unsigned long poll_timeout; | ||
853 | /* queried upon timeouts */ | ||
854 | int (*expiry)(ide_drive_t *); | ||
855 | |||
856 | int req_gen; | ||
857 | int req_gen_timer; | ||
858 | |||
859 | spinlock_t lock; | ||
844 | } ____cacheline_internodealigned_in_smp ide_hwif_t; | 860 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
845 | 861 | ||
846 | #define MAX_HOST_PORTS 4 | 862 | #define MAX_HOST_PORTS 4 |
847 | 863 | ||
848 | struct ide_host { | 864 | struct ide_host { |
849 | ide_hwif_t *ports[MAX_HOST_PORTS]; | 865 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; |
850 | unsigned int n_ports; | 866 | unsigned int n_ports; |
851 | struct device *dev[2]; | 867 | struct device *dev[2]; |
852 | unsigned int (*init_chipset)(struct pci_dev *); | 868 | unsigned int (*init_chipset)(struct pci_dev *); |
853 | unsigned long host_flags; | 869 | unsigned long host_flags; |
854 | void *host_priv; | 870 | void *host_priv; |
871 | ide_hwif_t *cur_port; /* for hosts requiring serialization */ | ||
872 | |||
873 | /* used for hosts requiring serialization */ | ||
874 | volatile long host_busy; | ||
855 | }; | 875 | }; |
856 | 876 | ||
877 | #define IDE_HOST_BUSY 0 | ||
878 | |||
857 | /* | 879 | /* |
858 | * internal ide interrupt handler type | 880 | * internal ide interrupt handler type |
859 | */ | 881 | */ |
@@ -863,38 +885,6 @@ typedef int (ide_expiry_t)(ide_drive_t *); | |||
863 | /* used by ide-cd, ide-floppy, etc. */ | 885 | /* used by ide-cd, ide-floppy, etc. */ |
864 | typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned); | 886 | typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned); |
865 | 887 | ||
866 | typedef struct hwgroup_s { | ||
867 | /* irq handler, if active */ | ||
868 | ide_startstop_t (*handler)(ide_drive_t *); | ||
869 | |||
870 | /* BOOL: protects all fields below */ | ||
871 | volatile int busy; | ||
872 | /* BOOL: polling active & poll_timeout field valid */ | ||
873 | unsigned int polling : 1; | ||
874 | |||
875 | /* current drive */ | ||
876 | ide_drive_t *drive; | ||
877 | /* ptr to current hwif in linked-list */ | ||
878 | ide_hwif_t *hwif; | ||
879 | |||
880 | /* current request */ | ||
881 | struct request *rq; | ||
882 | |||
883 | /* failsafe timer */ | ||
884 | struct timer_list timer; | ||
885 | /* timeout value during long polls */ | ||
886 | unsigned long poll_timeout; | ||
887 | /* queried upon timeouts */ | ||
888 | int (*expiry)(ide_drive_t *); | ||
889 | |||
890 | int req_gen; | ||
891 | int req_gen_timer; | ||
892 | |||
893 | spinlock_t lock; | ||
894 | } ide_hwgroup_t; | ||
895 | |||
896 | typedef struct ide_driver_s ide_driver_t; | ||
897 | |||
898 | extern struct mutex ide_setting_mtx; | 888 | extern struct mutex ide_setting_mtx; |
899 | 889 | ||
900 | /* | 890 | /* |
@@ -1020,8 +1010,8 @@ void ide_proc_register_port(ide_hwif_t *); | |||
1020 | void ide_proc_port_register_devices(ide_hwif_t *); | 1010 | void ide_proc_port_register_devices(ide_hwif_t *); |
1021 | void ide_proc_unregister_device(ide_drive_t *); | 1011 | void ide_proc_unregister_device(ide_drive_t *); |
1022 | void ide_proc_unregister_port(ide_hwif_t *); | 1012 | void ide_proc_unregister_port(ide_hwif_t *); |
1023 | void ide_proc_register_driver(ide_drive_t *, ide_driver_t *); | 1013 | void ide_proc_register_driver(ide_drive_t *, struct ide_driver *); |
1024 | void ide_proc_unregister_driver(ide_drive_t *, ide_driver_t *); | 1014 | void ide_proc_unregister_driver(ide_drive_t *, struct ide_driver *); |
1025 | 1015 | ||
1026 | read_proc_t proc_ide_read_capacity; | 1016 | read_proc_t proc_ide_read_capacity; |
1027 | read_proc_t proc_ide_read_geometry; | 1017 | read_proc_t proc_ide_read_geometry; |
@@ -1048,8 +1038,10 @@ static inline void ide_proc_register_port(ide_hwif_t *hwif) { ; } | |||
1048 | static inline void ide_proc_port_register_devices(ide_hwif_t *hwif) { ; } | 1038 | static inline void ide_proc_port_register_devices(ide_hwif_t *hwif) { ; } |
1049 | static inline void ide_proc_unregister_device(ide_drive_t *drive) { ; } | 1039 | static inline void ide_proc_unregister_device(ide_drive_t *drive) { ; } |
1050 | static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; } | 1040 | static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; } |
1051 | static inline void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) { ; } | 1041 | static inline void ide_proc_register_driver(ide_drive_t *drive, |
1052 | static inline void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) { ; } | 1042 | struct ide_driver *driver) { ; } |
1043 | static inline void ide_proc_unregister_driver(ide_drive_t *drive, | ||
1044 | struct ide_driver *driver) { ; } | ||
1053 | #define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0; | 1045 | #define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0; |
1054 | #endif | 1046 | #endif |
1055 | 1047 | ||
@@ -1118,11 +1110,10 @@ void ide_check_pm_state(ide_drive_t *, struct request *); | |||
1118 | * The gendriver.owner field should be set to the module owner of this driver. | 1110 | * The gendriver.owner field should be set to the module owner of this driver. |
1119 | * The gendriver.name field should be set to the name of this driver | 1111 | * The gendriver.name field should be set to the name of this driver |
1120 | */ | 1112 | */ |
1121 | struct ide_driver_s { | 1113 | struct ide_driver { |
1122 | const char *version; | 1114 | const char *version; |
1123 | ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); | 1115 | ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); |
1124 | int (*end_request)(ide_drive_t *, int, int); | 1116 | int (*end_request)(ide_drive_t *, int, int); |
1125 | ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); | ||
1126 | struct device_driver gen_driver; | 1117 | struct device_driver gen_driver; |
1127 | int (*probe)(ide_drive_t *); | 1118 | int (*probe)(ide_drive_t *); |
1128 | void (*remove)(ide_drive_t *); | 1119 | void (*remove)(ide_drive_t *); |
@@ -1134,7 +1125,7 @@ struct ide_driver_s { | |||
1134 | #endif | 1125 | #endif |
1135 | }; | 1126 | }; |
1136 | 1127 | ||
1137 | #define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) | 1128 | #define to_ide_driver(drv) container_of(drv, struct ide_driver, gen_driver) |
1138 | 1129 | ||
1139 | int ide_device_get(ide_drive_t *); | 1130 | int ide_device_get(ide_drive_t *); |
1140 | void ide_device_put(ide_drive_t *); | 1131 | void ide_device_put(ide_drive_t *); |
@@ -1166,9 +1157,7 @@ void ide_execute_pkt_cmd(ide_drive_t *); | |||
1166 | 1157 | ||
1167 | void ide_pad_transfer(ide_drive_t *, int, int); | 1158 | void ide_pad_transfer(ide_drive_t *, int, int); |
1168 | 1159 | ||
1169 | ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8); | 1160 | ide_startstop_t ide_error(ide_drive_t *, const char *, u8); |
1170 | |||
1171 | ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat); | ||
1172 | 1161 | ||
1173 | void ide_fix_driveid(u16 *); | 1162 | void ide_fix_driveid(u16 *); |
1174 | 1163 | ||
@@ -1192,7 +1181,6 @@ void ide_tf_dump(const char *, struct ide_taskfile *); | |||
1192 | void ide_exec_command(ide_hwif_t *, u8); | 1181 | void ide_exec_command(ide_hwif_t *, u8); |
1193 | u8 ide_read_status(ide_hwif_t *); | 1182 | u8 ide_read_status(ide_hwif_t *); |
1194 | u8 ide_read_altstatus(ide_hwif_t *); | 1183 | u8 ide_read_altstatus(ide_hwif_t *); |
1195 | u8 ide_read_sff_dma_status(ide_hwif_t *); | ||
1196 | 1184 | ||
1197 | void ide_set_irq(ide_hwif_t *, int); | 1185 | void ide_set_irq(ide_hwif_t *, int); |
1198 | 1186 | ||
@@ -1272,26 +1260,6 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | |||
1272 | 1260 | ||
1273 | extern void ide_timer_expiry(unsigned long); | 1261 | extern void ide_timer_expiry(unsigned long); |
1274 | extern irqreturn_t ide_intr(int irq, void *dev_id); | 1262 | extern irqreturn_t ide_intr(int irq, void *dev_id); |
1275 | |||
1276 | static inline int ide_lock_hwgroup(ide_hwgroup_t *hwgroup) | ||
1277 | { | ||
1278 | if (hwgroup->busy) | ||
1279 | return 1; | ||
1280 | |||
1281 | hwgroup->busy = 1; | ||
1282 | /* for atari only */ | ||
1283 | ide_get_lock(ide_intr, hwgroup); | ||
1284 | |||
1285 | return 0; | ||
1286 | } | ||
1287 | |||
1288 | static inline void ide_unlock_hwgroup(ide_hwgroup_t *hwgroup) | ||
1289 | { | ||
1290 | /* for atari only */ | ||
1291 | ide_release_lock(); | ||
1292 | hwgroup->busy = 0; | ||
1293 | } | ||
1294 | |||
1295 | extern void do_ide_request(struct request_queue *); | 1263 | extern void do_ide_request(struct request_queue *); |
1296 | 1264 | ||
1297 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1265 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
@@ -1327,11 +1295,11 @@ static inline int ide_hwif_setup_dma(ide_hwif_t *hwif, | |||
1327 | } | 1295 | } |
1328 | #endif | 1296 | #endif |
1329 | 1297 | ||
1330 | typedef struct ide_pci_enablebit_s { | 1298 | struct ide_pci_enablebit { |
1331 | u8 reg; /* byte pci reg holding the enable-bit */ | 1299 | u8 reg; /* byte pci reg holding the enable-bit */ |
1332 | u8 mask; /* mask to isolate the enable-bit */ | 1300 | u8 mask; /* mask to isolate the enable-bit */ |
1333 | u8 val; /* value of masked reg when "enabled" */ | 1301 | u8 val; /* value of masked reg when "enabled" */ |
1334 | } ide_pci_enablebit_t; | 1302 | }; |
1335 | 1303 | ||
1336 | enum { | 1304 | enum { |
1337 | /* Uses ISA control ports not PCI ones. */ | 1305 | /* Uses ISA control ports not PCI ones. */ |
@@ -1420,7 +1388,8 @@ struct ide_port_info { | |||
1420 | const struct ide_port_ops *port_ops; | 1388 | const struct ide_port_ops *port_ops; |
1421 | const struct ide_dma_ops *dma_ops; | 1389 | const struct ide_dma_ops *dma_ops; |
1422 | 1390 | ||
1423 | ide_pci_enablebit_t enablebits[2]; | 1391 | struct ide_pci_enablebit enablebits[2]; |
1392 | |||
1424 | hwif_chipset_t chipset; | 1393 | hwif_chipset_t chipset; |
1425 | 1394 | ||
1426 | u16 max_sectors; /* if < than the default one */ | 1395 | u16 max_sectors; /* if < than the default one */ |
@@ -1492,6 +1461,7 @@ void ide_dma_exec_cmd(ide_drive_t *, u8); | |||
1492 | extern void ide_dma_start(ide_drive_t *); | 1461 | extern void ide_dma_start(ide_drive_t *); |
1493 | int ide_dma_end(ide_drive_t *); | 1462 | int ide_dma_end(ide_drive_t *); |
1494 | int ide_dma_test_irq(ide_drive_t *); | 1463 | int ide_dma_test_irq(ide_drive_t *); |
1464 | u8 ide_dma_sff_read_status(ide_hwif_t *); | ||
1495 | extern const struct ide_dma_ops sff_dma_ops; | 1465 | extern const struct ide_dma_ops sff_dma_ops; |
1496 | #else | 1466 | #else |
1497 | static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | 1467 | static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } |
@@ -1529,9 +1499,6 @@ static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } | |||
1529 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1499 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
1530 | #endif | 1500 | #endif |
1531 | 1501 | ||
1532 | void ide_remove_port_from_hwgroup(ide_hwif_t *); | ||
1533 | void ide_unregister(ide_hwif_t *); | ||
1534 | |||
1535 | void ide_register_region(struct gendisk *); | 1502 | void ide_register_region(struct gendisk *); |
1536 | void ide_unregister_region(struct gendisk *); | 1503 | void ide_unregister_region(struct gendisk *); |
1537 | 1504 | ||
@@ -1616,23 +1583,6 @@ static inline void ide_set_max_pio(ide_drive_t *drive) | |||
1616 | ide_set_pio(drive, 255); | 1583 | ide_set_pio(drive, 255); |
1617 | } | 1584 | } |
1618 | 1585 | ||
1619 | extern spinlock_t ide_lock; | ||
1620 | extern struct mutex ide_cfg_mtx; | ||
1621 | /* | ||
1622 | * Structure locking: | ||
1623 | * | ||
1624 | * ide_cfg_mtx and hwgroup->lock together protect changes to | ||
1625 | * ide_hwif_t->next | ||
1626 | * ide_drive_t->next | ||
1627 | * | ||
1628 | * ide_hwgroup_t->busy: hwgroup->lock | ||
1629 | * ide_hwgroup_t->hwif: hwgroup->lock | ||
1630 | * ide_hwif_t->{hwgroup,mate}: constant, no locking | ||
1631 | * ide_drive_t->hwif: constant, no locking | ||
1632 | */ | ||
1633 | |||
1634 | #define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable_in_hardirq(); } while (0) | ||
1635 | |||
1636 | char *ide_media_string(ide_drive_t *); | 1586 | char *ide_media_string(ide_drive_t *); |
1637 | 1587 | ||
1638 | extern struct device_attribute ide_dev_attrs[]; | 1588 | extern struct device_attribute ide_dev_attrs[]; |
@@ -1651,8 +1601,15 @@ static inline int hwif_to_node(ide_hwif_t *hwif) | |||
1651 | 1601 | ||
1652 | static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) | 1602 | static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) |
1653 | { | 1603 | { |
1654 | ide_drive_t *peer = &drive->hwif->drives[(drive->dn ^ 1) & 1]; | 1604 | ide_drive_t *peer = drive->hwif->devices[(drive->dn ^ 1) & 1]; |
1655 | 1605 | ||
1656 | return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL; | 1606 | return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL; |
1657 | } | 1607 | } |
1608 | |||
1609 | #define ide_port_for_each_dev(i, dev, port) \ | ||
1610 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) | ||
1611 | |||
1612 | #define ide_host_for_each_port(i, port, host) \ | ||
1613 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) | ||
1614 | |||
1658 | #endif /* _IDE_H */ | 1615 | #endif /* _IDE_H */ |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 0702c4d7bdf0..9127f6b51a39 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/irqflags.h> | 14 | #include <linux/irqflags.h> |
15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
16 | #include <linux/percpu.h> | 16 | #include <linux/percpu.h> |
17 | #include <linux/irqnr.h> | ||
18 | 17 | ||
19 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
20 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
@@ -253,7 +252,8 @@ enum | |||
253 | BLOCK_SOFTIRQ, | 252 | BLOCK_SOFTIRQ, |
254 | TASKLET_SOFTIRQ, | 253 | TASKLET_SOFTIRQ, |
255 | SCHED_SOFTIRQ, | 254 | SCHED_SOFTIRQ, |
256 | RCU_SOFTIRQ, /* Preferable RCU should always be the last softirq */ | 255 | HRTIMER_SOFTIRQ, |
256 | RCU_SOFTIRQ, /* Preferable RCU should always be the last softirq */ | ||
257 | 257 | ||
258 | NR_SOFTIRQS | 258 | NR_SOFTIRQS |
259 | }; | 259 | }; |
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 5504a5c97836..86af92e9e84c 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
@@ -8,7 +8,12 @@ | |||
8 | 8 | ||
9 | #ifndef CONFIG_GENERIC_HARDIRQS | 9 | #ifndef CONFIG_GENERIC_HARDIRQS |
10 | #include <asm/irq.h> | 10 | #include <asm/irq.h> |
11 | # define nr_irqs NR_IRQS | 11 | |
12 | /* | ||
13 | * Wrappers for non-genirq architectures: | ||
14 | */ | ||
15 | #define nr_irqs NR_IRQS | ||
16 | #define irq_to_desc(irq) (&irq_desc[irq]) | ||
12 | 17 | ||
13 | # define for_each_irq_desc(irq, desc) \ | 18 | # define for_each_irq_desc(irq, desc) \ |
14 | for (irq = 0; irq < nr_irqs; irq++) | 19 | for (irq = 0; irq < nr_irqs; irq++) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ca9ff6411dfa..6b8e2027165e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -48,6 +48,12 @@ extern const char linux_proc_banner[]; | |||
48 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 48 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
49 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 49 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
50 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 50 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
51 | #define DIV_ROUND_CLOSEST(x, divisor)( \ | ||
52 | { \ | ||
53 | typeof(divisor) __divisor = divisor; \ | ||
54 | (((x) + ((__divisor) / 2)) / (__divisor)); \ | ||
55 | } \ | ||
56 | ) | ||
51 | 57 | ||
52 | #define _RET_IP_ (unsigned long)__builtin_return_address(0) | 58 | #define _RET_IP_ (unsigned long)__builtin_return_address(0) |
53 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | 59 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) |
@@ -349,13 +355,13 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
349 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 355 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
350 | 356 | ||
351 | /* If you are writing a driver, please use dev_dbg instead */ | 357 | /* If you are writing a driver, please use dev_dbg instead */ |
352 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 358 | #if defined(DEBUG) |
359 | #define pr_debug(fmt, ...) \ | ||
360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
361 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | ||
353 | #define pr_debug(fmt, ...) do { \ | 362 | #define pr_debug(fmt, ...) do { \ |
354 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 363 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ |
355 | } while (0) | 364 | } while (0) |
356 | #elif defined(DEBUG) | ||
357 | #define pr_debug(fmt, ...) \ | ||
358 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
359 | #else | 365 | #else |
360 | #define pr_debug(fmt, ...) \ | 366 | #define pr_debug(fmt, ...) \ |
361 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | 367 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) |
diff --git a/include/linux/klist.h b/include/linux/klist.h index 8ea98db223e5..d5a27af9dba5 100644 --- a/include/linux/klist.h +++ b/include/linux/klist.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #define _LINUX_KLIST_H | 13 | #define _LINUX_KLIST_H |
14 | 14 | ||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/completion.h> | ||
17 | #include <linux/kref.h> | 16 | #include <linux/kref.h> |
18 | #include <linux/list.h> | 17 | #include <linux/list.h> |
19 | 18 | ||
@@ -41,7 +40,6 @@ struct klist_node { | |||
41 | void *n_klist; /* never access directly */ | 40 | void *n_klist; /* never access directly */ |
42 | struct list_head n_node; | 41 | struct list_head n_node; |
43 | struct kref n_ref; | 42 | struct kref n_ref; |
44 | struct completion n_removed; | ||
45 | }; | 43 | }; |
46 | 44 | ||
47 | extern void klist_add_tail(struct klist_node *n, struct klist *k); | 45 | extern void klist_add_tail(struct klist_node *n, struct klist *k); |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 497b1d1f7a05..d6ea19e314bb 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -69,9 +69,6 @@ struct kprobe { | |||
69 | /* list of kprobes for multi-handler support */ | 69 | /* list of kprobes for multi-handler support */ |
70 | struct list_head list; | 70 | struct list_head list; |
71 | 71 | ||
72 | /* Indicates that the corresponding module has been ref counted */ | ||
73 | unsigned int mod_refcounted; | ||
74 | |||
75 | /*count the number of times this probe was temporarily disarmed */ | 72 | /*count the number of times this probe was temporarily disarmed */ |
76 | unsigned long nmissed; | 73 | unsigned long nmissed; |
77 | 74 | ||
@@ -103,8 +100,19 @@ struct kprobe { | |||
103 | 100 | ||
104 | /* copy of the original instruction */ | 101 | /* copy of the original instruction */ |
105 | struct arch_specific_insn ainsn; | 102 | struct arch_specific_insn ainsn; |
103 | |||
104 | /* Indicates various status flags. Protected by kprobe_mutex. */ | ||
105 | u32 flags; | ||
106 | }; | 106 | }; |
107 | 107 | ||
108 | /* Kprobe status flags */ | ||
109 | #define KPROBE_FLAG_GONE 1 /* breakpoint has already gone */ | ||
110 | |||
111 | static inline int kprobe_gone(struct kprobe *p) | ||
112 | { | ||
113 | return p->flags & KPROBE_FLAG_GONE; | ||
114 | } | ||
115 | |||
108 | /* | 116 | /* |
109 | * Special probe type that uses setjmp-longjmp type tricks to resume | 117 | * Special probe type that uses setjmp-longjmp type tricks to resume |
110 | * execution at a specified entry with a matching prototype corresponding | 118 | * execution at a specified entry with a matching prototype corresponding |
@@ -201,7 +209,6 @@ static inline int init_test_probes(void) | |||
201 | } | 209 | } |
202 | #endif /* CONFIG_KPROBES_SANITY_TEST */ | 210 | #endif /* CONFIG_KPROBES_SANITY_TEST */ |
203 | 211 | ||
204 | extern struct mutex kprobe_mutex; | ||
205 | extern int arch_prepare_kprobe(struct kprobe *p); | 212 | extern int arch_prepare_kprobe(struct kprobe *p); |
206 | extern void arch_arm_kprobe(struct kprobe *p); | 213 | extern void arch_arm_kprobe(struct kprobe *p); |
207 | extern void arch_disarm_kprobe(struct kprobe *p); | 214 | extern void arch_disarm_kprobe(struct kprobe *p); |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 36c82c9e6ea7..3fdc10806d31 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -79,14 +79,14 @@ static inline int memory_notify(unsigned long val, void *v) | |||
79 | #else | 79 | #else |
80 | extern int register_memory_notifier(struct notifier_block *nb); | 80 | extern int register_memory_notifier(struct notifier_block *nb); |
81 | extern void unregister_memory_notifier(struct notifier_block *nb); | 81 | extern void unregister_memory_notifier(struct notifier_block *nb); |
82 | extern int register_new_memory(struct mem_section *); | 82 | extern int register_new_memory(int, struct mem_section *); |
83 | extern int unregister_memory_section(struct mem_section *); | 83 | extern int unregister_memory_section(struct mem_section *); |
84 | extern int memory_dev_init(void); | 84 | extern int memory_dev_init(void); |
85 | extern int remove_memory_block(unsigned long, struct mem_section *, int); | 85 | extern int remove_memory_block(unsigned long, struct mem_section *, int); |
86 | extern int memory_notify(unsigned long val, void *v); | 86 | extern int memory_notify(unsigned long val, void *v); |
87 | extern struct memory_block *find_memory_block(struct mem_section *); | ||
87 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) | 88 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) |
88 | 89 | enum mem_add_context { BOOT, HOTPLUG }; | |
89 | |||
90 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ | 90 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ |
91 | 91 | ||
92 | #ifdef CONFIG_MEMORY_HOTPLUG | 92 | #ifdef CONFIG_MEMORY_HOTPLUG |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 763ba81fc0f0..d95f72e79b82 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -72,7 +72,7 @@ extern void __offline_isolated_pages(unsigned long, unsigned long); | |||
72 | extern int offline_pages(unsigned long, unsigned long, unsigned long); | 72 | extern int offline_pages(unsigned long, unsigned long, unsigned long); |
73 | 73 | ||
74 | /* reasonably generic interface to expand the physical pages in a zone */ | 74 | /* reasonably generic interface to expand the physical pages in a zone */ |
75 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, | 75 | extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, |
76 | unsigned long nr_pages); | 76 | unsigned long nr_pages); |
77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | 77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, |
78 | unsigned long nr_pages); | 78 | unsigned long nr_pages); |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 3f34005068d4..527602cdea1c 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -7,6 +7,8 @@ | |||
7 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); | 7 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); |
8 | 8 | ||
9 | #ifdef CONFIG_MIGRATION | 9 | #ifdef CONFIG_MIGRATION |
10 | #define PAGE_MIGRATION 1 | ||
11 | |||
10 | extern int putback_lru_pages(struct list_head *l); | 12 | extern int putback_lru_pages(struct list_head *l); |
11 | extern int migrate_page(struct address_space *, | 13 | extern int migrate_page(struct address_space *, |
12 | struct page *, struct page *); | 14 | struct page *, struct page *); |
@@ -20,6 +22,8 @@ extern int migrate_vmas(struct mm_struct *mm, | |||
20 | const nodemask_t *from, const nodemask_t *to, | 22 | const nodemask_t *from, const nodemask_t *to, |
21 | unsigned long flags); | 23 | unsigned long flags); |
22 | #else | 24 | #else |
25 | #define PAGE_MIGRATION 0 | ||
26 | |||
23 | static inline int putback_lru_pages(struct list_head *l) { return 0; } | 27 | static inline int putback_lru_pages(struct list_head *l) { return 0; } |
24 | static inline int migrate_pages(struct list_head *l, new_page_t x, | 28 | static inline int migrate_pages(struct list_head *l, new_page_t x, |
25 | unsigned long private) { return -ENOSYS; } | 29 | unsigned long private) { return -ENOSYS; } |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 26433ec520b3..a820f816a49e 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -3,33 +3,33 @@ | |||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/major.h> | 4 | #include <linux/major.h> |
5 | 5 | ||
6 | #define PSMOUSE_MINOR 1 | 6 | #define PSMOUSE_MINOR 1 |
7 | #define MS_BUSMOUSE_MINOR 2 | 7 | #define MS_BUSMOUSE_MINOR 2 |
8 | #define ATIXL_BUSMOUSE_MINOR 3 | 8 | #define ATIXL_BUSMOUSE_MINOR 3 |
9 | /*#define AMIGAMOUSE_MINOR 4 FIXME OBSOLETE */ | 9 | /*#define AMIGAMOUSE_MINOR 4 FIXME OBSOLETE */ |
10 | #define ATARIMOUSE_MINOR 5 | 10 | #define ATARIMOUSE_MINOR 5 |
11 | #define SUN_MOUSE_MINOR 6 | 11 | #define SUN_MOUSE_MINOR 6 |
12 | #define APOLLO_MOUSE_MINOR 7 | 12 | #define APOLLO_MOUSE_MINOR 7 |
13 | #define PC110PAD_MINOR 9 | 13 | #define PC110PAD_MINOR 9 |
14 | /*#define ADB_MOUSE_MINOR 10 FIXME OBSOLETE */ | 14 | /*#define ADB_MOUSE_MINOR 10 FIXME OBSOLETE */ |
15 | #define WATCHDOG_MINOR 130 /* Watchdog timer */ | 15 | #define WATCHDOG_MINOR 130 /* Watchdog timer */ |
16 | #define TEMP_MINOR 131 /* Temperature Sensor */ | 16 | #define TEMP_MINOR 131 /* Temperature Sensor */ |
17 | #define RTC_MINOR 135 | 17 | #define RTC_MINOR 135 |
18 | #define EFI_RTC_MINOR 136 /* EFI Time services */ | 18 | #define EFI_RTC_MINOR 136 /* EFI Time services */ |
19 | #define SUN_OPENPROM_MINOR 139 | 19 | #define SUN_OPENPROM_MINOR 139 |
20 | #define DMAPI_MINOR 140 /* DMAPI */ | 20 | #define DMAPI_MINOR 140 /* DMAPI */ |
21 | #define NVRAM_MINOR 144 | 21 | #define NVRAM_MINOR 144 |
22 | #define SGI_MMTIMER 153 | 22 | #define SGI_MMTIMER 153 |
23 | #define STORE_QUEUE_MINOR 155 | 23 | #define STORE_QUEUE_MINOR 155 |
24 | #define I2O_MINOR 166 | 24 | #define I2O_MINOR 166 |
25 | #define MICROCODE_MINOR 184 | 25 | #define MICROCODE_MINOR 184 |
26 | #define MWAVE_MINOR 219 /* ACP/Mwave Modem */ | 26 | #define TUN_MINOR 200 |
27 | #define MPT_MINOR 220 | 27 | #define MWAVE_MINOR 219 /* ACP/Mwave Modem */ |
28 | #define MISC_DYNAMIC_MINOR 255 | 28 | #define MPT_MINOR 220 |
29 | 29 | #define HPET_MINOR 228 | |
30 | #define TUN_MINOR 200 | 30 | #define FUSE_MINOR 229 |
31 | #define HPET_MINOR 228 | 31 | #define KVM_MINOR 232 |
32 | #define KVM_MINOR 232 | 32 | #define MISC_DYNAMIC_MINOR 255 |
33 | 33 | ||
34 | struct device; | 34 | struct device; |
35 | 35 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index aaa8b843be28..4a3d28c86443 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -717,6 +717,11 @@ static inline int page_mapped(struct page *page) | |||
717 | 717 | ||
718 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS) | 718 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS) |
719 | 719 | ||
720 | /* | ||
721 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. | ||
722 | */ | ||
723 | extern void pagefault_out_of_memory(void); | ||
724 | |||
720 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) | 725 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) |
721 | 726 | ||
722 | extern void show_free_areas(void); | 727 | extern void show_free_areas(void); |
diff --git a/include/linux/module.h b/include/linux/module.h index 3bfed013350b..4f7ea12463d3 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -294,9 +294,6 @@ struct module | |||
294 | /* The size of the executable code in each section. */ | 294 | /* The size of the executable code in each section. */ |
295 | unsigned int init_text_size, core_text_size; | 295 | unsigned int init_text_size, core_text_size; |
296 | 296 | ||
297 | /* The handle returned from unwind_add_table. */ | ||
298 | void *unwind_info; | ||
299 | |||
300 | /* Arch-specific module values */ | 297 | /* Arch-specific module values */ |
301 | struct mod_arch_specific arch; | 298 | struct mod_arch_specific arch; |
302 | 299 | ||
@@ -368,6 +365,18 @@ struct module *module_text_address(unsigned long addr); | |||
368 | struct module *__module_text_address(unsigned long addr); | 365 | struct module *__module_text_address(unsigned long addr); |
369 | int is_module_address(unsigned long addr); | 366 | int is_module_address(unsigned long addr); |
370 | 367 | ||
368 | static inline int within_module_core(unsigned long addr, struct module *mod) | ||
369 | { | ||
370 | return (unsigned long)mod->module_core <= addr && | ||
371 | addr < (unsigned long)mod->module_core + mod->core_size; | ||
372 | } | ||
373 | |||
374 | static inline int within_module_init(unsigned long addr, struct module *mod) | ||
375 | { | ||
376 | return (unsigned long)mod->module_init <= addr && | ||
377 | addr < (unsigned long)mod->module_init + mod->init_size; | ||
378 | } | ||
379 | |||
371 | /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if | 380 | /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if |
372 | symnum out of range. */ | 381 | symnum out of range. */ |
373 | int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, | 382 | int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, |
diff --git a/include/linux/mtd/concat.h b/include/linux/mtd/concat.h index c02f3d264ecf..e80c674daeb3 100644 --- a/include/linux/mtd/concat.h +++ b/include/linux/mtd/concat.h | |||
@@ -13,7 +13,7 @@ | |||
13 | struct mtd_info *mtd_concat_create( | 13 | struct mtd_info *mtd_concat_create( |
14 | struct mtd_info *subdev[], /* subdevices to concatenate */ | 14 | struct mtd_info *subdev[], /* subdevices to concatenate */ |
15 | int num_devs, /* number of subdevices */ | 15 | int num_devs, /* number of subdevices */ |
16 | char *name); /* name for the new device */ | 16 | const char *name); /* name for the new device */ |
17 | 17 | ||
18 | void mtd_concat_destroy(struct mtd_info *mtd); | 18 | void mtd_concat_destroy(struct mtd_info *mtd); |
19 | 19 | ||
diff --git a/include/linux/node.h b/include/linux/node.h index bc001bc225c3..681a697b9a86 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
@@ -26,6 +26,7 @@ struct node { | |||
26 | struct sys_device sysdev; | 26 | struct sys_device sysdev; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct memory_block; | ||
29 | extern struct node node_devices[]; | 30 | extern struct node node_devices[]; |
30 | 31 | ||
31 | extern int register_node(struct node *, int, struct node *); | 32 | extern int register_node(struct node *, int, struct node *); |
@@ -35,6 +36,9 @@ extern int register_one_node(int nid); | |||
35 | extern void unregister_one_node(int nid); | 36 | extern void unregister_one_node(int nid); |
36 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); | 37 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); |
37 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); | 38 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); |
39 | extern int register_mem_sect_under_node(struct memory_block *mem_blk, | ||
40 | int nid); | ||
41 | extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk); | ||
38 | #else | 42 | #else |
39 | static inline int register_one_node(int nid) | 43 | static inline int register_one_node(int nid) |
40 | { | 44 | { |
@@ -52,6 +56,15 @@ static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) | |||
52 | { | 56 | { |
53 | return 0; | 57 | return 0; |
54 | } | 58 | } |
59 | static inline int register_mem_sect_under_node(struct memory_block *mem_blk, | ||
60 | int nid) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
64 | static inline int unregister_mem_sect_under_nodes(struct memory_block *mem_blk) | ||
65 | { | ||
66 | return 0; | ||
67 | } | ||
55 | #endif | 68 | #endif |
56 | 69 | ||
57 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 70 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index b12f93a3c345..219a523ecdb0 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -228,6 +228,7 @@ PAGEFLAG_FALSE(HighMem) | |||
228 | PAGEFLAG(SwapCache, swapcache) | 228 | PAGEFLAG(SwapCache, swapcache) |
229 | #else | 229 | #else |
230 | PAGEFLAG_FALSE(SwapCache) | 230 | PAGEFLAG_FALSE(SwapCache) |
231 | SETPAGEFLAG_NOOP(SwapCache) CLEARPAGEFLAG_NOOP(SwapCache) | ||
231 | #endif | 232 | #endif |
232 | 233 | ||
233 | #ifdef CONFIG_UNEVICTABLE_LRU | 234 | #ifdef CONFIG_UNEVICTABLE_LRU |
@@ -372,31 +373,22 @@ static inline void __ClearPageTail(struct page *page) | |||
372 | #define __PG_MLOCKED 0 | 373 | #define __PG_MLOCKED 0 |
373 | #endif | 374 | #endif |
374 | 375 | ||
375 | #define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ | ||
376 | 1 << PG_buddy | 1 << PG_writeback | \ | ||
377 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ | ||
378 | __PG_UNEVICTABLE | __PG_MLOCKED) | ||
379 | |||
380 | /* | ||
381 | * Flags checked in bad_page(). Pages on the free list should not have | ||
382 | * these flags set. It they are, there is a problem. | ||
383 | */ | ||
384 | #define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | \ | ||
385 | 1 << PG_reclaim | 1 << PG_dirty | 1 << PG_swapbacked) | ||
386 | |||
387 | /* | 376 | /* |
388 | * Flags checked when a page is freed. Pages being freed should not have | 377 | * Flags checked when a page is freed. Pages being freed should not have |
389 | * these flags set. It they are, there is a problem. | 378 | * these flags set. It they are, there is a problem. |
390 | */ | 379 | */ |
391 | #define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved) | 380 | #define PAGE_FLAGS_CHECK_AT_FREE \ |
381 | (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ | ||
382 | 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \ | ||
383 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ | ||
384 | __PG_UNEVICTABLE | __PG_MLOCKED) | ||
392 | 385 | ||
393 | /* | 386 | /* |
394 | * Flags checked when a page is prepped for return by the page allocator. | 387 | * Flags checked when a page is prepped for return by the page allocator. |
395 | * Pages being prepped should not have these flags set. It they are, there | 388 | * Pages being prepped should not have any flags set. It they are set, |
396 | * is a problem. | 389 | * there has been a kernel bug or struct page corruption. |
397 | */ | 390 | */ |
398 | #define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | \ | 391 | #define PAGE_FLAGS_CHECK_AT_PREP ((1 << NR_PAGEFLAGS) - 1) |
399 | 1 << PG_reserved | 1 << PG_dirty | 1 << PG_swapbacked) | ||
400 | 392 | ||
401 | #endif /* !__GENERATING_BOUNDS_H */ | 393 | #endif /* !__GENERATING_BOUNDS_H */ |
402 | #endif /* PAGE_FLAGS_H */ | 394 | #endif /* PAGE_FLAGS_H */ |
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index e90a2cb02915..7b2886fa7fdc 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -21,7 +21,6 @@ struct pagevec { | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | void __pagevec_release(struct pagevec *pvec); | 23 | void __pagevec_release(struct pagevec *pvec); |
24 | void __pagevec_release_nonlru(struct pagevec *pvec); | ||
25 | void __pagevec_free(struct pagevec *pvec); | 24 | void __pagevec_free(struct pagevec *pvec); |
26 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); | 25 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); |
27 | void pagevec_strip(struct pagevec *pvec); | 26 | void pagevec_strip(struct pagevec *pvec); |
@@ -69,12 +68,6 @@ static inline void pagevec_release(struct pagevec *pvec) | |||
69 | __pagevec_release(pvec); | 68 | __pagevec_release(pvec); |
70 | } | 69 | } |
71 | 70 | ||
72 | static inline void pagevec_release_nonlru(struct pagevec *pvec) | ||
73 | { | ||
74 | if (pagevec_count(pvec)) | ||
75 | __pagevec_release_nonlru(pvec); | ||
76 | } | ||
77 | |||
78 | static inline void pagevec_free(struct pagevec *pvec) | 71 | static inline void pagevec_free(struct pagevec *pvec) |
79 | { | 72 | { |
80 | if (pagevec_count(pvec)) | 73 | if (pagevec_count(pvec)) |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 03b0b8c3c81b..4bb156ba854a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -421,7 +421,6 @@ struct pci_driver { | |||
421 | int (*resume_early) (struct pci_dev *dev); | 421 | int (*resume_early) (struct pci_dev *dev); |
422 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 422 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
423 | void (*shutdown) (struct pci_dev *dev); | 423 | void (*shutdown) (struct pci_dev *dev); |
424 | struct pm_ext_ops *pm; | ||
425 | struct pci_error_handlers *err_handler; | 424 | struct pci_error_handlers *err_handler; |
426 | struct device_driver driver; | 425 | struct device_driver driver; |
427 | struct pci_dynids dynids; | 426 | struct pci_dynids dynids; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 218c73b1e6d4..d543365518ab 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1658,6 +1658,7 @@ | |||
1658 | #define PCI_VENDOR_ID_ROCKWELL 0x127A | 1658 | #define PCI_VENDOR_ID_ROCKWELL 0x127A |
1659 | 1659 | ||
1660 | #define PCI_VENDOR_ID_ITE 0x1283 | 1660 | #define PCI_VENDOR_ID_ITE 0x1283 |
1661 | #define PCI_DEVICE_ID_ITE_8172 0x8172 | ||
1661 | #define PCI_DEVICE_ID_ITE_8211 0x8211 | 1662 | #define PCI_DEVICE_ID_ITE_8211 0x8211 |
1662 | #define PCI_DEVICE_ID_ITE_8212 0x8212 | 1663 | #define PCI_DEVICE_ID_ITE_8212 0x8212 |
1663 | #define PCI_DEVICE_ID_ITE_8213 0x8213 | 1664 | #define PCI_DEVICE_ID_ITE_8213 0x8213 |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index 9007ccdfc112..a7684a513994 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -24,14 +24,18 @@ struct percpu_counter { | |||
24 | s32 *counters; | 24 | s32 *counters; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | #if NR_CPUS >= 16 | 27 | extern int percpu_counter_batch; |
28 | #define FBC_BATCH (NR_CPUS*2) | 28 | |
29 | #else | 29 | int __percpu_counter_init(struct percpu_counter *fbc, s64 amount, |
30 | #define FBC_BATCH (NR_CPUS*4) | 30 | struct lock_class_key *key); |
31 | #endif | 31 | |
32 | #define percpu_counter_init(fbc, value) \ | ||
33 | ({ \ | ||
34 | static struct lock_class_key __key; \ | ||
35 | \ | ||
36 | __percpu_counter_init(fbc, value, &__key); \ | ||
37 | }) | ||
32 | 38 | ||
33 | int percpu_counter_init(struct percpu_counter *fbc, s64 amount); | ||
34 | int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount); | ||
35 | void percpu_counter_destroy(struct percpu_counter *fbc); | 39 | void percpu_counter_destroy(struct percpu_counter *fbc); |
36 | void percpu_counter_set(struct percpu_counter *fbc, s64 amount); | 40 | void percpu_counter_set(struct percpu_counter *fbc, s64 amount); |
37 | void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch); | 41 | void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch); |
@@ -39,7 +43,7 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc); | |||
39 | 43 | ||
40 | static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount) | 44 | static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount) |
41 | { | 45 | { |
42 | __percpu_counter_add(fbc, amount, FBC_BATCH); | 46 | __percpu_counter_add(fbc, amount, percpu_counter_batch); |
43 | } | 47 | } |
44 | 48 | ||
45 | static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc) | 49 | static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc) |
@@ -85,8 +89,6 @@ static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount) | |||
85 | return 0; | 89 | return 0; |
86 | } | 90 | } |
87 | 91 | ||
88 | #define percpu_counter_init_irq percpu_counter_init | ||
89 | |||
90 | static inline void percpu_counter_destroy(struct percpu_counter *fbc) | 92 | static inline void percpu_counter_destroy(struct percpu_counter *fbc) |
91 | { | 93 | { |
92 | } | 94 | } |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 4b8cc6a32479..9a342699c607 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -55,7 +55,6 @@ struct platform_driver { | |||
55 | int (*suspend_late)(struct platform_device *, pm_message_t state); | 55 | int (*suspend_late)(struct platform_device *, pm_message_t state); |
56 | int (*resume_early)(struct platform_device *); | 56 | int (*resume_early)(struct platform_device *); |
57 | int (*resume)(struct platform_device *); | 57 | int (*resume)(struct platform_device *); |
58 | struct pm_ext_ops *pm; | ||
59 | struct device_driver driver; | 58 | struct device_driver driver; |
60 | }; | 59 | }; |
61 | 60 | ||
diff --git a/include/linux/pm.h b/include/linux/pm.h index 42de4003c4ee..de2e0a8f6728 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -41,7 +41,7 @@ typedef struct pm_message { | |||
41 | } pm_message_t; | 41 | } pm_message_t; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * struct pm_ops - device PM callbacks | 44 | * struct dev_pm_ops - device PM callbacks |
45 | * | 45 | * |
46 | * Several driver power state transitions are externally visible, affecting | 46 | * Several driver power state transitions are externally visible, affecting |
47 | * the state of pending I/O queues and (for drivers that touch hardware) | 47 | * the state of pending I/O queues and (for drivers that touch hardware) |
@@ -126,46 +126,6 @@ typedef struct pm_message { | |||
126 | * On most platforms, there are no restrictions on availability of | 126 | * On most platforms, there are no restrictions on availability of |
127 | * resources like clocks during @restore(). | 127 | * resources like clocks during @restore(). |
128 | * | 128 | * |
129 | * All of the above callbacks, except for @complete(), return error codes. | ||
130 | * However, the error codes returned by the resume operations, @resume(), | ||
131 | * @thaw(), and @restore(), do not cause the PM core to abort the resume | ||
132 | * transition during which they are returned. The error codes returned in | ||
133 | * that cases are only printed by the PM core to the system logs for debugging | ||
134 | * purposes. Still, it is recommended that drivers only return error codes | ||
135 | * from their resume methods in case of an unrecoverable failure (i.e. when the | ||
136 | * device being handled refuses to resume and becomes unusable) to allow us to | ||
137 | * modify the PM core in the future, so that it can avoid attempting to handle | ||
138 | * devices that failed to resume and their children. | ||
139 | * | ||
140 | * It is allowed to unregister devices while the above callbacks are being | ||
141 | * executed. However, it is not allowed to unregister a device from within any | ||
142 | * of its own callbacks. | ||
143 | */ | ||
144 | |||
145 | struct pm_ops { | ||
146 | int (*prepare)(struct device *dev); | ||
147 | void (*complete)(struct device *dev); | ||
148 | int (*suspend)(struct device *dev); | ||
149 | int (*resume)(struct device *dev); | ||
150 | int (*freeze)(struct device *dev); | ||
151 | int (*thaw)(struct device *dev); | ||
152 | int (*poweroff)(struct device *dev); | ||
153 | int (*restore)(struct device *dev); | ||
154 | }; | ||
155 | |||
156 | /** | ||
157 | * struct pm_ext_ops - extended device PM callbacks | ||
158 | * | ||
159 | * Some devices require certain operations related to suspend and hibernation | ||
160 | * to be carried out with interrupts disabled. Thus, 'struct pm_ext_ops' below | ||
161 | * is defined, adding callbacks to be executed with interrupts disabled to | ||
162 | * 'struct pm_ops'. | ||
163 | * | ||
164 | * The following callbacks included in 'struct pm_ext_ops' are executed with | ||
165 | * the nonboot CPUs switched off and with interrupts disabled on the only | ||
166 | * functional CPU. They also are executed with the PM core list of devices | ||
167 | * locked, so they must NOT unregister any devices. | ||
168 | * | ||
169 | * @suspend_noirq: Complete the operations of ->suspend() by carrying out any | 129 | * @suspend_noirq: Complete the operations of ->suspend() by carrying out any |
170 | * actions required for suspending the device that need interrupts to be | 130 | * actions required for suspending the device that need interrupts to be |
171 | * disabled | 131 | * disabled |
@@ -190,18 +150,32 @@ struct pm_ops { | |||
190 | * actions required for restoring the operations of the device that need | 150 | * actions required for restoring the operations of the device that need |
191 | * interrupts to be disabled | 151 | * interrupts to be disabled |
192 | * | 152 | * |
193 | * All of the above callbacks return error codes, but the error codes returned | 153 | * All of the above callbacks, except for @complete(), return error codes. |
194 | * by the resume operations, @resume_noirq(), @thaw_noirq(), and | 154 | * However, the error codes returned by the resume operations, @resume(), |
195 | * @restore_noirq(), do not cause the PM core to abort the resume transition | 155 | * @thaw(), @restore(), @resume_noirq(), @thaw_noirq(), and @restore_noirq() do |
196 | * during which they are returned. The error codes returned in that cases are | 156 | * not cause the PM core to abort the resume transition during which they are |
197 | * only printed by the PM core to the system logs for debugging purposes. | 157 | * returned. The error codes returned in that cases are only printed by the PM |
198 | * Still, as stated above, it is recommended that drivers only return error | 158 | * core to the system logs for debugging purposes. Still, it is recommended |
199 | * codes from their resume methods if the device being handled fails to resume | 159 | * that drivers only return error codes from their resume methods in case of an |
200 | * and is not usable any more. | 160 | * unrecoverable failure (i.e. when the device being handled refuses to resume |
161 | * and becomes unusable) to allow us to modify the PM core in the future, so | ||
162 | * that it can avoid attempting to handle devices that failed to resume and | ||
163 | * their children. | ||
164 | * | ||
165 | * It is allowed to unregister devices while the above callbacks are being | ||
166 | * executed. However, it is not allowed to unregister a device from within any | ||
167 | * of its own callbacks. | ||
201 | */ | 168 | */ |
202 | 169 | ||
203 | struct pm_ext_ops { | 170 | struct dev_pm_ops { |
204 | struct pm_ops base; | 171 | int (*prepare)(struct device *dev); |
172 | void (*complete)(struct device *dev); | ||
173 | int (*suspend)(struct device *dev); | ||
174 | int (*resume)(struct device *dev); | ||
175 | int (*freeze)(struct device *dev); | ||
176 | int (*thaw)(struct device *dev); | ||
177 | int (*poweroff)(struct device *dev); | ||
178 | int (*restore)(struct device *dev); | ||
205 | int (*suspend_noirq)(struct device *dev); | 179 | int (*suspend_noirq)(struct device *dev); |
206 | int (*resume_noirq)(struct device *dev); | 180 | int (*resume_noirq)(struct device *dev); |
207 | int (*freeze_noirq)(struct device *dev); | 181 | int (*freeze_noirq)(struct device *dev); |
@@ -278,7 +252,7 @@ struct pm_ext_ops { | |||
278 | #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE) | 252 | #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE) |
279 | #define PM_EVENT_USER_SUSPEND (PM_EVENT_USER | PM_EVENT_SUSPEND) | 253 | #define PM_EVENT_USER_SUSPEND (PM_EVENT_USER | PM_EVENT_SUSPEND) |
280 | #define PM_EVENT_USER_RESUME (PM_EVENT_USER | PM_EVENT_RESUME) | 254 | #define PM_EVENT_USER_RESUME (PM_EVENT_USER | PM_EVENT_RESUME) |
281 | #define PM_EVENT_REMOTE_WAKEUP (PM_EVENT_REMOTE | PM_EVENT_RESUME) | 255 | #define PM_EVENT_REMOTE_RESUME (PM_EVENT_REMOTE | PM_EVENT_RESUME) |
282 | #define PM_EVENT_AUTO_SUSPEND (PM_EVENT_AUTO | PM_EVENT_SUSPEND) | 256 | #define PM_EVENT_AUTO_SUSPEND (PM_EVENT_AUTO | PM_EVENT_SUSPEND) |
283 | #define PM_EVENT_AUTO_RESUME (PM_EVENT_AUTO | PM_EVENT_RESUME) | 257 | #define PM_EVENT_AUTO_RESUME (PM_EVENT_AUTO | PM_EVENT_RESUME) |
284 | 258 | ||
@@ -291,15 +265,15 @@ struct pm_ext_ops { | |||
291 | #define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, }) | 265 | #define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, }) |
292 | #define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, }) | 266 | #define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, }) |
293 | #define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, }) | 267 | #define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, }) |
294 | #define PMSG_USER_SUSPEND ((struct pm_messge) \ | 268 | #define PMSG_USER_SUSPEND ((struct pm_message) \ |
295 | { .event = PM_EVENT_USER_SUSPEND, }) | 269 | { .event = PM_EVENT_USER_SUSPEND, }) |
296 | #define PMSG_USER_RESUME ((struct pm_messge) \ | 270 | #define PMSG_USER_RESUME ((struct pm_message) \ |
297 | { .event = PM_EVENT_USER_RESUME, }) | 271 | { .event = PM_EVENT_USER_RESUME, }) |
298 | #define PMSG_REMOTE_RESUME ((struct pm_messge) \ | 272 | #define PMSG_REMOTE_RESUME ((struct pm_message) \ |
299 | { .event = PM_EVENT_REMOTE_RESUME, }) | 273 | { .event = PM_EVENT_REMOTE_RESUME, }) |
300 | #define PMSG_AUTO_SUSPEND ((struct pm_messge) \ | 274 | #define PMSG_AUTO_SUSPEND ((struct pm_message) \ |
301 | { .event = PM_EVENT_AUTO_SUSPEND, }) | 275 | { .event = PM_EVENT_AUTO_SUSPEND, }) |
302 | #define PMSG_AUTO_RESUME ((struct pm_messge) \ | 276 | #define PMSG_AUTO_RESUME ((struct pm_message) \ |
303 | { .event = PM_EVENT_AUTO_RESUME, }) | 277 | { .event = PM_EVENT_AUTO_RESUME, }) |
304 | 278 | ||
305 | /** | 279 | /** |
diff --git a/include/linux/poll.h b/include/linux/poll.h index badd98ab06f6..8c24ef8d9976 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
@@ -46,9 +46,9 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | struct poll_table_entry { | 48 | struct poll_table_entry { |
49 | struct file * filp; | 49 | struct file *filp; |
50 | wait_queue_t wait; | 50 | wait_queue_t wait; |
51 | wait_queue_head_t * wait_address; | 51 | wait_queue_head_t *wait_address; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* | 54 | /* |
@@ -56,7 +56,9 @@ struct poll_table_entry { | |||
56 | */ | 56 | */ |
57 | struct poll_wqueues { | 57 | struct poll_wqueues { |
58 | poll_table pt; | 58 | poll_table pt; |
59 | struct poll_table_page * table; | 59 | struct poll_table_page *table; |
60 | struct task_struct *polling_task; | ||
61 | int triggered; | ||
60 | int error; | 62 | int error; |
61 | int inline_index; | 63 | int inline_index; |
62 | struct poll_table_entry inline_entries[N_INLINE_POLL_ENTRIES]; | 64 | struct poll_table_entry inline_entries[N_INLINE_POLL_ENTRIES]; |
@@ -64,6 +66,13 @@ struct poll_wqueues { | |||
64 | 66 | ||
65 | extern void poll_initwait(struct poll_wqueues *pwq); | 67 | extern void poll_initwait(struct poll_wqueues *pwq); |
66 | extern void poll_freewait(struct poll_wqueues *pwq); | 68 | extern void poll_freewait(struct poll_wqueues *pwq); |
69 | extern int poll_schedule_timeout(struct poll_wqueues *pwq, int state, | ||
70 | ktime_t *expires, unsigned long slack); | ||
71 | |||
72 | static inline int poll_schedule(struct poll_wqueues *pwq, int state) | ||
73 | { | ||
74 | return poll_schedule_timeout(pwq, state, NULL, 0); | ||
75 | } | ||
67 | 76 | ||
68 | /* | 77 | /* |
69 | * Scaleable version of the fd_set. | 78 | * Scaleable version of the fd_set. |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 1168fbcea8d4..921340a7b71c 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -204,18 +204,6 @@ struct rcu_synchronize { | |||
204 | 204 | ||
205 | extern void wakeme_after_rcu(struct rcu_head *head); | 205 | extern void wakeme_after_rcu(struct rcu_head *head); |
206 | 206 | ||
207 | #define synchronize_rcu_xxx(name, func) \ | ||
208 | void name(void) \ | ||
209 | { \ | ||
210 | struct rcu_synchronize rcu; \ | ||
211 | \ | ||
212 | init_completion(&rcu.completion); \ | ||
213 | /* Will wake me after RCU finished. */ \ | ||
214 | func(&rcu.head, wakeme_after_rcu); \ | ||
215 | /* Wait for it. */ \ | ||
216 | wait_for_completion(&rcu.completion); \ | ||
217 | } | ||
218 | |||
219 | /** | 207 | /** |
220 | * synchronize_sched - block until all CPUs have exited any non-preemptive | 208 | * synchronize_sched - block until all CPUs have exited any non-preemptive |
221 | * kernel code sequences. | 209 | * kernel code sequences. |
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 32c0547ffafc..c93a58a40033 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
@@ -391,7 +391,6 @@ static inline int rio_add_inb_buffer(struct rio_mport *mport, int mbox, | |||
391 | * rio_get_inb_message - Get A RIO message from an inbound mailbox queue | 391 | * rio_get_inb_message - Get A RIO message from an inbound mailbox queue |
392 | * @mport: Master port containing the inbound mailbox | 392 | * @mport: Master port containing the inbound mailbox |
393 | * @mbox: The inbound mailbox number | 393 | * @mbox: The inbound mailbox number |
394 | * @buffer: Pointer to the message buffer | ||
395 | * | 394 | * |
396 | * Get a RIO message from an inbound mailbox queue. Returns 0 on success. | 395 | * Get a RIO message from an inbound mailbox queue. Returns 0 on success. |
397 | */ | 396 | */ |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 89f0564b10c8..b35bc0e19cd9 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -63,16 +63,13 @@ void anon_vma_unlink(struct vm_area_struct *); | |||
63 | void anon_vma_link(struct vm_area_struct *); | 63 | void anon_vma_link(struct vm_area_struct *); |
64 | void __anon_vma_link(struct vm_area_struct *); | 64 | void __anon_vma_link(struct vm_area_struct *); |
65 | 65 | ||
66 | extern struct anon_vma *page_lock_anon_vma(struct page *page); | ||
67 | extern void page_unlock_anon_vma(struct anon_vma *anon_vma); | ||
68 | |||
69 | /* | 66 | /* |
70 | * rmap interfaces called when adding or removing pte of page | 67 | * rmap interfaces called when adding or removing pte of page |
71 | */ | 68 | */ |
72 | void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); | 69 | void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); |
73 | void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); | 70 | void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); |
74 | void page_add_file_rmap(struct page *); | 71 | void page_add_file_rmap(struct page *); |
75 | void page_remove_rmap(struct page *, struct vm_area_struct *); | 72 | void page_remove_rmap(struct page *); |
76 | 73 | ||
77 | #ifdef CONFIG_DEBUG_VM | 74 | #ifdef CONFIG_DEBUG_VM |
78 | void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address); | 75 | void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 38a3f4b15394..4cae9b81a1f8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -386,6 +386,9 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); | |||
386 | (mm)->hiwater_vm = (mm)->total_vm; \ | 386 | (mm)->hiwater_vm = (mm)->total_vm; \ |
387 | } while (0) | 387 | } while (0) |
388 | 388 | ||
389 | #define get_mm_hiwater_rss(mm) max((mm)->hiwater_rss, get_mm_rss(mm)) | ||
390 | #define get_mm_hiwater_vm(mm) max((mm)->hiwater_vm, (mm)->total_vm) | ||
391 | |||
389 | extern void set_dumpable(struct mm_struct *mm, int value); | 392 | extern void set_dumpable(struct mm_struct *mm, int value); |
390 | extern int get_dumpable(struct mm_struct *mm); | 393 | extern int get_dumpable(struct mm_struct *mm); |
391 | 394 | ||
@@ -912,7 +915,6 @@ static inline struct cpumask *sched_domain_span(struct sched_domain *sd) | |||
912 | 915 | ||
913 | extern void partition_sched_domains(int ndoms_new, struct cpumask *doms_new, | 916 | extern void partition_sched_domains(int ndoms_new, struct cpumask *doms_new, |
914 | struct sched_domain_attr *dattr_new); | 917 | struct sched_domain_attr *dattr_new); |
915 | extern int arch_reinit_sched_domains(void); | ||
916 | 918 | ||
917 | /* Test a flag in parent sched domain */ | 919 | /* Test a flag in parent sched domain */ |
918 | static inline int test_sd_parent(struct sched_domain *sd, int flag) | 920 | static inline int test_sd_parent(struct sched_domain *sd, int flag) |
@@ -1704,16 +1706,16 @@ extern void wake_up_idle_cpu(int cpu); | |||
1704 | static inline void wake_up_idle_cpu(int cpu) { } | 1706 | static inline void wake_up_idle_cpu(int cpu) { } |
1705 | #endif | 1707 | #endif |
1706 | 1708 | ||
1707 | #ifdef CONFIG_SCHED_DEBUG | ||
1708 | extern unsigned int sysctl_sched_latency; | 1709 | extern unsigned int sysctl_sched_latency; |
1709 | extern unsigned int sysctl_sched_min_granularity; | 1710 | extern unsigned int sysctl_sched_min_granularity; |
1710 | extern unsigned int sysctl_sched_wakeup_granularity; | 1711 | extern unsigned int sysctl_sched_wakeup_granularity; |
1712 | extern unsigned int sysctl_sched_shares_ratelimit; | ||
1713 | extern unsigned int sysctl_sched_shares_thresh; | ||
1714 | #ifdef CONFIG_SCHED_DEBUG | ||
1711 | extern unsigned int sysctl_sched_child_runs_first; | 1715 | extern unsigned int sysctl_sched_child_runs_first; |
1712 | extern unsigned int sysctl_sched_features; | 1716 | extern unsigned int sysctl_sched_features; |
1713 | extern unsigned int sysctl_sched_migration_cost; | 1717 | extern unsigned int sysctl_sched_migration_cost; |
1714 | extern unsigned int sysctl_sched_nr_migrate; | 1718 | extern unsigned int sysctl_sched_nr_migrate; |
1715 | extern unsigned int sysctl_sched_shares_ratelimit; | ||
1716 | extern unsigned int sysctl_sched_shares_thresh; | ||
1717 | 1719 | ||
1718 | int sched_nr_latency_handler(struct ctl_table *table, int write, | 1720 | int sched_nr_latency_handler(struct ctl_table *table, int write, |
1719 | struct file *file, void __user *buffer, size_t *length, | 1721 | struct file *file, void __user *buffer, size_t *length, |
diff --git a/include/linux/spi/spi_gpio.h b/include/linux/spi/spi_gpio.h new file mode 100644 index 000000000000..0f01a0f1f40c --- /dev/null +++ b/include/linux/spi/spi_gpio.h | |||
@@ -0,0 +1,60 @@ | |||
1 | #ifndef __LINUX_SPI_GPIO_H | ||
2 | #define __LINUX_SPI_GPIO_H | ||
3 | |||
4 | /* | ||
5 | * For each bitbanged SPI bus, set up a platform_device node with: | ||
6 | * - name "spi_gpio" | ||
7 | * - id the same as the SPI bus number it implements | ||
8 | * - dev.platform data pointing to a struct spi_gpio_platform_data | ||
9 | * | ||
10 | * Or, see the driver code for information about speedups that are | ||
11 | * possible on platforms that support inlined access for GPIOs (no | ||
12 | * spi_gpio_platform_data is used). | ||
13 | * | ||
14 | * Use spi_board_info with these busses in the usual way, being sure | ||
15 | * that the controller_data being the GPIO used for each device's | ||
16 | * chipselect: | ||
17 | * | ||
18 | * static struct spi_board_info ... [] = { | ||
19 | * ... | ||
20 | * // this slave uses GPIO 42 for its chipselect | ||
21 | * .controller_data = (void *) 42, | ||
22 | * ... | ||
23 | * // this one uses GPIO 86 for its chipselect | ||
24 | * .controller_data = (void *) 86, | ||
25 | * ... | ||
26 | * }; | ||
27 | * | ||
28 | * If the bitbanged bus is later switched to a "native" controller, | ||
29 | * that platform_device and controller_data should be removed. | ||
30 | */ | ||
31 | |||
32 | /** | ||
33 | * struct spi_gpio_platform_data - parameter for bitbanged SPI master | ||
34 | * @sck: number of the GPIO used for clock output | ||
35 | * @mosi: number of the GPIO used for Master Output, Slave In (MOSI) data | ||
36 | * @miso: number of the GPIO used for Master Input, Slave Output (MISO) data | ||
37 | * @num_chipselect: how many slaves to allow | ||
38 | * | ||
39 | * All GPIO signals used with the SPI bus managed through this driver | ||
40 | * (chipselects, MOSI, MISO, SCK) must be configured as GPIOs, instead | ||
41 | * of some alternate function. | ||
42 | * | ||
43 | * It can be convenient to use this driver with pins that have alternate | ||
44 | * functions associated with a "native" SPI controller if a driver for that | ||
45 | * controller is not available, or is missing important functionality. | ||
46 | * | ||
47 | * On platforms which can do so, configure MISO with a weak pullup unless | ||
48 | * there's an external pullup on that signal. That saves power by avoiding | ||
49 | * floating signals. (A weak pulldown would save power too, but many | ||
50 | * drivers expect to see all-ones data as the no slave "response".) | ||
51 | */ | ||
52 | struct spi_gpio_platform_data { | ||
53 | unsigned sck; | ||
54 | unsigned mosi; | ||
55 | unsigned miso; | ||
56 | |||
57 | u16 num_chipselect; | ||
58 | }; | ||
59 | |||
60 | #endif /* __LINUX_SPI_GPIO_H */ | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index a3af95b2cb6d..91dee50fe260 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -120,7 +120,9 @@ struct swap_extent { | |||
120 | enum { | 120 | enum { |
121 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ | 121 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ |
122 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ | 122 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ |
123 | SWP_ACTIVE = (SWP_USED | SWP_WRITEOK), | 123 | SWP_DISCARDABLE = (1 << 2), /* blkdev supports discard */ |
124 | SWP_DISCARDING = (1 << 3), /* now discarding a free cluster */ | ||
125 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ | ||
124 | /* add others here before... */ | 126 | /* add others here before... */ |
125 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ | 127 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ |
126 | }; | 128 | }; |
@@ -134,22 +136,24 @@ enum { | |||
134 | * The in-memory structure used to track swap areas. | 136 | * The in-memory structure used to track swap areas. |
135 | */ | 137 | */ |
136 | struct swap_info_struct { | 138 | struct swap_info_struct { |
137 | unsigned int flags; | 139 | unsigned long flags; |
138 | int prio; /* swap priority */ | 140 | int prio; /* swap priority */ |
141 | int next; /* next entry on swap list */ | ||
139 | struct file *swap_file; | 142 | struct file *swap_file; |
140 | struct block_device *bdev; | 143 | struct block_device *bdev; |
141 | struct list_head extent_list; | 144 | struct list_head extent_list; |
142 | struct swap_extent *curr_swap_extent; | 145 | struct swap_extent *curr_swap_extent; |
143 | unsigned old_block_size; | 146 | unsigned short *swap_map; |
144 | unsigned short * swap_map; | ||
145 | unsigned int lowest_bit; | 147 | unsigned int lowest_bit; |
146 | unsigned int highest_bit; | 148 | unsigned int highest_bit; |
149 | unsigned int lowest_alloc; /* while preparing discard cluster */ | ||
150 | unsigned int highest_alloc; /* while preparing discard cluster */ | ||
147 | unsigned int cluster_next; | 151 | unsigned int cluster_next; |
148 | unsigned int cluster_nr; | 152 | unsigned int cluster_nr; |
149 | unsigned int pages; | 153 | unsigned int pages; |
150 | unsigned int max; | 154 | unsigned int max; |
151 | unsigned int inuse_pages; | 155 | unsigned int inuse_pages; |
152 | int next; /* next entry on swap list */ | 156 | unsigned int old_block_size; |
153 | }; | 157 | }; |
154 | 158 | ||
155 | struct swap_list_t { | 159 | struct swap_list_t { |
@@ -163,7 +167,6 @@ struct swap_list_t { | |||
163 | /* linux/mm/page_alloc.c */ | 167 | /* linux/mm/page_alloc.c */ |
164 | extern unsigned long totalram_pages; | 168 | extern unsigned long totalram_pages; |
165 | extern unsigned long totalreserve_pages; | 169 | extern unsigned long totalreserve_pages; |
166 | extern long nr_swap_pages; | ||
167 | extern unsigned int nr_free_buffer_pages(void); | 170 | extern unsigned int nr_free_buffer_pages(void); |
168 | extern unsigned int nr_free_pagecache_pages(void); | 171 | extern unsigned int nr_free_pagecache_pages(void); |
169 | 172 | ||
@@ -174,8 +177,6 @@ extern unsigned int nr_free_pagecache_pages(void); | |||
174 | /* linux/mm/swap.c */ | 177 | /* linux/mm/swap.c */ |
175 | extern void __lru_cache_add(struct page *, enum lru_list lru); | 178 | extern void __lru_cache_add(struct page *, enum lru_list lru); |
176 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); | 179 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); |
177 | extern void lru_cache_add_active_or_unevictable(struct page *, | ||
178 | struct vm_area_struct *); | ||
179 | extern void activate_page(struct page *); | 180 | extern void activate_page(struct page *); |
180 | extern void mark_page_accessed(struct page *); | 181 | extern void mark_page_accessed(struct page *); |
181 | extern void lru_add_drain(void); | 182 | extern void lru_add_drain(void); |
@@ -280,7 +281,7 @@ extern void end_swap_bio_read(struct bio *bio, int err); | |||
280 | extern struct address_space swapper_space; | 281 | extern struct address_space swapper_space; |
281 | #define total_swapcache_pages swapper_space.nrpages | 282 | #define total_swapcache_pages swapper_space.nrpages |
282 | extern void show_swap_cache_info(void); | 283 | extern void show_swap_cache_info(void); |
283 | extern int add_to_swap(struct page *, gfp_t); | 284 | extern int add_to_swap(struct page *); |
284 | extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t); | 285 | extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t); |
285 | extern void __delete_from_swap_cache(struct page *); | 286 | extern void __delete_from_swap_cache(struct page *); |
286 | extern void delete_from_swap_cache(struct page *); | 287 | extern void delete_from_swap_cache(struct page *); |
@@ -293,6 +294,7 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t, | |||
293 | struct vm_area_struct *vma, unsigned long addr); | 294 | struct vm_area_struct *vma, unsigned long addr); |
294 | 295 | ||
295 | /* linux/mm/swapfile.c */ | 296 | /* linux/mm/swapfile.c */ |
297 | extern long nr_swap_pages; | ||
296 | extern long total_swap_pages; | 298 | extern long total_swap_pages; |
297 | extern void si_swapinfo(struct sysinfo *); | 299 | extern void si_swapinfo(struct sysinfo *); |
298 | extern swp_entry_t get_swap_page(void); | 300 | extern swp_entry_t get_swap_page(void); |
@@ -300,15 +302,14 @@ extern swp_entry_t get_swap_page_of_type(int); | |||
300 | extern int swap_duplicate(swp_entry_t); | 302 | extern int swap_duplicate(swp_entry_t); |
301 | extern int valid_swaphandles(swp_entry_t, unsigned long *); | 303 | extern int valid_swaphandles(swp_entry_t, unsigned long *); |
302 | extern void swap_free(swp_entry_t); | 304 | extern void swap_free(swp_entry_t); |
303 | extern void free_swap_and_cache(swp_entry_t); | 305 | extern int free_swap_and_cache(swp_entry_t); |
304 | extern int swap_type_of(dev_t, sector_t, struct block_device **); | 306 | extern int swap_type_of(dev_t, sector_t, struct block_device **); |
305 | extern unsigned int count_swap_pages(int, int); | 307 | extern unsigned int count_swap_pages(int, int); |
306 | extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t); | 308 | extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t); |
307 | extern sector_t swapdev_block(int, pgoff_t); | 309 | extern sector_t swapdev_block(int, pgoff_t); |
308 | extern struct swap_info_struct *get_swap_info_struct(unsigned); | 310 | extern struct swap_info_struct *get_swap_info_struct(unsigned); |
309 | extern int can_share_swap_page(struct page *); | 311 | extern int reuse_swap_page(struct page *); |
310 | extern int remove_exclusive_swap_page(struct page *); | 312 | extern int try_to_free_swap(struct page *); |
311 | extern int remove_exclusive_swap_page_ref(struct page *); | ||
312 | struct backing_dev_info; | 313 | struct backing_dev_info; |
313 | 314 | ||
314 | /* linux/mm/thrash.c */ | 315 | /* linux/mm/thrash.c */ |
@@ -334,7 +335,8 @@ static inline void disable_swap_token(void) | |||
334 | 335 | ||
335 | #else /* CONFIG_SWAP */ | 336 | #else /* CONFIG_SWAP */ |
336 | 337 | ||
337 | #define total_swap_pages 0 | 338 | #define nr_swap_pages 0L |
339 | #define total_swap_pages 0L | ||
338 | #define total_swapcache_pages 0UL | 340 | #define total_swapcache_pages 0UL |
339 | 341 | ||
340 | #define si_swapinfo(val) \ | 342 | #define si_swapinfo(val) \ |
@@ -350,14 +352,8 @@ static inline void show_swap_cache_info(void) | |||
350 | { | 352 | { |
351 | } | 353 | } |
352 | 354 | ||
353 | static inline void free_swap_and_cache(swp_entry_t swp) | 355 | #define free_swap_and_cache(swp) is_migration_entry(swp) |
354 | { | 356 | #define swap_duplicate(swp) is_migration_entry(swp) |
355 | } | ||
356 | |||
357 | static inline int swap_duplicate(swp_entry_t swp) | ||
358 | { | ||
359 | return 0; | ||
360 | } | ||
361 | 357 | ||
362 | static inline void swap_free(swp_entry_t swp) | 358 | static inline void swap_free(swp_entry_t swp) |
363 | { | 359 | { |
@@ -374,7 +370,10 @@ static inline struct page *lookup_swap_cache(swp_entry_t swp) | |||
374 | return NULL; | 370 | return NULL; |
375 | } | 371 | } |
376 | 372 | ||
377 | #define can_share_swap_page(p) (page_mapcount(p) == 1) | 373 | static inline int add_to_swap(struct page *page) |
374 | { | ||
375 | return 0; | ||
376 | } | ||
378 | 377 | ||
379 | static inline int add_to_swap_cache(struct page *page, swp_entry_t entry, | 378 | static inline int add_to_swap_cache(struct page *page, swp_entry_t entry, |
380 | gfp_t gfp_mask) | 379 | gfp_t gfp_mask) |
@@ -390,14 +389,9 @@ static inline void delete_from_swap_cache(struct page *page) | |||
390 | { | 389 | { |
391 | } | 390 | } |
392 | 391 | ||
393 | #define swap_token_default_timeout 0 | 392 | #define reuse_swap_page(page) (page_mapcount(page) == 1) |
394 | |||
395 | static inline int remove_exclusive_swap_page(struct page *p) | ||
396 | { | ||
397 | return 0; | ||
398 | } | ||
399 | 393 | ||
400 | static inline int remove_exclusive_swap_page_ref(struct page *page) | 394 | static inline int try_to_free_swap(struct page *page) |
401 | { | 395 | { |
402 | return 0; | 396 | return 0; |
403 | } | 397 | } |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 325af1de0351..dedd3c0cfe30 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -27,7 +27,8 @@ swiotlb_init(void); | |||
27 | extern void *swiotlb_alloc_boot(size_t bytes, unsigned long nslabs); | 27 | extern void *swiotlb_alloc_boot(size_t bytes, unsigned long nslabs); |
28 | extern void *swiotlb_alloc(unsigned order, unsigned long nslabs); | 28 | extern void *swiotlb_alloc(unsigned order, unsigned long nslabs); |
29 | 29 | ||
30 | extern dma_addr_t swiotlb_phys_to_bus(phys_addr_t address); | 30 | extern dma_addr_t swiotlb_phys_to_bus(struct device *hwdev, |
31 | phys_addr_t address); | ||
31 | extern phys_addr_t swiotlb_bus_to_phys(dma_addr_t address); | 32 | extern phys_addr_t swiotlb_bus_to_phys(dma_addr_t address); |
32 | 33 | ||
33 | extern int swiotlb_arch_range_needs_mapping(void *ptr, size_t size); | 34 | extern int swiotlb_arch_range_needs_mapping(void *ptr, size_t size); |
diff --git a/include/linux/time.h b/include/linux/time.h index ce321ac5c8f8..fbbd2a1c92ba 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -105,6 +105,7 @@ extern unsigned long read_persistent_clock(void); | |||
105 | extern int update_persistent_clock(struct timespec now); | 105 | extern int update_persistent_clock(struct timespec now); |
106 | extern int no_sync_cmos_clock __read_mostly; | 106 | extern int no_sync_cmos_clock __read_mostly; |
107 | void timekeeping_init(void); | 107 | void timekeeping_init(void); |
108 | extern int timekeeping_suspended; | ||
108 | 109 | ||
109 | unsigned long get_seconds(void); | 110 | unsigned long get_seconds(void); |
110 | struct timespec current_kernel_time(void); | 111 | struct timespec current_kernel_time(void); |
diff --git a/include/linux/types.h b/include/linux/types.h index 121f349cb7ec..3b864f2d9560 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -195,6 +195,16 @@ typedef u32 phys_addr_t; | |||
195 | 195 | ||
196 | typedef phys_addr_t resource_size_t; | 196 | typedef phys_addr_t resource_size_t; |
197 | 197 | ||
198 | typedef struct { | ||
199 | volatile int counter; | ||
200 | } atomic_t; | ||
201 | |||
202 | #ifdef CONFIG_64BIT | ||
203 | typedef struct { | ||
204 | volatile long counter; | ||
205 | } atomic64_t; | ||
206 | #endif | ||
207 | |||
198 | struct ustat { | 208 | struct ustat { |
199 | __kernel_daddr_t f_tfree; | 209 | __kernel_daddr_t f_tfree; |
200 | __kernel_ino_t f_tinode; | 210 | __kernel_ino_t f_tinode; |
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index cdf338d94b7f..a0bb6bd2e5c1 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
@@ -38,6 +38,24 @@ struct uio_mem { | |||
38 | 38 | ||
39 | #define MAX_UIO_MAPS 5 | 39 | #define MAX_UIO_MAPS 5 |
40 | 40 | ||
41 | struct uio_portio; | ||
42 | |||
43 | /** | ||
44 | * struct uio_port - description of a UIO port region | ||
45 | * @start: start of port region | ||
46 | * @size: size of port region | ||
47 | * @porttype: type of port (see UIO_PORT_* below) | ||
48 | * @portio: for use by the UIO core only. | ||
49 | */ | ||
50 | struct uio_port { | ||
51 | unsigned long start; | ||
52 | unsigned long size; | ||
53 | int porttype; | ||
54 | struct uio_portio *portio; | ||
55 | }; | ||
56 | |||
57 | #define MAX_UIO_PORT_REGIONS 5 | ||
58 | |||
41 | struct uio_device; | 59 | struct uio_device; |
42 | 60 | ||
43 | /** | 61 | /** |
@@ -46,6 +64,7 @@ struct uio_device; | |||
46 | * @name: device name | 64 | * @name: device name |
47 | * @version: device driver version | 65 | * @version: device driver version |
48 | * @mem: list of mappable memory regions, size==0 for end of list | 66 | * @mem: list of mappable memory regions, size==0 for end of list |
67 | * @port: list of port regions, size==0 for end of list | ||
49 | * @irq: interrupt number or UIO_IRQ_CUSTOM | 68 | * @irq: interrupt number or UIO_IRQ_CUSTOM |
50 | * @irq_flags: flags for request_irq() | 69 | * @irq_flags: flags for request_irq() |
51 | * @priv: optional private data | 70 | * @priv: optional private data |
@@ -57,9 +76,10 @@ struct uio_device; | |||
57 | */ | 76 | */ |
58 | struct uio_info { | 77 | struct uio_info { |
59 | struct uio_device *uio_dev; | 78 | struct uio_device *uio_dev; |
60 | char *name; | 79 | const char *name; |
61 | char *version; | 80 | const char *version; |
62 | struct uio_mem mem[MAX_UIO_MAPS]; | 81 | struct uio_mem mem[MAX_UIO_MAPS]; |
82 | struct uio_port port[MAX_UIO_PORT_REGIONS]; | ||
63 | long irq; | 83 | long irq; |
64 | unsigned long irq_flags; | 84 | unsigned long irq_flags; |
65 | void *priv; | 85 | void *priv; |
@@ -92,4 +112,10 @@ extern void uio_event_notify(struct uio_info *info); | |||
92 | #define UIO_MEM_LOGICAL 2 | 112 | #define UIO_MEM_LOGICAL 2 |
93 | #define UIO_MEM_VIRTUAL 3 | 113 | #define UIO_MEM_VIRTUAL 3 |
94 | 114 | ||
115 | /* defines for uio_port->porttype */ | ||
116 | #define UIO_PORT_NONE 0 | ||
117 | #define UIO_PORT_X86 1 | ||
118 | #define UIO_PORT_GPIO 2 | ||
119 | #define UIO_PORT_OTHER 3 | ||
120 | |||
95 | #endif /* _LINUX_UIO_DRIVER_H_ */ | 121 | #endif /* _LINUX_UIO_DRIVER_H_ */ |
diff --git a/include/linux/unwind.h b/include/linux/unwind.h deleted file mode 100644 index 7760860fa170..000000000000 --- a/include/linux/unwind.h +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | #ifndef _LINUX_UNWIND_H | ||
2 | #define _LINUX_UNWIND_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2002-2006 Novell, Inc. | ||
6 | * Jan Beulich <jbeulich@novell.com> | ||
7 | * This code is released under version 2 of the GNU GPL. | ||
8 | * | ||
9 | * A simple API for unwinding kernel stacks. This is used for | ||
10 | * debugging and error reporting purposes. The kernel doesn't need | ||
11 | * full-blown stack unwinding with all the bells and whistles, so there | ||
12 | * is not much point in implementing the full Dwarf2 unwind API. | ||
13 | */ | ||
14 | |||
15 | struct module; | ||
16 | |||
17 | struct unwind_frame_info {}; | ||
18 | |||
19 | static inline void unwind_init(void) {} | ||
20 | static inline void unwind_setup(void) {} | ||
21 | |||
22 | #ifdef CONFIG_MODULES | ||
23 | |||
24 | static inline void *unwind_add_table(struct module *mod, | ||
25 | const void *table_start, | ||
26 | unsigned long table_size) | ||
27 | { | ||
28 | return NULL; | ||
29 | } | ||
30 | |||
31 | static inline void unwind_remove_table(void *handle, int init_only) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | #endif | ||
36 | |||
37 | static inline int unwind_init_frame_info(struct unwind_frame_info *info, | ||
38 | struct task_struct *tsk, | ||
39 | const struct pt_regs *regs) | ||
40 | { | ||
41 | return -ENOSYS; | ||
42 | } | ||
43 | |||
44 | static inline int unwind_init_blocked(struct unwind_frame_info *info, | ||
45 | struct task_struct *tsk) | ||
46 | { | ||
47 | return -ENOSYS; | ||
48 | } | ||
49 | |||
50 | static inline int unwind_init_running(struct unwind_frame_info *info, | ||
51 | asmlinkage int (*cb)(struct unwind_frame_info *, | ||
52 | void *arg), | ||
53 | void *arg) | ||
54 | { | ||
55 | return -ENOSYS; | ||
56 | } | ||
57 | |||
58 | static inline int unwind(struct unwind_frame_info *info) | ||
59 | { | ||
60 | return -ENOSYS; | ||
61 | } | ||
62 | |||
63 | static inline int unwind_to_user(struct unwind_frame_info *info) | ||
64 | { | ||
65 | return -ENOSYS; | ||
66 | } | ||
67 | |||
68 | #endif /* _LINUX_UNWIND_H */ | ||
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 307b88577eaa..506e7620a986 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -97,6 +97,10 @@ extern void unmap_kernel_range(unsigned long addr, unsigned long size); | |||
97 | extern struct vm_struct *alloc_vm_area(size_t size); | 97 | extern struct vm_struct *alloc_vm_area(size_t size); |
98 | extern void free_vm_area(struct vm_struct *area); | 98 | extern void free_vm_area(struct vm_struct *area); |
99 | 99 | ||
100 | /* for /dev/kmem */ | ||
101 | extern long vread(char *buf, char *addr, unsigned long count); | ||
102 | extern long vwrite(char *buf, char *addr, unsigned long count); | ||
103 | |||
100 | /* | 104 | /* |
101 | * Internals. Dont't use.. | 105 | * Internals. Dont't use.. |
102 | */ | 106 | */ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index e585657e9831..7300ecdc480c 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -30,7 +30,6 @@ static inline int task_is_pdflush(struct task_struct *task) | |||
30 | enum writeback_sync_modes { | 30 | enum writeback_sync_modes { |
31 | WB_SYNC_NONE, /* Don't wait on anything */ | 31 | WB_SYNC_NONE, /* Don't wait on anything */ |
32 | WB_SYNC_ALL, /* Wait on every mapping */ | 32 | WB_SYNC_ALL, /* Wait on every mapping */ |
33 | WB_SYNC_HOLD, /* Hold the inode on sb_dirty for sys_sync() */ | ||
34 | }; | 33 | }; |
35 | 34 | ||
36 | /* | 35 | /* |
@@ -107,7 +106,9 @@ void throttle_vm_writeout(gfp_t gfp_mask); | |||
107 | 106 | ||
108 | /* These are exported to sysctl. */ | 107 | /* These are exported to sysctl. */ |
109 | extern int dirty_background_ratio; | 108 | extern int dirty_background_ratio; |
109 | extern unsigned long dirty_background_bytes; | ||
110 | extern int vm_dirty_ratio; | 110 | extern int vm_dirty_ratio; |
111 | extern unsigned long vm_dirty_bytes; | ||
111 | extern int dirty_writeback_interval; | 112 | extern int dirty_writeback_interval; |
112 | extern int dirty_expire_interval; | 113 | extern int dirty_expire_interval; |
113 | extern int vm_highmem_is_dirtyable; | 114 | extern int vm_highmem_is_dirtyable; |
@@ -116,17 +117,26 @@ extern int laptop_mode; | |||
116 | 117 | ||
117 | extern unsigned long determine_dirtyable_memory(void); | 118 | extern unsigned long determine_dirtyable_memory(void); |
118 | 119 | ||
120 | extern int dirty_background_ratio_handler(struct ctl_table *table, int write, | ||
121 | struct file *filp, void __user *buffer, size_t *lenp, | ||
122 | loff_t *ppos); | ||
123 | extern int dirty_background_bytes_handler(struct ctl_table *table, int write, | ||
124 | struct file *filp, void __user *buffer, size_t *lenp, | ||
125 | loff_t *ppos); | ||
119 | extern int dirty_ratio_handler(struct ctl_table *table, int write, | 126 | extern int dirty_ratio_handler(struct ctl_table *table, int write, |
120 | struct file *filp, void __user *buffer, size_t *lenp, | 127 | struct file *filp, void __user *buffer, size_t *lenp, |
121 | loff_t *ppos); | 128 | loff_t *ppos); |
129 | extern int dirty_bytes_handler(struct ctl_table *table, int write, | ||
130 | struct file *filp, void __user *buffer, size_t *lenp, | ||
131 | loff_t *ppos); | ||
122 | 132 | ||
123 | struct ctl_table; | 133 | struct ctl_table; |
124 | struct file; | 134 | struct file; |
125 | int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *, | 135 | int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *, |
126 | void __user *, size_t *, loff_t *); | 136 | void __user *, size_t *, loff_t *); |
127 | 137 | ||
128 | void get_dirty_limits(long *pbackground, long *pdirty, long *pbdi_dirty, | 138 | void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty, |
129 | struct backing_dev_info *bdi); | 139 | unsigned long *pbdi_dirty, struct backing_dev_info *bdi); |
130 | 140 | ||
131 | void page_writeback_init(void); | 141 | void page_writeback_init(void); |
132 | void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, | 142 | void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 7ee2f70ca42e..4af1083e3287 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -85,6 +85,10 @@ | |||
85 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 85 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
86 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 86 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
87 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | 87 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} |
88 | #define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \ | ||
89 | { .id = snd_soc_dapm_value_mux, .name = wname, .reg = wreg, \ | ||
90 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | ||
91 | .num_kcontrols = 1} | ||
88 | 92 | ||
89 | /* path domain with event - event handler must return 0 for success */ | 93 | /* path domain with event - event handler must return 0 for success */ |
90 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ | 94 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ |
@@ -172,6 +176,12 @@ | |||
172 | .get = snd_soc_dapm_get_enum_double, \ | 176 | .get = snd_soc_dapm_get_enum_double, \ |
173 | .put = snd_soc_dapm_put_enum_double, \ | 177 | .put = snd_soc_dapm_put_enum_double, \ |
174 | .private_value = (unsigned long)&xenum } | 178 | .private_value = (unsigned long)&xenum } |
179 | #define SOC_DAPM_VALUE_ENUM(xname, xenum) \ | ||
180 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
181 | .info = snd_soc_info_value_enum_double, \ | ||
182 | .get = snd_soc_dapm_get_value_enum_double, \ | ||
183 | .put = snd_soc_dapm_put_value_enum_double, \ | ||
184 | .private_value = (unsigned long)&xenum } | ||
175 | 185 | ||
176 | /* dapm stream operations */ | 186 | /* dapm stream operations */ |
177 | #define SND_SOC_DAPM_STREAM_NOP 0x0 | 187 | #define SND_SOC_DAPM_STREAM_NOP 0x0 |
@@ -214,6 +224,10 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol, | |||
214 | struct snd_ctl_elem_value *ucontrol); | 224 | struct snd_ctl_elem_value *ucontrol); |
215 | int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, | 225 | int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, |
216 | struct snd_ctl_elem_value *ucontrol); | 226 | struct snd_ctl_elem_value *ucontrol); |
227 | int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol, | ||
228 | struct snd_ctl_elem_value *ucontrol); | ||
229 | int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, | ||
230 | struct snd_ctl_elem_value *ucontrol); | ||
217 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, | 231 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, |
218 | const struct snd_soc_dapm_widget *widget); | 232 | const struct snd_soc_dapm_widget *widget); |
219 | int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, | 233 | int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, |
@@ -247,6 +261,7 @@ enum snd_soc_dapm_type { | |||
247 | snd_soc_dapm_input = 0, /* input pin */ | 261 | snd_soc_dapm_input = 0, /* input pin */ |
248 | snd_soc_dapm_output, /* output pin */ | 262 | snd_soc_dapm_output, /* output pin */ |
249 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ | 263 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ |
264 | snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */ | ||
250 | snd_soc_dapm_mixer, /* mixes several analog signals together */ | 265 | snd_soc_dapm_mixer, /* mixes several analog signals together */ |
251 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ | 266 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ |
252 | snd_soc_dapm_adc, /* analog to digital converter */ | 267 | snd_soc_dapm_adc, /* analog to digital converter */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index f86e455d3828..9b930d342116 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -94,11 +94,22 @@ | |||
94 | SOC_ENUM_DOUBLE(xreg, xshift, xshift, xmax, xtexts) | 94 | SOC_ENUM_DOUBLE(xreg, xshift, xshift, xmax, xtexts) |
95 | #define SOC_ENUM_SINGLE_EXT(xmax, xtexts) \ | 95 | #define SOC_ENUM_SINGLE_EXT(xmax, xtexts) \ |
96 | { .max = xmax, .texts = xtexts } | 96 | { .max = xmax, .texts = xtexts } |
97 | #define SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xmax, xtexts, xvalues) \ | ||
98 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ | ||
99 | .mask = xmask, .max = xmax, .texts = xtexts, .values = xvalues} | ||
100 | #define SOC_VALUE_ENUM_SINGLE(xreg, xshift, xmask, xmax, xtexts, xvalues) \ | ||
101 | SOC_VALUE_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xmax, xtexts, xvalues) | ||
97 | #define SOC_ENUM(xname, xenum) \ | 102 | #define SOC_ENUM(xname, xenum) \ |
98 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\ | 103 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\ |
99 | .info = snd_soc_info_enum_double, \ | 104 | .info = snd_soc_info_enum_double, \ |
100 | .get = snd_soc_get_enum_double, .put = snd_soc_put_enum_double, \ | 105 | .get = snd_soc_get_enum_double, .put = snd_soc_put_enum_double, \ |
101 | .private_value = (unsigned long)&xenum } | 106 | .private_value = (unsigned long)&xenum } |
107 | #define SOC_VALUE_ENUM(xname, xenum) \ | ||
108 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\ | ||
109 | .info = snd_soc_info_value_enum_double, \ | ||
110 | .get = snd_soc_get_value_enum_double, \ | ||
111 | .put = snd_soc_put_value_enum_double, \ | ||
112 | .private_value = (unsigned long)&xenum } | ||
102 | #define SOC_SINGLE_EXT(xname, xreg, xshift, xmax, xinvert,\ | 113 | #define SOC_SINGLE_EXT(xname, xreg, xshift, xmax, xinvert,\ |
103 | xhandler_get, xhandler_put) \ | 114 | xhandler_get, xhandler_put) \ |
104 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 115 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
@@ -200,6 +211,12 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol, | |||
200 | struct snd_ctl_elem_value *ucontrol); | 211 | struct snd_ctl_elem_value *ucontrol); |
201 | int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol, | 212 | int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol, |
202 | struct snd_ctl_elem_value *ucontrol); | 213 | struct snd_ctl_elem_value *ucontrol); |
214 | int snd_soc_info_value_enum_double(struct snd_kcontrol *kcontrol, | ||
215 | struct snd_ctl_elem_info *uinfo); | ||
216 | int snd_soc_get_value_enum_double(struct snd_kcontrol *kcontrol, | ||
217 | struct snd_ctl_elem_value *ucontrol); | ||
218 | int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol, | ||
219 | struct snd_ctl_elem_value *ucontrol); | ||
203 | int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, | 220 | int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, |
204 | struct snd_ctl_elem_info *uinfo); | 221 | struct snd_ctl_elem_info *uinfo); |
205 | int snd_soc_info_volsw_ext(struct snd_kcontrol *kcontrol, | 222 | int snd_soc_info_volsw_ext(struct snd_kcontrol *kcontrol, |
@@ -406,6 +423,19 @@ struct soc_enum { | |||
406 | void *dapm; | 423 | void *dapm; |
407 | }; | 424 | }; |
408 | 425 | ||
426 | /* semi enumerated kcontrol */ | ||
427 | struct soc_value_enum { | ||
428 | unsigned short reg; | ||
429 | unsigned short reg2; | ||
430 | unsigned char shift_l; | ||
431 | unsigned char shift_r; | ||
432 | unsigned int max; | ||
433 | unsigned int mask; | ||
434 | const char **texts; | ||
435 | const unsigned int *values; | ||
436 | void *dapm; | ||
437 | }; | ||
438 | |||
409 | #include <sound/soc-dai.h> | 439 | #include <sound/soc-dai.h> |
410 | 440 | ||
411 | #endif | 441 | #endif |