aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/audit_change_attr.h4
-rw-r--r--include/asm-generic/audit_dir_write.h14
-rw-r--r--include/asm-generic/audit_read.h5
-rw-r--r--include/asm-generic/audit_write.h2
-rw-r--r--include/asm-generic/unistd.h221
-rw-r--r--include/linux/blk_types.h2
-rw-r--r--include/linux/blkdev.h15
-rw-r--r--include/linux/ceph/ceph_fs.h1
-rw-r--r--include/linux/compat.h236
-rw-r--r--include/linux/drbd.h10
-rw-r--r--include/linux/drbd_tag_magic.h2
-rw-r--r--include/linux/genhd.h2
-rw-r--r--include/linux/i2c.h2
-rw-r--r--include/linux/lru_cache.h12
-rw-r--r--include/linux/mfd/db5500-prcmu.h45
-rw-r--r--include/linux/mfd/db8500-prcmu.h978
-rw-r--r--include/linux/regulator/db8500-prcmu.h45
-rw-r--r--include/net/9p/9p.h13
-rw-r--r--include/net/9p/client.h2
-rw-r--r--include/net/9p/transport.h3
-rw-r--r--include/xen/interface/io/blkif.h13
21 files changed, 1483 insertions, 144 deletions
diff --git a/include/asm-generic/audit_change_attr.h b/include/asm-generic/audit_change_attr.h
index bcbab3e4a3be..89b73e5d0fd0 100644
--- a/include/asm-generic/audit_change_attr.h
+++ b/include/asm-generic/audit_change_attr.h
@@ -1,4 +1,6 @@
1#ifdef __NR_chmod
1__NR_chmod, 2__NR_chmod,
3#endif
2__NR_fchmod, 4__NR_fchmod,
3#ifdef __NR_chown 5#ifdef __NR_chown
4__NR_chown, 6__NR_chown,
@@ -20,7 +22,9 @@ __NR_chown32,
20__NR_fchown32, 22__NR_fchown32,
21__NR_lchown32, 23__NR_lchown32,
22#endif 24#endif
25#ifdef __NR_link
23__NR_link, 26__NR_link,
27#endif
24#ifdef __NR_linkat 28#ifdef __NR_linkat
25__NR_linkat, 29__NR_linkat,
26#endif 30#endif
diff --git a/include/asm-generic/audit_dir_write.h b/include/asm-generic/audit_dir_write.h
index 6621bd82cbe8..7b61db4fe72b 100644
--- a/include/asm-generic/audit_dir_write.h
+++ b/include/asm-generic/audit_dir_write.h
@@ -1,13 +1,27 @@
1#ifdef __NR_rename
1__NR_rename, 2__NR_rename,
3#endif
4#ifdef __NR_mkdir
2__NR_mkdir, 5__NR_mkdir,
6#endif
7#ifdef __NR_rmdir
3__NR_rmdir, 8__NR_rmdir,
9#endif
4#ifdef __NR_creat 10#ifdef __NR_creat
5__NR_creat, 11__NR_creat,
6#endif 12#endif
13#ifdef __NR_link
7__NR_link, 14__NR_link,
15#endif
16#ifdef __NR_unlink
8__NR_unlink, 17__NR_unlink,
18#endif
19#ifdef __NR_symlink
9__NR_symlink, 20__NR_symlink,
21#endif
22#ifdef __NR_mknod
10__NR_mknod, 23__NR_mknod,
24#endif
11#ifdef __NR_mkdirat 25#ifdef __NR_mkdirat
12__NR_mkdirat, 26__NR_mkdirat,
13__NR_mknodat, 27__NR_mknodat,
diff --git a/include/asm-generic/audit_read.h b/include/asm-generic/audit_read.h
index 0e87464d9847..3b249cb857dc 100644
--- a/include/asm-generic/audit_read.h
+++ b/include/asm-generic/audit_read.h
@@ -1,4 +1,6 @@
1#ifdef __NR_readlink
1__NR_readlink, 2__NR_readlink,
3#endif
2__NR_quotactl, 4__NR_quotactl,
3__NR_listxattr, 5__NR_listxattr,
4__NR_llistxattr, 6__NR_llistxattr,
@@ -6,3 +8,6 @@ __NR_flistxattr,
6__NR_getxattr, 8__NR_getxattr,
7__NR_lgetxattr, 9__NR_lgetxattr,
8__NR_fgetxattr, 10__NR_fgetxattr,
11#ifdef __NR_readlinkat
12__NR_readlinkat,
13#endif
diff --git a/include/asm-generic/audit_write.h b/include/asm-generic/audit_write.h
index c5f1c2c920e2..e7020c57b13b 100644
--- a/include/asm-generic/audit_write.h
+++ b/include/asm-generic/audit_write.h
@@ -4,7 +4,9 @@ __NR_acct,
4__NR_swapon, 4__NR_swapon,
5#endif 5#endif
6__NR_quotactl, 6__NR_quotactl,
7#ifdef __NR_truncate
7__NR_truncate, 8__NR_truncate,
9#endif
8#ifdef __NR_truncate64 10#ifdef __NR_truncate64
9__NR_truncate64, 11__NR_truncate64,
10#endif 12#endif
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
index 07c40d5149de..33d524704883 100644
--- a/include/asm-generic/unistd.h
+++ b/include/asm-generic/unistd.h
@@ -24,16 +24,24 @@
24#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) 24#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
25#endif 25#endif
26 26
27#ifdef __SYSCALL_COMPAT
28#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp)
29#define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp)
30#else
31#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
32#define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64)
33#endif
34
27#define __NR_io_setup 0 35#define __NR_io_setup 0
28__SYSCALL(__NR_io_setup, sys_io_setup) 36__SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
29#define __NR_io_destroy 1 37#define __NR_io_destroy 1
30__SYSCALL(__NR_io_destroy, sys_io_destroy) 38__SYSCALL(__NR_io_destroy, sys_io_destroy)
31#define __NR_io_submit 2 39#define __NR_io_submit 2
32__SYSCALL(__NR_io_submit, sys_io_submit) 40__SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)
33#define __NR_io_cancel 3 41#define __NR_io_cancel 3
34__SYSCALL(__NR_io_cancel, sys_io_cancel) 42__SYSCALL(__NR_io_cancel, sys_io_cancel)
35#define __NR_io_getevents 4 43#define __NR_io_getevents 4
36__SYSCALL(__NR_io_getevents, sys_io_getevents) 44__SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents)
37 45
38/* fs/xattr.c */ 46/* fs/xattr.c */
39#define __NR_setxattr 5 47#define __NR_setxattr 5
@@ -67,7 +75,7 @@ __SYSCALL(__NR_getcwd, sys_getcwd)
67 75
68/* fs/cookies.c */ 76/* fs/cookies.c */
69#define __NR_lookup_dcookie 18 77#define __NR_lookup_dcookie 18
70__SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie) 78__SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie)
71 79
72/* fs/eventfd.c */ 80/* fs/eventfd.c */
73#define __NR_eventfd2 19 81#define __NR_eventfd2 19
@@ -79,7 +87,7 @@ __SYSCALL(__NR_epoll_create1, sys_epoll_create1)
79#define __NR_epoll_ctl 21 87#define __NR_epoll_ctl 21
80__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) 88__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
81#define __NR_epoll_pwait 22 89#define __NR_epoll_pwait 22
82__SYSCALL(__NR_epoll_pwait, sys_epoll_pwait) 90__SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait)
83 91
84/* fs/fcntl.c */ 92/* fs/fcntl.c */
85#define __NR_dup 23 93#define __NR_dup 23
@@ -87,7 +95,7 @@ __SYSCALL(__NR_dup, sys_dup)
87#define __NR_dup3 24 95#define __NR_dup3 24
88__SYSCALL(__NR_dup3, sys_dup3) 96__SYSCALL(__NR_dup3, sys_dup3)
89#define __NR3264_fcntl 25 97#define __NR3264_fcntl 25
90__SC_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl) 98__SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64)
91 99
92/* fs/inotify_user.c */ 100/* fs/inotify_user.c */
93#define __NR_inotify_init1 26 101#define __NR_inotify_init1 26
@@ -99,7 +107,7 @@ __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
99 107
100/* fs/ioctl.c */ 108/* fs/ioctl.c */
101#define __NR_ioctl 29 109#define __NR_ioctl 29
102__SYSCALL(__NR_ioctl, sys_ioctl) 110__SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl)
103 111
104/* fs/ioprio.c */ 112/* fs/ioprio.c */
105#define __NR_ioprio_set 30 113#define __NR_ioprio_set 30
@@ -129,26 +137,30 @@ __SYSCALL(__NR_renameat, sys_renameat)
129#define __NR_umount2 39 137#define __NR_umount2 39
130__SYSCALL(__NR_umount2, sys_umount) 138__SYSCALL(__NR_umount2, sys_umount)
131#define __NR_mount 40 139#define __NR_mount 40
132__SYSCALL(__NR_mount, sys_mount) 140__SC_COMP(__NR_mount, sys_mount, compat_sys_mount)
133#define __NR_pivot_root 41 141#define __NR_pivot_root 41
134__SYSCALL(__NR_pivot_root, sys_pivot_root) 142__SYSCALL(__NR_pivot_root, sys_pivot_root)
135 143
136/* fs/nfsctl.c */ 144/* fs/nfsctl.c */
137#define __NR_nfsservctl 42 145#define __NR_nfsservctl 42
138__SYSCALL(__NR_nfsservctl, sys_nfsservctl) 146__SC_COMP(__NR_nfsservctl, sys_nfsservctl, compat_sys_nfsservctl)
139 147
140/* fs/open.c */ 148/* fs/open.c */
141#define __NR3264_statfs 43 149#define __NR3264_statfs 43
142__SC_3264(__NR3264_statfs, sys_statfs64, sys_statfs) 150__SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \
151 compat_sys_statfs64)
143#define __NR3264_fstatfs 44 152#define __NR3264_fstatfs 44
144__SC_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs) 153__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \
154 compat_sys_fstatfs64)
145#define __NR3264_truncate 45 155#define __NR3264_truncate 45
146__SC_3264(__NR3264_truncate, sys_truncate64, sys_truncate) 156__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \
157 compat_sys_truncate64)
147#define __NR3264_ftruncate 46 158#define __NR3264_ftruncate 46
148__SC_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate) 159__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \
160 compat_sys_ftruncate64)
149 161
150#define __NR_fallocate 47 162#define __NR_fallocate 47
151__SYSCALL(__NR_fallocate, sys_fallocate) 163__SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate)
152#define __NR_faccessat 48 164#define __NR_faccessat 48
153__SYSCALL(__NR_faccessat, sys_faccessat) 165__SYSCALL(__NR_faccessat, sys_faccessat)
154#define __NR_chdir 49 166#define __NR_chdir 49
@@ -166,7 +178,7 @@ __SYSCALL(__NR_fchownat, sys_fchownat)
166#define __NR_fchown 55 178#define __NR_fchown 55
167__SYSCALL(__NR_fchown, sys_fchown) 179__SYSCALL(__NR_fchown, sys_fchown)
168#define __NR_openat 56 180#define __NR_openat 56
169__SYSCALL(__NR_openat, sys_openat) 181__SC_COMP(__NR_openat, sys_openat, compat_sys_openat)
170#define __NR_close 57 182#define __NR_close 57
171__SYSCALL(__NR_close, sys_close) 183__SYSCALL(__NR_close, sys_close)
172#define __NR_vhangup 58 184#define __NR_vhangup 58
@@ -182,7 +194,7 @@ __SYSCALL(__NR_quotactl, sys_quotactl)
182 194
183/* fs/readdir.c */ 195/* fs/readdir.c */
184#define __NR_getdents64 61 196#define __NR_getdents64 61
185__SYSCALL(__NR_getdents64, sys_getdents64) 197__SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64)
186 198
187/* fs/read_write.c */ 199/* fs/read_write.c */
188#define __NR3264_lseek 62 200#define __NR3264_lseek 62
@@ -192,17 +204,17 @@ __SYSCALL(__NR_read, sys_read)
192#define __NR_write 64 204#define __NR_write 64
193__SYSCALL(__NR_write, sys_write) 205__SYSCALL(__NR_write, sys_write)
194#define __NR_readv 65 206#define __NR_readv 65
195__SYSCALL(__NR_readv, sys_readv) 207__SC_COMP(__NR_readv, sys_readv, compat_sys_readv)
196#define __NR_writev 66 208#define __NR_writev 66
197__SYSCALL(__NR_writev, sys_writev) 209__SC_COMP(__NR_writev, sys_writev, compat_sys_writev)
198#define __NR_pread64 67 210#define __NR_pread64 67
199__SYSCALL(__NR_pread64, sys_pread64) 211__SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64)
200#define __NR_pwrite64 68 212#define __NR_pwrite64 68
201__SYSCALL(__NR_pwrite64, sys_pwrite64) 213__SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64)
202#define __NR_preadv 69 214#define __NR_preadv 69
203__SYSCALL(__NR_preadv, sys_preadv) 215__SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv)
204#define __NR_pwritev 70 216#define __NR_pwritev 70
205__SYSCALL(__NR_pwritev, sys_pwritev) 217__SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)
206 218
207/* fs/sendfile.c */ 219/* fs/sendfile.c */
208#define __NR3264_sendfile 71 220#define __NR3264_sendfile 71
@@ -210,17 +222,17 @@ __SC_3264(__NR3264_sendfile, sys_sendfile64, sys_sendfile)
210 222
211/* fs/select.c */ 223/* fs/select.c */
212#define __NR_pselect6 72 224#define __NR_pselect6 72
213__SYSCALL(__NR_pselect6, sys_pselect6) 225__SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6)
214#define __NR_ppoll 73 226#define __NR_ppoll 73
215__SYSCALL(__NR_ppoll, sys_ppoll) 227__SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll)
216 228
217/* fs/signalfd.c */ 229/* fs/signalfd.c */
218#define __NR_signalfd4 74 230#define __NR_signalfd4 74
219__SYSCALL(__NR_signalfd4, sys_signalfd4) 231__SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4)
220 232
221/* fs/splice.c */ 233/* fs/splice.c */
222#define __NR_vmsplice 75 234#define __NR_vmsplice 75
223__SYSCALL(__NR_vmsplice, sys_vmsplice) 235__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice)
224#define __NR_splice 76 236#define __NR_splice 76
225__SYSCALL(__NR_splice, sys_splice) 237__SYSCALL(__NR_splice, sys_splice)
226#define __NR_tee 77 238#define __NR_tee 77
@@ -243,23 +255,27 @@ __SYSCALL(__NR_fsync, sys_fsync)
243__SYSCALL(__NR_fdatasync, sys_fdatasync) 255__SYSCALL(__NR_fdatasync, sys_fdatasync)
244#ifdef __ARCH_WANT_SYNC_FILE_RANGE2 256#ifdef __ARCH_WANT_SYNC_FILE_RANGE2
245#define __NR_sync_file_range2 84 257#define __NR_sync_file_range2 84
246__SYSCALL(__NR_sync_file_range2, sys_sync_file_range2) 258__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \
259 compat_sys_sync_file_range2)
247#else 260#else
248#define __NR_sync_file_range 84 261#define __NR_sync_file_range 84
249__SYSCALL(__NR_sync_file_range, sys_sync_file_range) 262__SC_COMP(__NR_sync_file_range, sys_sync_file_range, \
263 compat_sys_sync_file_range)
250#endif 264#endif
251 265
252/* fs/timerfd.c */ 266/* fs/timerfd.c */
253#define __NR_timerfd_create 85 267#define __NR_timerfd_create 85
254__SYSCALL(__NR_timerfd_create, sys_timerfd_create) 268__SYSCALL(__NR_timerfd_create, sys_timerfd_create)
255#define __NR_timerfd_settime 86 269#define __NR_timerfd_settime 86
256__SYSCALL(__NR_timerfd_settime, sys_timerfd_settime) 270__SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \
271 compat_sys_timerfd_settime)
257#define __NR_timerfd_gettime 87 272#define __NR_timerfd_gettime 87
258__SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime) 273__SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \
274 compat_sys_timerfd_gettime)
259 275
260/* fs/utimes.c */ 276/* fs/utimes.c */
261#define __NR_utimensat 88 277#define __NR_utimensat 88
262__SYSCALL(__NR_utimensat, sys_utimensat) 278__SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat)
263 279
264/* kernel/acct.c */ 280/* kernel/acct.c */
265#define __NR_acct 89 281#define __NR_acct 89
@@ -281,7 +297,7 @@ __SYSCALL(__NR_exit, sys_exit)
281#define __NR_exit_group 94 297#define __NR_exit_group 94
282__SYSCALL(__NR_exit_group, sys_exit_group) 298__SYSCALL(__NR_exit_group, sys_exit_group)
283#define __NR_waitid 95 299#define __NR_waitid 95
284__SYSCALL(__NR_waitid, sys_waitid) 300__SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid)
285 301
286/* kernel/fork.c */ 302/* kernel/fork.c */
287#define __NR_set_tid_address 96 303#define __NR_set_tid_address 96
@@ -291,25 +307,27 @@ __SYSCALL(__NR_unshare, sys_unshare)
291 307
292/* kernel/futex.c */ 308/* kernel/futex.c */
293#define __NR_futex 98 309#define __NR_futex 98
294__SYSCALL(__NR_futex, sys_futex) 310__SC_COMP(__NR_futex, sys_futex, compat_sys_futex)
295#define __NR_set_robust_list 99 311#define __NR_set_robust_list 99
296__SYSCALL(__NR_set_robust_list, sys_set_robust_list) 312__SC_COMP(__NR_set_robust_list, sys_set_robust_list, \
313 compat_sys_set_robust_list)
297#define __NR_get_robust_list 100 314#define __NR_get_robust_list 100
298__SYSCALL(__NR_get_robust_list, sys_get_robust_list) 315__SC_COMP(__NR_get_robust_list, sys_get_robust_list, \
316 compat_sys_get_robust_list)
299 317
300/* kernel/hrtimer.c */ 318/* kernel/hrtimer.c */
301#define __NR_nanosleep 101 319#define __NR_nanosleep 101
302__SYSCALL(__NR_nanosleep, sys_nanosleep) 320__SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep)
303 321
304/* kernel/itimer.c */ 322/* kernel/itimer.c */
305#define __NR_getitimer 102 323#define __NR_getitimer 102
306__SYSCALL(__NR_getitimer, sys_getitimer) 324__SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer)
307#define __NR_setitimer 103 325#define __NR_setitimer 103
308__SYSCALL(__NR_setitimer, sys_setitimer) 326__SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer)
309 327
310/* kernel/kexec.c */ 328/* kernel/kexec.c */
311#define __NR_kexec_load 104 329#define __NR_kexec_load 104
312__SYSCALL(__NR_kexec_load, sys_kexec_load) 330__SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load)
313 331
314/* kernel/module.c */ 332/* kernel/module.c */
315#define __NR_init_module 105 333#define __NR_init_module 105
@@ -319,23 +337,24 @@ __SYSCALL(__NR_delete_module, sys_delete_module)
319 337
320/* kernel/posix-timers.c */ 338/* kernel/posix-timers.c */
321#define __NR_timer_create 107 339#define __NR_timer_create 107
322__SYSCALL(__NR_timer_create, sys_timer_create) 340__SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create)
323#define __NR_timer_gettime 108 341#define __NR_timer_gettime 108
324__SYSCALL(__NR_timer_gettime, sys_timer_gettime) 342__SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime)
325#define __NR_timer_getoverrun 109 343#define __NR_timer_getoverrun 109
326__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) 344__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
327#define __NR_timer_settime 110 345#define __NR_timer_settime 110
328__SYSCALL(__NR_timer_settime, sys_timer_settime) 346__SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime)
329#define __NR_timer_delete 111 347#define __NR_timer_delete 111
330__SYSCALL(__NR_timer_delete, sys_timer_delete) 348__SYSCALL(__NR_timer_delete, sys_timer_delete)
331#define __NR_clock_settime 112 349#define __NR_clock_settime 112
332__SYSCALL(__NR_clock_settime, sys_clock_settime) 350__SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime)
333#define __NR_clock_gettime 113 351#define __NR_clock_gettime 113
334__SYSCALL(__NR_clock_gettime, sys_clock_gettime) 352__SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime)
335#define __NR_clock_getres 114 353#define __NR_clock_getres 114
336__SYSCALL(__NR_clock_getres, sys_clock_getres) 354__SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres)
337#define __NR_clock_nanosleep 115 355#define __NR_clock_nanosleep 115
338__SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep) 356__SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \
357 compat_sys_clock_nanosleep)
339 358
340/* kernel/printk.c */ 359/* kernel/printk.c */
341#define __NR_syslog 116 360#define __NR_syslog 116
@@ -355,9 +374,11 @@ __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
355#define __NR_sched_getparam 121 374#define __NR_sched_getparam 121
356__SYSCALL(__NR_sched_getparam, sys_sched_getparam) 375__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
357#define __NR_sched_setaffinity 122 376#define __NR_sched_setaffinity 122
358__SYSCALL(__NR_sched_setaffinity, sys_sched_setaffinity) 377__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \
378 compat_sys_sched_setaffinity)
359#define __NR_sched_getaffinity 123 379#define __NR_sched_getaffinity 123
360__SYSCALL(__NR_sched_getaffinity, sys_sched_getaffinity) 380__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \
381 compat_sys_sched_getaffinity)
361#define __NR_sched_yield 124 382#define __NR_sched_yield 124
362__SYSCALL(__NR_sched_yield, sys_sched_yield) 383__SYSCALL(__NR_sched_yield, sys_sched_yield)
363#define __NR_sched_get_priority_max 125 384#define __NR_sched_get_priority_max 125
@@ -365,7 +386,8 @@ __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
365#define __NR_sched_get_priority_min 126 386#define __NR_sched_get_priority_min 126
366__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) 387__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
367#define __NR_sched_rr_get_interval 127 388#define __NR_sched_rr_get_interval 127
368__SYSCALL(__NR_sched_rr_get_interval, sys_sched_rr_get_interval) 389__SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \
390 compat_sys_sched_rr_get_interval)
369 391
370/* kernel/signal.c */ 392/* kernel/signal.c */
371#define __NR_restart_syscall 128 393#define __NR_restart_syscall 128
@@ -377,21 +399,23 @@ __SYSCALL(__NR_tkill, sys_tkill)
377#define __NR_tgkill 131 399#define __NR_tgkill 131
378__SYSCALL(__NR_tgkill, sys_tgkill) 400__SYSCALL(__NR_tgkill, sys_tgkill)
379#define __NR_sigaltstack 132 401#define __NR_sigaltstack 132
380__SYSCALL(__NR_sigaltstack, sys_sigaltstack) 402__SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack)
381#define __NR_rt_sigsuspend 133 403#define __NR_rt_sigsuspend 133
382__SYSCALL(__NR_rt_sigsuspend, sys_rt_sigsuspend) /* __ARCH_WANT_SYS_RT_SIGSUSPEND */ 404__SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend)
383#define __NR_rt_sigaction 134 405#define __NR_rt_sigaction 134
384__SYSCALL(__NR_rt_sigaction, sys_rt_sigaction) /* __ARCH_WANT_SYS_RT_SIGACTION */ 406__SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction)
385#define __NR_rt_sigprocmask 135 407#define __NR_rt_sigprocmask 135
386__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) 408__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
387#define __NR_rt_sigpending 136 409#define __NR_rt_sigpending 136
388__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) 410__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending)
389#define __NR_rt_sigtimedwait 137 411#define __NR_rt_sigtimedwait 137
390__SYSCALL(__NR_rt_sigtimedwait, sys_rt_sigtimedwait) 412__SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \
413 compat_sys_rt_sigtimedwait)
391#define __NR_rt_sigqueueinfo 138 414#define __NR_rt_sigqueueinfo 138
392__SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo) 415__SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \
416 compat_sys_rt_sigqueueinfo)
393#define __NR_rt_sigreturn 139 417#define __NR_rt_sigreturn 139
394__SYSCALL(__NR_rt_sigreturn, sys_rt_sigreturn) /* sys_rt_sigreturn_wrapper, */ 418__SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn)
395 419
396/* kernel/sys.c */ 420/* kernel/sys.c */
397#define __NR_setpriority 140 421#define __NR_setpriority 140
@@ -421,7 +445,7 @@ __SYSCALL(__NR_setfsuid, sys_setfsuid)
421#define __NR_setfsgid 152 445#define __NR_setfsgid 152
422__SYSCALL(__NR_setfsgid, sys_setfsgid) 446__SYSCALL(__NR_setfsgid, sys_setfsgid)
423#define __NR_times 153 447#define __NR_times 153
424__SYSCALL(__NR_times, sys_times) 448__SC_COMP(__NR_times, sys_times, compat_sys_times)
425#define __NR_setpgid 154 449#define __NR_setpgid 154
426__SYSCALL(__NR_setpgid, sys_setpgid) 450__SYSCALL(__NR_setpgid, sys_setpgid)
427#define __NR_getpgid 155 451#define __NR_getpgid 155
@@ -441,11 +465,11 @@ __SYSCALL(__NR_sethostname, sys_sethostname)
441#define __NR_setdomainname 162 465#define __NR_setdomainname 162
442__SYSCALL(__NR_setdomainname, sys_setdomainname) 466__SYSCALL(__NR_setdomainname, sys_setdomainname)
443#define __NR_getrlimit 163 467#define __NR_getrlimit 163
444__SYSCALL(__NR_getrlimit, sys_getrlimit) 468__SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)
445#define __NR_setrlimit 164 469#define __NR_setrlimit 164
446__SYSCALL(__NR_setrlimit, sys_setrlimit) 470__SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit)
447#define __NR_getrusage 165 471#define __NR_getrusage 165
448__SYSCALL(__NR_getrusage, sys_getrusage) 472__SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)
449#define __NR_umask 166 473#define __NR_umask 166
450__SYSCALL(__NR_umask, sys_umask) 474__SYSCALL(__NR_umask, sys_umask)
451#define __NR_prctl 167 475#define __NR_prctl 167
@@ -455,11 +479,11 @@ __SYSCALL(__NR_getcpu, sys_getcpu)
455 479
456/* kernel/time.c */ 480/* kernel/time.c */
457#define __NR_gettimeofday 169 481#define __NR_gettimeofday 169
458__SYSCALL(__NR_gettimeofday, sys_gettimeofday) 482__SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday)
459#define __NR_settimeofday 170 483#define __NR_settimeofday 170
460__SYSCALL(__NR_settimeofday, sys_settimeofday) 484__SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)
461#define __NR_adjtimex 171 485#define __NR_adjtimex 171
462__SYSCALL(__NR_adjtimex, sys_adjtimex) 486__SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex)
463 487
464/* kernel/timer.c */ 488/* kernel/timer.c */
465#define __NR_getpid 172 489#define __NR_getpid 172
@@ -477,39 +501,40 @@ __SYSCALL(__NR_getegid, sys_getegid)
477#define __NR_gettid 178 501#define __NR_gettid 178
478__SYSCALL(__NR_gettid, sys_gettid) 502__SYSCALL(__NR_gettid, sys_gettid)
479#define __NR_sysinfo 179 503#define __NR_sysinfo 179
480__SYSCALL(__NR_sysinfo, sys_sysinfo) 504__SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo)
481 505
482/* ipc/mqueue.c */ 506/* ipc/mqueue.c */
483#define __NR_mq_open 180 507#define __NR_mq_open 180
484__SYSCALL(__NR_mq_open, sys_mq_open) 508__SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open)
485#define __NR_mq_unlink 181 509#define __NR_mq_unlink 181
486__SYSCALL(__NR_mq_unlink, sys_mq_unlink) 510__SYSCALL(__NR_mq_unlink, sys_mq_unlink)
487#define __NR_mq_timedsend 182 511#define __NR_mq_timedsend 182
488__SYSCALL(__NR_mq_timedsend, sys_mq_timedsend) 512__SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend)
489#define __NR_mq_timedreceive 183 513#define __NR_mq_timedreceive 183
490__SYSCALL(__NR_mq_timedreceive, sys_mq_timedreceive) 514__SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \
515 compat_sys_mq_timedreceive)
491#define __NR_mq_notify 184 516#define __NR_mq_notify 184
492__SYSCALL(__NR_mq_notify, sys_mq_notify) 517__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)
493#define __NR_mq_getsetattr 185 518#define __NR_mq_getsetattr 185
494__SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr) 519__SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr)
495 520
496/* ipc/msg.c */ 521/* ipc/msg.c */
497#define __NR_msgget 186 522#define __NR_msgget 186
498__SYSCALL(__NR_msgget, sys_msgget) 523__SYSCALL(__NR_msgget, sys_msgget)
499#define __NR_msgctl 187 524#define __NR_msgctl 187
500__SYSCALL(__NR_msgctl, sys_msgctl) 525__SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl)
501#define __NR_msgrcv 188 526#define __NR_msgrcv 188
502__SYSCALL(__NR_msgrcv, sys_msgrcv) 527__SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv)
503#define __NR_msgsnd 189 528#define __NR_msgsnd 189
504__SYSCALL(__NR_msgsnd, sys_msgsnd) 529__SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd)
505 530
506/* ipc/sem.c */ 531/* ipc/sem.c */
507#define __NR_semget 190 532#define __NR_semget 190
508__SYSCALL(__NR_semget, sys_semget) 533__SYSCALL(__NR_semget, sys_semget)
509#define __NR_semctl 191 534#define __NR_semctl 191
510__SYSCALL(__NR_semctl, sys_semctl) 535__SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl)
511#define __NR_semtimedop 192 536#define __NR_semtimedop 192
512__SYSCALL(__NR_semtimedop, sys_semtimedop) 537__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop)
513#define __NR_semop 193 538#define __NR_semop 193
514__SYSCALL(__NR_semop, sys_semop) 539__SYSCALL(__NR_semop, sys_semop)
515 540
@@ -517,9 +542,9 @@ __SYSCALL(__NR_semop, sys_semop)
517#define __NR_shmget 194 542#define __NR_shmget 194
518__SYSCALL(__NR_shmget, sys_shmget) 543__SYSCALL(__NR_shmget, sys_shmget)
519#define __NR_shmctl 195 544#define __NR_shmctl 195
520__SYSCALL(__NR_shmctl, sys_shmctl) 545__SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl)
521#define __NR_shmat 196 546#define __NR_shmat 196
522__SYSCALL(__NR_shmat, sys_shmat) 547__SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat)
523#define __NR_shmdt 197 548#define __NR_shmdt 197
524__SYSCALL(__NR_shmdt, sys_shmdt) 549__SYSCALL(__NR_shmdt, sys_shmdt)
525 550
@@ -543,21 +568,21 @@ __SYSCALL(__NR_getpeername, sys_getpeername)
543#define __NR_sendto 206 568#define __NR_sendto 206
544__SYSCALL(__NR_sendto, sys_sendto) 569__SYSCALL(__NR_sendto, sys_sendto)
545#define __NR_recvfrom 207 570#define __NR_recvfrom 207
546__SYSCALL(__NR_recvfrom, sys_recvfrom) 571__SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom)
547#define __NR_setsockopt 208 572#define __NR_setsockopt 208
548__SYSCALL(__NR_setsockopt, sys_setsockopt) 573__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt)
549#define __NR_getsockopt 209 574#define __NR_getsockopt 209
550__SYSCALL(__NR_getsockopt, sys_getsockopt) 575__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt)
551#define __NR_shutdown 210 576#define __NR_shutdown 210
552__SYSCALL(__NR_shutdown, sys_shutdown) 577__SYSCALL(__NR_shutdown, sys_shutdown)
553#define __NR_sendmsg 211 578#define __NR_sendmsg 211
554__SYSCALL(__NR_sendmsg, sys_sendmsg) 579__SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg)
555#define __NR_recvmsg 212 580#define __NR_recvmsg 212
556__SYSCALL(__NR_recvmsg, sys_recvmsg) 581__SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg)
557 582
558/* mm/filemap.c */ 583/* mm/filemap.c */
559#define __NR_readahead 213 584#define __NR_readahead 213
560__SYSCALL(__NR_readahead, sys_readahead) 585__SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead)
561 586
562/* mm/nommu.c, also with MMU */ 587/* mm/nommu.c, also with MMU */
563#define __NR_brk 214 588#define __NR_brk 214
@@ -573,19 +598,19 @@ __SYSCALL(__NR_add_key, sys_add_key)
573#define __NR_request_key 218 598#define __NR_request_key 218
574__SYSCALL(__NR_request_key, sys_request_key) 599__SYSCALL(__NR_request_key, sys_request_key)
575#define __NR_keyctl 219 600#define __NR_keyctl 219
576__SYSCALL(__NR_keyctl, sys_keyctl) 601__SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl)
577 602
578/* arch/example/kernel/sys_example.c */ 603/* arch/example/kernel/sys_example.c */
579#define __NR_clone 220 604#define __NR_clone 220
580__SYSCALL(__NR_clone, sys_clone) /* .long sys_clone_wrapper */ 605__SYSCALL(__NR_clone, sys_clone)
581#define __NR_execve 221 606#define __NR_execve 221
582__SYSCALL(__NR_execve, sys_execve) /* .long sys_execve_wrapper */ 607__SC_COMP(__NR_execve, sys_execve, compat_sys_execve)
583 608
584#define __NR3264_mmap 222 609#define __NR3264_mmap 222
585__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) 610__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
586/* mm/fadvise.c */ 611/* mm/fadvise.c */
587#define __NR3264_fadvise64 223 612#define __NR3264_fadvise64 223
588__SYSCALL(__NR3264_fadvise64, sys_fadvise64_64) 613__SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
589 614
590/* mm/, CONFIG_MMU only */ 615/* mm/, CONFIG_MMU only */
591#ifndef __ARCH_NOMMU 616#ifndef __ARCH_NOMMU
@@ -612,25 +637,26 @@ __SYSCALL(__NR_madvise, sys_madvise)
612#define __NR_remap_file_pages 234 637#define __NR_remap_file_pages 234
613__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) 638__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
614#define __NR_mbind 235 639#define __NR_mbind 235
615__SYSCALL(__NR_mbind, sys_mbind) 640__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind)
616#define __NR_get_mempolicy 236 641#define __NR_get_mempolicy 236
617__SYSCALL(__NR_get_mempolicy, sys_get_mempolicy) 642__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy)
618#define __NR_set_mempolicy 237 643#define __NR_set_mempolicy 237
619__SYSCALL(__NR_set_mempolicy, sys_set_mempolicy) 644__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy)
620#define __NR_migrate_pages 238 645#define __NR_migrate_pages 238
621__SYSCALL(__NR_migrate_pages, sys_migrate_pages) 646__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages)
622#define __NR_move_pages 239 647#define __NR_move_pages 239
623__SYSCALL(__NR_move_pages, sys_move_pages) 648__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages)
624#endif 649#endif
625 650
626#define __NR_rt_tgsigqueueinfo 240 651#define __NR_rt_tgsigqueueinfo 240
627__SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) 652__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \
653 compat_sys_rt_tgsigqueueinfo)
628#define __NR_perf_event_open 241 654#define __NR_perf_event_open 241
629__SYSCALL(__NR_perf_event_open, sys_perf_event_open) 655__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
630#define __NR_accept4 242 656#define __NR_accept4 242
631__SYSCALL(__NR_accept4, sys_accept4) 657__SYSCALL(__NR_accept4, sys_accept4)
632#define __NR_recvmmsg 243 658#define __NR_recvmmsg 243
633__SYSCALL(__NR_recvmmsg, sys_recvmmsg) 659__SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg)
634 660
635/* 661/*
636 * Architectures may provide up to 16 syscalls of their own 662 * Architectures may provide up to 16 syscalls of their own
@@ -639,19 +665,20 @@ __SYSCALL(__NR_recvmmsg, sys_recvmmsg)
639#define __NR_arch_specific_syscall 244 665#define __NR_arch_specific_syscall 244
640 666
641#define __NR_wait4 260 667#define __NR_wait4 260
642__SYSCALL(__NR_wait4, sys_wait4) 668__SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4)
643#define __NR_prlimit64 261 669#define __NR_prlimit64 261
644__SYSCALL(__NR_prlimit64, sys_prlimit64) 670__SYSCALL(__NR_prlimit64, sys_prlimit64)
645#define __NR_fanotify_init 262 671#define __NR_fanotify_init 262
646__SYSCALL(__NR_fanotify_init, sys_fanotify_init) 672__SYSCALL(__NR_fanotify_init, sys_fanotify_init)
647#define __NR_fanotify_mark 263 673#define __NR_fanotify_mark 263
648__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) 674__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
649#define __NR_name_to_handle_at 264 675#define __NR_name_to_handle_at 264
650__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) 676__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
651#define __NR_open_by_handle_at 265 677#define __NR_open_by_handle_at 265
652__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) 678__SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \
679 compat_sys_open_by_handle_at)
653#define __NR_clock_adjtime 266 680#define __NR_clock_adjtime 266
654__SYSCALL(__NR_clock_adjtime, sys_clock_adjtime) 681__SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime)
655#define __NR_syncfs 267 682#define __NR_syncfs 267
656__SYSCALL(__NR_syncfs, sys_syncfs) 683__SYSCALL(__NR_syncfs, sys_syncfs)
657 684
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index be50d9e70a7d..2a7cea53ca0d 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -151,7 +151,6 @@ enum rq_flag_bits {
151 __REQ_IO_STAT, /* account I/O stat */ 151 __REQ_IO_STAT, /* account I/O stat */
152 __REQ_MIXED_MERGE, /* merge of different types, fail separately */ 152 __REQ_MIXED_MERGE, /* merge of different types, fail separately */
153 __REQ_SECURE, /* secure discard (used with __REQ_DISCARD) */ 153 __REQ_SECURE, /* secure discard (used with __REQ_DISCARD) */
154 __REQ_ON_PLUG, /* on plug list */
155 __REQ_NR_BITS, /* stops here */ 154 __REQ_NR_BITS, /* stops here */
156}; 155};
157 156
@@ -192,6 +191,5 @@ enum rq_flag_bits {
192#define REQ_IO_STAT (1 << __REQ_IO_STAT) 191#define REQ_IO_STAT (1 << __REQ_IO_STAT)
193#define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE) 192#define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE)
194#define REQ_SECURE (1 << __REQ_SECURE) 193#define REQ_SECURE (1 << __REQ_SECURE)
195#define REQ_ON_PLUG (1 << __REQ_ON_PLUG)
196 194
197#endif /* __LINUX_BLK_TYPES_H */ 195#endif /* __LINUX_BLK_TYPES_H */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2ad95fa1d130..ae9091a68480 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -257,7 +257,7 @@ struct queue_limits {
257 unsigned char misaligned; 257 unsigned char misaligned;
258 unsigned char discard_misaligned; 258 unsigned char discard_misaligned;
259 unsigned char cluster; 259 unsigned char cluster;
260 signed char discard_zeroes_data; 260 unsigned char discard_zeroes_data;
261}; 261};
262 262
263struct request_queue 263struct request_queue
@@ -364,6 +364,8 @@ struct request_queue
364 * for flush operations 364 * for flush operations
365 */ 365 */
366 unsigned int flush_flags; 366 unsigned int flush_flags;
367 unsigned int flush_not_queueable:1;
368 unsigned int flush_queue_delayed:1;
367 unsigned int flush_pending_idx:1; 369 unsigned int flush_pending_idx:1;
368 unsigned int flush_running_idx:1; 370 unsigned int flush_running_idx:1;
369 unsigned long flush_pending_since; 371 unsigned long flush_pending_since;
@@ -843,6 +845,7 @@ extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *);
843extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *); 845extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *);
844extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); 846extern void blk_queue_rq_timeout(struct request_queue *, unsigned int);
845extern void blk_queue_flush(struct request_queue *q, unsigned int flush); 847extern void blk_queue_flush(struct request_queue *q, unsigned int flush);
848extern void blk_queue_flush_queueable(struct request_queue *q, bool queueable);
846extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); 849extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
847 850
848extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); 851extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *);
@@ -1066,13 +1069,16 @@ static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector
1066{ 1069{
1067 unsigned int alignment = (sector << 9) & (lim->discard_granularity - 1); 1070 unsigned int alignment = (sector << 9) & (lim->discard_granularity - 1);
1068 1071
1072 if (!lim->max_discard_sectors)
1073 return 0;
1074
1069 return (lim->discard_granularity + lim->discard_alignment - alignment) 1075 return (lim->discard_granularity + lim->discard_alignment - alignment)
1070 & (lim->discard_granularity - 1); 1076 & (lim->discard_granularity - 1);
1071} 1077}
1072 1078
1073static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) 1079static inline unsigned int queue_discard_zeroes_data(struct request_queue *q)
1074{ 1080{
1075 if (q->limits.discard_zeroes_data == 1) 1081 if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1)
1076 return 1; 1082 return 1;
1077 1083
1078 return 0; 1084 return 0;
@@ -1111,6 +1117,11 @@ static inline unsigned int block_size(struct block_device *bdev)
1111 return bdev->bd_block_size; 1117 return bdev->bd_block_size;
1112} 1118}
1113 1119
1120static inline bool queue_flush_queueable(struct request_queue *q)
1121{
1122 return !q->flush_not_queueable;
1123}
1124
1114typedef struct {struct page *v;} Sector; 1125typedef struct {struct page *v;} Sector;
1115 1126
1116unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *); 1127unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *);
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index b8e995fbd867..b8c60694b2b0 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -313,6 +313,7 @@ enum {
313 CEPH_MDS_OP_GETATTR = 0x00101, 313 CEPH_MDS_OP_GETATTR = 0x00101,
314 CEPH_MDS_OP_LOOKUPHASH = 0x00102, 314 CEPH_MDS_OP_LOOKUPHASH = 0x00102,
315 CEPH_MDS_OP_LOOKUPPARENT = 0x00103, 315 CEPH_MDS_OP_LOOKUPPARENT = 0x00103,
316 CEPH_MDS_OP_LOOKUPINO = 0x00104,
316 317
317 CEPH_MDS_OP_SETXATTR = 0x01105, 318 CEPH_MDS_OP_SETXATTR = 0x01105,
318 CEPH_MDS_OP_RMXATTR = 0x01106, 319 CEPH_MDS_OP_RMXATTR = 0x01106,
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 5778b559d59c..ddcb7db38e67 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -12,6 +12,8 @@
12#include <linux/sem.h> 12#include <linux/sem.h>
13#include <linux/socket.h> 13#include <linux/socket.h>
14#include <linux/if.h> 14#include <linux/if.h>
15#include <linux/fs.h>
16#include <linux/aio_abi.h> /* for aio_context_t */
15 17
16#include <asm/compat.h> 18#include <asm/compat.h>
17#include <asm/siginfo.h> 19#include <asm/siginfo.h>
@@ -26,7 +28,7 @@ typedef __compat_gid32_t compat_gid_t;
26struct compat_sel_arg_struct; 28struct compat_sel_arg_struct;
27struct rusage; 29struct rusage;
28 30
29struct compat_itimerspec { 31struct compat_itimerspec {
30 struct compat_timespec it_interval; 32 struct compat_timespec it_interval;
31 struct compat_timespec it_value; 33 struct compat_timespec it_value;
32}; 34};
@@ -70,9 +72,9 @@ struct compat_timex {
70 compat_long_t stbcnt; 72 compat_long_t stbcnt;
71 compat_int_t tai; 73 compat_int_t tai;
72 74
73 compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; 75 compat_int_t:32; compat_int_t:32; compat_int_t:32; compat_int_t:32;
74 compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; 76 compat_int_t:32; compat_int_t:32; compat_int_t:32; compat_int_t:32;
75 compat_int_t :32; compat_int_t :32; compat_int_t :32; 77 compat_int_t:32; compat_int_t:32; compat_int_t:32;
76}; 78};
77 79
78#define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW) 80#define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW)
@@ -81,8 +83,10 @@ typedef struct {
81 compat_sigset_word sig[_COMPAT_NSIG_WORDS]; 83 compat_sigset_word sig[_COMPAT_NSIG_WORDS];
82} compat_sigset_t; 84} compat_sigset_t;
83 85
84extern int get_compat_timespec(struct timespec *, const struct compat_timespec __user *); 86extern int get_compat_timespec(struct timespec *,
85extern int put_compat_timespec(const struct timespec *, struct compat_timespec __user *); 87 const struct compat_timespec __user *);
88extern int put_compat_timespec(const struct timespec *,
89 struct compat_timespec __user *);
86 90
87struct compat_iovec { 91struct compat_iovec {
88 compat_uptr_t iov_base; 92 compat_uptr_t iov_base;
@@ -113,7 +117,8 @@ struct compat_rusage {
113 compat_long_t ru_nivcsw; 117 compat_long_t ru_nivcsw;
114}; 118};
115 119
116extern int put_compat_rusage(const struct rusage *, struct compat_rusage __user *); 120extern int put_compat_rusage(const struct rusage *,
121 struct compat_rusage __user *);
117 122
118struct compat_siginfo; 123struct compat_siginfo;
119 124
@@ -166,8 +171,7 @@ struct compat_ifmap {
166 unsigned char port; 171 unsigned char port;
167}; 172};
168 173
169struct compat_if_settings 174struct compat_if_settings {
170{
171 unsigned int type; /* Type of physical device or protocol */ 175 unsigned int type; /* Type of physical device or protocol */
172 unsigned int size; /* Size of the data allocated by the caller */ 176 unsigned int size; /* Size of the data allocated by the caller */
173 compat_uptr_t ifs_ifsu; /* union of pointers */ 177 compat_uptr_t ifs_ifsu; /* union of pointers */
@@ -195,8 +199,8 @@ struct compat_ifreq {
195}; 199};
196 200
197struct compat_ifconf { 201struct compat_ifconf {
198 compat_int_t ifc_len; /* size of buffer */ 202 compat_int_t ifc_len; /* size of buffer */
199 compat_caddr_t ifcbuf; 203 compat_caddr_t ifcbuf;
200}; 204};
201 205
202struct compat_robust_list { 206struct compat_robust_list {
@@ -209,6 +213,18 @@ struct compat_robust_list_head {
209 compat_uptr_t list_op_pending; 213 compat_uptr_t list_op_pending;
210}; 214};
211 215
216struct compat_statfs;
217struct compat_statfs64;
218struct compat_old_linux_dirent;
219struct compat_linux_dirent;
220struct linux_dirent64;
221struct compat_msghdr;
222struct compat_mmsghdr;
223struct compat_sysinfo;
224struct compat_sysctl_args;
225struct compat_kexec_segment;
226struct compat_mq_attr;
227
212extern void compat_exit_robust_list(struct task_struct *curr); 228extern void compat_exit_robust_list(struct task_struct *curr);
213 229
214asmlinkage long 230asmlinkage long
@@ -243,8 +259,8 @@ asmlinkage ssize_t compat_sys_pwritev(unsigned long fd,
243 const struct compat_iovec __user *vec, 259 const struct compat_iovec __user *vec,
244 unsigned long vlen, u32 pos_low, u32 pos_high); 260 unsigned long vlen, u32 pos_low, u32 pos_high);
245 261
246int compat_do_execve(char * filename, compat_uptr_t __user *argv, 262int compat_do_execve(char *filename, compat_uptr_t __user *argv,
247 compat_uptr_t __user *envp, struct pt_regs * regs); 263 compat_uptr_t __user *envp, struct pt_regs *regs);
248 264
249asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, 265asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
250 compat_ulong_t __user *outp, compat_ulong_t __user *exp, 266 compat_ulong_t __user *outp, compat_ulong_t __user *exp,
@@ -331,12 +347,18 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
331 const compat_sigset_t __user *sigmask, 347 const compat_sigset_t __user *sigmask,
332 compat_size_t sigsetsize); 348 compat_size_t sigsetsize);
333 349
334asmlinkage long compat_sys_utimensat(unsigned int dfd, const char __user *filename, 350asmlinkage long compat_sys_utime(const char __user *filename,
335 struct compat_timespec __user *t, int flags); 351 struct compat_utimbuf __user *t);
352asmlinkage long compat_sys_utimensat(unsigned int dfd,
353 const char __user *filename,
354 struct compat_timespec __user *t,
355 int flags);
336 356
357asmlinkage long compat_sys_time(compat_time_t __user *tloc);
358asmlinkage long compat_sys_stime(compat_time_t __user *tptr);
337asmlinkage long compat_sys_signalfd(int ufd, 359asmlinkage long compat_sys_signalfd(int ufd,
338 const compat_sigset_t __user *sigmask, 360 const compat_sigset_t __user *sigmask,
339 compat_size_t sigsetsize); 361 compat_size_t sigsetsize);
340asmlinkage long compat_sys_timerfd_settime(int ufd, int flags, 362asmlinkage long compat_sys_timerfd_settime(int ufd, int flags,
341 const struct compat_itimerspec __user *utmr, 363 const struct compat_itimerspec __user *utmr,
342 struct compat_itimerspec __user *otmr); 364 struct compat_itimerspec __user *otmr);
@@ -348,16 +370,190 @@ asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
348 const int __user *nodes, 370 const int __user *nodes,
349 int __user *status, 371 int __user *status,
350 int flags); 372 int flags);
351asmlinkage long compat_sys_futimesat(unsigned int dfd, const char __user *filename, 373asmlinkage long compat_sys_futimesat(unsigned int dfd,
374 const char __user *filename,
352 struct compat_timeval __user *t); 375 struct compat_timeval __user *t);
353asmlinkage long compat_sys_newfstatat(unsigned int dfd, const char __user * filename, 376asmlinkage long compat_sys_utimes(const char __user *filename,
377 struct compat_timeval __user *t);
378asmlinkage long compat_sys_newstat(const char __user *filename,
379 struct compat_stat __user *statbuf);
380asmlinkage long compat_sys_newlstat(const char __user *filename,
381 struct compat_stat __user *statbuf);
382asmlinkage long compat_sys_newfstatat(unsigned int dfd,
383 const char __user *filename,
354 struct compat_stat __user *statbuf, 384 struct compat_stat __user *statbuf,
355 int flag); 385 int flag);
386asmlinkage long compat_sys_newfstat(unsigned int fd,
387 struct compat_stat __user *statbuf);
388asmlinkage long compat_sys_statfs(const char __user *pathname,
389 struct compat_statfs __user *buf);
390asmlinkage long compat_sys_fstatfs(unsigned int fd,
391 struct compat_statfs __user *buf);
392asmlinkage long compat_sys_statfs64(const char __user *pathname,
393 compat_size_t sz,
394 struct compat_statfs64 __user *buf);
395asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz,
396 struct compat_statfs64 __user *buf);
397asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd,
398 unsigned long arg);
399asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,
400 unsigned long arg);
401asmlinkage long compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p);
402asmlinkage long compat_sys_io_getevents(aio_context_t ctx_id,
403 unsigned long min_nr,
404 unsigned long nr,
405 struct io_event __user *events,
406 struct compat_timespec __user *timeout);
407asmlinkage long compat_sys_io_submit(aio_context_t ctx_id, int nr,
408 u32 __user *iocb);
409asmlinkage long compat_sys_mount(const char __user *dev_name,
410 const char __user *dir_name,
411 const char __user *type, unsigned long flags,
412 const void __user *data);
413asmlinkage long compat_sys_old_readdir(unsigned int fd,
414 struct compat_old_linux_dirent __user *,
415 unsigned int count);
416asmlinkage long compat_sys_getdents(unsigned int fd,
417 struct compat_linux_dirent __user *dirent,
418 unsigned int count);
419asmlinkage long compat_sys_getdents64(unsigned int fd,
420 struct linux_dirent64 __user *dirent,
421 unsigned int count);
422asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *,
423 unsigned int nr_segs, unsigned int flags);
424asmlinkage long compat_sys_open(const char __user *filename, int flags,
425 int mode);
356asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, 426asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
357 int flags, int mode); 427 int flags, int mode);
428asmlinkage long compat_sys_open_by_handle_at(int mountdirfd,
429 struct file_handle __user *handle,
430 int flags);
431asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp,
432 compat_ulong_t __user *outp,
433 compat_ulong_t __user *exp,
434 struct compat_timespec __user *tsp,
435 void __user *sig);
436asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
437 unsigned int nfds,
438 struct compat_timespec __user *tsp,
439 const compat_sigset_t __user *sigmask,
440 compat_size_t sigsetsize);
441#if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && \
442 !defined(CONFIG_NFSD_DEPRECATED)
443union compat_nfsctl_res;
444struct compat_nfsctl_arg;
445asmlinkage long compat_sys_nfsservctl(int cmd,
446 struct compat_nfsctl_arg __user *arg,
447 union compat_nfsctl_res __user *res);
448#else
449asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2);
450#endif
451asmlinkage long compat_sys_signalfd4(int ufd,
452 const compat_sigset_t __user *sigmask,
453 compat_size_t sigsetsize, int flags);
454asmlinkage long compat_sys_get_mempolicy(int __user *policy,
455 compat_ulong_t __user *nmask,
456 compat_ulong_t maxnode,
457 compat_ulong_t addr,
458 compat_ulong_t flags);
459asmlinkage long compat_sys_set_mempolicy(int mode, compat_ulong_t __user *nmask,
460 compat_ulong_t maxnode);
461asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len,
462 compat_ulong_t mode,
463 compat_ulong_t __user *nmask,
464 compat_ulong_t maxnode, compat_ulong_t flags);
465
466asmlinkage long compat_sys_setsockopt(int fd, int level, int optname,
467 char __user *optval, unsigned int optlen);
468asmlinkage long compat_sys_sendmsg(int fd, struct compat_msghdr __user *msg,
469 unsigned flags);
470asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg,
471 unsigned int flags);
472asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len,
473 unsigned flags);
474asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len,
475 unsigned flags, struct sockaddr __user *addr,
476 int __user *addrlen);
477asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
478 unsigned vlen, unsigned int flags,
479 struct compat_timespec __user *timeout);
480asmlinkage long compat_sys_nanosleep(struct compat_timespec __user *rqtp,
481 struct compat_timespec __user *rmtp);
482asmlinkage long compat_sys_getitimer(int which,
483 struct compat_itimerval __user *it);
484asmlinkage long compat_sys_setitimer(int which,
485 struct compat_itimerval __user *in,
486 struct compat_itimerval __user *out);
487asmlinkage long compat_sys_times(struct compat_tms __user *tbuf);
488asmlinkage long compat_sys_setrlimit(unsigned int resource,
489 struct compat_rlimit __user *rlim);
490asmlinkage long compat_sys_getrlimit(unsigned int resource,
491 struct compat_rlimit __user *rlim);
492asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru);
493asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid,
494 unsigned int len,
495 compat_ulong_t __user *user_mask_ptr);
496asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid,
497 unsigned int len,
498 compat_ulong_t __user *user_mask_ptr);
499asmlinkage long compat_sys_timer_create(clockid_t which_clock,
500 struct compat_sigevent __user *timer_event_spec,
501 timer_t __user *created_timer_id);
502asmlinkage long compat_sys_timer_settime(timer_t timer_id, int flags,
503 struct compat_itimerspec __user *new,
504 struct compat_itimerspec __user *old);
505asmlinkage long compat_sys_timer_gettime(timer_t timer_id,
506 struct compat_itimerspec __user *setting);
507asmlinkage long compat_sys_clock_settime(clockid_t which_clock,
508 struct compat_timespec __user *tp);
509asmlinkage long compat_sys_clock_gettime(clockid_t which_clock,
510 struct compat_timespec __user *tp);
511asmlinkage long compat_sys_clock_adjtime(clockid_t which_clock,
512 struct compat_timex __user *tp);
513asmlinkage long compat_sys_clock_getres(clockid_t which_clock,
514 struct compat_timespec __user *tp);
515asmlinkage long compat_sys_clock_nanosleep(clockid_t which_clock, int flags,
516 struct compat_timespec __user *rqtp,
517 struct compat_timespec __user *rmtp);
518asmlinkage long compat_sys_rt_sigtimedwait(compat_sigset_t __user *uthese,
519 struct compat_siginfo __user *uinfo,
520 struct compat_timespec __user *uts, compat_size_t sigsetsize);
521asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset,
522 compat_size_t sigsetsize);
523asmlinkage long compat_sys_sysinfo(struct compat_sysinfo __user *info);
524asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
525 unsigned long arg);
526asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
527 struct compat_timespec __user *utime, u32 __user *uaddr2,
528 u32 val3);
529asmlinkage long compat_sys_getsockopt(int fd, int level, int optname,
530 char __user *optval, int __user *optlen);
531asmlinkage long compat_sys_kexec_load(unsigned long entry,
532 unsigned long nr_segments,
533 struct compat_kexec_segment __user *,
534 unsigned long flags);
535asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes,
536 const struct compat_mq_attr __user *u_mqstat,
537 struct compat_mq_attr __user *u_omqstat);
538asmlinkage long compat_sys_mq_notify(mqd_t mqdes,
539 const struct compat_sigevent __user *u_notification);
540asmlinkage long compat_sys_mq_open(const char __user *u_name,
541 int oflag, compat_mode_t mode,
542 struct compat_mq_attr __user *u_attr);
543asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes,
544 const char __user *u_msg_ptr,
545 size_t msg_len, unsigned int msg_prio,
546 const struct compat_timespec __user *u_abs_timeout);
547asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes,
548 char __user *u_msg_ptr,
549 size_t msg_len, unsigned int __user *u_msg_prio,
550 const struct compat_timespec __user *u_abs_timeout);
551asmlinkage long compat_sys_socketcall(int call, u32 __user *args);
552asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args);
358 553
359extern ssize_t compat_rw_copy_check_uvector(int type, 554extern ssize_t compat_rw_copy_check_uvector(int type,
360 const struct compat_iovec __user *uvector, unsigned long nr_segs, 555 const struct compat_iovec __user *uvector,
556 unsigned long nr_segs,
361 unsigned long fast_segs, struct iovec *fast_pointer, 557 unsigned long fast_segs, struct iovec *fast_pointer,
362 struct iovec **ret_pointer); 558 struct iovec **ret_pointer);
363 559
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index cec467f5d676..9e5f5607eba3 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -38,7 +38,7 @@
38 38
39/* Although the Linux source code makes a difference between 39/* Although the Linux source code makes a difference between
40 generic endianness and the bitfields' endianness, there is no 40 generic endianness and the bitfields' endianness, there is no
41 architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness 41 architecture as of Linux-2.6.24-rc4 where the bitfields' endianness
42 does not match the generic endianness. */ 42 does not match the generic endianness. */
43 43
44#if __BYTE_ORDER == __LITTLE_ENDIAN 44#if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -53,7 +53,7 @@
53 53
54 54
55extern const char *drbd_buildtag(void); 55extern const char *drbd_buildtag(void);
56#define REL_VERSION "8.3.10" 56#define REL_VERSION "8.3.11"
57#define API_VERSION 88 57#define API_VERSION 88
58#define PRO_VERSION_MIN 86 58#define PRO_VERSION_MIN 86
59#define PRO_VERSION_MAX 96 59#define PRO_VERSION_MAX 96
@@ -195,7 +195,7 @@ enum drbd_conns {
195 C_WF_REPORT_PARAMS, /* we have a socket */ 195 C_WF_REPORT_PARAMS, /* we have a socket */
196 C_CONNECTED, /* we have introduced each other */ 196 C_CONNECTED, /* we have introduced each other */
197 C_STARTING_SYNC_S, /* starting full sync by admin request. */ 197 C_STARTING_SYNC_S, /* starting full sync by admin request. */
198 C_STARTING_SYNC_T, /* stariing full sync by admin request. */ 198 C_STARTING_SYNC_T, /* starting full sync by admin request. */
199 C_WF_BITMAP_S, 199 C_WF_BITMAP_S,
200 C_WF_BITMAP_T, 200 C_WF_BITMAP_T,
201 C_WF_SYNC_UUID, 201 C_WF_SYNC_UUID,
@@ -236,7 +236,7 @@ union drbd_state {
236 * pointed out by Maxim Uvarov q<muvarov@ru.mvista.com> 236 * pointed out by Maxim Uvarov q<muvarov@ru.mvista.com>
237 * even though we transmit as "cpu_to_be32(state)", 237 * even though we transmit as "cpu_to_be32(state)",
238 * the offsets of the bitfields still need to be swapped 238 * the offsets of the bitfields still need to be swapped
239 * on different endianess. 239 * on different endianness.
240 */ 240 */
241 struct { 241 struct {
242#if defined(__LITTLE_ENDIAN_BITFIELD) 242#if defined(__LITTLE_ENDIAN_BITFIELD)
@@ -266,7 +266,7 @@ union drbd_state {
266 unsigned peer:2 ; /* 3/4 primary/secondary/unknown */ 266 unsigned peer:2 ; /* 3/4 primary/secondary/unknown */
267 unsigned role:2 ; /* 3/4 primary/secondary/unknown */ 267 unsigned role:2 ; /* 3/4 primary/secondary/unknown */
268#else 268#else
269# error "this endianess is not supported" 269# error "this endianness is not supported"
270#endif 270#endif
271 }; 271 };
272 unsigned int i; 272 unsigned int i;
diff --git a/include/linux/drbd_tag_magic.h b/include/linux/drbd_tag_magic.h
index f14a165e82dc..069543190516 100644
--- a/include/linux/drbd_tag_magic.h
+++ b/include/linux/drbd_tag_magic.h
@@ -30,7 +30,7 @@ enum packet_types {
30 int tag_and_len ## member; 30 int tag_and_len ## member;
31#include "linux/drbd_nl.h" 31#include "linux/drbd_nl.h"
32 32
33/* declate tag-list-sizes */ 33/* declare tag-list-sizes */
34static const int tag_list_sizes[] = { 34static const int tag_list_sizes[] = {
35#define NL_PACKET(name, number, fields) 2 fields , 35#define NL_PACKET(name, number, fields) 2 fields ,
36#define NL_INTEGER(pn, pr, member) + 4 + 4 36#define NL_INTEGER(pn, pr, member) + 4 + 4
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index d764a426e9fd..b78956b3c2e7 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -100,7 +100,6 @@ struct hd_struct {
100 sector_t start_sect; 100 sector_t start_sect;
101 sector_t nr_sects; 101 sector_t nr_sects;
102 sector_t alignment_offset; 102 sector_t alignment_offset;
103 unsigned int discard_alignment;
104 struct device __dev; 103 struct device __dev;
105 struct kobject *holder_dir; 104 struct kobject *holder_dir;
106 int policy, partno; 105 int policy, partno;
@@ -127,6 +126,7 @@ struct hd_struct {
127#define GENHD_FL_SUPPRESS_PARTITION_INFO 32 126#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
128#define GENHD_FL_EXT_DEVT 64 /* allow extended devt */ 127#define GENHD_FL_EXT_DEVT 64 /* allow extended devt */
129#define GENHD_FL_NATIVE_CAPACITY 128 128#define GENHD_FL_NATIVE_CAPACITY 128
129#define GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE 256
130 130
131enum { 131enum {
132 DISK_EVENT_MEDIA_CHANGE = 1 << 0, /* media changed */ 132 DISK_EVENT_MEDIA_CHANGE = 1 << 0, /* media changed */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index f1e3ff5880a9..a6c652ef516d 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -409,7 +409,7 @@ void i2c_unlock_adapter(struct i2c_adapter *);
409/* i2c adapter classes (bitmask) */ 409/* i2c adapter classes (bitmask) */
410#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ 410#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */
411#define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */ 411#define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */
412#define I2C_CLASS_SPD (1<<7) /* SPD EEPROMs and similar */ 412#define I2C_CLASS_SPD (1<<7) /* Memory modules */
413 413
414/* Internal numbers to terminate lists */ 414/* Internal numbers to terminate lists */
415#define I2C_CLIENT_END 0xfffeU 415#define I2C_CLIENT_END 0xfffeU
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h
index 6a4fab7c6e09..7a71ffad037c 100644
--- a/include/linux/lru_cache.h
+++ b/include/linux/lru_cache.h
@@ -139,9 +139,9 @@ write intent log information, three of which are mentioned here.
139 * .list is on one of three lists: 139 * .list is on one of three lists:
140 * in_use: currently in use (refcnt > 0, lc_number != LC_FREE) 140 * in_use: currently in use (refcnt > 0, lc_number != LC_FREE)
141 * lru: unused but ready to be reused or recycled 141 * lru: unused but ready to be reused or recycled
142 * (ts_refcnt == 0, lc_number != LC_FREE), 142 * (lc_refcnt == 0, lc_number != LC_FREE),
143 * free: unused but ready to be recycled 143 * free: unused but ready to be recycled
144 * (ts_refcnt == 0, lc_number == LC_FREE), 144 * (lc_refcnt == 0, lc_number == LC_FREE),
145 * 145 *
146 * an element is said to be "in the active set", 146 * an element is said to be "in the active set",
147 * if either on "in_use" or "lru", i.e. lc_number != LC_FREE. 147 * if either on "in_use" or "lru", i.e. lc_number != LC_FREE.
@@ -160,8 +160,8 @@ struct lc_element {
160 struct hlist_node colision; 160 struct hlist_node colision;
161 struct list_head list; /* LRU list or free list */ 161 struct list_head list; /* LRU list or free list */
162 unsigned refcnt; 162 unsigned refcnt;
163 /* back "pointer" into ts_cache->element[index], 163 /* back "pointer" into lc_cache->element[index],
164 * for paranoia, and for "ts_element_to_index" */ 164 * for paranoia, and for "lc_element_to_index" */
165 unsigned lc_index; 165 unsigned lc_index;
166 /* if we want to track a larger set of objects, 166 /* if we want to track a larger set of objects,
167 * it needs to become arch independend u64 */ 167 * it needs to become arch independend u64 */
@@ -190,8 +190,8 @@ struct lru_cache {
190 /* Arbitrary limit on maximum tracked objects. Practical limit is much 190 /* Arbitrary limit on maximum tracked objects. Practical limit is much
191 * lower due to allocation failures, probably. For typical use cases, 191 * lower due to allocation failures, probably. For typical use cases,
192 * nr_elements should be a few thousand at most. 192 * nr_elements should be a few thousand at most.
193 * This also limits the maximum value of ts_element.ts_index, allowing the 193 * This also limits the maximum value of lc_element.lc_index, allowing the
194 * 8 high bits of .ts_index to be overloaded with flags in the future. */ 194 * 8 high bits of .lc_index to be overloaded with flags in the future. */
195#define LC_MAX_ACTIVE (1<<24) 195#define LC_MAX_ACTIVE (1<<24)
196 196
197 /* statistics */ 197 /* statistics */
diff --git a/include/linux/mfd/db5500-prcmu.h b/include/linux/mfd/db5500-prcmu.h
new file mode 100644
index 000000000000..f0977986402c
--- /dev/null
+++ b/include/linux/mfd/db5500-prcmu.h
@@ -0,0 +1,45 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License v2
5 *
6 * U5500 PRCMU API.
7 */
8#ifndef __MACH_PRCMU_U5500_H
9#define __MACH_PRCMU_U5500_H
10
11#ifdef CONFIG_UX500_SOC_DB5500
12
13void db5500_prcmu_early_init(void);
14
15int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
16int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
17
18#else /* !CONFIG_UX500_SOC_DB5500 */
19
20static inline void db5500_prcmu_early_init(void)
21{
22}
23
24static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
25{
26 return -ENOSYS;
27}
28
29static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
30{
31 return -ENOSYS;
32}
33
34#endif /* CONFIG_UX500_SOC_DB5500 */
35
36static inline int db5500_prcmu_config_abb_event_readout(u32 abb_events)
37{
38#ifdef CONFIG_MACH_U5500_SIMULATOR
39 return 0;
40#else
41 return -1;
42#endif
43}
44
45#endif /* __MACH_PRCMU_U5500_H */
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
new file mode 100644
index 000000000000..917dbcab701c
--- /dev/null
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -0,0 +1,978 @@
1/*
2 * Copyright (C) STMicroelectronics 2009
3 * Copyright (C) ST-Ericsson SA 2010
4 *
5 * License Terms: GNU General Public License v2
6 * Author: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
7 *
8 * PRCMU f/w APIs
9 */
10#ifndef __MFD_DB8500_PRCMU_H
11#define __MFD_DB8500_PRCMU_H
12
13#include <linux/interrupt.h>
14#include <linux/notifier.h>
15
16/* This portion previously known as <mach/prcmu-fw-defs_v1.h> */
17
18/**
19 * enum state - ON/OFF state definition
20 * @OFF: State is ON
21 * @ON: State is OFF
22 *
23 */
24enum state {
25 OFF = 0x0,
26 ON = 0x1,
27};
28
29/**
30 * enum ret_state - general purpose On/Off/Retention states
31 *
32 */
33enum ret_state {
34 OFFST = 0,
35 ONST = 1,
36 RETST = 2
37};
38
39/**
40 * enum clk_arm - ARM Cortex A9 clock schemes
41 * @A9_OFF:
42 * @A9_BOOT:
43 * @A9_OPPT1:
44 * @A9_OPPT2:
45 * @A9_EXTCLK:
46 */
47enum clk_arm {
48 A9_OFF,
49 A9_BOOT,
50 A9_OPPT1,
51 A9_OPPT2,
52 A9_EXTCLK
53};
54
55/**
56 * enum clk_gen - GEN#0/GEN#1 clock schemes
57 * @GEN_OFF:
58 * @GEN_BOOT:
59 * @GEN_OPPT1:
60 */
61enum clk_gen {
62 GEN_OFF,
63 GEN_BOOT,
64 GEN_OPPT1,
65};
66
67/* some information between arm and xp70 */
68
69/**
70 * enum romcode_write - Romcode message written by A9 AND read by XP70
71 * @RDY_2_DS: Value set when ApDeepSleep state can be executed by XP70
72 * @RDY_2_XP70_RST: Value set when 0x0F has been successfully polled by the
73 * romcode. The xp70 will go into self-reset
74 */
75enum romcode_write {
76 RDY_2_DS = 0x09,
77 RDY_2_XP70_RST = 0x10
78};
79
80/**
81 * enum romcode_read - Romcode message written by XP70 and read by A9
82 * @INIT: Init value when romcode field is not used
83 * @FS_2_DS: Value set when power state is going from ApExecute to
84 * ApDeepSleep
85 * @END_DS: Value set when ApDeepSleep power state is reached coming from
86 * ApExecute state
87 * @DS_TO_FS: Value set when power state is going from ApDeepSleep to
88 * ApExecute
89 * @END_FS: Value set when ApExecute power state is reached coming from
90 * ApDeepSleep state
91 * @SWR: Value set when power state is going to ApReset
92 * @END_SWR: Value set when the xp70 finished executing ApReset actions and
93 * waits for romcode acknowledgment to go to self-reset
94 */
95enum romcode_read {
96 INIT = 0x00,
97 FS_2_DS = 0x0A,
98 END_DS = 0x0B,
99 DS_TO_FS = 0x0C,
100 END_FS = 0x0D,
101 SWR = 0x0E,
102 END_SWR = 0x0F
103};
104
105/**
106 * enum ap_pwrst - current power states defined in PRCMU firmware
107 * @NO_PWRST: Current power state init
108 * @AP_BOOT: Current power state is apBoot
109 * @AP_EXECUTE: Current power state is apExecute
110 * @AP_DEEP_SLEEP: Current power state is apDeepSleep
111 * @AP_SLEEP: Current power state is apSleep
112 * @AP_IDLE: Current power state is apIdle
113 * @AP_RESET: Current power state is apReset
114 */
115enum ap_pwrst {
116 NO_PWRST = 0x00,
117 AP_BOOT = 0x01,
118 AP_EXECUTE = 0x02,
119 AP_DEEP_SLEEP = 0x03,
120 AP_SLEEP = 0x04,
121 AP_IDLE = 0x05,
122 AP_RESET = 0x06
123};
124
125/**
126 * enum ap_pwrst_trans - Transition states defined in PRCMU firmware
127 * @NO_TRANSITION: No power state transition
128 * @APEXECUTE_TO_APSLEEP: Power state transition from ApExecute to ApSleep
129 * @APIDLE_TO_APSLEEP: Power state transition from ApIdle to ApSleep
130 * @APBOOT_TO_APEXECUTE: Power state transition from ApBoot to ApExecute
131 * @APEXECUTE_TO_APDEEPSLEEP: Power state transition from ApExecute to
132 * ApDeepSleep
133 * @APEXECUTE_TO_APIDLE: Power state transition from ApExecute to ApIdle
134 */
135enum ap_pwrst_trans {
136 NO_TRANSITION = 0x00,
137 APEXECUTE_TO_APSLEEP = 0x01,
138 APIDLE_TO_APSLEEP = 0x02, /* To be removed */
139 PRCMU_AP_SLEEP = 0x01,
140 APBOOT_TO_APEXECUTE = 0x03,
141 APEXECUTE_TO_APDEEPSLEEP = 0x04, /* To be removed */
142 PRCMU_AP_DEEP_SLEEP = 0x04,
143 APEXECUTE_TO_APIDLE = 0x05, /* To be removed */
144 PRCMU_AP_IDLE = 0x05,
145 PRCMU_AP_DEEP_IDLE = 0x07,
146};
147
148/**
149 * enum ddr_pwrst - DDR power states definition
150 * @DDR_PWR_STATE_UNCHANGED: SDRAM and DDR controller state is unchanged
151 * @DDR_PWR_STATE_ON:
152 * @DDR_PWR_STATE_OFFLOWLAT:
153 * @DDR_PWR_STATE_OFFHIGHLAT:
154 */
155enum ddr_pwrst {
156 DDR_PWR_STATE_UNCHANGED = 0x00,
157 DDR_PWR_STATE_ON = 0x01,
158 DDR_PWR_STATE_OFFLOWLAT = 0x02,
159 DDR_PWR_STATE_OFFHIGHLAT = 0x03
160};
161
162/**
163 * enum arm_opp - ARM OPP states definition
164 * @ARM_OPP_INIT:
165 * @ARM_NO_CHANGE: The ARM operating point is unchanged
166 * @ARM_100_OPP: The new ARM operating point is arm100opp
167 * @ARM_50_OPP: The new ARM operating point is arm50opp
168 * @ARM_MAX_OPP: Operating point is "max" (more than 100)
169 * @ARM_MAX_FREQ100OPP: Set max opp if available, else 100
170 * @ARM_EXTCLK: The new ARM operating point is armExtClk
171 */
172enum arm_opp {
173 ARM_OPP_INIT = 0x00,
174 ARM_NO_CHANGE = 0x01,
175 ARM_100_OPP = 0x02,
176 ARM_50_OPP = 0x03,
177 ARM_MAX_OPP = 0x04,
178 ARM_MAX_FREQ100OPP = 0x05,
179 ARM_EXTCLK = 0x07
180};
181
182/**
183 * enum ape_opp - APE OPP states definition
184 * @APE_OPP_INIT:
185 * @APE_NO_CHANGE: The APE operating point is unchanged
186 * @APE_100_OPP: The new APE operating point is ape100opp
187 * @APE_50_OPP: 50%
188 */
189enum ape_opp {
190 APE_OPP_INIT = 0x00,
191 APE_NO_CHANGE = 0x01,
192 APE_100_OPP = 0x02,
193 APE_50_OPP = 0x03
194};
195
196/**
197 * enum hw_acc_state - State definition for hardware accelerator
198 * @HW_NO_CHANGE: The hardware accelerator state must remain unchanged
199 * @HW_OFF: The hardware accelerator must be switched off
200 * @HW_OFF_RAMRET: The hardware accelerator must be switched off with its
201 * internal RAM in retention
202 * @HW_ON: The hwa hardware accelerator hwa must be switched on
203 *
204 * NOTE! Deprecated, to be removed when all users switched over to use the
205 * regulator API.
206 */
207enum hw_acc_state {
208 HW_NO_CHANGE = 0x00,
209 HW_OFF = 0x01,
210 HW_OFF_RAMRET = 0x02,
211 HW_ON = 0x04
212};
213
214/**
215 * enum mbox_2_arm_stat - Status messages definition for mbox_arm
216 * @BOOT_TO_EXECUTEOK: The apBoot to apExecute state transition has been
217 * completed
218 * @DEEPSLEEPOK: The apExecute to apDeepSleep state transition has been
219 * completed
220 * @SLEEPOK: The apExecute to apSleep state transition has been completed
221 * @IDLEOK: The apExecute to apIdle state transition has been completed
222 * @SOFTRESETOK: The A9 watchdog/ SoftReset state has been completed
223 * @SOFTRESETGO : The A9 watchdog/SoftReset state is on going
224 * @BOOT_TO_EXECUTE: The apBoot to apExecute state transition is on going
225 * @EXECUTE_TO_DEEPSLEEP: The apExecute to apDeepSleep state transition is on
226 * going
227 * @DEEPSLEEP_TO_EXECUTE: The apDeepSleep to apExecute state transition is on
228 * going
229 * @DEEPSLEEP_TO_EXECUTEOK: The apDeepSleep to apExecute state transition has
230 * been completed
231 * @EXECUTE_TO_SLEEP: The apExecute to apSleep state transition is on going
232 * @SLEEP_TO_EXECUTE: The apSleep to apExecute state transition is on going
233 * @SLEEP_TO_EXECUTEOK: The apSleep to apExecute state transition has been
234 * completed
235 * @EXECUTE_TO_IDLE: The apExecute to apIdle state transition is on going
236 * @IDLE_TO_EXECUTE: The apIdle to apExecute state transition is on going
237 * @IDLE_TO_EXECUTEOK: The apIdle to apExecute state transition has been
238 * completed
239 * @INIT_STATUS: Status init
240 */
241enum ap_pwrsttr_status {
242 BOOT_TO_EXECUTEOK = 0xFF,
243 DEEPSLEEPOK = 0xFE,
244 SLEEPOK = 0xFD,
245 IDLEOK = 0xFC,
246 SOFTRESETOK = 0xFB,
247 SOFTRESETGO = 0xFA,
248 BOOT_TO_EXECUTE = 0xF9,
249 EXECUTE_TO_DEEPSLEEP = 0xF8,
250 DEEPSLEEP_TO_EXECUTE = 0xF7,
251 DEEPSLEEP_TO_EXECUTEOK = 0xF6,
252 EXECUTE_TO_SLEEP = 0xF5,
253 SLEEP_TO_EXECUTE = 0xF4,
254 SLEEP_TO_EXECUTEOK = 0xF3,
255 EXECUTE_TO_IDLE = 0xF2,
256 IDLE_TO_EXECUTE = 0xF1,
257 IDLE_TO_EXECUTEOK = 0xF0,
258 RDYTODS_RETURNTOEXE = 0xEF,
259 NORDYTODS_RETURNTOEXE = 0xEE,
260 EXETOSLEEP_RETURNTOEXE = 0xED,
261 EXETOIDLE_RETURNTOEXE = 0xEC,
262 INIT_STATUS = 0xEB,
263
264 /*error messages */
265 INITERROR = 0x00,
266 PLLARMLOCKP_ER = 0x01,
267 PLLDDRLOCKP_ER = 0x02,
268 PLLSOCLOCKP_ER = 0x03,
269 PLLSOCK1LOCKP_ER = 0x04,
270 ARMWFI_ER = 0x05,
271 SYSCLKOK_ER = 0x06,
272 I2C_NACK_DATA_ER = 0x07,
273 BOOT_ER = 0x08,
274 I2C_STATUS_ALWAYS_1 = 0x0A,
275 I2C_NACK_REG_ADDR_ER = 0x0B,
276 I2C_NACK_DATA0123_ER = 0x1B,
277 I2C_NACK_ADDR_ER = 0x1F,
278 CURAPPWRSTISNOT_BOOT = 0x20,
279 CURAPPWRSTISNOT_EXECUTE = 0x21,
280 CURAPPWRSTISNOT_SLEEPMODE = 0x22,
281 CURAPPWRSTISNOT_CORRECTFORIT10 = 0x23,
282 FIFO4500WUISNOT_WUPEVENT = 0x24,
283 PLL32KLOCKP_ER = 0x29,
284 DDRDEEPSLEEPOK_ER = 0x2A,
285 ROMCODEREADY_ER = 0x50,
286 WUPBEFOREDS = 0x51,
287 DDRCONFIG_ER = 0x52,
288 WUPBEFORESLEEP = 0x53,
289 WUPBEFOREIDLE = 0x54
290}; /* earlier called as mbox_2_arm_stat */
291
292/**
293 * enum dvfs_stat - DVFS status messages definition
294 * @DVFS_GO: A state transition DVFS is on going
295 * @DVFS_ARM100OPPOK: The state transition DVFS has been completed for 100OPP
296 * @DVFS_ARM50OPPOK: The state transition DVFS has been completed for 50OPP
297 * @DVFS_ARMEXTCLKOK: The state transition DVFS has been completed for EXTCLK
298 * @DVFS_NOCHGTCLKOK: The state transition DVFS has been completed for
299 * NOCHGCLK
300 * @DVFS_INITSTATUS: Value init
301 */
302enum dvfs_stat {
303 DVFS_GO = 0xFF,
304 DVFS_ARM100OPPOK = 0xFE,
305 DVFS_ARM50OPPOK = 0xFD,
306 DVFS_ARMEXTCLKOK = 0xFC,
307 DVFS_NOCHGTCLKOK = 0xFB,
308 DVFS_INITSTATUS = 0x00
309};
310
311/**
312 * enum sva_mmdsp_stat - SVA MMDSP status messages
313 * @SVA_MMDSP_GO: SVAMMDSP interrupt has happened
314 * @SVA_MMDSP_INIT: Status init
315 */
316enum sva_mmdsp_stat {
317 SVA_MMDSP_GO = 0xFF,
318 SVA_MMDSP_INIT = 0x00
319};
320
321/**
322 * enum sia_mmdsp_stat - SIA MMDSP status messages
323 * @SIA_MMDSP_GO: SIAMMDSP interrupt has happened
324 * @SIA_MMDSP_INIT: Status init
325 */
326enum sia_mmdsp_stat {
327 SIA_MMDSP_GO = 0xFF,
328 SIA_MMDSP_INIT = 0x00
329};
330
331/**
332 * enum mbox_to_arm_err - Error messages definition
333 * @INIT_ERR: Init value
334 * @PLLARMLOCKP_ERR: PLLARM has not been correctly locked in given time
335 * @PLLDDRLOCKP_ERR: PLLDDR has not been correctly locked in the given time
336 * @PLLSOC0LOCKP_ERR: PLLSOC0 has not been correctly locked in the given time
337 * @PLLSOC1LOCKP_ERR: PLLSOC1 has not been correctly locked in the given time
338 * @ARMWFI_ERR: The ARM WFI has not been correctly executed in the given time
339 * @SYSCLKOK_ERR: The SYSCLK is not available in the given time
340 * @BOOT_ERR: Romcode has not validated the XP70 self reset in the given time
341 * @ROMCODESAVECONTEXT: The Romcode didn.t correctly save it secure context
342 * @VARMHIGHSPEEDVALTO_ERR: The ARM high speed supply value transfered
343 * through I2C has not been correctly executed in the given time
344 * @VARMHIGHSPEEDACCESS_ERR: The command value of VarmHighSpeedVal transfered
345 * through I2C has not been correctly executed in the given time
346 * @VARMLOWSPEEDVALTO_ERR:The ARM low speed supply value transfered through
347 * I2C has not been correctly executed in the given time
348 * @VARMLOWSPEEDACCESS_ERR: The command value of VarmLowSpeedVal transfered
349 * through I2C has not been correctly executed in the given time
350 * @VARMRETENTIONVALTO_ERR: The ARM retention supply value transfered through
351 * I2C has not been correctly executed in the given time
352 * @VARMRETENTIONACCESS_ERR: The command value of VarmRetentionVal transfered
353 * through I2C has not been correctly executed in the given time
354 * @VAPEHIGHSPEEDVALTO_ERR: The APE highspeed supply value transfered through
355 * I2C has not been correctly executed in the given time
356 * @VSAFEHPVALTO_ERR: The SAFE high power supply value transfered through I2C
357 * has not been correctly executed in the given time
358 * @VMODSEL1VALTO_ERR: The MODEM sel1 supply value transfered through I2C has
359 * not been correctly executed in the given time
360 * @VMODSEL2VALTO_ERR: The MODEM sel2 supply value transfered through I2C has
361 * not been correctly executed in the given time
362 * @VARMOFFACCESS_ERR: The command value of Varm ON/OFF transfered through
363 * I2C has not been correctly executed in the given time
364 * @VAPEOFFACCESS_ERR: The command value of Vape ON/OFF transfered through
365 * I2C has not been correctly executed in the given time
366 * @VARMRETACCES_ERR: The command value of Varm retention ON/OFF transfered
367 * through I2C has not been correctly executed in the given time
368 * @CURAPPWRSTISNOTBOOT:Generated when Arm want to do power state transition
369 * ApBoot to ApExecute but the power current state is not Apboot
370 * @CURAPPWRSTISNOTEXECUTE: Generated when Arm want to do power state
371 * transition from ApExecute to others power state but the
372 * power current state is not ApExecute
373 * @CURAPPWRSTISNOTSLEEPMODE: Generated when wake up events are transmitted
374 * but the power current state is not ApDeepSleep/ApSleep/ApIdle
375 * @CURAPPWRSTISNOTCORRECTDBG: Generated when wake up events are transmitted
376 * but the power current state is not correct
377 * @ARMREGU1VALTO_ERR:The ArmRegu1 value transferred through I2C has not
378 * been correctly executed in the given time
379 * @ARMREGU2VALTO_ERR: The ArmRegu2 value transferred through I2C has not
380 * been correctly executed in the given time
381 * @VAPEREGUVALTO_ERR: The VApeRegu value transfered through I2C has not
382 * been correctly executed in the given time
383 * @VSMPS3REGUVALTO_ERR: The VSmps3Regu value transfered through I2C has not
384 * been correctly executed in the given time
385 * @VMODREGUVALTO_ERR: The VModemRegu value transfered through I2C has not
386 * been correctly executed in the given time
387 */
388enum mbox_to_arm_err {
389 INIT_ERR = 0x00,
390 PLLARMLOCKP_ERR = 0x01,
391 PLLDDRLOCKP_ERR = 0x02,
392 PLLSOC0LOCKP_ERR = 0x03,
393 PLLSOC1LOCKP_ERR = 0x04,
394 ARMWFI_ERR = 0x05,
395 SYSCLKOK_ERR = 0x06,
396 BOOT_ERR = 0x07,
397 ROMCODESAVECONTEXT = 0x08,
398 VARMHIGHSPEEDVALTO_ERR = 0x10,
399 VARMHIGHSPEEDACCESS_ERR = 0x11,
400 VARMLOWSPEEDVALTO_ERR = 0x12,
401 VARMLOWSPEEDACCESS_ERR = 0x13,
402 VARMRETENTIONVALTO_ERR = 0x14,
403 VARMRETENTIONACCESS_ERR = 0x15,
404 VAPEHIGHSPEEDVALTO_ERR = 0x16,
405 VSAFEHPVALTO_ERR = 0x17,
406 VMODSEL1VALTO_ERR = 0x18,
407 VMODSEL2VALTO_ERR = 0x19,
408 VARMOFFACCESS_ERR = 0x1A,
409 VAPEOFFACCESS_ERR = 0x1B,
410 VARMRETACCES_ERR = 0x1C,
411 CURAPPWRSTISNOTBOOT = 0x20,
412 CURAPPWRSTISNOTEXECUTE = 0x21,
413 CURAPPWRSTISNOTSLEEPMODE = 0x22,
414 CURAPPWRSTISNOTCORRECTDBG = 0x23,
415 ARMREGU1VALTO_ERR = 0x24,
416 ARMREGU2VALTO_ERR = 0x25,
417 VAPEREGUVALTO_ERR = 0x26,
418 VSMPS3REGUVALTO_ERR = 0x27,
419 VMODREGUVALTO_ERR = 0x28
420};
421
422enum hw_acc {
423 SVAMMDSP = 0,
424 SVAPIPE = 1,
425 SIAMMDSP = 2,
426 SIAPIPE = 3,
427 SGA = 4,
428 B2R2MCDE = 5,
429 ESRAM12 = 6,
430 ESRAM34 = 7,
431};
432
433enum cs_pwrmgt {
434 PWRDNCS0 = 0,
435 WKUPCS0 = 1,
436 PWRDNCS1 = 2,
437 WKUPCS1 = 3
438};
439
440/* Defs related to autonomous power management */
441
442/**
443 * enum sia_sva_pwr_policy - Power policy
444 * @NO_CHGT: No change
445 * @DSPOFF_HWPOFF:
446 * @DSPOFFRAMRET_HWPOFF:
447 * @DSPCLKOFF_HWPOFF:
448 * @DSPCLKOFF_HWPCLKOFF:
449 *
450 */
451enum sia_sva_pwr_policy {
452 NO_CHGT = 0x0,
453 DSPOFF_HWPOFF = 0x1,
454 DSPOFFRAMRET_HWPOFF = 0x2,
455 DSPCLKOFF_HWPOFF = 0x3,
456 DSPCLKOFF_HWPCLKOFF = 0x4,
457};
458
459/**
460 * enum auto_enable - Auto Power enable
461 * @AUTO_OFF:
462 * @AUTO_ON:
463 *
464 */
465enum auto_enable {
466 AUTO_OFF = 0x0,
467 AUTO_ON = 0x1,
468};
469
470/* End of file previously known as prcmu-fw-defs_v1.h */
471
472/* PRCMU Wakeup defines */
473enum prcmu_wakeup_index {
474 PRCMU_WAKEUP_INDEX_RTC,
475 PRCMU_WAKEUP_INDEX_RTT0,
476 PRCMU_WAKEUP_INDEX_RTT1,
477 PRCMU_WAKEUP_INDEX_HSI0,
478 PRCMU_WAKEUP_INDEX_HSI1,
479 PRCMU_WAKEUP_INDEX_USB,
480 PRCMU_WAKEUP_INDEX_ABB,
481 PRCMU_WAKEUP_INDEX_ABB_FIFO,
482 PRCMU_WAKEUP_INDEX_ARM,
483 NUM_PRCMU_WAKEUP_INDICES
484};
485#define PRCMU_WAKEUP(_name) (BIT(PRCMU_WAKEUP_INDEX_##_name))
486
487/* PRCMU QoS APE OPP class */
488#define PRCMU_QOS_APE_OPP 1
489#define PRCMU_QOS_DDR_OPP 2
490#define PRCMU_QOS_DEFAULT_VALUE -1
491
492/**
493 * enum hw_acc_dev - enum for hw accelerators
494 * @HW_ACC_SVAMMDSP: for SVAMMDSP
495 * @HW_ACC_SVAPIPE: for SVAPIPE
496 * @HW_ACC_SIAMMDSP: for SIAMMDSP
497 * @HW_ACC_SIAPIPE: for SIAPIPE
498 * @HW_ACC_SGA: for SGA
499 * @HW_ACC_B2R2: for B2R2
500 * @HW_ACC_MCDE: for MCDE
501 * @HW_ACC_ESRAM1: for ESRAM1
502 * @HW_ACC_ESRAM2: for ESRAM2
503 * @HW_ACC_ESRAM3: for ESRAM3
504 * @HW_ACC_ESRAM4: for ESRAM4
505 * @NUM_HW_ACC: number of hardware accelerators
506 *
507 * Different hw accelerators which can be turned ON/
508 * OFF or put into retention (MMDSPs and ESRAMs).
509 * Used with EPOD API.
510 *
511 * NOTE! Deprecated, to be removed when all users switched over to use the
512 * regulator API.
513 */
514enum hw_acc_dev {
515 HW_ACC_SVAMMDSP,
516 HW_ACC_SVAPIPE,
517 HW_ACC_SIAMMDSP,
518 HW_ACC_SIAPIPE,
519 HW_ACC_SGA,
520 HW_ACC_B2R2,
521 HW_ACC_MCDE,
522 HW_ACC_ESRAM1,
523 HW_ACC_ESRAM2,
524 HW_ACC_ESRAM3,
525 HW_ACC_ESRAM4,
526 NUM_HW_ACC
527};
528
529/*
530 * Ids for all EPODs (power domains)
531 * - EPOD_ID_SVAMMDSP: power domain for SVA MMDSP
532 * - EPOD_ID_SVAPIPE: power domain for SVA pipe
533 * - EPOD_ID_SIAMMDSP: power domain for SIA MMDSP
534 * - EPOD_ID_SIAPIPE: power domain for SIA pipe
535 * - EPOD_ID_SGA: power domain for SGA
536 * - EPOD_ID_B2R2_MCDE: power domain for B2R2 and MCDE
537 * - EPOD_ID_ESRAM12: power domain for ESRAM 1 and 2
538 * - EPOD_ID_ESRAM34: power domain for ESRAM 3 and 4
539 * - NUM_EPOD_ID: number of power domains
540 */
541#define EPOD_ID_SVAMMDSP 0
542#define EPOD_ID_SVAPIPE 1
543#define EPOD_ID_SIAMMDSP 2
544#define EPOD_ID_SIAPIPE 3
545#define EPOD_ID_SGA 4
546#define EPOD_ID_B2R2_MCDE 5
547#define EPOD_ID_ESRAM12 6
548#define EPOD_ID_ESRAM34 7
549#define NUM_EPOD_ID 8
550
551/*
552 * state definition for EPOD (power domain)
553 * - EPOD_STATE_NO_CHANGE: The EPOD should remain unchanged
554 * - EPOD_STATE_OFF: The EPOD is switched off
555 * - EPOD_STATE_RAMRET: The EPOD is switched off with its internal RAM in
556 * retention
557 * - EPOD_STATE_ON_CLK_OFF: The EPOD is switched on, clock is still off
558 * - EPOD_STATE_ON: Same as above, but with clock enabled
559 */
560#define EPOD_STATE_NO_CHANGE 0x00
561#define EPOD_STATE_OFF 0x01
562#define EPOD_STATE_RAMRET 0x02
563#define EPOD_STATE_ON_CLK_OFF 0x03
564#define EPOD_STATE_ON 0x04
565
566/*
567 * CLKOUT sources
568 */
569#define PRCMU_CLKSRC_CLK38M 0x00
570#define PRCMU_CLKSRC_ACLK 0x01
571#define PRCMU_CLKSRC_SYSCLK 0x02
572#define PRCMU_CLKSRC_LCDCLK 0x03
573#define PRCMU_CLKSRC_SDMMCCLK 0x04
574#define PRCMU_CLKSRC_TVCLK 0x05
575#define PRCMU_CLKSRC_TIMCLK 0x06
576#define PRCMU_CLKSRC_CLK009 0x07
577/* These are only valid for CLKOUT1: */
578#define PRCMU_CLKSRC_SIAMMDSPCLK 0x40
579#define PRCMU_CLKSRC_I2CCLK 0x41
580#define PRCMU_CLKSRC_MSP02CLK 0x42
581#define PRCMU_CLKSRC_ARMPLL_OBSCLK 0x43
582#define PRCMU_CLKSRC_HSIRXCLK 0x44
583#define PRCMU_CLKSRC_HSITXCLK 0x45
584#define PRCMU_CLKSRC_ARMCLKFIX 0x46
585#define PRCMU_CLKSRC_HDMICLK 0x47
586
587/*
588 * Definitions for autonomous power management configuration.
589 */
590
591#define PRCMU_AUTO_PM_OFF 0
592#define PRCMU_AUTO_PM_ON 1
593
594#define PRCMU_AUTO_PM_POWER_ON_HSEM BIT(0)
595#define PRCMU_AUTO_PM_POWER_ON_ABB_FIFO_IT BIT(1)
596
597enum prcmu_auto_pm_policy {
598 PRCMU_AUTO_PM_POLICY_NO_CHANGE,
599 PRCMU_AUTO_PM_POLICY_DSP_OFF_HWP_OFF,
600 PRCMU_AUTO_PM_POLICY_DSP_OFF_RAMRET_HWP_OFF,
601 PRCMU_AUTO_PM_POLICY_DSP_CLK_OFF_HWP_OFF,
602 PRCMU_AUTO_PM_POLICY_DSP_CLK_OFF_HWP_CLK_OFF,
603};
604
605/**
606 * struct prcmu_auto_pm_config - Autonomous power management configuration.
607 * @sia_auto_pm_enable: SIA autonomous pm enable. (PRCMU_AUTO_PM_{OFF,ON})
608 * @sia_power_on: SIA power ON enable. (PRCMU_AUTO_PM_POWER_ON_* bitmask)
609 * @sia_policy: SIA power policy. (enum prcmu_auto_pm_policy)
610 * @sva_auto_pm_enable: SVA autonomous pm enable. (PRCMU_AUTO_PM_{OFF,ON})
611 * @sva_power_on: SVA power ON enable. (PRCMU_AUTO_PM_POWER_ON_* bitmask)
612 * @sva_policy: SVA power policy. (enum prcmu_auto_pm_policy)
613 */
614struct prcmu_auto_pm_config {
615 u8 sia_auto_pm_enable;
616 u8 sia_power_on;
617 u8 sia_policy;
618 u8 sva_auto_pm_enable;
619 u8 sva_power_on;
620 u8 sva_policy;
621};
622
623/**
624 * enum ddr_opp - DDR OPP states definition
625 * @DDR_100_OPP: The new DDR operating point is ddr100opp
626 * @DDR_50_OPP: The new DDR operating point is ddr50opp
627 * @DDR_25_OPP: The new DDR operating point is ddr25opp
628 */
629enum ddr_opp {
630 DDR_100_OPP = 0x00,
631 DDR_50_OPP = 0x01,
632 DDR_25_OPP = 0x02,
633};
634
635/*
636 * Clock identifiers.
637 */
638enum prcmu_clock {
639 PRCMU_SGACLK,
640 PRCMU_UARTCLK,
641 PRCMU_MSP02CLK,
642 PRCMU_MSP1CLK,
643 PRCMU_I2CCLK,
644 PRCMU_SDMMCCLK,
645 PRCMU_SLIMCLK,
646 PRCMU_PER1CLK,
647 PRCMU_PER2CLK,
648 PRCMU_PER3CLK,
649 PRCMU_PER5CLK,
650 PRCMU_PER6CLK,
651 PRCMU_PER7CLK,
652 PRCMU_LCDCLK,
653 PRCMU_BMLCLK,
654 PRCMU_HSITXCLK,
655 PRCMU_HSIRXCLK,
656 PRCMU_HDMICLK,
657 PRCMU_APEATCLK,
658 PRCMU_APETRACECLK,
659 PRCMU_MCDECLK,
660 PRCMU_IPI2CCLK,
661 PRCMU_DSIALTCLK,
662 PRCMU_DMACLK,
663 PRCMU_B2R2CLK,
664 PRCMU_TVCLK,
665 PRCMU_SSPCLK,
666 PRCMU_RNGCLK,
667 PRCMU_UICCCLK,
668 PRCMU_NUM_REG_CLOCKS,
669 PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS,
670 PRCMU_TIMCLK,
671};
672
673/*
674 * Definitions for controlling ESRAM0 in deep sleep.
675 */
676#define ESRAM0_DEEP_SLEEP_STATE_OFF 1
677#define ESRAM0_DEEP_SLEEP_STATE_RET 2
678
679#ifdef CONFIG_MFD_DB8500_PRCMU
680void __init prcmu_early_init(void);
681int prcmu_set_display_clocks(void);
682int prcmu_disable_dsipll(void);
683int prcmu_enable_dsipll(void);
684#else
685static inline void __init prcmu_early_init(void) {}
686#endif
687
688#ifdef CONFIG_MFD_DB8500_PRCMU
689
690int prcmu_set_rc_a2p(enum romcode_write);
691enum romcode_read prcmu_get_rc_p2a(void);
692enum ap_pwrst prcmu_get_xp70_current_state(void);
693int prcmu_set_power_state(u8 state, bool keep_ulp_clk, bool keep_ap_pll);
694
695void prcmu_enable_wakeups(u32 wakeups);
696static inline void prcmu_disable_wakeups(void)
697{
698 prcmu_enable_wakeups(0);
699}
700
701void prcmu_config_abb_event_readout(u32 abb_events);
702void prcmu_get_abb_event_buffer(void __iomem **buf);
703int prcmu_set_arm_opp(u8 opp);
704int prcmu_get_arm_opp(void);
705bool prcmu_has_arm_maxopp(void);
706bool prcmu_is_u8400(void);
707int prcmu_set_ape_opp(u8 opp);
708int prcmu_get_ape_opp(void);
709int prcmu_request_ape_opp_100_voltage(bool enable);
710int prcmu_release_usb_wakeup_state(void);
711int prcmu_set_ddr_opp(u8 opp);
712int prcmu_get_ddr_opp(void);
713unsigned long prcmu_qos_get_cpufreq_opp_delay(void);
714void prcmu_qos_set_cpufreq_opp_delay(unsigned long);
715/* NOTE! Use regulator framework instead */
716int prcmu_set_hwacc(u16 hw_acc_dev, u8 state);
717int prcmu_set_epod(u16 epod_id, u8 epod_state);
718void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
719 struct prcmu_auto_pm_config *idle);
720bool prcmu_is_auto_pm_enabled(void);
721
722int prcmu_config_clkout(u8 clkout, u8 source, u8 div);
723int prcmu_request_clock(u8 clock, bool enable);
724int prcmu_set_clock_divider(u8 clock, u8 divider);
725int prcmu_config_esram0_deep_sleep(u8 state);
726int prcmu_config_hotdog(u8 threshold);
727int prcmu_config_hotmon(u8 low, u8 high);
728int prcmu_start_temp_sense(u16 cycles32k);
729int prcmu_stop_temp_sense(void);
730int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
731int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
732
733void prcmu_ac_wake_req(void);
734void prcmu_ac_sleep_req(void);
735void prcmu_system_reset(u16 reset_code);
736void prcmu_modem_reset(void);
737bool prcmu_is_ac_wake_requested(void);
738void prcmu_enable_spi2(void);
739void prcmu_disable_spi2(void);
740
741#else /* !CONFIG_MFD_DB8500_PRCMU */
742
743static inline int prcmu_set_rc_a2p(enum romcode_write code)
744{
745 return 0;
746}
747
748static inline enum romcode_read prcmu_get_rc_p2a(void)
749{
750 return INIT;
751}
752
753static inline enum ap_pwrst prcmu_get_xp70_current_state(void)
754{
755 return AP_EXECUTE;
756}
757
758static inline int prcmu_set_power_state(u8 state, bool keep_ulp_clk,
759 bool keep_ap_pll)
760{
761 return 0;
762}
763
764static inline void prcmu_enable_wakeups(u32 wakeups) {}
765
766static inline void prcmu_disable_wakeups(void) {}
767
768static inline void prcmu_config_abb_event_readout(u32 abb_events) {}
769
770static inline int prcmu_set_arm_opp(u8 opp)
771{
772 return 0;
773}
774
775static inline int prcmu_get_arm_opp(void)
776{
777 return ARM_100_OPP;
778}
779
780static bool prcmu_has_arm_maxopp(void)
781{
782 return false;
783}
784
785static bool prcmu_is_u8400(void)
786{
787 return false;
788}
789
790static inline int prcmu_set_ape_opp(u8 opp)
791{
792 return 0;
793}
794
795static inline int prcmu_get_ape_opp(void)
796{
797 return APE_100_OPP;
798}
799
800static inline int prcmu_request_ape_opp_100_voltage(bool enable)
801{
802 return 0;
803}
804
805static inline int prcmu_release_usb_wakeup_state(void)
806{
807 return 0;
808}
809
810static inline int prcmu_set_ddr_opp(u8 opp)
811{
812 return 0;
813}
814
815static inline int prcmu_get_ddr_opp(void)
816{
817 return DDR_100_OPP;
818}
819
820static inline unsigned long prcmu_qos_get_cpufreq_opp_delay(void)
821{
822 return 0;
823}
824
825static inline void prcmu_qos_set_cpufreq_opp_delay(unsigned long n) {}
826
827static inline int prcmu_set_hwacc(u16 hw_acc_dev, u8 state)
828{
829 return 0;
830}
831
832static inline void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
833 struct prcmu_auto_pm_config *idle)
834{
835}
836
837static inline bool prcmu_is_auto_pm_enabled(void)
838{
839 return false;
840}
841
842static inline int prcmu_config_clkout(u8 clkout, u8 source, u8 div)
843{
844 return 0;
845}
846
847static inline int prcmu_request_clock(u8 clock, bool enable)
848{
849 return 0;
850}
851
852static inline int prcmu_set_clock_divider(u8 clock, u8 divider)
853{
854 return 0;
855}
856
857int prcmu_config_esram0_deep_sleep(u8 state)
858{
859 return 0;
860}
861
862static inline int prcmu_config_hotdog(u8 threshold)
863{
864 return 0;
865}
866
867static inline int prcmu_config_hotmon(u8 low, u8 high)
868{
869 return 0;
870}
871
872static inline int prcmu_start_temp_sense(u16 cycles32k)
873{
874 return 0;
875}
876
877static inline int prcmu_stop_temp_sense(void)
878{
879 return 0;
880}
881
882static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
883{
884 return -ENOSYS;
885}
886
887static inline int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
888{
889 return -ENOSYS;
890}
891
892static inline void prcmu_ac_wake_req(void) {}
893
894static inline void prcmu_ac_sleep_req(void) {}
895
896static inline void prcmu_system_reset(u16 reset_code) {}
897
898static inline void prcmu_modem_reset(void) {}
899
900static inline bool prcmu_is_ac_wake_requested(void)
901{
902 return false;
903}
904
905#ifndef CONFIG_UX500_SOC_DB5500
906static inline int prcmu_set_display_clocks(void)
907{
908 return 0;
909}
910
911static inline int prcmu_disable_dsipll(void)
912{
913 return 0;
914}
915
916static inline int prcmu_enable_dsipll(void)
917{
918 return 0;
919}
920#endif
921
922static inline int prcmu_enable_spi2(void)
923{
924 return 0;
925}
926
927static inline int prcmu_disable_spi2(void)
928{
929 return 0;
930}
931
932#endif /* !CONFIG_MFD_DB8500_PRCMU */
933
934#ifdef CONFIG_UX500_PRCMU_QOS_POWER
935int prcmu_qos_requirement(int pm_qos_class);
936int prcmu_qos_add_requirement(int pm_qos_class, char *name, s32 value);
937int prcmu_qos_update_requirement(int pm_qos_class, char *name, s32 new_value);
938void prcmu_qos_remove_requirement(int pm_qos_class, char *name);
939int prcmu_qos_add_notifier(int prcmu_qos_class,
940 struct notifier_block *notifier);
941int prcmu_qos_remove_notifier(int prcmu_qos_class,
942 struct notifier_block *notifier);
943#else
944static inline int prcmu_qos_requirement(int prcmu_qos_class)
945{
946 return 0;
947}
948
949static inline int prcmu_qos_add_requirement(int prcmu_qos_class,
950 char *name, s32 value)
951{
952 return 0;
953}
954
955static inline int prcmu_qos_update_requirement(int prcmu_qos_class,
956 char *name, s32 new_value)
957{
958 return 0;
959}
960
961static inline void prcmu_qos_remove_requirement(int prcmu_qos_class, char *name)
962{
963}
964
965static inline int prcmu_qos_add_notifier(int prcmu_qos_class,
966 struct notifier_block *notifier)
967{
968 return 0;
969}
970static inline int prcmu_qos_remove_notifier(int prcmu_qos_class,
971 struct notifier_block *notifier)
972{
973 return 0;
974}
975
976#endif
977
978#endif /* __MFD_DB8500_PRCMU_H */
diff --git a/include/linux/regulator/db8500-prcmu.h b/include/linux/regulator/db8500-prcmu.h
new file mode 100644
index 000000000000..612062313b68
--- /dev/null
+++ b/include/linux/regulator/db8500-prcmu.h
@@ -0,0 +1,45 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License v2
5 *
6 * Author: Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
7 *
8 * Interface to power domain regulators on DB8500
9 */
10
11#ifndef __REGULATOR_H__
12#define __REGULATOR_H__
13
14/* Number of DB8500 regulators and regulator enumeration */
15enum db8500_regulator_id {
16 DB8500_REGULATOR_VAPE,
17 DB8500_REGULATOR_VARM,
18 DB8500_REGULATOR_VMODEM,
19 DB8500_REGULATOR_VPLL,
20 DB8500_REGULATOR_VSMPS1,
21 DB8500_REGULATOR_VSMPS2,
22 DB8500_REGULATOR_VSMPS3,
23 DB8500_REGULATOR_VRF1,
24 DB8500_REGULATOR_SWITCH_SVAMMDSP,
25 DB8500_REGULATOR_SWITCH_SVAMMDSPRET,
26 DB8500_REGULATOR_SWITCH_SVAPIPE,
27 DB8500_REGULATOR_SWITCH_SIAMMDSP,
28 DB8500_REGULATOR_SWITCH_SIAMMDSPRET,
29 DB8500_REGULATOR_SWITCH_SIAPIPE,
30 DB8500_REGULATOR_SWITCH_SGA,
31 DB8500_REGULATOR_SWITCH_B2R2_MCDE,
32 DB8500_REGULATOR_SWITCH_ESRAM12,
33 DB8500_REGULATOR_SWITCH_ESRAM12RET,
34 DB8500_REGULATOR_SWITCH_ESRAM34,
35 DB8500_REGULATOR_SWITCH_ESRAM34RET,
36 DB8500_NUM_REGULATORS
37};
38
39/*
40 * Exported interface for CPUIdle only. This function is called with all
41 * interrupts turned off.
42 */
43int power_state_active_is_enabled(void);
44
45#endif
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index d2df55b0c213..008711e8e78f 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -241,10 +241,10 @@ enum p9_open_mode_t {
241 241
242/** 242/**
243 * enum p9_perm_t - 9P permissions 243 * enum p9_perm_t - 9P permissions
244 * @P9_DMDIR: mode bite for directories 244 * @P9_DMDIR: mode bit for directories
245 * @P9_DMAPPEND: mode bit for is append-only 245 * @P9_DMAPPEND: mode bit for is append-only
246 * @P9_DMEXCL: mode bit for excluse use (only one open handle allowed) 246 * @P9_DMEXCL: mode bit for excluse use (only one open handle allowed)
247 * @P9_DMMOUNT: mode bite for mount points 247 * @P9_DMMOUNT: mode bit for mount points
248 * @P9_DMAUTH: mode bit for authentication file 248 * @P9_DMAUTH: mode bit for authentication file
249 * @P9_DMTMP: mode bit for non-backed-up files 249 * @P9_DMTMP: mode bit for non-backed-up files
250 * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u) 250 * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u)
@@ -362,7 +362,7 @@ struct p9_qid {
362}; 362};
363 363
364/** 364/**
365 * struct p9_stat - file system metadata information 365 * struct p9_wstat - file system metadata information
366 * @size: length prefix for this stat structure instance 366 * @size: length prefix for this stat structure instance
367 * @type: the type of the server (equivalent to a major number) 367 * @type: the type of the server (equivalent to a major number)
368 * @dev: the sub-type of the server (equivalent to a minor number) 368 * @dev: the sub-type of the server (equivalent to a minor number)
@@ -687,10 +687,10 @@ struct p9_rwstat {
687 * @size: prefixed length of the structure 687 * @size: prefixed length of the structure
688 * @id: protocol operating identifier of type &p9_msg_t 688 * @id: protocol operating identifier of type &p9_msg_t
689 * @tag: transaction id of the request 689 * @tag: transaction id of the request
690 * @offset: used by marshalling routines to track currentposition in buffer 690 * @offset: used by marshalling routines to track current position in buffer
691 * @capacity: used by marshalling routines to track total malloc'd capacity 691 * @capacity: used by marshalling routines to track total malloc'd capacity
692 * @pubuf: Payload user buffer given by the caller 692 * @pubuf: Payload user buffer given by the caller
693 * @pubuf: Payload kernel buffer given by the caller 693 * @pkbuf: Payload kernel buffer given by the caller
694 * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write. 694 * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write.
695 * @private: For transport layer's use. 695 * @private: For transport layer's use.
696 * @sdata: payload 696 * @sdata: payload
@@ -714,7 +714,7 @@ struct p9_fcall {
714 size_t pbuf_size; 714 size_t pbuf_size;
715 void *private; 715 void *private;
716 716
717 uint8_t *sdata; 717 u8 *sdata;
718}; 718};
719 719
720struct p9_idpool; 720struct p9_idpool;
@@ -728,7 +728,6 @@ void p9_idpool_put(int id, struct p9_idpool *p);
728int p9_idpool_check(int id, struct p9_idpool *p); 728int p9_idpool_check(int id, struct p9_idpool *p);
729 729
730int p9_error_init(void); 730int p9_error_init(void);
731int p9_errstr2errno(char *, int);
732int p9_trans_fd_init(void); 731int p9_trans_fd_init(void);
733void p9_trans_fd_exit(void); 732void p9_trans_fd_exit(void);
734#endif /* NET_9P_H */ 733#endif /* NET_9P_H */
diff --git a/include/net/9p/client.h b/include/net/9p/client.h
index 051a99f79769..d26d5e98a173 100644
--- a/include/net/9p/client.h
+++ b/include/net/9p/client.h
@@ -60,7 +60,7 @@ enum p9_trans_status {
60}; 60};
61 61
62/** 62/**
63 * enum p9_req_status_t - virtio request status 63 * enum p9_req_status_t - status of a request
64 * @REQ_STATUS_IDLE: request slot unused 64 * @REQ_STATUS_IDLE: request slot unused
65 * @REQ_STATUS_ALLOC: request has been allocated but not sent 65 * @REQ_STATUS_ALLOC: request has been allocated but not sent
66 * @REQ_STATUS_UNSENT: request waiting to be sent 66 * @REQ_STATUS_UNSENT: request waiting to be sent
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
index 8f08c736c4c3..d8549fb9c742 100644
--- a/include/net/9p/transport.h
+++ b/include/net/9p/transport.h
@@ -41,6 +41,7 @@
41 * @pref: Preferences of this transport 41 * @pref: Preferences of this transport
42 * @def: set if this transport should be considered the default 42 * @def: set if this transport should be considered the default
43 * @create: member function to create a new connection on this transport 43 * @create: member function to create a new connection on this transport
44 * @close: member function to discard a connection on this transport
44 * @request: member function to issue a request to the transport 45 * @request: member function to issue a request to the transport
45 * @cancel: member function to cancel a request (if it hasn't been sent) 46 * @cancel: member function to cancel a request (if it hasn't been sent)
46 * 47 *
@@ -48,7 +49,7 @@
48 * transport module with the 9P core network module and used by the client 49 * transport module with the 9P core network module and used by the client
49 * to instantiate a new connection on a transport. 50 * to instantiate a new connection on a transport.
50 * 51 *
51 * BUGS: the transport module list isn't protected. 52 * The transport module list is protected by v9fs_trans_lock.
52 */ 53 */
53 54
54struct p9_trans_module { 55struct p9_trans_module {
diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h
index 61e523af3c46..3d5d6db864fe 100644
--- a/include/xen/interface/io/blkif.h
+++ b/include/xen/interface/io/blkif.h
@@ -45,6 +45,19 @@ typedef uint64_t blkif_sector_t;
45#define BLKIF_OP_WRITE_BARRIER 2 45#define BLKIF_OP_WRITE_BARRIER 2
46 46
47/* 47/*
48 * Recognised if "feature-flush-cache" is present in backend xenbus
49 * info. A flush will ask the underlying storage hardware to flush its
50 * non-volatile caches as appropriate. The "feature-flush-cache" node
51 * contains a boolean indicating whether flush requests are likely to
52 * succeed or fail. Either way, a flush request may fail at any time
53 * with BLKIF_RSP_EOPNOTSUPP if it is unsupported by the underlying
54 * block-device hardware. The boolean simply indicates whether or not it
55 * is worthwhile for the frontend to attempt flushes. If a backend does
56 * not recognise BLKIF_OP_WRITE_FLUSH_CACHE, it should *not* create the
57 * "feature-flush-cache" node!
58 */
59#define BLKIF_OP_FLUSH_DISKCACHE 3
60/*
48 * Maximum scatter/gather segments per request. 61 * Maximum scatter/gather segments per request.
49 * This is carefully chosen so that sizeof(struct blkif_ring) <= PAGE_SIZE. 62 * This is carefully chosen so that sizeof(struct blkif_ring) <= PAGE_SIZE.
50 * NB. This could be 12 if the ring indexes weren't stored in the same page. 63 * NB. This could be 12 if the ring indexes weren't stored in the same page.