diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-05-19 03:17:38 -0700 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2019-05-19 03:17:38 -0700 |
| commit | d7d07b8fe791c98c3cc7b1a4cce0392e34e26fc5 (patch) | |
| tree | b3b47f0e755d7354716687822224671281df1199 /include/linux | |
| parent | 5a3610e664f628ca5f72b04cb465761ab8dfa5f9 (diff) | |
| parent | 592adc48492083ee94921e48da73473888949561 (diff) | |
Merge 592adc48492083ee94921e48da73473888949561 on remote branch
Change-Id: I65365f5b2a57ecf8591c5ed364f7a8338ed9793b
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/atalk.h | 20 | ||||
| -rw-r--r-- | include/linux/bitrev.h | 36 | ||||
| -rw-r--r-- | include/linux/cpufreq.h | 12 | ||||
| -rw-r--r-- | include/linux/device-mapper.h | 2 | ||||
| -rw-r--r-- | include/linux/diagchar.h | 46 | ||||
| -rw-r--r-- | include/linux/f2fs_fs.h | 20 | ||||
| -rw-r--r-- | include/linux/fs.h | 1 | ||||
| -rw-r--r-- | include/linux/kprobes.h | 1 | ||||
| -rw-r--r-- | include/linux/rculist.h | 36 | ||||
| -rw-r--r-- | include/linux/ring_buffer.h | 2 | ||||
| -rw-r--r-- | include/linux/string.h | 3 | ||||
| -rw-r--r-- | include/linux/swap.h | 4 |
12 files changed, 115 insertions, 68 deletions
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 73fd8b7e9534..af43ed404ff4 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h @@ -150,19 +150,29 @@ extern int sysctl_aarp_retransmit_limit; extern int sysctl_aarp_resolve_time; #ifdef CONFIG_SYSCTL -extern void atalk_register_sysctl(void); +extern int atalk_register_sysctl(void); extern void atalk_unregister_sysctl(void); #else -#define atalk_register_sysctl() do { } while(0) -#define atalk_unregister_sysctl() do { } while(0) +static inline int atalk_register_sysctl(void) +{ + return 0; +} +static inline void atalk_unregister_sysctl(void) +{ +} #endif #ifdef CONFIG_PROC_FS extern int atalk_proc_init(void); extern void atalk_proc_exit(void); #else -#define atalk_proc_init() ({ 0; }) -#define atalk_proc_exit() do { } while(0) +static inline int atalk_proc_init(void) +{ + return 0; +} +static inline void atalk_proc_exit(void) +{ +} #endif /* CONFIG_PROC_FS */ #endif /* __LINUX_ATALK_H__ */ diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h index fb790b8449c1..333e42cf08de 100644 --- a/include/linux/bitrev.h +++ b/include/linux/bitrev.h @@ -31,32 +31,32 @@ static inline u32 __bitrev32(u32 x) #define __constant_bitrev32(x) \ ({ \ - u32 __x = x; \ - __x = (__x >> 16) | (__x << 16); \ - __x = ((__x & (u32)0xFF00FF00UL) >> 8) | ((__x & (u32)0x00FF00FFUL) << 8); \ - __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ - __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ - __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ - __x; \ + u32 ___x = x; \ + ___x = (___x >> 16) | (___x << 16); \ + ___x = ((___x & (u32)0xFF00FF00UL) >> 8) | ((___x & (u32)0x00FF00FFUL) << 8); \ + ___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4); \ + ___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2); \ + ___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1); \ + ___x; \ }) #define __constant_bitrev16(x) \ ({ \ - u16 __x = x; \ - __x = (__x >> 8) | (__x << 8); \ - __x = ((__x & (u16)0xF0F0U) >> 4) | ((__x & (u16)0x0F0FU) << 4); \ - __x = ((__x & (u16)0xCCCCU) >> 2) | ((__x & (u16)0x3333U) << 2); \ - __x = ((__x & (u16)0xAAAAU) >> 1) | ((__x & (u16)0x5555U) << 1); \ - __x; \ + u16 ___x = x; \ + ___x = (___x >> 8) | (___x << 8); \ + ___x = ((___x & (u16)0xF0F0U) >> 4) | ((___x & (u16)0x0F0FU) << 4); \ + ___x = ((___x & (u16)0xCCCCU) >> 2) | ((___x & (u16)0x3333U) << 2); \ + ___x = ((___x & (u16)0xAAAAU) >> 1) | ((___x & (u16)0x5555U) << 1); \ + ___x; \ }) #define __constant_bitrev8(x) \ ({ \ - u8 __x = x; \ - __x = (__x >> 4) | (__x << 4); \ - __x = ((__x & (u8)0xCCU) >> 2) | ((__x & (u8)0x33U) << 2); \ - __x = ((__x & (u8)0xAAU) >> 1) | ((__x & (u8)0x55U) << 1); \ - __x; \ + u8 ___x = x; \ + ___x = (___x >> 4) | (___x << 4); \ + ___x = ((___x & (u8)0xCCU) >> 2) | ((___x & (u8)0x33U) << 2); \ + ___x = ((___x & (u8)0xAAU) >> 1) | ((___x & (u8)0x55U) << 1); \ + ___x; \ }) #define bitrev32(x) \ diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a998cf205cdc..0c84c69d54f8 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -228,20 +228,12 @@ __ATTR(_name, _perm, show_##_name, NULL) static struct freq_attr _name = \ __ATTR(_name, 0644, show_##_name, store_##_name) -struct global_attr { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, - struct attribute *attr, char *buf); - ssize_t (*store)(struct kobject *a, struct attribute *b, - const char *c, size_t count); -}; - #define define_one_global_ro(_name) \ -static struct global_attr _name = \ +static struct kobj_attribute _name = \ __ATTR(_name, 0444, show_##_name, NULL) #define define_one_global_rw(_name) \ -static struct global_attr _name = \ +static struct kobj_attribute _name = \ __ATTR(_name, 0644, show_##_name, store_##_name) diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 403a239b7aa1..b393ab66073a 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -606,7 +606,7 @@ extern struct ratelimit_state dm_ratelimit_state; */ #define dm_target_offset(ti, sector) ((sector) - (ti)->begin) -static inline sector_t to_sector(unsigned long n) +static inline sector_t to_sector(unsigned long long n) { return (n >> SECTOR_SHIFT); } diff --git a/include/linux/diagchar.h b/include/linux/diagchar.h index ec9e2edda345..3ae123acbaaa 100644 --- a/include/linux/diagchar.h +++ b/include/linux/diagchar.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2008-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -145,10 +145,10 @@ the appropriate macros. */ /* This needs to be modified manually now, when we add a new RANGE of SSIDs to the msg_mask_tbl */ #define MSG_MASK_TBL_CNT 26 -#define APPS_EVENT_LAST_ID 0xC92 +#define APPS_EVENT_LAST_ID 0xCA7 #define MSG_SSID_0 0 -#define MSG_SSID_0_LAST 129 +#define MSG_SSID_0_LAST 130 #define MSG_SSID_1 500 #define MSG_SSID_1_LAST 506 #define MSG_SSID_2 1000 @@ -166,7 +166,7 @@ the appropriate macros. */ #define MSG_SSID_8 5000 #define MSG_SSID_8_LAST 5036 #define MSG_SSID_9 5500 -#define MSG_SSID_9_LAST 5516 +#define MSG_SSID_9_LAST 5517 #define MSG_SSID_10 6000 #define MSG_SSID_10_LAST 6081 #define MSG_SSID_11 6500 @@ -346,6 +346,7 @@ static const uint32_t msg_bld_masks_0[] = { MSG_LVL_LOW, MSG_LVL_MED, MSG_LVL_MED, + MSG_LVL_HIGH, MSG_LVL_HIGH }; @@ -566,23 +567,24 @@ static const uint32_t msg_bld_masks_8[] = { }; static const uint32_t msg_bld_masks_9[] = { - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5, - MSG_LVL_MED|MSG_MASK_5 + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_LOW }; static const uint32_t msg_bld_masks_10[] = { @@ -908,7 +910,7 @@ static const uint32_t msg_bld_masks_25[] = { /* LOG CODES */ static const uint32_t log_code_last_tbl[] = { 0x0, /* EQUIP ID 0 */ - 0x1C7B, /* EQUIP ID 1 */ + 0x1C94, /* EQUIP ID 1 */ 0x0, /* EQUIP ID 2 */ 0x0, /* EQUIP ID 3 */ 0x4910, /* EQUIP ID 4 */ diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index 162f83358abb..b19433738690 100644 --- a/include/linux/f2fs_fs.h +++ b/include/linux/f2fs_fs.h @@ -116,6 +116,7 @@ struct f2fs_super_block { /* * For checkpoint */ +#define CP_DISABLED_QUICK_FLAG 0x00002000 #define CP_DISABLED_FLAG 0x00001000 #define CP_QUOTA_NEED_FSCK_FLAG 0x00000800 #define CP_LARGE_NAT_BITMAP_FLAG 0x00000400 @@ -186,7 +187,7 @@ struct f2fs_orphan_block { struct f2fs_extent { __le32 fofs; /* start file offset of the extent */ __le32 blk; /* start block address of the extent */ - __le32 len; /* lengh of the extent */ + __le32 len; /* length of the extent */ } __packed; #define F2FS_NAME_LEN 255 @@ -284,7 +285,7 @@ enum { struct node_footer { __le32 nid; /* node id */ - __le32 ino; /* inode nunmber */ + __le32 ino; /* inode number */ __le32 flag; /* include cold/fsync/dentry marks and offset */ __le64 cp_ver; /* checkpoint version */ __le32 next_blkaddr; /* next node page block address */ @@ -489,12 +490,12 @@ typedef __le32 f2fs_hash_t; /* * space utilization of regular dentry and inline dentry (w/o extra reservation) - * regular dentry inline dentry - * bitmap 1 * 27 = 27 1 * 23 = 23 - * reserved 1 * 3 = 3 1 * 7 = 7 - * dentry 11 * 214 = 2354 11 * 182 = 2002 - * filename 8 * 214 = 1712 8 * 182 = 1456 - * total 4096 3488 + * regular dentry inline dentry (def) inline dentry (min) + * bitmap 1 * 27 = 27 1 * 23 = 23 1 * 1 = 1 + * reserved 1 * 3 = 3 1 * 7 = 7 1 * 1 = 1 + * dentry 11 * 214 = 2354 11 * 182 = 2002 11 * 2 = 22 + * filename 8 * 214 = 1712 8 * 182 = 1456 8 * 2 = 16 + * total 4096 3488 40 * * Note: there are more reserved space in inline dentry than in regular * dentry, when converting inline dentry we should handle this carefully. @@ -506,12 +507,13 @@ typedef __le32 f2fs_hash_t; #define SIZE_OF_RESERVED (PAGE_SIZE - ((SIZE_OF_DIR_ENTRY + \ F2FS_SLOT_LEN) * \ NR_DENTRY_IN_BLOCK + SIZE_OF_DENTRY_BITMAP)) +#define MIN_INLINE_DENTRY_SIZE 40 /* just include '.' and '..' entries */ /* One directory entry slot representing F2FS_SLOT_LEN-sized file name */ struct f2fs_dir_entry { __le32 hash_code; /* hash code of file name */ __le32 ino; /* inode number */ - __le16 name_len; /* lengh of file name */ + __le16 name_len; /* length of file name */ __u8 file_type; /* file type */ } __packed; diff --git a/include/linux/fs.h b/include/linux/fs.h index ffa1033ad1ce..e0472dc3a1a0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2686,6 +2686,7 @@ static inline void lockdep_annotate_inode_mutex_key(struct inode *inode) { }; #endif extern void unlock_new_inode(struct inode *); extern unsigned int get_next_ino(void); +extern void evict_inodes(struct super_block *sb); extern void __iget(struct inode * inode); extern void iget_failed(struct inode *); diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index e23392517db9..cb527c78de9f 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -197,6 +197,7 @@ struct kretprobe_instance { struct kretprobe *rp; kprobe_opcode_t *ret_addr; struct task_struct *task; + void *fp; char data[0]; }; diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 0c94d17a4642..c22ce750df4e 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h @@ -400,6 +400,42 @@ static inline void hlist_add_head_rcu(struct hlist_node *n, } /** + * hlist_add_tail_rcu + * @n: the element to add to the hash list. + * @h: the list to add to. + * + * Description: + * Adds the specified element to the specified hlist, + * while permitting racing traversals. + * + * The caller must take whatever precautions are necessary + * (such as holding appropriate locks) to avoid racing + * with another list-mutation primitive, such as hlist_add_head_rcu() + * or hlist_del_rcu(), running on this same list. + * However, it is perfectly legal to run concurrently with + * the _rcu list-traversal primitives, such as + * hlist_for_each_entry_rcu(), used to prevent memory-consistency + * problems on Alpha CPUs. Regardless of the type of CPU, the + * list-traversal primitive must be guarded by rcu_read_lock(). + */ +static inline void hlist_add_tail_rcu(struct hlist_node *n, + struct hlist_head *h) +{ + struct hlist_node *i, *last = NULL; + + for (i = hlist_first_rcu(h); i; i = hlist_next_rcu(i)) + last = i; + + if (last) { + n->next = last->next; + n->pprev = &last->next; + rcu_assign_pointer(hlist_next_rcu(last), n); + } else { + hlist_add_head_rcu(n, h); + } +} + +/** * hlist_add_before_rcu * @n: the new element to add to the hash list. * @next: the existing element to add the new element before. diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 19d0778ec382..121c8f99ecdd 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h @@ -125,7 +125,7 @@ ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events); struct ring_buffer_iter * -ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu); +ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu, gfp_t flags); void ring_buffer_read_prepare_sync(void); void ring_buffer_read_start(struct ring_buffer_iter *iter); void ring_buffer_read_finish(struct ring_buffer_iter *iter); diff --git a/include/linux/string.h b/include/linux/string.h index c026b7a19e26..870268d42ae7 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -110,6 +110,9 @@ extern void * memscan(void *,int,__kernel_size_t); #ifndef __HAVE_ARCH_MEMCMP extern int memcmp(const void *,const void *,__kernel_size_t); #endif +#ifndef __HAVE_ARCH_BCMP +extern int bcmp(const void *,const void *,__kernel_size_t); +#endif #ifndef __HAVE_ARCH_MEMCHR extern void * memchr(const void *,int,__kernel_size_t); #endif diff --git a/include/linux/swap.h b/include/linux/swap.h index 16b4a657fa6e..f1007d5abab8 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -135,9 +135,9 @@ struct swap_extent { /* * Max bad pages in the new format.. */ -#define __swapoffset(x) ((unsigned long)&((union swap_header *)0)->x) #define MAX_SWAP_BADPAGES \ - ((__swapoffset(magic.magic) - __swapoffset(info.badpages)) / sizeof(int)) + ((offsetof(union swap_header, magic.magic) - \ + offsetof(union swap_header, info.badpages)) / sizeof(int)) enum { SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ |
