diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ceph/ceph_features.h | 8 | ||||
-rw-r--r-- | include/linux/compiler-gcc.h | 12 | ||||
-rw-r--r-- | include/linux/compiler.h | 2 | ||||
-rw-r--r-- | include/linux/compiler_attributes.h | 14 | ||||
-rw-r--r-- | include/linux/compiler_types.h | 4 | ||||
-rw-r--r-- | include/linux/efi.h | 7 | ||||
-rw-r--r-- | include/linux/hid.h | 4 | ||||
-rw-r--r-- | include/linux/i8253.h | 1 | ||||
-rw-r--r-- | include/linux/mm.h | 8 | ||||
-rw-r--r-- | include/linux/mtd/nand.h | 7 | ||||
-rw-r--r-- | include/linux/netdevice.h | 20 | ||||
-rw-r--r-- | include/linux/netfilter/ipset/ip_set.h | 2 | ||||
-rw-r--r-- | include/linux/netfilter/ipset/ip_set_comment.h | 4 | ||||
-rw-r--r-- | include/linux/nmi.h | 2 | ||||
-rw-r--r-- | include/linux/swap.h | 4 |
15 files changed, 64 insertions, 35 deletions
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h index 6b92b3395fa9..65a38c4a02a1 100644 --- a/include/linux/ceph/ceph_features.h +++ b/include/linux/ceph/ceph_features.h | |||
@@ -213,12 +213,6 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin | |||
213 | CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING | \ | 213 | CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING | \ |
214 | CEPH_FEATURE_CEPHX_V2) | 214 | CEPH_FEATURE_CEPHX_V2) |
215 | 215 | ||
216 | #define CEPH_FEATURES_REQUIRED_DEFAULT \ | 216 | #define CEPH_FEATURES_REQUIRED_DEFAULT 0 |
217 | (CEPH_FEATURE_NOSRCADDR | \ | ||
218 | CEPH_FEATURE_SUBSCRIBE2 | \ | ||
219 | CEPH_FEATURE_RECONNECT_SEQ | \ | ||
220 | CEPH_FEATURE_PGID64 | \ | ||
221 | CEPH_FEATURE_PGPOOL3 | \ | ||
222 | CEPH_FEATURE_OSDENC) | ||
223 | 217 | ||
224 | #endif | 218 | #endif |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index c0f5db3a9621..2010493e1040 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -143,18 +143,6 @@ | |||
143 | #define KASAN_ABI_VERSION 3 | 143 | #define KASAN_ABI_VERSION 3 |
144 | #endif | 144 | #endif |
145 | 145 | ||
146 | /* | ||
147 | * Because __no_sanitize_address conflicts with inlining: | ||
148 | * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 | ||
149 | * we do one or the other. | ||
150 | */ | ||
151 | #ifdef CONFIG_KASAN | ||
152 | #define __no_sanitize_address_or_inline \ | ||
153 | __no_sanitize_address __maybe_unused notrace | ||
154 | #else | ||
155 | #define __no_sanitize_address_or_inline inline | ||
156 | #endif | ||
157 | |||
158 | #if GCC_VERSION >= 50100 | 146 | #if GCC_VERSION >= 50100 |
159 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 | 147 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 |
160 | #endif | 148 | #endif |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 18c80cfa4fc4..06396c1cf127 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -189,7 +189,7 @@ void __read_once_size(const volatile void *p, void *res, int size) | |||
189 | * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 | 189 | * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 |
190 | * '__maybe_unused' allows us to avoid defined-but-not-used warnings. | 190 | * '__maybe_unused' allows us to avoid defined-but-not-used warnings. |
191 | */ | 191 | */ |
192 | # define __no_kasan_or_inline __no_sanitize_address __maybe_unused | 192 | # define __no_kasan_or_inline __no_sanitize_address notrace __maybe_unused |
193 | #else | 193 | #else |
194 | # define __no_kasan_or_inline __always_inline | 194 | # define __no_kasan_or_inline __always_inline |
195 | #endif | 195 | #endif |
diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h index 6b28c1b7310c..f8c400ba1929 100644 --- a/include/linux/compiler_attributes.h +++ b/include/linux/compiler_attributes.h | |||
@@ -4,22 +4,26 @@ | |||
4 | 4 | ||
5 | /* | 5 | /* |
6 | * The attributes in this file are unconditionally defined and they directly | 6 | * The attributes in this file are unconditionally defined and they directly |
7 | * map to compiler attribute(s) -- except those that are optional. | 7 | * map to compiler attribute(s), unless one of the compilers does not support |
8 | * the attribute. In that case, __has_attribute is used to check for support | ||
9 | * and the reason is stated in its comment ("Optional: ..."). | ||
8 | * | 10 | * |
9 | * Any other "attributes" (i.e. those that depend on a configuration option, | 11 | * Any other "attributes" (i.e. those that depend on a configuration option, |
10 | * on a compiler, on an architecture, on plugins, on other attributes...) | 12 | * on a compiler, on an architecture, on plugins, on other attributes...) |
11 | * should be defined elsewhere (e.g. compiler_types.h or compiler-*.h). | 13 | * should be defined elsewhere (e.g. compiler_types.h or compiler-*.h). |
14 | * The intention is to keep this file as simple as possible, as well as | ||
15 | * compiler- and version-agnostic (e.g. avoiding GCC_VERSION checks). | ||
12 | * | 16 | * |
13 | * This file is meant to be sorted (by actual attribute name, | 17 | * This file is meant to be sorted (by actual attribute name, |
14 | * not by #define identifier). Use the __attribute__((__name__)) syntax | 18 | * not by #define identifier). Use the __attribute__((__name__)) syntax |
15 | * (i.e. with underscores) to avoid future collisions with other macros. | 19 | * (i.e. with underscores) to avoid future collisions with other macros. |
16 | * If an attribute is optional, state the reason in the comment. | 20 | * Provide links to the documentation of each supported compiler, if it exists. |
17 | */ | 21 | */ |
18 | 22 | ||
19 | /* | 23 | /* |
20 | * To check for optional attributes, we use __has_attribute, which is supported | 24 | * __has_attribute is supported on gcc >= 5, clang >= 2.9 and icc >= 17. |
21 | * on gcc >= 5, clang >= 2.9 and icc >= 17. In the meantime, to support | 25 | * In the meantime, to support 4.6 <= gcc < 5, we implement __has_attribute |
22 | * 4.6 <= gcc < 5, we implement __has_attribute by hand. | 26 | * by hand. |
23 | * | 27 | * |
24 | * sparse does not support __has_attribute (yet) and defines __GNUC_MINOR__ | 28 | * sparse does not support __has_attribute (yet) and defines __GNUC_MINOR__ |
25 | * depending on the compiler used to build it; however, these attributes have | 29 | * depending on the compiler used to build it; however, these attributes have |
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 3439d7d0249a..4a3f9c09c92d 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h | |||
@@ -130,6 +130,10 @@ struct ftrace_likely_data { | |||
130 | # define randomized_struct_fields_end | 130 | # define randomized_struct_fields_end |
131 | #endif | 131 | #endif |
132 | 132 | ||
133 | #ifndef asm_volatile_goto | ||
134 | #define asm_volatile_goto(x...) asm goto(x) | ||
135 | #endif | ||
136 | |||
133 | /* Are two types/vars the same type (ignoring qualifiers)? */ | 137 | /* Are two types/vars the same type (ignoring qualifiers)? */ |
134 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | 138 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) |
135 | 139 | ||
diff --git a/include/linux/efi.h b/include/linux/efi.h index 845174e113ce..100ce4a4aff6 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -1167,6 +1167,8 @@ static inline bool efi_enabled(int feature) | |||
1167 | extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); | 1167 | extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); |
1168 | 1168 | ||
1169 | extern bool efi_is_table_address(unsigned long phys_addr); | 1169 | extern bool efi_is_table_address(unsigned long phys_addr); |
1170 | |||
1171 | extern int efi_apply_persistent_mem_reservations(void); | ||
1170 | #else | 1172 | #else |
1171 | static inline bool efi_enabled(int feature) | 1173 | static inline bool efi_enabled(int feature) |
1172 | { | 1174 | { |
@@ -1185,6 +1187,11 @@ static inline bool efi_is_table_address(unsigned long phys_addr) | |||
1185 | { | 1187 | { |
1186 | return false; | 1188 | return false; |
1187 | } | 1189 | } |
1190 | |||
1191 | static inline int efi_apply_persistent_mem_reservations(void) | ||
1192 | { | ||
1193 | return 0; | ||
1194 | } | ||
1188 | #endif | 1195 | #endif |
1189 | 1196 | ||
1190 | extern int efi_status_to_err(efi_status_t status); | 1197 | extern int efi_status_to_err(efi_status_t status); |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 2827b87590d8..387c70df6f29 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -722,8 +722,8 @@ struct hid_usage_id { | |||
722 | * input will not be passed to raw_event unless hid_device_io_start is | 722 | * input will not be passed to raw_event unless hid_device_io_start is |
723 | * called. | 723 | * called. |
724 | * | 724 | * |
725 | * raw_event and event should return 0 on no action performed, 1 when no | 725 | * raw_event and event should return negative on error, any other value will |
726 | * further processing should be done and negative on error | 726 | * pass the event on to .event() typically return 0 for success. |
727 | * | 727 | * |
728 | * input_mapping shall return a negative value to completely ignore this usage | 728 | * input_mapping shall return a negative value to completely ignore this usage |
729 | * (e.g. doubled or invalid usage), zero to continue with parsing of this | 729 | * (e.g. doubled or invalid usage), zero to continue with parsing of this |
diff --git a/include/linux/i8253.h b/include/linux/i8253.h index e6bb36a97519..8336b2f6f834 100644 --- a/include/linux/i8253.h +++ b/include/linux/i8253.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ) | 21 | #define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ) |
22 | 22 | ||
23 | extern raw_spinlock_t i8253_lock; | 23 | extern raw_spinlock_t i8253_lock; |
24 | extern bool i8253_clear_counter_on_shutdown; | ||
24 | extern struct clock_event_device i8253_clockevent; | 25 | extern struct clock_event_device i8253_clockevent; |
25 | extern void clockevent_i8253_init(bool oneshot); | 26 | extern void clockevent_i8253_init(bool oneshot); |
26 | 27 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index fcf9cc9d535f..5411de93a363 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1744,11 +1744,15 @@ int __pud_alloc(struct mm_struct *mm, p4d_t *p4d, unsigned long address); | |||
1744 | 1744 | ||
1745 | static inline void mm_inc_nr_puds(struct mm_struct *mm) | 1745 | static inline void mm_inc_nr_puds(struct mm_struct *mm) |
1746 | { | 1746 | { |
1747 | if (mm_pud_folded(mm)) | ||
1748 | return; | ||
1747 | atomic_long_add(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes); | 1749 | atomic_long_add(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes); |
1748 | } | 1750 | } |
1749 | 1751 | ||
1750 | static inline void mm_dec_nr_puds(struct mm_struct *mm) | 1752 | static inline void mm_dec_nr_puds(struct mm_struct *mm) |
1751 | { | 1753 | { |
1754 | if (mm_pud_folded(mm)) | ||
1755 | return; | ||
1752 | atomic_long_sub(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes); | 1756 | atomic_long_sub(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes); |
1753 | } | 1757 | } |
1754 | #endif | 1758 | #endif |
@@ -1768,11 +1772,15 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); | |||
1768 | 1772 | ||
1769 | static inline void mm_inc_nr_pmds(struct mm_struct *mm) | 1773 | static inline void mm_inc_nr_pmds(struct mm_struct *mm) |
1770 | { | 1774 | { |
1775 | if (mm_pmd_folded(mm)) | ||
1776 | return; | ||
1771 | atomic_long_add(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes); | 1777 | atomic_long_add(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes); |
1772 | } | 1778 | } |
1773 | 1779 | ||
1774 | static inline void mm_dec_nr_pmds(struct mm_struct *mm) | 1780 | static inline void mm_dec_nr_pmds(struct mm_struct *mm) |
1775 | { | 1781 | { |
1782 | if (mm_pmd_folded(mm)) | ||
1783 | return; | ||
1776 | atomic_long_sub(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes); | 1784 | atomic_long_sub(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes); |
1777 | } | 1785 | } |
1778 | #endif | 1786 | #endif |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index abe975c87b90..7f53ece2c039 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -324,9 +324,8 @@ static inline unsigned int nanddev_ntargets(const struct nand_device *nand) | |||
324 | */ | 324 | */ |
325 | static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand) | 325 | static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand) |
326 | { | 326 | { |
327 | return (u64)nand->memorg.luns_per_target * | 327 | return nand->memorg.ntargets * nand->memorg.luns_per_target * |
328 | nand->memorg.eraseblocks_per_lun * | 328 | nand->memorg.eraseblocks_per_lun; |
329 | nand->memorg.pages_per_eraseblock; | ||
330 | } | 329 | } |
331 | 330 | ||
332 | /** | 331 | /** |
@@ -569,7 +568,7 @@ static inline void nanddev_pos_next_eraseblock(struct nand_device *nand, | |||
569 | } | 568 | } |
570 | 569 | ||
571 | /** | 570 | /** |
572 | * nanddev_pos_next_eraseblock() - Move a position to the next page | 571 | * nanddev_pos_next_page() - Move a position to the next page |
573 | * @nand: NAND device | 572 | * @nand: NAND device |
574 | * @pos: the position to update | 573 | * @pos: the position to update |
575 | * | 574 | * |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index dc1d9ed33b31..857f8abf7b91 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3190,6 +3190,26 @@ static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue, | |||
3190 | #endif | 3190 | #endif |
3191 | } | 3191 | } |
3192 | 3192 | ||
3193 | /* Variant of netdev_tx_sent_queue() for drivers that are aware | ||
3194 | * that they should not test BQL status themselves. | ||
3195 | * We do want to change __QUEUE_STATE_STACK_XOFF only for the last | ||
3196 | * skb of a batch. | ||
3197 | * Returns true if the doorbell must be used to kick the NIC. | ||
3198 | */ | ||
3199 | static inline bool __netdev_tx_sent_queue(struct netdev_queue *dev_queue, | ||
3200 | unsigned int bytes, | ||
3201 | bool xmit_more) | ||
3202 | { | ||
3203 | if (xmit_more) { | ||
3204 | #ifdef CONFIG_BQL | ||
3205 | dql_queued(&dev_queue->dql, bytes); | ||
3206 | #endif | ||
3207 | return netif_tx_queue_stopped(dev_queue); | ||
3208 | } | ||
3209 | netdev_tx_sent_queue(dev_queue, bytes); | ||
3210 | return true; | ||
3211 | } | ||
3212 | |||
3193 | /** | 3213 | /** |
3194 | * netdev_sent_queue - report the number of bytes queued to hardware | 3214 | * netdev_sent_queue - report the number of bytes queued to hardware |
3195 | * @dev: network device | 3215 | * @dev: network device |
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h index 34fc80f3eb90..1d100efe74ec 100644 --- a/include/linux/netfilter/ipset/ip_set.h +++ b/include/linux/netfilter/ipset/ip_set.h | |||
@@ -314,7 +314,7 @@ enum { | |||
314 | extern ip_set_id_t ip_set_get_byname(struct net *net, | 314 | extern ip_set_id_t ip_set_get_byname(struct net *net, |
315 | const char *name, struct ip_set **set); | 315 | const char *name, struct ip_set **set); |
316 | extern void ip_set_put_byindex(struct net *net, ip_set_id_t index); | 316 | extern void ip_set_put_byindex(struct net *net, ip_set_id_t index); |
317 | extern const char *ip_set_name_byindex(struct net *net, ip_set_id_t index); | 317 | extern void ip_set_name_byindex(struct net *net, ip_set_id_t index, char *name); |
318 | extern ip_set_id_t ip_set_nfnl_get_byindex(struct net *net, ip_set_id_t index); | 318 | extern ip_set_id_t ip_set_nfnl_get_byindex(struct net *net, ip_set_id_t index); |
319 | extern void ip_set_nfnl_put(struct net *net, ip_set_id_t index); | 319 | extern void ip_set_nfnl_put(struct net *net, ip_set_id_t index); |
320 | 320 | ||
diff --git a/include/linux/netfilter/ipset/ip_set_comment.h b/include/linux/netfilter/ipset/ip_set_comment.h index 8e2bab1e8e90..70877f8de7e9 100644 --- a/include/linux/netfilter/ipset/ip_set_comment.h +++ b/include/linux/netfilter/ipset/ip_set_comment.h | |||
@@ -43,11 +43,11 @@ ip_set_init_comment(struct ip_set *set, struct ip_set_comment *comment, | |||
43 | rcu_assign_pointer(comment->c, c); | 43 | rcu_assign_pointer(comment->c, c); |
44 | } | 44 | } |
45 | 45 | ||
46 | /* Used only when dumping a set, protected by rcu_read_lock_bh() */ | 46 | /* Used only when dumping a set, protected by rcu_read_lock() */ |
47 | static inline int | 47 | static inline int |
48 | ip_set_put_comment(struct sk_buff *skb, const struct ip_set_comment *comment) | 48 | ip_set_put_comment(struct sk_buff *skb, const struct ip_set_comment *comment) |
49 | { | 49 | { |
50 | struct ip_set_comment_rcu *c = rcu_dereference_bh(comment->c); | 50 | struct ip_set_comment_rcu *c = rcu_dereference(comment->c); |
51 | 51 | ||
52 | if (!c) | 52 | if (!c) |
53 | return 0; | 53 | return 0; |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 08f9247e9827..9003e29cde46 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -119,6 +119,8 @@ static inline int hardlockup_detector_perf_init(void) { return 0; } | |||
119 | void watchdog_nmi_stop(void); | 119 | void watchdog_nmi_stop(void); |
120 | void watchdog_nmi_start(void); | 120 | void watchdog_nmi_start(void); |
121 | int watchdog_nmi_probe(void); | 121 | int watchdog_nmi_probe(void); |
122 | int watchdog_nmi_enable(unsigned int cpu); | ||
123 | void watchdog_nmi_disable(unsigned int cpu); | ||
122 | 124 | ||
123 | /** | 125 | /** |
124 | * touch_nmi_watchdog - restart NMI watchdog timeout. | 126 | * touch_nmi_watchdog - restart NMI watchdog timeout. |
diff --git a/include/linux/swap.h b/include/linux/swap.h index d8a07a4f171d..a8f6d5d89524 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -18,6 +18,8 @@ struct notifier_block; | |||
18 | 18 | ||
19 | struct bio; | 19 | struct bio; |
20 | 20 | ||
21 | struct pagevec; | ||
22 | |||
21 | #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ | 23 | #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ |
22 | #define SWAP_FLAG_PRIO_MASK 0x7fff | 24 | #define SWAP_FLAG_PRIO_MASK 0x7fff |
23 | #define SWAP_FLAG_PRIO_SHIFT 0 | 25 | #define SWAP_FLAG_PRIO_SHIFT 0 |
@@ -369,7 +371,7 @@ static inline int node_reclaim(struct pglist_data *pgdat, gfp_t mask, | |||
369 | #endif | 371 | #endif |
370 | 372 | ||
371 | extern int page_evictable(struct page *page); | 373 | extern int page_evictable(struct page *page); |
372 | extern void check_move_unevictable_pages(struct page **, int nr_pages); | 374 | extern void check_move_unevictable_pages(struct pagevec *pvec); |
373 | 375 | ||
374 | extern int kswapd_run(int nid); | 376 | extern int kswapd_run(int nid); |
375 | extern void kswapd_stop(int nid); | 377 | extern void kswapd_stop(int nid); |