diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c.h | 6 | ||||
-rw-r--r-- | include/linux/kernel.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/samsung/s2mps13.h | 2 | ||||
-rw-r--r-- | include/linux/mm.h | 6 | ||||
-rw-r--r-- | include/linux/oom.h | 5 | ||||
-rw-r--r-- | include/linux/perf_event.h | 6 | ||||
-rw-r--r-- | include/linux/printk.h | 15 | ||||
-rw-r--r-- | include/linux/quota.h | 47 | ||||
-rw-r--r-- | include/linux/quotaops.h | 4 | ||||
-rw-r--r-- | include/net/ip.h | 11 |
10 files changed, 78 insertions, 26 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index e3a1721c8354..7c7695940ddd 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -228,7 +228,9 @@ struct i2c_client { | |||
228 | struct device dev; /* the device structure */ | 228 | struct device dev; /* the device structure */ |
229 | int irq; /* irq issued by device */ | 229 | int irq; /* irq issued by device */ |
230 | struct list_head detected; | 230 | struct list_head detected; |
231 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
231 | i2c_slave_cb_t slave_cb; /* callback for slave mode */ | 232 | i2c_slave_cb_t slave_cb; /* callback for slave mode */ |
233 | #endif | ||
232 | }; | 234 | }; |
233 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) | 235 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) |
234 | 236 | ||
@@ -253,6 +255,7 @@ static inline void i2c_set_clientdata(struct i2c_client *dev, void *data) | |||
253 | 255 | ||
254 | /* I2C slave support */ | 256 | /* I2C slave support */ |
255 | 257 | ||
258 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
256 | enum i2c_slave_event { | 259 | enum i2c_slave_event { |
257 | I2C_SLAVE_REQ_READ_START, | 260 | I2C_SLAVE_REQ_READ_START, |
258 | I2C_SLAVE_REQ_READ_END, | 261 | I2C_SLAVE_REQ_READ_END, |
@@ -269,6 +272,7 @@ static inline int i2c_slave_event(struct i2c_client *client, | |||
269 | { | 272 | { |
270 | return client->slave_cb(client, event, val); | 273 | return client->slave_cb(client, event, val); |
271 | } | 274 | } |
275 | #endif | ||
272 | 276 | ||
273 | /** | 277 | /** |
274 | * struct i2c_board_info - template for device creation | 278 | * struct i2c_board_info - template for device creation |
@@ -404,8 +408,10 @@ struct i2c_algorithm { | |||
404 | /* To determine what the adapter supports */ | 408 | /* To determine what the adapter supports */ |
405 | u32 (*functionality) (struct i2c_adapter *); | 409 | u32 (*functionality) (struct i2c_adapter *); |
406 | 410 | ||
411 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
407 | int (*reg_slave)(struct i2c_client *client); | 412 | int (*reg_slave)(struct i2c_client *client); |
408 | int (*unreg_slave)(struct i2c_client *client); | 413 | int (*unreg_slave)(struct i2c_client *client); |
414 | #endif | ||
409 | }; | 415 | }; |
410 | 416 | ||
411 | /** | 417 | /** |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5449d2f4a1ef..64ce58bee6f5 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -176,7 +176,7 @@ extern int _cond_resched(void); | |||
176 | */ | 176 | */ |
177 | # define might_sleep() \ | 177 | # define might_sleep() \ |
178 | do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) | 178 | do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) |
179 | # define sched_annotate_sleep() __set_current_state(TASK_RUNNING) | 179 | # define sched_annotate_sleep() (current->task_state_change = 0) |
180 | #else | 180 | #else |
181 | static inline void ___might_sleep(const char *file, int line, | 181 | static inline void ___might_sleep(const char *file, int line, |
182 | int preempt_offset) { } | 182 | int preempt_offset) { } |
diff --git a/include/linux/mfd/samsung/s2mps13.h b/include/linux/mfd/samsung/s2mps13.h index ce5dda8958fe..b1fd675fa36f 100644 --- a/include/linux/mfd/samsung/s2mps13.h +++ b/include/linux/mfd/samsung/s2mps13.h | |||
@@ -59,6 +59,7 @@ enum s2mps13_reg { | |||
59 | S2MPS13_REG_B6CTRL, | 59 | S2MPS13_REG_B6CTRL, |
60 | S2MPS13_REG_B6OUT, | 60 | S2MPS13_REG_B6OUT, |
61 | S2MPS13_REG_B7CTRL, | 61 | S2MPS13_REG_B7CTRL, |
62 | S2MPS13_REG_B7SW, | ||
62 | S2MPS13_REG_B7OUT, | 63 | S2MPS13_REG_B7OUT, |
63 | S2MPS13_REG_B8CTRL, | 64 | S2MPS13_REG_B8CTRL, |
64 | S2MPS13_REG_B8OUT, | 65 | S2MPS13_REG_B8OUT, |
@@ -102,6 +103,7 @@ enum s2mps13_reg { | |||
102 | S2MPS13_REG_L26CTRL, | 103 | S2MPS13_REG_L26CTRL, |
103 | S2MPS13_REG_L27CTRL, | 104 | S2MPS13_REG_L27CTRL, |
104 | S2MPS13_REG_L28CTRL, | 105 | S2MPS13_REG_L28CTRL, |
106 | S2MPS13_REG_L29CTRL, | ||
105 | S2MPS13_REG_L30CTRL, | 107 | S2MPS13_REG_L30CTRL, |
106 | S2MPS13_REG_L31CTRL, | 108 | S2MPS13_REG_L31CTRL, |
107 | S2MPS13_REG_L32CTRL, | 109 | S2MPS13_REG_L32CTRL, |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 80fc92a49649..dd5ea3016fc4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1070,6 +1070,7 @@ static inline int page_mapped(struct page *page) | |||
1070 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 1070 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
1071 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ | 1071 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ |
1072 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ | 1072 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ |
1073 | #define VM_FAULT_SIGSEGV 0x0040 | ||
1073 | 1074 | ||
1074 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 1075 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
1075 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 1076 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
@@ -1078,8 +1079,9 @@ static inline int page_mapped(struct page *page) | |||
1078 | 1079 | ||
1079 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ | 1080 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ |
1080 | 1081 | ||
1081 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ | 1082 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \ |
1082 | VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE) | 1083 | VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \ |
1084 | VM_FAULT_FALLBACK) | ||
1083 | 1085 | ||
1084 | /* Encode hstate index for a hwpoisoned large page */ | 1086 | /* Encode hstate index for a hwpoisoned large page */ |
1085 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) | 1087 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) |
diff --git a/include/linux/oom.h b/include/linux/oom.h index 853698c721f7..76200984d1e2 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
@@ -85,11 +85,6 @@ static inline void oom_killer_enable(void) | |||
85 | oom_killer_disabled = false; | 85 | oom_killer_disabled = false; |
86 | } | 86 | } |
87 | 87 | ||
88 | static inline bool oom_gfp_allowed(gfp_t gfp_mask) | ||
89 | { | ||
90 | return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY); | ||
91 | } | ||
92 | |||
93 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); | 88 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); |
94 | 89 | ||
95 | static inline bool task_will_free_mem(struct task_struct *task) | 90 | static inline bool task_will_free_mem(struct task_struct *task) |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 4f7a61ca4b39..664de5a4ec46 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -450,11 +450,6 @@ struct perf_event { | |||
450 | #endif /* CONFIG_PERF_EVENTS */ | 450 | #endif /* CONFIG_PERF_EVENTS */ |
451 | }; | 451 | }; |
452 | 452 | ||
453 | enum perf_event_context_type { | ||
454 | task_context, | ||
455 | cpu_context, | ||
456 | }; | ||
457 | |||
458 | /** | 453 | /** |
459 | * struct perf_event_context - event context structure | 454 | * struct perf_event_context - event context structure |
460 | * | 455 | * |
@@ -462,7 +457,6 @@ enum perf_event_context_type { | |||
462 | */ | 457 | */ |
463 | struct perf_event_context { | 458 | struct perf_event_context { |
464 | struct pmu *pmu; | 459 | struct pmu *pmu; |
465 | enum perf_event_context_type type; | ||
466 | /* | 460 | /* |
467 | * Protect the states of the events in the list, | 461 | * Protect the states of the events in the list, |
468 | * nr_active, and the list: | 462 | * nr_active, and the list: |
diff --git a/include/linux/printk.h b/include/linux/printk.h index c8f170324e64..4d5bf5726578 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -10,9 +10,6 @@ | |||
10 | extern const char linux_banner[]; | 10 | extern const char linux_banner[]; |
11 | extern const char linux_proc_banner[]; | 11 | extern const char linux_proc_banner[]; |
12 | 12 | ||
13 | extern char *log_buf_addr_get(void); | ||
14 | extern u32 log_buf_len_get(void); | ||
15 | |||
16 | static inline int printk_get_level(const char *buffer) | 13 | static inline int printk_get_level(const char *buffer) |
17 | { | 14 | { |
18 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { | 15 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { |
@@ -163,6 +160,8 @@ extern int kptr_restrict; | |||
163 | 160 | ||
164 | extern void wake_up_klogd(void); | 161 | extern void wake_up_klogd(void); |
165 | 162 | ||
163 | char *log_buf_addr_get(void); | ||
164 | u32 log_buf_len_get(void); | ||
166 | void log_buf_kexec_setup(void); | 165 | void log_buf_kexec_setup(void); |
167 | void __init setup_log_buf(int early); | 166 | void __init setup_log_buf(int early); |
168 | void dump_stack_set_arch_desc(const char *fmt, ...); | 167 | void dump_stack_set_arch_desc(const char *fmt, ...); |
@@ -198,6 +197,16 @@ static inline void wake_up_klogd(void) | |||
198 | { | 197 | { |
199 | } | 198 | } |
200 | 199 | ||
200 | static inline char *log_buf_addr_get(void) | ||
201 | { | ||
202 | return NULL; | ||
203 | } | ||
204 | |||
205 | static inline u32 log_buf_len_get(void) | ||
206 | { | ||
207 | return 0; | ||
208 | } | ||
209 | |||
201 | static inline void log_buf_kexec_setup(void) | 210 | static inline void log_buf_kexec_setup(void) |
202 | { | 211 | { |
203 | } | 212 | } |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 50978b781a19..097d7eb2441e 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -321,6 +321,49 @@ struct dquot_operations { | |||
321 | 321 | ||
322 | struct path; | 322 | struct path; |
323 | 323 | ||
324 | /* Structure for communicating via ->get_dqblk() & ->set_dqblk() */ | ||
325 | struct qc_dqblk { | ||
326 | int d_fieldmask; /* mask of fields to change in ->set_dqblk() */ | ||
327 | u64 d_spc_hardlimit; /* absolute limit on used space */ | ||
328 | u64 d_spc_softlimit; /* preferred limit on used space */ | ||
329 | u64 d_ino_hardlimit; /* maximum # allocated inodes */ | ||
330 | u64 d_ino_softlimit; /* preferred inode limit */ | ||
331 | u64 d_space; /* Space owned by the user */ | ||
332 | u64 d_ino_count; /* # inodes owned by the user */ | ||
333 | s64 d_ino_timer; /* zero if within inode limits */ | ||
334 | /* if not, we refuse service */ | ||
335 | s64 d_spc_timer; /* similar to above; for space */ | ||
336 | int d_ino_warns; /* # warnings issued wrt num inodes */ | ||
337 | int d_spc_warns; /* # warnings issued wrt used space */ | ||
338 | u64 d_rt_spc_hardlimit; /* absolute limit on realtime space */ | ||
339 | u64 d_rt_spc_softlimit; /* preferred limit on RT space */ | ||
340 | u64 d_rt_space; /* realtime space owned */ | ||
341 | s64 d_rt_spc_timer; /* similar to above; for RT space */ | ||
342 | int d_rt_spc_warns; /* # warnings issued wrt RT space */ | ||
343 | }; | ||
344 | |||
345 | /* Field specifiers for ->set_dqblk() in struct qc_dqblk */ | ||
346 | #define QC_INO_SOFT (1<<0) | ||
347 | #define QC_INO_HARD (1<<1) | ||
348 | #define QC_SPC_SOFT (1<<2) | ||
349 | #define QC_SPC_HARD (1<<3) | ||
350 | #define QC_RT_SPC_SOFT (1<<4) | ||
351 | #define QC_RT_SPC_HARD (1<<5) | ||
352 | #define QC_LIMIT_MASK (QC_INO_SOFT | QC_INO_HARD | QC_SPC_SOFT | QC_SPC_HARD | \ | ||
353 | QC_RT_SPC_SOFT | QC_RT_SPC_HARD) | ||
354 | #define QC_SPC_TIMER (1<<6) | ||
355 | #define QC_INO_TIMER (1<<7) | ||
356 | #define QC_RT_SPC_TIMER (1<<8) | ||
357 | #define QC_TIMER_MASK (QC_SPC_TIMER | QC_INO_TIMER | QC_RT_SPC_TIMER) | ||
358 | #define QC_SPC_WARNS (1<<9) | ||
359 | #define QC_INO_WARNS (1<<10) | ||
360 | #define QC_RT_SPC_WARNS (1<<11) | ||
361 | #define QC_WARNS_MASK (QC_SPC_WARNS | QC_INO_WARNS | QC_RT_SPC_WARNS) | ||
362 | #define QC_SPACE (1<<12) | ||
363 | #define QC_INO_COUNT (1<<13) | ||
364 | #define QC_RT_SPACE (1<<14) | ||
365 | #define QC_ACCT_MASK (QC_SPACE | QC_INO_COUNT | QC_RT_SPACE) | ||
366 | |||
324 | /* Operations handling requests from userspace */ | 367 | /* Operations handling requests from userspace */ |
325 | struct quotactl_ops { | 368 | struct quotactl_ops { |
326 | int (*quota_on)(struct super_block *, int, int, struct path *); | 369 | int (*quota_on)(struct super_block *, int, int, struct path *); |
@@ -329,8 +372,8 @@ struct quotactl_ops { | |||
329 | int (*quota_sync)(struct super_block *, int); | 372 | int (*quota_sync)(struct super_block *, int); |
330 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); | 373 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); |
331 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); | 374 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); |
332 | int (*get_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); | 375 | int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
333 | int (*set_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); | 376 | int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
334 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); | 377 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); |
335 | int (*set_xstate)(struct super_block *, unsigned int, int); | 378 | int (*set_xstate)(struct super_block *, unsigned int, int); |
336 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); | 379 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index f23538a6e411..29e3455f7d41 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -98,9 +98,9 @@ int dquot_quota_sync(struct super_block *sb, int type); | |||
98 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 98 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
99 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 99 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
100 | int dquot_get_dqblk(struct super_block *sb, struct kqid id, | 100 | int dquot_get_dqblk(struct super_block *sb, struct kqid id, |
101 | struct fs_disk_quota *di); | 101 | struct qc_dqblk *di); |
102 | int dquot_set_dqblk(struct super_block *sb, struct kqid id, | 102 | int dquot_set_dqblk(struct super_block *sb, struct kqid id, |
103 | struct fs_disk_quota *di); | 103 | struct qc_dqblk *di); |
104 | 104 | ||
105 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); | 105 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); |
106 | int dquot_transfer(struct inode *inode, struct iattr *iattr); | 106 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
diff --git a/include/net/ip.h b/include/net/ip.h index 0bb620702929..f7cbd703d15d 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -39,11 +39,12 @@ struct inet_skb_parm { | |||
39 | struct ip_options opt; /* Compiled IP options */ | 39 | struct ip_options opt; /* Compiled IP options */ |
40 | unsigned char flags; | 40 | unsigned char flags; |
41 | 41 | ||
42 | #define IPSKB_FORWARDED 1 | 42 | #define IPSKB_FORWARDED BIT(0) |
43 | #define IPSKB_XFRM_TUNNEL_SIZE 2 | 43 | #define IPSKB_XFRM_TUNNEL_SIZE BIT(1) |
44 | #define IPSKB_XFRM_TRANSFORMED 4 | 44 | #define IPSKB_XFRM_TRANSFORMED BIT(2) |
45 | #define IPSKB_FRAG_COMPLETE 8 | 45 | #define IPSKB_FRAG_COMPLETE BIT(3) |
46 | #define IPSKB_REROUTED 16 | 46 | #define IPSKB_REROUTED BIT(4) |
47 | #define IPSKB_DOREDIRECT BIT(5) | ||
47 | 48 | ||
48 | u16 frag_max_size; | 49 | u16 frag_max_size; |
49 | }; | 50 | }; |