diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/filter.h | 2 | ||||
| -rw-r--r-- | include/linux/input.h | 7 | ||||
| -rw-r--r-- | include/linux/irq.h | 2 | ||||
| -rw-r--r-- | include/linux/irqchip/arm-gic-v3.h | 2 | ||||
| -rw-r--r-- | include/linux/key.h | 47 | ||||
| -rw-r--r-- | include/linux/mbus.h | 4 | ||||
| -rw-r--r-- | include/linux/mod_devicetable.h | 3 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 3 |
8 files changed, 49 insertions, 21 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index d29e58fde364..818a0b26249e 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -728,7 +728,7 @@ void xdp_do_flush_map(void); | |||
| 728 | void bpf_warn_invalid_xdp_action(u32 act); | 728 | void bpf_warn_invalid_xdp_action(u32 act); |
| 729 | void bpf_warn_invalid_xdp_redirect(u32 ifindex); | 729 | void bpf_warn_invalid_xdp_redirect(u32 ifindex); |
| 730 | 730 | ||
| 731 | struct sock *do_sk_redirect_map(void); | 731 | struct sock *do_sk_redirect_map(struct sk_buff *skb); |
| 732 | 732 | ||
| 733 | #ifdef CONFIG_BPF_JIT | 733 | #ifdef CONFIG_BPF_JIT |
| 734 | extern int bpf_jit_enable; | 734 | extern int bpf_jit_enable; |
diff --git a/include/linux/input.h b/include/linux/input.h index fb5e23c7ed98..7c7516eb7d76 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -234,6 +234,10 @@ struct input_dev { | |||
| 234 | #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" | 234 | #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" |
| 235 | #endif | 235 | #endif |
| 236 | 236 | ||
| 237 | #if INPUT_PROP_MAX != INPUT_DEVICE_ID_PROP_MAX | ||
| 238 | #error "INPUT_PROP_MAX and INPUT_DEVICE_ID_PROP_MAX do not match" | ||
| 239 | #endif | ||
| 240 | |||
| 237 | #define INPUT_DEVICE_ID_MATCH_DEVICE \ | 241 | #define INPUT_DEVICE_ID_MATCH_DEVICE \ |
| 238 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) | 242 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) |
| 239 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ | 243 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ |
| @@ -469,6 +473,9 @@ int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke); | |||
| 469 | int input_set_keycode(struct input_dev *dev, | 473 | int input_set_keycode(struct input_dev *dev, |
| 470 | const struct input_keymap_entry *ke); | 474 | const struct input_keymap_entry *ke); |
| 471 | 475 | ||
| 476 | bool input_match_device_id(const struct input_dev *dev, | ||
| 477 | const struct input_device_id *id); | ||
| 478 | |||
| 472 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period); | 479 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period); |
| 473 | 480 | ||
| 474 | extern struct class input_class; | 481 | extern struct class input_class; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index d4728bf6a537..5ad10948ea95 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -1009,7 +1009,7 @@ void irq_gc_mask_clr_bit(struct irq_data *d); | |||
| 1009 | void irq_gc_unmask_enable_reg(struct irq_data *d); | 1009 | void irq_gc_unmask_enable_reg(struct irq_data *d); |
| 1010 | void irq_gc_ack_set_bit(struct irq_data *d); | 1010 | void irq_gc_ack_set_bit(struct irq_data *d); |
| 1011 | void irq_gc_ack_clr_bit(struct irq_data *d); | 1011 | void irq_gc_ack_clr_bit(struct irq_data *d); |
| 1012 | void irq_gc_mask_disable_reg_and_ack(struct irq_data *d); | 1012 | void irq_gc_mask_disable_and_ack_set(struct irq_data *d); |
| 1013 | void irq_gc_eoi(struct irq_data *d); | 1013 | void irq_gc_eoi(struct irq_data *d); |
| 1014 | int irq_gc_set_wake(struct irq_data *d, unsigned int on); | 1014 | int irq_gc_set_wake(struct irq_data *d, unsigned int on); |
| 1015 | 1015 | ||
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index 1ea576c8126f..14b74f22d43c 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h | |||
| @@ -372,6 +372,8 @@ | |||
| 372 | #define GITS_BASER_ENTRY_SIZE_SHIFT (48) | 372 | #define GITS_BASER_ENTRY_SIZE_SHIFT (48) |
| 373 | #define GITS_BASER_ENTRY_SIZE(r) ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1) | 373 | #define GITS_BASER_ENTRY_SIZE(r) ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1) |
| 374 | #define GITS_BASER_ENTRY_SIZE_MASK GENMASK_ULL(52, 48) | 374 | #define GITS_BASER_ENTRY_SIZE_MASK GENMASK_ULL(52, 48) |
| 375 | #define GITS_BASER_PHYS_52_to_48(phys) \ | ||
| 376 | (((phys) & GENMASK_ULL(47, 16)) | (((phys) >> 48) & 0xf) << 12) | ||
| 375 | #define GITS_BASER_SHAREABILITY_SHIFT (10) | 377 | #define GITS_BASER_SHAREABILITY_SHIFT (10) |
| 376 | #define GITS_BASER_InnerShareable \ | 378 | #define GITS_BASER_InnerShareable \ |
| 377 | GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable) | 379 | GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable) |
diff --git a/include/linux/key.h b/include/linux/key.h index e315e16b6ff8..8a15cabe928d 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
| @@ -138,6 +138,11 @@ struct key_restriction { | |||
| 138 | struct key_type *keytype; | 138 | struct key_type *keytype; |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | enum key_state { | ||
| 142 | KEY_IS_UNINSTANTIATED, | ||
| 143 | KEY_IS_POSITIVE, /* Positively instantiated */ | ||
| 144 | }; | ||
| 145 | |||
| 141 | /*****************************************************************************/ | 146 | /*****************************************************************************/ |
| 142 | /* | 147 | /* |
| 143 | * authentication token / access credential / keyring | 148 | * authentication token / access credential / keyring |
| @@ -169,6 +174,7 @@ struct key { | |||
| 169 | * - may not match RCU dereferenced payload | 174 | * - may not match RCU dereferenced payload |
| 170 | * - payload should contain own length | 175 | * - payload should contain own length |
| 171 | */ | 176 | */ |
| 177 | short state; /* Key state (+) or rejection error (-) */ | ||
| 172 | 178 | ||
| 173 | #ifdef KEY_DEBUGGING | 179 | #ifdef KEY_DEBUGGING |
| 174 | unsigned magic; | 180 | unsigned magic; |
| @@ -176,18 +182,16 @@ struct key { | |||
| 176 | #endif | 182 | #endif |
| 177 | 183 | ||
| 178 | unsigned long flags; /* status flags (change with bitops) */ | 184 | unsigned long flags; /* status flags (change with bitops) */ |
| 179 | #define KEY_FLAG_INSTANTIATED 0 /* set if key has been instantiated */ | 185 | #define KEY_FLAG_DEAD 0 /* set if key type has been deleted */ |
| 180 | #define KEY_FLAG_DEAD 1 /* set if key type has been deleted */ | 186 | #define KEY_FLAG_REVOKED 1 /* set if key had been revoked */ |
| 181 | #define KEY_FLAG_REVOKED 2 /* set if key had been revoked */ | 187 | #define KEY_FLAG_IN_QUOTA 2 /* set if key consumes quota */ |
| 182 | #define KEY_FLAG_IN_QUOTA 3 /* set if key consumes quota */ | 188 | #define KEY_FLAG_USER_CONSTRUCT 3 /* set if key is being constructed in userspace */ |
| 183 | #define KEY_FLAG_USER_CONSTRUCT 4 /* set if key is being constructed in userspace */ | 189 | #define KEY_FLAG_ROOT_CAN_CLEAR 4 /* set if key can be cleared by root without permission */ |
| 184 | #define KEY_FLAG_NEGATIVE 5 /* set if key is negative */ | 190 | #define KEY_FLAG_INVALIDATED 5 /* set if key has been invalidated */ |
| 185 | #define KEY_FLAG_ROOT_CAN_CLEAR 6 /* set if key can be cleared by root without permission */ | 191 | #define KEY_FLAG_BUILTIN 6 /* set if key is built in to the kernel */ |
| 186 | #define KEY_FLAG_INVALIDATED 7 /* set if key has been invalidated */ | 192 | #define KEY_FLAG_ROOT_CAN_INVAL 7 /* set if key can be invalidated by root without permission */ |
| 187 | #define KEY_FLAG_BUILTIN 8 /* set if key is built in to the kernel */ | 193 | #define KEY_FLAG_KEEP 8 /* set if key should not be removed */ |
| 188 | #define KEY_FLAG_ROOT_CAN_INVAL 9 /* set if key can be invalidated by root without permission */ | 194 | #define KEY_FLAG_UID_KEYRING 9 /* set if key is a user or user session keyring */ |
| 189 | #define KEY_FLAG_KEEP 10 /* set if key should not be removed */ | ||
| 190 | #define KEY_FLAG_UID_KEYRING 11 /* set if key is a user or user session keyring */ | ||
| 191 | 195 | ||
| 192 | /* the key type and key description string | 196 | /* the key type and key description string |
| 193 | * - the desc is used to match a key against search criteria | 197 | * - the desc is used to match a key against search criteria |
| @@ -213,7 +217,6 @@ struct key { | |||
| 213 | struct list_head name_link; | 217 | struct list_head name_link; |
| 214 | struct assoc_array keys; | 218 | struct assoc_array keys; |
| 215 | }; | 219 | }; |
| 216 | int reject_error; | ||
| 217 | }; | 220 | }; |
| 218 | 221 | ||
| 219 | /* This is set on a keyring to restrict the addition of a link to a key | 222 | /* This is set on a keyring to restrict the addition of a link to a key |
| @@ -353,17 +356,27 @@ extern void key_set_timeout(struct key *, unsigned); | |||
| 353 | #define KEY_NEED_SETATTR 0x20 /* Require permission to change attributes */ | 356 | #define KEY_NEED_SETATTR 0x20 /* Require permission to change attributes */ |
| 354 | #define KEY_NEED_ALL 0x3f /* All the above permissions */ | 357 | #define KEY_NEED_ALL 0x3f /* All the above permissions */ |
| 355 | 358 | ||
| 359 | static inline short key_read_state(const struct key *key) | ||
| 360 | { | ||
| 361 | /* Barrier versus mark_key_instantiated(). */ | ||
| 362 | return smp_load_acquire(&key->state); | ||
| 363 | } | ||
| 364 | |||
| 356 | /** | 365 | /** |
| 357 | * key_is_instantiated - Determine if a key has been positively instantiated | 366 | * key_is_positive - Determine if a key has been positively instantiated |
| 358 | * @key: The key to check. | 367 | * @key: The key to check. |
| 359 | * | 368 | * |
| 360 | * Return true if the specified key has been positively instantiated, false | 369 | * Return true if the specified key has been positively instantiated, false |
| 361 | * otherwise. | 370 | * otherwise. |
| 362 | */ | 371 | */ |
| 363 | static inline bool key_is_instantiated(const struct key *key) | 372 | static inline bool key_is_positive(const struct key *key) |
| 373 | { | ||
| 374 | return key_read_state(key) == KEY_IS_POSITIVE; | ||
| 375 | } | ||
| 376 | |||
| 377 | static inline bool key_is_negative(const struct key *key) | ||
| 364 | { | 378 | { |
| 365 | return test_bit(KEY_FLAG_INSTANTIATED, &key->flags) && | 379 | return key_read_state(key) < 0; |
| 366 | !test_bit(KEY_FLAG_NEGATIVE, &key->flags); | ||
| 367 | } | 380 | } |
| 368 | 381 | ||
| 369 | #define dereference_key_rcu(KEY) \ | 382 | #define dereference_key_rcu(KEY) \ |
diff --git a/include/linux/mbus.h b/include/linux/mbus.h index 0d3f14fd2621..4773145246ed 100644 --- a/include/linux/mbus.h +++ b/include/linux/mbus.h | |||
| @@ -31,8 +31,8 @@ struct mbus_dram_target_info | |||
| 31 | struct mbus_dram_window { | 31 | struct mbus_dram_window { |
| 32 | u8 cs_index; | 32 | u8 cs_index; |
| 33 | u8 mbus_attr; | 33 | u8 mbus_attr; |
| 34 | u32 base; | 34 | u64 base; |
| 35 | u32 size; | 35 | u64 size; |
| 36 | } cs[4]; | 36 | } cs[4]; |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 694cebb50f72..2657f9f51536 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -293,6 +293,7 @@ struct pcmcia_device_id { | |||
| 293 | #define INPUT_DEVICE_ID_SND_MAX 0x07 | 293 | #define INPUT_DEVICE_ID_SND_MAX 0x07 |
| 294 | #define INPUT_DEVICE_ID_FF_MAX 0x7f | 294 | #define INPUT_DEVICE_ID_FF_MAX 0x7f |
| 295 | #define INPUT_DEVICE_ID_SW_MAX 0x0f | 295 | #define INPUT_DEVICE_ID_SW_MAX 0x0f |
| 296 | #define INPUT_DEVICE_ID_PROP_MAX 0x1f | ||
| 296 | 297 | ||
| 297 | #define INPUT_DEVICE_ID_MATCH_BUS 1 | 298 | #define INPUT_DEVICE_ID_MATCH_BUS 1 |
| 298 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 | 299 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 |
| @@ -308,6 +309,7 @@ struct pcmcia_device_id { | |||
| 308 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 | 309 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 |
| 309 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 | 310 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 |
| 310 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 | 311 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 |
| 312 | #define INPUT_DEVICE_ID_MATCH_PROPBIT 0x2000 | ||
| 311 | 313 | ||
| 312 | struct input_device_id { | 314 | struct input_device_id { |
| 313 | 315 | ||
| @@ -327,6 +329,7 @@ struct input_device_id { | |||
| 327 | kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; | 329 | kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; |
| 328 | kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; | 330 | kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; |
| 329 | kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; | 331 | kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; |
| 332 | kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1]; | ||
| 330 | 333 | ||
| 331 | kernel_ulong_t driver_info; | 334 | kernel_ulong_t driver_info; |
| 332 | }; | 335 | }; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f535779d9dc1..2eaac7d75af4 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -3694,6 +3694,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, | |||
| 3694 | unsigned char name_assign_type, | 3694 | unsigned char name_assign_type, |
| 3695 | void (*setup)(struct net_device *), | 3695 | void (*setup)(struct net_device *), |
| 3696 | unsigned int txqs, unsigned int rxqs); | 3696 | unsigned int txqs, unsigned int rxqs); |
| 3697 | int dev_get_valid_name(struct net *net, struct net_device *dev, | ||
| 3698 | const char *name); | ||
| 3699 | |||
| 3697 | #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \ | 3700 | #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \ |
| 3698 | alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1) | 3701 | alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1) |
| 3699 | 3702 | ||
