aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h1
-rw-r--r--include/linux/audit.h2
-rw-r--r--include/linux/buffer_head.h47
-rw-r--r--include/linux/clocksource.h2
-rw-r--r--include/linux/cpufreq-dt.h22
-rw-r--r--include/linux/cpufreq.h2
-rw-r--r--include/linux/crash_dump.h15
-rw-r--r--include/linux/efi.h17
-rw-r--r--include/linux/fs.h39
-rw-r--r--include/linux/jbd2.h2
-rw-r--r--include/linux/kernel.h1
-rw-r--r--include/linux/kgdb.h2
-rw-r--r--include/linux/kvm_host.h1
-rw-r--r--include/linux/leds.h16
-rw-r--r--include/linux/mailbox_client.h46
-rw-r--r--include/linux/mailbox_controller.h133
-rw-r--r--include/linux/memory.h2
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/mount.h3
-rw-r--r--include/linux/oom.h3
-rw-r--r--include/linux/pl320-ipc.h (renamed from include/linux/mailbox.h)0
-rw-r--r--include/linux/pm_qos.h5
-rw-r--r--include/linux/pnfs_osd_xdr.h2
-rw-r--r--include/linux/string.h5
-rw-r--r--include/linux/thermal.h4
-rw-r--r--include/linux/uio_driver.h12
-rw-r--r--include/linux/uprobes.h14
-rw-r--r--include/linux/watchdog.h9
28 files changed, 368 insertions, 40 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index b7926bb9b444..407a12f663eb 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -432,6 +432,7 @@ static inline bool acpi_driver_match_device(struct device *dev,
432int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *); 432int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
433int acpi_device_modalias(struct device *, char *, int); 433int acpi_device_modalias(struct device *, char *, int);
434 434
435struct platform_device *acpi_create_platform_device(struct acpi_device *);
435#define ACPI_PTR(_ptr) (_ptr) 436#define ACPI_PTR(_ptr) (_ptr)
436 437
437#else /* !CONFIG_ACPI */ 438#else /* !CONFIG_ACPI */
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 36dffeccebdb..e58fe7df8b9c 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -90,7 +90,7 @@ extern unsigned compat_dir_class[];
90extern unsigned compat_chattr_class[]; 90extern unsigned compat_chattr_class[];
91extern unsigned compat_signal_class[]; 91extern unsigned compat_signal_class[];
92 92
93extern int __weak audit_classify_compat_syscall(int abi, unsigned syscall); 93extern int audit_classify_compat_syscall(int abi, unsigned syscall);
94 94
95/* audit_names->type values */ 95/* audit_names->type values */
96#define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ 96#define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 324329ceea1e..73b45225a7ca 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -175,12 +175,13 @@ void __wait_on_buffer(struct buffer_head *);
175wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); 175wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
176struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, 176struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
177 unsigned size); 177 unsigned size);
178struct buffer_head *__getblk(struct block_device *bdev, sector_t block, 178struct buffer_head *__getblk_gfp(struct block_device *bdev, sector_t block,
179 unsigned size); 179 unsigned size, gfp_t gfp);
180void __brelse(struct buffer_head *); 180void __brelse(struct buffer_head *);
181void __bforget(struct buffer_head *); 181void __bforget(struct buffer_head *);
182void __breadahead(struct block_device *, sector_t block, unsigned int size); 182void __breadahead(struct block_device *, sector_t block, unsigned int size);
183struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size); 183struct buffer_head *__bread_gfp(struct block_device *,
184 sector_t block, unsigned size, gfp_t gfp);
184void invalidate_bh_lrus(void); 185void invalidate_bh_lrus(void);
185struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); 186struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
186void free_buffer_head(struct buffer_head * bh); 187void free_buffer_head(struct buffer_head * bh);
@@ -295,7 +296,13 @@ static inline void bforget(struct buffer_head *bh)
295static inline struct buffer_head * 296static inline struct buffer_head *
296sb_bread(struct super_block *sb, sector_t block) 297sb_bread(struct super_block *sb, sector_t block)
297{ 298{
298 return __bread(sb->s_bdev, block, sb->s_blocksize); 299 return __bread_gfp(sb->s_bdev, block, sb->s_blocksize, __GFP_MOVABLE);
300}
301
302static inline struct buffer_head *
303sb_bread_unmovable(struct super_block *sb, sector_t block)
304{
305 return __bread_gfp(sb->s_bdev, block, sb->s_blocksize, 0);
299} 306}
300 307
301static inline void 308static inline void
@@ -307,7 +314,7 @@ sb_breadahead(struct super_block *sb, sector_t block)
307static inline struct buffer_head * 314static inline struct buffer_head *
308sb_getblk(struct super_block *sb, sector_t block) 315sb_getblk(struct super_block *sb, sector_t block)
309{ 316{
310 return __getblk(sb->s_bdev, block, sb->s_blocksize); 317 return __getblk_gfp(sb->s_bdev, block, sb->s_blocksize, __GFP_MOVABLE);
311} 318}
312 319
313static inline struct buffer_head * 320static inline struct buffer_head *
@@ -344,6 +351,36 @@ static inline void lock_buffer(struct buffer_head *bh)
344 __lock_buffer(bh); 351 __lock_buffer(bh);
345} 352}
346 353
354static inline struct buffer_head *getblk_unmovable(struct block_device *bdev,
355 sector_t block,
356 unsigned size)
357{
358 return __getblk_gfp(bdev, block, size, 0);
359}
360
361static inline struct buffer_head *__getblk(struct block_device *bdev,
362 sector_t block,
363 unsigned size)
364{
365 return __getblk_gfp(bdev, block, size, __GFP_MOVABLE);
366}
367
368/**
369 * __bread() - reads a specified block and returns the bh
370 * @bdev: the block_device to read from
371 * @block: number of block
372 * @size: size (in bytes) to read
373 *
374 * Reads a specified block, and returns buffer head that contains it.
375 * The page cache is allocated from movable area so that it can be migrated.
376 * It returns NULL if the block was unreadable.
377 */
378static inline struct buffer_head *
379__bread(struct block_device *bdev, sector_t block, unsigned size)
380{
381 return __bread_gfp(bdev, block, size, __GFP_MOVABLE);
382}
383
347extern int __set_page_dirty_buffers(struct page *page); 384extern int __set_page_dirty_buffers(struct page *page);
348 385
349#else /* CONFIG_BLOCK */ 386#else /* CONFIG_BLOCK */
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 653f0e2b6ca9..abcafaa20b86 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -287,7 +287,7 @@ extern struct clocksource* clocksource_get_next(void);
287extern void clocksource_change_rating(struct clocksource *cs, int rating); 287extern void clocksource_change_rating(struct clocksource *cs, int rating);
288extern void clocksource_suspend(void); 288extern void clocksource_suspend(void);
289extern void clocksource_resume(void); 289extern void clocksource_resume(void);
290extern struct clocksource * __init __weak clocksource_default_clock(void); 290extern struct clocksource * __init clocksource_default_clock(void);
291extern void clocksource_mark_unstable(struct clocksource *cs); 291extern void clocksource_mark_unstable(struct clocksource *cs);
292 292
293extern u64 293extern u64
diff --git a/include/linux/cpufreq-dt.h b/include/linux/cpufreq-dt.h
new file mode 100644
index 000000000000..0414009e2c30
--- /dev/null
+++ b/include/linux/cpufreq-dt.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright (C) 2014 Marvell
3 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#ifndef __CPUFREQ_DT_H__
11#define __CPUFREQ_DT_H__
12
13struct cpufreq_dt_platform_data {
14 /*
15 * True when each CPU has its own clock to control its
16 * frequency, false when all CPUs are controlled by a single
17 * clock.
18 */
19 bool independent_clocks;
20};
21
22#endif /* __CPUFREQ_DT_H__ */
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 138336b6bb04..503b085b7832 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -219,6 +219,7 @@ __ATTR(_name, 0644, show_##_name, store_##_name)
219struct cpufreq_driver { 219struct cpufreq_driver {
220 char name[CPUFREQ_NAME_LEN]; 220 char name[CPUFREQ_NAME_LEN];
221 u8 flags; 221 u8 flags;
222 void *driver_data;
222 223
223 /* needed by all drivers */ 224 /* needed by all drivers */
224 int (*init) (struct cpufreq_policy *policy); 225 int (*init) (struct cpufreq_policy *policy);
@@ -312,6 +313,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data);
312int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); 313int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
313 314
314const char *cpufreq_get_current_driver(void); 315const char *cpufreq_get_current_driver(void);
316void *cpufreq_get_driver_data(void);
315 317
316static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, 318static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy,
317 unsigned int min, unsigned int max) 319 unsigned int min, unsigned int max)
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
index 72ab536ad3de..3849fce7ecfe 100644
--- a/include/linux/crash_dump.h
+++ b/include/linux/crash_dump.h
@@ -14,14 +14,13 @@
14extern unsigned long long elfcorehdr_addr; 14extern unsigned long long elfcorehdr_addr;
15extern unsigned long long elfcorehdr_size; 15extern unsigned long long elfcorehdr_size;
16 16
17extern int __weak elfcorehdr_alloc(unsigned long long *addr, 17extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size);
18 unsigned long long *size); 18extern void elfcorehdr_free(unsigned long long addr);
19extern void __weak elfcorehdr_free(unsigned long long addr); 19extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos);
20extern ssize_t __weak elfcorehdr_read(char *buf, size_t count, u64 *ppos); 20extern ssize_t elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos);
21extern ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); 21extern int remap_oldmem_pfn_range(struct vm_area_struct *vma,
22extern int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma, 22 unsigned long from, unsigned long pfn,
23 unsigned long from, unsigned long pfn, 23 unsigned long size, pgprot_t prot);
24 unsigned long size, pgprot_t prot);
25 24
26extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, 25extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
27 unsigned long, int); 26 unsigned long, int);
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 45cb4ffdea62..0949f9c7e872 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -92,6 +92,7 @@ typedef struct {
92#define EFI_MEMORY_WC ((u64)0x0000000000000002ULL) /* write-coalescing */ 92#define EFI_MEMORY_WC ((u64)0x0000000000000002ULL) /* write-coalescing */
93#define EFI_MEMORY_WT ((u64)0x0000000000000004ULL) /* write-through */ 93#define EFI_MEMORY_WT ((u64)0x0000000000000004ULL) /* write-through */
94#define EFI_MEMORY_WB ((u64)0x0000000000000008ULL) /* write-back */ 94#define EFI_MEMORY_WB ((u64)0x0000000000000008ULL) /* write-back */
95#define EFI_MEMORY_UCE ((u64)0x0000000000000010ULL) /* uncached, exported */
95#define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */ 96#define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */
96#define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */ 97#define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */
97#define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */ 98#define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */
@@ -502,6 +503,10 @@ typedef efi_status_t efi_get_next_variable_t (unsigned long *name_size, efi_char
502typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor, 503typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor,
503 u32 attr, unsigned long data_size, 504 u32 attr, unsigned long data_size,
504 void *data); 505 void *data);
506typedef efi_status_t
507efi_set_variable_nonblocking_t(efi_char16_t *name, efi_guid_t *vendor,
508 u32 attr, unsigned long data_size, void *data);
509
505typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count); 510typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count);
506typedef void efi_reset_system_t (int reset_type, efi_status_t status, 511typedef void efi_reset_system_t (int reset_type, efi_status_t status,
507 unsigned long data_size, efi_char16_t *data); 512 unsigned long data_size, efi_char16_t *data);
@@ -821,6 +826,7 @@ extern struct efi {
821 efi_get_variable_t *get_variable; 826 efi_get_variable_t *get_variable;
822 efi_get_next_variable_t *get_next_variable; 827 efi_get_next_variable_t *get_next_variable;
823 efi_set_variable_t *set_variable; 828 efi_set_variable_t *set_variable;
829 efi_set_variable_nonblocking_t *set_variable_nonblocking;
824 efi_query_variable_info_t *query_variable_info; 830 efi_query_variable_info_t *query_variable_info;
825 efi_update_capsule_t *update_capsule; 831 efi_update_capsule_t *update_capsule;
826 efi_query_capsule_caps_t *query_capsule_caps; 832 efi_query_capsule_caps_t *query_capsule_caps;
@@ -886,6 +892,13 @@ extern bool efi_poweroff_required(void);
886 (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \ 892 (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \
887 (md) = (void *)(md) + (m)->desc_size) 893 (md) = (void *)(md) + (m)->desc_size)
888 894
895/*
896 * Format an EFI memory descriptor's type and attributes to a user-provided
897 * character buffer, as per snprintf(), and return the buffer.
898 */
899char * __init efi_md_typeattr_format(char *buf, size_t size,
900 const efi_memory_desc_t *md);
901
889/** 902/**
890 * efi_range_is_wc - check the WC bit on an address range 903 * efi_range_is_wc - check the WC bit on an address range
891 * @start: starting kvirt address 904 * @start: starting kvirt address
@@ -1034,6 +1047,7 @@ struct efivar_operations {
1034 efi_get_variable_t *get_variable; 1047 efi_get_variable_t *get_variable;
1035 efi_get_next_variable_t *get_next_variable; 1048 efi_get_next_variable_t *get_next_variable;
1036 efi_set_variable_t *set_variable; 1049 efi_set_variable_t *set_variable;
1050 efi_set_variable_nonblocking_t *set_variable_nonblocking;
1037 efi_query_variable_store_t *query_variable_store; 1051 efi_query_variable_store_t *query_variable_store;
1038}; 1052};
1039 1053
@@ -1227,4 +1241,7 @@ efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg,
1227 unsigned long *load_addr, 1241 unsigned long *load_addr,
1228 unsigned long *load_size); 1242 unsigned long *load_size);
1229 1243
1244efi_status_t efi_parse_options(char *cmdline);
1245
1246bool efi_runtime_disabled(void);
1230#endif /* _LINUX_EFI_H */ 1247#endif /* _LINUX_EFI_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a957d4366c24..4e41a4a331bb 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -223,6 +223,13 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
223#define ATTR_TIMES_SET (1 << 16) 223#define ATTR_TIMES_SET (1 << 16)
224 224
225/* 225/*
226 * Whiteout is represented by a char device. The following constants define the
227 * mode and device number to use.
228 */
229#define WHITEOUT_MODE 0
230#define WHITEOUT_DEV 0
231
232/*
226 * This is the Inode Attributes structure, used for notify_change(). It 233 * This is the Inode Attributes structure, used for notify_change(). It
227 * uses the above definitions as flags, to know which values have changed. 234 * uses the above definitions as flags, to know which values have changed.
228 * Also, in this manner, a Filesystem can look at only the values it cares 235 * Also, in this manner, a Filesystem can look at only the values it cares
@@ -254,6 +261,12 @@ struct iattr {
254 */ 261 */
255#include <linux/quota.h> 262#include <linux/quota.h>
256 263
264/*
265 * Maximum number of layers of fs stack. Needs to be limited to
266 * prevent kernel stack overflow
267 */
268#define FILESYSTEM_MAX_STACK_DEPTH 2
269
257/** 270/**
258 * enum positive_aop_returns - aop return codes with specific semantics 271 * enum positive_aop_returns - aop return codes with specific semantics
259 * 272 *
@@ -1266,6 +1279,11 @@ struct super_block {
1266 struct list_lru s_dentry_lru ____cacheline_aligned_in_smp; 1279 struct list_lru s_dentry_lru ____cacheline_aligned_in_smp;
1267 struct list_lru s_inode_lru ____cacheline_aligned_in_smp; 1280 struct list_lru s_inode_lru ____cacheline_aligned_in_smp;
1268 struct rcu_head rcu; 1281 struct rcu_head rcu;
1282
1283 /*
1284 * Indicates how deep in a filesystem stack this SB is
1285 */
1286 int s_stack_depth;
1269}; 1287};
1270 1288
1271extern struct timespec current_fs_time(struct super_block *sb); 1289extern struct timespec current_fs_time(struct super_block *sb);
@@ -1398,6 +1416,7 @@ extern int vfs_link(struct dentry *, struct inode *, struct dentry *, struct ino
1398extern int vfs_rmdir(struct inode *, struct dentry *); 1416extern int vfs_rmdir(struct inode *, struct dentry *);
1399extern int vfs_unlink(struct inode *, struct dentry *, struct inode **); 1417extern int vfs_unlink(struct inode *, struct dentry *, struct inode **);
1400extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int); 1418extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int);
1419extern int vfs_whiteout(struct inode *, struct dentry *);
1401 1420
1402/* 1421/*
1403 * VFS dentry helper functions. 1422 * VFS dentry helper functions.
@@ -1528,6 +1547,9 @@ struct inode_operations {
1528 umode_t create_mode, int *opened); 1547 umode_t create_mode, int *opened);
1529 int (*tmpfile) (struct inode *, struct dentry *, umode_t); 1548 int (*tmpfile) (struct inode *, struct dentry *, umode_t);
1530 int (*set_acl)(struct inode *, struct posix_acl *, int); 1549 int (*set_acl)(struct inode *, struct posix_acl *, int);
1550
1551 /* WARNING: probably going away soon, do not use! */
1552 int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
1531} ____cacheline_aligned; 1553} ____cacheline_aligned;
1532 1554
1533ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, 1555ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
@@ -1625,6 +1647,9 @@ struct super_operations {
1625#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) 1647#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
1626#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC) 1648#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
1627 1649
1650#define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \
1651 (inode)->i_rdev == WHITEOUT_DEV)
1652
1628/* 1653/*
1629 * Inode state bits. Protected by inode->i_lock 1654 * Inode state bits. Protected by inode->i_lock
1630 * 1655 *
@@ -2040,6 +2065,7 @@ extern struct file *file_open_name(struct filename *, int, umode_t);
2040extern struct file *filp_open(const char *, int, umode_t); 2065extern struct file *filp_open(const char *, int, umode_t);
2041extern struct file *file_open_root(struct dentry *, struct vfsmount *, 2066extern struct file *file_open_root(struct dentry *, struct vfsmount *,
2042 const char *, int); 2067 const char *, int);
2068extern int vfs_open(const struct path *, struct file *, const struct cred *);
2043extern struct file * dentry_open(const struct path *, int, const struct cred *); 2069extern struct file * dentry_open(const struct path *, int, const struct cred *);
2044extern int filp_close(struct file *, fl_owner_t id); 2070extern int filp_close(struct file *, fl_owner_t id);
2045 2071
@@ -2253,7 +2279,9 @@ extern sector_t bmap(struct inode *, sector_t);
2253#endif 2279#endif
2254extern int notify_change(struct dentry *, struct iattr *, struct inode **); 2280extern int notify_change(struct dentry *, struct iattr *, struct inode **);
2255extern int inode_permission(struct inode *, int); 2281extern int inode_permission(struct inode *, int);
2282extern int __inode_permission(struct inode *, int);
2256extern int generic_permission(struct inode *, int); 2283extern int generic_permission(struct inode *, int);
2284extern int __check_sticky(struct inode *dir, struct inode *inode);
2257 2285
2258static inline bool execute_ok(struct inode *inode) 2286static inline bool execute_ok(struct inode *inode)
2259{ 2287{
@@ -2452,6 +2480,9 @@ extern ssize_t iter_file_splice_write(struct pipe_inode_info *,
2452 struct file *, loff_t *, size_t, unsigned int); 2480 struct file *, loff_t *, size_t, unsigned int);
2453extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, 2481extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
2454 struct file *out, loff_t *, size_t len, unsigned int flags); 2482 struct file *out, loff_t *, size_t len, unsigned int flags);
2483extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
2484 loff_t *opos, size_t len, unsigned int flags);
2485
2455 2486
2456extern void 2487extern void
2457file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); 2488file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
@@ -2737,6 +2768,14 @@ static inline int is_sxid(umode_t mode)
2737 return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); 2768 return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP));
2738} 2769}
2739 2770
2771static inline int check_sticky(struct inode *dir, struct inode *inode)
2772{
2773 if (!(dir->i_mode & S_ISVTX))
2774 return 0;
2775
2776 return __check_sticky(dir, inode);
2777}
2778
2740static inline void inode_has_no_xattr(struct inode *inode) 2779static inline void inode_has_no_xattr(struct inode *inode)
2741{ 2780{
2742 if (!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & MS_NOSEC)) 2781 if (!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & MS_NOSEC))
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 0dae71e9971c..704b9a599b26 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1042,7 +1042,7 @@ void jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block);
1042extern void jbd2_journal_commit_transaction(journal_t *); 1042extern void jbd2_journal_commit_transaction(journal_t *);
1043 1043
1044/* Checkpoint list management */ 1044/* Checkpoint list management */
1045int __jbd2_journal_clean_checkpoint_list(journal_t *journal); 1045void __jbd2_journal_clean_checkpoint_list(journal_t *journal);
1046int __jbd2_journal_remove_checkpoint(struct journal_head *); 1046int __jbd2_journal_remove_checkpoint(struct journal_head *);
1047void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); 1047void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *);
1048 1048
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 40728cf1c452..3d770f5564b8 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -403,6 +403,7 @@ int vsscanf(const char *, const char *, va_list);
403extern int get_option(char **str, int *pint); 403extern int get_option(char **str, int *pint);
404extern char *get_options(const char *str, int nints, int *ints); 404extern char *get_options(const char *str, int nints, int *ints);
405extern unsigned long long memparse(const char *ptr, char **retptr); 405extern unsigned long long memparse(const char *ptr, char **retptr);
406extern bool parse_option_str(const char *str, const char *option);
406 407
407extern int core_kernel_text(unsigned long addr); 408extern int core_kernel_text(unsigned long addr);
408extern int core_kernel_data(unsigned long addr); 409extern int core_kernel_data(unsigned long addr);
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 6b06d378f3df..e465bb15912d 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -283,7 +283,7 @@ struct kgdb_io {
283 283
284extern struct kgdb_arch arch_kgdb_ops; 284extern struct kgdb_arch arch_kgdb_ops;
285 285
286extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs); 286extern unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs);
287 287
288#ifdef CONFIG_SERIAL_KGDB_NMI 288#ifdef CONFIG_SERIAL_KGDB_NMI
289extern int kgdb_register_nmi_console(void); 289extern int kgdb_register_nmi_console(void);
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 28be31f49250..ea53b04993f2 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -1080,6 +1080,7 @@ void kvm_device_get(struct kvm_device *dev);
1080void kvm_device_put(struct kvm_device *dev); 1080void kvm_device_put(struct kvm_device *dev);
1081struct kvm_device *kvm_device_from_filp(struct file *filp); 1081struct kvm_device *kvm_device_from_filp(struct file *filp);
1082int kvm_register_device_ops(struct kvm_device_ops *ops, u32 type); 1082int kvm_register_device_ops(struct kvm_device_ops *ops, u32 type);
1083void kvm_unregister_device_ops(u32 type);
1083 1084
1084extern struct kvm_device_ops kvm_mpic_ops; 1085extern struct kvm_device_ops kvm_mpic_ops;
1085extern struct kvm_device_ops kvm_xics_ops; 1086extern struct kvm_device_ops kvm_xics_ops;
diff --git a/include/linux/leds.h b/include/linux/leds.h
index e43686472197..a57611d0c94e 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -13,8 +13,8 @@
13#define __LINUX_LEDS_H_INCLUDED 13#define __LINUX_LEDS_H_INCLUDED
14 14
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/spinlock.h>
17#include <linux/rwsem.h> 16#include <linux/rwsem.h>
17#include <linux/spinlock.h>
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/workqueue.h> 19#include <linux/workqueue.h>
20 20
@@ -31,8 +31,8 @@ enum led_brightness {
31 31
32struct led_classdev { 32struct led_classdev {
33 const char *name; 33 const char *name;
34 int brightness; 34 enum led_brightness brightness;
35 int max_brightness; 35 enum led_brightness max_brightness;
36 int flags; 36 int flags;
37 37
38 /* Lower 16 bits reflect status */ 38 /* Lower 16 bits reflect status */
@@ -140,6 +140,16 @@ extern void led_blink_set_oneshot(struct led_classdev *led_cdev,
140 */ 140 */
141extern void led_set_brightness(struct led_classdev *led_cdev, 141extern void led_set_brightness(struct led_classdev *led_cdev,
142 enum led_brightness brightness); 142 enum led_brightness brightness);
143/**
144 * led_update_brightness - update LED brightness
145 * @led_cdev: the LED to query
146 *
147 * Get an LED's current brightness and update led_cdev->brightness
148 * member with the obtained value.
149 *
150 * Returns: 0 on success or negative error value on failure
151 */
152extern int led_update_brightness(struct led_classdev *led_cdev);
143 153
144/* 154/*
145 * LED Triggers 155 * LED Triggers
diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h
new file mode 100644
index 000000000000..307d9cab2026
--- /dev/null
+++ b/include/linux/mailbox_client.h
@@ -0,0 +1,46 @@
1/*
2 * Copyright (C) 2013-2014 Linaro Ltd.
3 * Author: Jassi Brar <jassisinghbrar@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#ifndef __MAILBOX_CLIENT_H
11#define __MAILBOX_CLIENT_H
12
13#include <linux/of.h>
14#include <linux/device.h>
15
16struct mbox_chan;
17
18/**
19 * struct mbox_client - User of a mailbox
20 * @dev: The client device
21 * @tx_block: If the mbox_send_message should block until data is
22 * transmitted.
23 * @tx_tout: Max block period in ms before TX is assumed failure
24 * @knows_txdone: If the client could run the TX state machine. Usually
25 * if the client receives some ACK packet for transmission.
26 * Unused if the controller already has TX_Done/RTR IRQ.
27 * @rx_callback: Atomic callback to provide client the data received
28 * @tx_done: Atomic callback to tell client of data transmission
29 */
30struct mbox_client {
31 struct device *dev;
32 bool tx_block;
33 unsigned long tx_tout;
34 bool knows_txdone;
35
36 void (*rx_callback)(struct mbox_client *cl, void *mssg);
37 void (*tx_done)(struct mbox_client *cl, void *mssg, int r);
38};
39
40struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index);
41int mbox_send_message(struct mbox_chan *chan, void *mssg);
42void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
43bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
44void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
45
46#endif /* __MAILBOX_CLIENT_H */
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
new file mode 100644
index 000000000000..d4cf96f07cfc
--- /dev/null
+++ b/include/linux/mailbox_controller.h
@@ -0,0 +1,133 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation.
5 */
6
7#ifndef __MAILBOX_CONTROLLER_H
8#define __MAILBOX_CONTROLLER_H
9
10#include <linux/of.h>
11#include <linux/types.h>
12#include <linux/timer.h>
13#include <linux/device.h>
14#include <linux/completion.h>
15
16struct mbox_chan;
17
18/**
19 * struct mbox_chan_ops - methods to control mailbox channels
20 * @send_data: The API asks the MBOX controller driver, in atomic
21 * context try to transmit a message on the bus. Returns 0 if
22 * data is accepted for transmission, -EBUSY while rejecting
23 * if the remote hasn't yet read the last data sent. Actual
24 * transmission of data is reported by the controller via
25 * mbox_chan_txdone (if it has some TX ACK irq). It must not
26 * sleep.
27 * @startup: Called when a client requests the chan. The controller
28 * could ask clients for additional parameters of communication
29 * to be provided via client's chan_data. This call may
30 * block. After this call the Controller must forward any
31 * data received on the chan by calling mbox_chan_received_data.
32 * The controller may do stuff that need to sleep.
33 * @shutdown: Called when a client relinquishes control of a chan.
34 * This call may block too. The controller must not forward
35 * any received data anymore.
36 * The controller may do stuff that need to sleep.
37 * @last_tx_done: If the controller sets 'txdone_poll', the API calls
38 * this to poll status of last TX. The controller must
39 * give priority to IRQ method over polling and never
40 * set both txdone_poll and txdone_irq. Only in polling
41 * mode 'send_data' is expected to return -EBUSY.
42 * The controller may do stuff that need to sleep/block.
43 * Used only if txdone_poll:=true && txdone_irq:=false
44 * @peek_data: Atomic check for any received data. Return true if controller
45 * has some data to push to the client. False otherwise.
46 */
47struct mbox_chan_ops {
48 int (*send_data)(struct mbox_chan *chan, void *data);
49 int (*startup)(struct mbox_chan *chan);
50 void (*shutdown)(struct mbox_chan *chan);
51 bool (*last_tx_done)(struct mbox_chan *chan);
52 bool (*peek_data)(struct mbox_chan *chan);
53};
54
55/**
56 * struct mbox_controller - Controller of a class of communication channels
57 * @dev: Device backing this controller
58 * @ops: Operators that work on each communication chan
59 * @chans: Array of channels
60 * @num_chans: Number of channels in the 'chans' array.
61 * @txdone_irq: Indicates if the controller can report to API when
62 * the last transmitted data was read by the remote.
63 * Eg, if it has some TX ACK irq.
64 * @txdone_poll: If the controller can read but not report the TX
65 * done. Ex, some register shows the TX status but
66 * no interrupt rises. Ignored if 'txdone_irq' is set.
67 * @txpoll_period: If 'txdone_poll' is in effect, the API polls for
68 * last TX's status after these many millisecs
69 * @of_xlate: Controller driver specific mapping of channel via DT
70 * @poll: API private. Used to poll for TXDONE on all channels.
71 * @node: API private. To hook into list of controllers.
72 */
73struct mbox_controller {
74 struct device *dev;
75 struct mbox_chan_ops *ops;
76 struct mbox_chan *chans;
77 int num_chans;
78 bool txdone_irq;
79 bool txdone_poll;
80 unsigned txpoll_period;
81 struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox,
82 const struct of_phandle_args *sp);
83 /* Internal to API */
84 struct timer_list poll;
85 struct list_head node;
86};
87
88/*
89 * The length of circular buffer for queuing messages from a client.
90 * 'msg_count' tracks the number of buffered messages while 'msg_free'
91 * is the index where the next message would be buffered.
92 * We shouldn't need it too big because every transfer is interrupt
93 * triggered and if we have lots of data to transfer, the interrupt
94 * latencies are going to be the bottleneck, not the buffer length.
95 * Besides, mbox_send_message could be called from atomic context and
96 * the client could also queue another message from the notifier 'tx_done'
97 * of the last transfer done.
98 * REVISIT: If too many platforms see the "Try increasing MBOX_TX_QUEUE_LEN"
99 * print, it needs to be taken from config option or somesuch.
100 */
101#define MBOX_TX_QUEUE_LEN 20
102
103/**
104 * struct mbox_chan - s/w representation of a communication chan
105 * @mbox: Pointer to the parent/provider of this channel
106 * @txdone_method: Way to detect TXDone chosen by the API
107 * @cl: Pointer to the current owner of this channel
108 * @tx_complete: Transmission completion
109 * @active_req: Currently active request hook
110 * @msg_count: No. of mssg currently queued
111 * @msg_free: Index of next available mssg slot
112 * @msg_data: Hook for data packet
113 * @lock: Serialise access to the channel
114 * @con_priv: Hook for controller driver to attach private data
115 */
116struct mbox_chan {
117 struct mbox_controller *mbox;
118 unsigned txdone_method;
119 struct mbox_client *cl;
120 struct completion tx_complete;
121 void *active_req;
122 unsigned msg_count, msg_free;
123 void *msg_data[MBOX_TX_QUEUE_LEN];
124 spinlock_t lock; /* Serialise access to the channel */
125 void *con_priv;
126};
127
128int mbox_controller_register(struct mbox_controller *mbox); /* can sleep */
129void mbox_controller_unregister(struct mbox_controller *mbox); /* can sleep */
130void mbox_chan_received_data(struct mbox_chan *chan, void *data); /* atomic */
131void mbox_chan_txdone(struct mbox_chan *chan, int r); /* atomic */
132
133#endif /* __MAILBOX_CONTROLLER_H */
diff --git a/include/linux/memory.h b/include/linux/memory.h
index bb7384e3c3d8..8b8d8d12348e 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -35,7 +35,7 @@ struct memory_block {
35}; 35};
36 36
37int arch_get_memory_phys_device(unsigned long start_pfn); 37int arch_get_memory_phys_device(unsigned long start_pfn);
38unsigned long __weak memory_block_size_bytes(void); 38unsigned long memory_block_size_bytes(void);
39 39
40/* These states are exposed to userspace as text strings in sysfs */ 40/* These states are exposed to userspace as text strings in sysfs */
41#define MEM_ONLINE (1<<0) /* exposed to userspace */ 41#define MEM_ONLINE (1<<0) /* exposed to userspace */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 02d11ee7f19d..27eb1bfbe704 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1176,6 +1176,7 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
1176 1176
1177extern void truncate_pagecache(struct inode *inode, loff_t new); 1177extern void truncate_pagecache(struct inode *inode, loff_t new);
1178extern void truncate_setsize(struct inode *inode, loff_t newsize); 1178extern void truncate_setsize(struct inode *inode, loff_t newsize);
1179void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to);
1179void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end); 1180void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end);
1180int truncate_inode_page(struct address_space *mapping, struct page *page); 1181int truncate_inode_page(struct address_space *mapping, struct page *page);
1181int generic_error_remove_page(struct address_space *mapping, struct page *page); 1182int generic_error_remove_page(struct address_space *mapping, struct page *page);
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 9262e4bf0cc3..c2c561dc0114 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -81,6 +81,9 @@ extern struct vfsmount *mntget(struct vfsmount *mnt);
81extern struct vfsmount *mnt_clone_internal(struct path *path); 81extern struct vfsmount *mnt_clone_internal(struct path *path);
82extern int __mnt_is_readonly(struct vfsmount *mnt); 82extern int __mnt_is_readonly(struct vfsmount *mnt);
83 83
84struct path;
85extern struct vfsmount *clone_private_mount(struct path *path);
86
84struct file_system_type; 87struct file_system_type;
85extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, 88extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
86 int flags, const char *name, 89 int flags, const char *name,
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 647395a1a550..e8d6e1058723 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -50,6 +50,9 @@ static inline bool oom_task_origin(const struct task_struct *p)
50extern unsigned long oom_badness(struct task_struct *p, 50extern unsigned long oom_badness(struct task_struct *p,
51 struct mem_cgroup *memcg, const nodemask_t *nodemask, 51 struct mem_cgroup *memcg, const nodemask_t *nodemask,
52 unsigned long totalpages); 52 unsigned long totalpages);
53
54extern int oom_kills_count(void);
55extern void note_oom_kill(void);
53extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, 56extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
54 unsigned int points, unsigned long totalpages, 57 unsigned int points, unsigned long totalpages,
55 struct mem_cgroup *memcg, nodemask_t *nodemask, 58 struct mem_cgroup *memcg, nodemask_t *nodemask,
diff --git a/include/linux/mailbox.h b/include/linux/pl320-ipc.h
index 5161f63ec1c8..5161f63ec1c8 100644
--- a/include/linux/mailbox.h
+++ b/include/linux/pl320-ipc.h
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 9ab4bf7c4646..636e82834506 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -15,6 +15,7 @@ enum {
15 PM_QOS_CPU_DMA_LATENCY, 15 PM_QOS_CPU_DMA_LATENCY,
16 PM_QOS_NETWORK_LATENCY, 16 PM_QOS_NETWORK_LATENCY,
17 PM_QOS_NETWORK_THROUGHPUT, 17 PM_QOS_NETWORK_THROUGHPUT,
18 PM_QOS_MEMORY_BANDWIDTH,
18 19
19 /* insert new class ID */ 20 /* insert new class ID */
20 PM_QOS_NUM_CLASSES, 21 PM_QOS_NUM_CLASSES,
@@ -32,6 +33,7 @@ enum pm_qos_flags_status {
32#define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) 33#define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC)
33#define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) 34#define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC)
34#define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 35#define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0
36#define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0
35#define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0 37#define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0
36#define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 38#define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0
37#define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) 39#define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1)
@@ -69,7 +71,8 @@ struct dev_pm_qos_request {
69enum pm_qos_type { 71enum pm_qos_type {
70 PM_QOS_UNITIALIZED, 72 PM_QOS_UNITIALIZED,
71 PM_QOS_MAX, /* return the largest value */ 73 PM_QOS_MAX, /* return the largest value */
72 PM_QOS_MIN /* return the smallest value */ 74 PM_QOS_MIN, /* return the smallest value */
75 PM_QOS_SUM /* return the sum */
73}; 76};
74 77
75/* 78/*
diff --git a/include/linux/pnfs_osd_xdr.h b/include/linux/pnfs_osd_xdr.h
index fe25876c1a5d..17d7d0d20eca 100644
--- a/include/linux/pnfs_osd_xdr.h
+++ b/include/linux/pnfs_osd_xdr.h
@@ -5,7 +5,7 @@
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Benny Halevy <bhalevy@panasas.com> 7 * Benny Halevy <bhalevy@panasas.com>
8 * Boaz Harrosh <bharrosh@panasas.com> 8 * Boaz Harrosh <ooo@electrozaur.com>
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 11 * it under the terms of the GNU General Public License version 2
diff --git a/include/linux/string.h b/include/linux/string.h
index e6edfe51575a..2e22a2e58f3a 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -132,7 +132,7 @@ int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4);
132#endif 132#endif
133 133
134extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, 134extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
135 const void *from, size_t available); 135 const void *from, size_t available);
136 136
137/** 137/**
138 * strstarts - does @str start with @prefix? 138 * strstarts - does @str start with @prefix?
@@ -144,7 +144,8 @@ static inline bool strstarts(const char *str, const char *prefix)
144 return strncmp(str, prefix, strlen(prefix)) == 0; 144 return strncmp(str, prefix, strlen(prefix)) == 0;
145} 145}
146 146
147extern size_t memweight(const void *ptr, size_t bytes); 147size_t memweight(const void *ptr, size_t bytes);
148void memzero_explicit(void *s, size_t count);
148 149
149/** 150/**
150 * kbasename - return the last part of a pathname. 151 * kbasename - return the last part of a pathname.
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 0305cde21a74..ef90838b36a0 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -44,6 +44,10 @@
44#define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \ 44#define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \
45 ((long)t-2732+5)/10 : ((long)t-2732-5)/10) 45 ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
46#define CELSIUS_TO_KELVIN(t) ((t)*10+2732) 46#define CELSIUS_TO_KELVIN(t) ((t)*10+2732)
47#define DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET(t, off) (((t) - (off)) * 100)
48#define DECI_KELVIN_TO_MILLICELSIUS(t) DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET(t, 2732)
49#define MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, off) (((t) / 100) + (off))
50#define MILLICELSIUS_TO_DECI_KELVIN(t) MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, 2732)
47 51
48/* Adding event notification support elements */ 52/* Adding event notification support elements */
49#define THERMAL_GENL_FAMILY_NAME "thermal_event" 53#define THERMAL_GENL_FAMILY_NAME "thermal_event"
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
index 1ad4724458de..baa81718d985 100644
--- a/include/linux/uio_driver.h
+++ b/include/linux/uio_driver.h
@@ -63,7 +63,17 @@ struct uio_port {
63 63
64#define MAX_UIO_PORT_REGIONS 5 64#define MAX_UIO_PORT_REGIONS 5
65 65
66struct uio_device; 66struct uio_device {
67 struct module *owner;
68 struct device *dev;
69 int minor;
70 atomic_t event;
71 struct fasync_struct *async_queue;
72 wait_queue_head_t wait;
73 struct uio_info *info;
74 struct kobject *map_dir;
75 struct kobject *portio_dir;
76};
67 77
68/** 78/**
69 * struct uio_info - UIO device capabilities 79 * struct uio_info - UIO device capabilities
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
index 4f844c6b03ee..60beb5dc7977 100644
--- a/include/linux/uprobes.h
+++ b/include/linux/uprobes.h
@@ -98,11 +98,11 @@ struct uprobes_state {
98 struct xol_area *xol_area; 98 struct xol_area *xol_area;
99}; 99};
100 100
101extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 101extern int set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
102extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 102extern int set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
103extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); 103extern bool is_swbp_insn(uprobe_opcode_t *insn);
104extern bool __weak is_trap_insn(uprobe_opcode_t *insn); 104extern bool is_trap_insn(uprobe_opcode_t *insn);
105extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); 105extern unsigned long uprobe_get_swbp_addr(struct pt_regs *regs);
106extern unsigned long uprobe_get_trap_addr(struct pt_regs *regs); 106extern unsigned long uprobe_get_trap_addr(struct pt_regs *regs);
107extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t); 107extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t);
108extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); 108extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
@@ -128,8 +128,8 @@ extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
128extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data); 128extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data);
129extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs); 129extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs);
130extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs); 130extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs);
131extern bool __weak arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs); 131extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs);
132extern void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, 132extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
133 void *src, unsigned long len); 133 void *src, unsigned long len);
134#else /* !CONFIG_UPROBES */ 134#else /* !CONFIG_UPROBES */
135struct uprobes_state { 135struct uprobes_state {
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index 2a3038ee17a3..395b70e0eccf 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -97,13 +97,8 @@ struct watchdog_device {
97#define WDOG_UNREGISTERED 4 /* Has the device been unregistered */ 97#define WDOG_UNREGISTERED 4 /* Has the device been unregistered */
98}; 98};
99 99
100#ifdef CONFIG_WATCHDOG_NOWAYOUT 100#define WATCHDOG_NOWAYOUT IS_BUILTIN(CONFIG_WATCHDOG_NOWAYOUT)
101#define WATCHDOG_NOWAYOUT 1 101#define WATCHDOG_NOWAYOUT_INIT_STATUS (WATCHDOG_NOWAYOUT << WDOG_NO_WAY_OUT)
102#define WATCHDOG_NOWAYOUT_INIT_STATUS (1 << WDOG_NO_WAY_OUT)
103#else
104#define WATCHDOG_NOWAYOUT 0
105#define WATCHDOG_NOWAYOUT_INIT_STATUS 0
106#endif
107 102
108/* Use the following function to check whether or not the watchdog is active */ 103/* Use the following function to check whether or not the watchdog is active */
109static inline bool watchdog_active(struct watchdog_device *wdd) 104static inline bool watchdog_active(struct watchdog_device *wdd)