ASoC: More updates for v5.5 Some more development work for v5.5. Highlights include: - More cleanups from Morimoto-san. - Trigger word detection for RT5677.
Showing the changes to include/linux (51 of 1653 files). Show all
Unified · Split
| @@ -326,10 +326,11 @@ static inline int bitmap_equal(const unsigned long *src1, · 325 unmodified lines | ||
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
| 329 | − * bitmap_or_equal - Check whether the or of two bitnaps is equal to a third | |
| 329 | + * bitmap_or_equal - Check whether the or of two bitmaps is equal to a third | |
| 330 | 330 | * @src1: Pointer to bitmap 1 |
| 331 | 331 | * @src2: Pointer to bitmap 2 will be or'ed with bitmap 1 |
| 332 | 332 | * @src3: Pointer to bitmap 3. Compare to the result of *@src1 | *@src2 |
| 333 | + * @nbits: number of bits in each of these bitmaps | |
| 333 | 334 | * |
| 334 | 335 | * Returns: True if (*@src1 | *@src2) == *@src3, false otherwise |
| 335 | 336 | */ |
| @@ -656,11 +656,11 @@ void bpf_map_put_with_uref(struct bpf_map *map); · 655 unmodified lines | ||
| 656 | 656 | void bpf_map_put(struct bpf_map *map); |
| 657 | 657 | int bpf_map_charge_memlock(struct bpf_map *map, u32 pages); |
| 658 | 658 | void bpf_map_uncharge_memlock(struct bpf_map *map, u32 pages); |
| 659 | −int bpf_map_charge_init(struct bpf_map_memory *mem, size_t size); | |
| 659 | +int bpf_map_charge_init(struct bpf_map_memory *mem, u64 size); | |
| 660 | 660 | void bpf_map_charge_finish(struct bpf_map_memory *mem); |
| 661 | 661 | void bpf_map_charge_move(struct bpf_map_memory *dst, |
| 662 | 662 | struct bpf_map_memory *src); |
| 663 | −void *bpf_map_area_alloc(size_t size, int numa_node); | |
| 663 | +void *bpf_map_area_alloc(u64 size, int numa_node); | |
| 664 | 664 | void bpf_map_area_free(void *base); |
| 665 | 665 | void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr); |
| 666 | 666 | |
| @@ -65,5 +65,6 @@ extern void can_rx_unregister(struct net *net, struct net_device *dev, · 64 unmodified lines | ||
| 65 | 65 | void *data); |
| 66 | 66 | |
| 67 | 67 | extern int can_send(struct sk_buff *skb, int loop); |
| 68 | +void can_sock_destruct(struct sock *sk); | |
| 68 | 69 | |
| 69 | 70 | #endif /* !_CAN_CORE_H */ |
| @@ -40,6 +40,7 @@ · 39 unmodified lines | ||
| 40 | 40 | # define __GCC4_has_attribute___noclone__ 1 |
| 41 | 41 | # define __GCC4_has_attribute___nonstring__ 0 |
| 42 | 42 | # define __GCC4_has_attribute___no_sanitize_address__ (__GNUC_MINOR__ >= 8) |
| 43 | +# define __GCC4_has_attribute___fallthrough__ 0 | |
| 43 | 44 | #endif |
| 44 | 45 | |
| 45 | 46 | /* |
| @@ -185,6 +186,22 @@ · 139 unmodified lines | ||
| 185 | 186 | # define __noclone |
| 186 | 187 | #endif |
| 187 | 188 | |
| 189 | +/* | |
| 190 | + * Add the pseudo keyword 'fallthrough' so case statement blocks | |
| 191 | + * must end with any of these keywords: | |
| 192 | + * break; | |
| 193 | + * fallthrough; | |
| 194 | + * goto <label>; | |
| 195 | + * return [expression]; | |
| 196 | + * | |
| 197 | + * gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attributes | |
| 198 | + */ | |
| 199 | +#if __has_attribute(__fallthrough__) | |
| 200 | +# define fallthrough __attribute__((__fallthrough__)) | |
| 201 | +#else | |
| 202 | +# define fallthrough do {} while (0) /* fallthrough */ | |
| 203 | +#endif | |
| 204 | + | |
| 188 | 205 | /* |
| 189 | 206 | * Note the missing underscores. |
| 190 | 207 | * |
| @@ -59,6 +59,11 @@ extern ssize_t cpu_show_l1tf(struct device *dev, · 58 unmodified lines | ||
| 59 | 59 | struct device_attribute *attr, char *buf); |
| 60 | 60 | extern ssize_t cpu_show_mds(struct device *dev, |
| 61 | 61 | struct device_attribute *attr, char *buf); |
| 62 | +extern ssize_t cpu_show_tsx_async_abort(struct device *dev, | |
| 63 | + struct device_attribute *attr, | |
| 64 | + char *buf); | |
| 65 | +extern ssize_t cpu_show_itlb_multihit(struct device *dev, | |
| 66 | + struct device_attribute *attr, char *buf); | |
| 62 | 67 | |
| 63 | 68 | extern __printf(4, 5) |
| 64 | 69 | struct device *cpu_device_create(struct device *parent, void *drvdata, |
| @@ -213,28 +218,7 @@ static inline int cpuhp_smt_enable(void) { return 0; } · 148 unmodified lines | ||
| 213 | 218 | static inline int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { return 0; } |
| 214 | 219 | #endif |
| 215 | 220 | |
| 216 | −/* | |
| 217 | − * These are used for a global "mitigations=" cmdline option for toggling | |
| 218 | − * optional CPU mitigations. | |
| 219 | − */ | |
| 220 | −enum cpu_mitigations { | |
| 221 | − CPU_MITIGATIONS_OFF, | |
| 222 | − CPU_MITIGATIONS_AUTO, | |
| 223 | − CPU_MITIGATIONS_AUTO_NOSMT, | |
| 224 | −}; | |
| 225 | − | |
| 226 | −extern enum cpu_mitigations cpu_mitigations; | |
| 227 | − | |
| 228 | −/* mitigations=off */ | |
| 229 | −static inline bool cpu_mitigations_off(void) | |
| 230 | −{ | |
| 231 | − return cpu_mitigations == CPU_MITIGATIONS_OFF; | |
| 232 | −} | |
| 233 | − | |
| 234 | −/* mitigations=auto,nosmt */ | |
| 235 | −static inline bool cpu_mitigations_auto_nosmt(void) | |
| 236 | −{ | |
| 237 | − return cpu_mitigations == CPU_MITIGATIONS_AUTO_NOSMT; | |
| 238 | −} | |
| 221 | +extern bool cpu_mitigations_off(void); | |
| 222 | +extern bool cpu_mitigations_auto_nosmt(void); | |
| 239 | 223 | |
| 240 | 224 | #endif /* _LINUX_CPU_H_ */ |
| @@ -13,6 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <linux/completion.h> |
| 14 | 14 | #include <linux/kobject.h> |
| 15 | 15 | #include <linux/notifier.h> |
| 16 | +#include <linux/pm_qos.h> | |
| 16 | 17 | #include <linux/spinlock.h> |
| 17 | 18 | #include <linux/sysfs.h> |
| 18 | 19 | |
| @@ -76,8 +77,10 @@ struct cpufreq_policy { · 57 unmodified lines | ||
| 76 | 77 | struct work_struct update; /* if update_policy() needs to be |
| 77 | 78 | * called, but you're in IRQ context */ |
| 78 | 79 | |
| 79 | − struct dev_pm_qos_request *min_freq_req; | |
| 80 | − struct dev_pm_qos_request *max_freq_req; | |
| 80 | + struct freq_constraints constraints; | |
| 81 | + struct freq_qos_request *min_freq_req; | |
| 82 | + struct freq_qos_request *max_freq_req; | |
| 83 | + | |
| 81 | 84 | struct cpufreq_frequency_table *freq_table; |
| 82 | 85 | enum cpufreq_table_sorting freq_table_sorted; |
| 83 | 86 | |
| @@ -204,6 +204,12 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, · 203 unmodified lines | ||
| 204 | 204 | do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) |
| 205 | 205 | #define dynamic_dev_dbg(dev, fmt, ...) \ |
| 206 | 206 | do { if (0) dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); } while (0) |
| 207 | +#define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ | |
| 208 | + groupsize, buf, len, ascii) \ | |
| 209 | + do { if (0) \ | |
| 210 | + print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, \ | |
| 211 | + rowsize, groupsize, buf, len, ascii); \ | |
| 212 | + } while (0) | |
| 207 | 213 | #endif |
| 208 | 214 | |
| 209 | 215 | #endif |
| @@ -1579,9 +1579,22 @@ char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, · 1578 unmodified lines | ||
| 1579 | 1579 | efi_status_t efi_get_memory_map(efi_system_table_t *sys_table_arg, |
| 1580 | 1580 | struct efi_boot_memmap *map); |
| 1581 | 1581 | |
| 1582 | +efi_status_t efi_low_alloc_above(efi_system_table_t *sys_table_arg, | |
| 1583 | + unsigned long size, unsigned long align, | |
| 1584 | + unsigned long *addr, unsigned long min); | |
| 1585 | + | |
| 1586 | +static inline | |
| 1582 | 1587 | efi_status_t efi_low_alloc(efi_system_table_t *sys_table_arg, |
| 1583 | 1588 | unsigned long size, unsigned long align, |
| 1584 | − unsigned long *addr); | |
| 1589 | + unsigned long *addr) | |
| 1590 | +{ | |
| 1591 | + /* | |
| 1592 | + * Don't allocate at 0x0. It will confuse code that | |
| 1593 | + * checks pointers against NULL. Skip the first 8 | |
| 1594 | + * bytes so we start at a nice even number. | |
| 1595 | + */ | |
| 1596 | + return efi_low_alloc_above(sys_table_arg, size, align, addr, 0x8); | |
| 1597 | +} | |
| 1585 | 1598 | |
| 1586 | 1599 | efi_status_t efi_high_alloc(efi_system_table_t *sys_table_arg, |
| 1587 | 1600 | unsigned long size, unsigned long align, |
| @@ -1592,7 +1605,8 @@ efi_status_t efi_relocate_kernel(efi_system_table_t *sys_table_arg, · 4 unmodified lines | ||
| 1592 | 1605 | unsigned long image_size, |
| 1593 | 1606 | unsigned long alloc_size, |
| 1594 | 1607 | unsigned long preferred_addr, |
| 1595 | − unsigned long alignment); | |
| 1608 | + unsigned long alignment, | |
| 1609 | + unsigned long min_addr); | |
| 1596 | 1610 | |
| 1597 | 1611 | efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg, |
| 1598 | 1612 | efi_loaded_image_t *image, |
| @@ -18,8 +18,6 @@ extern struct module __this_module; · 17 unmodified lines | ||
| 18 | 18 | #define THIS_MODULE ((struct module *)0) |
| 19 | 19 | #endif |
| 20 | 20 | |
| 21 | −#define NS_SEPARATOR "." | |
| 22 | − | |
| 23 | 21 | #ifdef CONFIG_MODVERSIONS |
| 24 | 22 | /* Mark the CRC weak since genksyms apparently decides not to |
| 25 | 23 | * generate a checksums for some symbols */ |
| @@ -48,14 +46,14 @@ extern struct module __this_module; · 22 unmodified lines | ||
| 48 | 46 | * absolute relocations that require runtime processing on relocatable |
| 49 | 47 | * kernels. |
| 50 | 48 | */ |
| 51 | −#define __KSYMTAB_ENTRY_NS(sym, sec, ns) \ | |
| 49 | +#define __KSYMTAB_ENTRY_NS(sym, sec) \ | |
| 52 | 50 | __ADDRESSABLE(sym) \ |
| 53 | 51 | asm(" .section \"___ksymtab" sec "+" #sym "\", \"a\" \n" \ |
| 54 | 52 | " .balign 4 \n" \ |
| 55 | − "__ksymtab_" #sym NS_SEPARATOR #ns ": \n" \ | |
| 53 | + "__ksymtab_" #sym ": \n" \ | |
| 56 | 54 | " .long " #sym "- . \n" \ |
| 57 | 55 | " .long __kstrtab_" #sym "- . \n" \ |
| 58 | − " .long __kstrtab_ns_" #sym "- . \n" \ | |
| 56 | + " .long __kstrtabns_" #sym "- . \n" \ | |
| 59 | 57 | " .previous \n") |
| 60 | 58 | |
| 61 | 59 | #define __KSYMTAB_ENTRY(sym, sec) \ |
| @@ -74,16 +72,14 @@ struct kernel_symbol { · 12 unmodified lines | ||
| 74 | 72 | int namespace_offset; |
| 75 | 73 | }; |
| 76 | 74 | #else |
| 77 | −#define __KSYMTAB_ENTRY_NS(sym, sec, ns) \ | |
| 78 | − static const struct kernel_symbol __ksymtab_##sym##__##ns \ | |
| 79 | − asm("__ksymtab_" #sym NS_SEPARATOR #ns) \ | |
| 75 | +#define __KSYMTAB_ENTRY_NS(sym, sec) \ | |
| 76 | + static const struct kernel_symbol __ksymtab_##sym \ | |
| 80 | 77 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ |
| 81 | 78 | __aligned(sizeof(void *)) \ |
| 82 | − = { (unsigned long)&sym, __kstrtab_##sym, __kstrtab_ns_##sym } | |
| 79 | + = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym } | |
| 83 | 80 | |
| 84 | 81 | #define __KSYMTAB_ENTRY(sym, sec) \ |
| 85 | 82 | static const struct kernel_symbol __ksymtab_##sym \ |
| 86 | − asm("__ksymtab_" #sym) \ | |
| 87 | 83 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ |
| 88 | 84 | __aligned(sizeof(void *)) \ |
| 89 | 85 | = { (unsigned long)&sym, __kstrtab_##sym, NULL } |
| @@ -112,10 +108,10 @@ struct kernel_symbol { · 22 unmodified lines | ||
| 112 | 108 | /* For every exported symbol, place a struct in the __ksymtab section */ |
| 113 | 109 | #define ___EXPORT_SYMBOL_NS(sym, sec, ns) \ |
| 114 | 110 | ___export_symbol_common(sym, sec); \ |
| 115 | − static const char __kstrtab_ns_##sym[] \ | |
| 111 | + static const char __kstrtabns_##sym[] \ | |
| 116 | 112 | __attribute__((section("__ksymtab_strings"), used, aligned(1))) \ |
| 117 | 113 | = #ns; \ |
| 118 | − __KSYMTAB_ENTRY_NS(sym, sec, ns) | |
| 114 | + __KSYMTAB_ENTRY_NS(sym, sec) | |
| 119 | 115 | |
| 120 | 116 | #define ___EXPORT_SYMBOL(sym, sec) \ |
| 121 | 117 | ___export_symbol_common(sym, sec); \ |
| @@ -1099,7 +1099,6 @@ static inline void bpf_get_prog_name(const struct bpf_prog *prog, char *sym) · 1098 unmodified lines | ||
| 1099 | 1099 | |
| 1100 | 1100 | #endif /* CONFIG_BPF_JIT */ |
| 1101 | 1101 | |
| 1102 | −void bpf_prog_kallsyms_del_subprogs(struct bpf_prog *fp); | |
| 1103 | 1102 | void bpf_prog_kallsyms_del_all(struct bpf_prog *fp); |
| 1104 | 1103 | |
| 1105 | 1104 | #define BPF_ANC BIT(15) |
| @@ -325,6 +325,29 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) · 324 unmodified lines | ||
| 325 | 325 | return !!(gfp_flags & __GFP_DIRECT_RECLAIM); |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | +/** | |
| 329 | + * gfpflags_normal_context - is gfp_flags a normal sleepable context? | |
| 330 | + * @gfp_flags: gfp_flags to test | |
| 331 | + * | |
| 332 | + * Test whether @gfp_flags indicates that the allocation is from the | |
| 333 | + * %current context and allowed to sleep. | |
| 334 | + * | |
| 335 | + * An allocation being allowed to block doesn't mean it owns the %current | |
| 336 | + * context. When direct reclaim path tries to allocate memory, the | |
| 337 | + * allocation context is nested inside whatever %current was doing at the | |
| 338 | + * time of the original allocation. The nested allocation may be allowed | |
| 339 | + * to block but modifying anything %current owns can corrupt the outer | |
| 340 | + * context's expectations. | |
| 341 | + * | |
| 342 | + * %true result from this function indicates that the allocation context | |
| 343 | + * can sleep and use anything that's associated with %current. | |
| 344 | + */ | |
| 345 | +static inline bool gfpflags_normal_context(const gfp_t gfp_flags) | |
| 346 | +{ | |
| 347 | + return (gfp_flags & (__GFP_DIRECT_RECLAIM | __GFP_MEMALLOC)) == | |
| 348 | + __GFP_DIRECT_RECLAIM; | |
| 349 | +} | |
| 350 | + | |
| 328 | 351 | #ifdef CONFIG_HIGHMEM |
| 329 | 352 | #define OPT_ZONE_HIGHMEM ZONE_HIGHMEM |
| 330 | 353 | #else |
| @@ -201,6 +201,14 @@ struct gpio_irq_chip { · 200 unmodified lines | ||
| 201 | 201 | */ |
| 202 | 202 | bool threaded; |
| 203 | 203 | |
| 204 | + /** | |
| 205 | + * @init_hw: optional routine to initialize hardware before | |
| 206 | + * an IRQ chip will be added. This is quite useful when | |
| 207 | + * a particular driver wants to clear IRQ related registers | |
| 208 | + * in order to avoid undesired events. | |
| 209 | + */ | |
| 210 | + int (*init_hw)(struct gpio_chip *chip); | |
| 211 | + | |
| 204 | 212 | /** |
| 205 | 213 | * @init_valid_mask: optional routine to initialize @valid_mask, to be |
| 206 | 214 | * used if not all GPIO lines are valid interrupts. Sometimes some |
| @@ -235,7 +235,7 @@ enum hwmon_power_attributes { · 234 unmodified lines | ||
| 235 | 235 | #define HWMON_P_LABEL BIT(hwmon_power_label) |
| 236 | 236 | #define HWMON_P_ALARM BIT(hwmon_power_alarm) |
| 237 | 237 | #define HWMON_P_CAP_ALARM BIT(hwmon_power_cap_alarm) |
| 238 | −#define HWMON_P_MIN_ALARM BIT(hwmon_power_max_alarm) | |
| 238 | +#define HWMON_P_MIN_ALARM BIT(hwmon_power_min_alarm) | |
| 239 | 239 | #define HWMON_P_MAX_ALARM BIT(hwmon_power_max_alarm) |
| 240 | 240 | #define HWMON_P_LCRIT_ALARM BIT(hwmon_power_lcrit_alarm) |
| 241 | 241 | #define HWMON_P_CRIT_ALARM BIT(hwmon_power_crit_alarm) |
| @@ -185,7 +185,7 @@ static inline void idr_preload_end(void) · 184 unmodified lines | ||
| 185 | 185 | * is convenient for a "not found" value. |
| 186 | 186 | */ |
| 187 | 187 | #define idr_for_each_entry(idr, entry, id) \ |
| 188 | − for (id = 0; ((entry) = idr_get_next(idr, &(id))) != NULL; ++id) | |
| 188 | + for (id = 0; ((entry) = idr_get_next(idr, &(id))) != NULL; id += 1U) | |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | 191 | * idr_for_each_entry_ul() - Iterate over an IDR's elements of a given type. |
| @@ -29,7 +29,6 @@ struct macvlan_dev { · 28 unmodified lines | ||
| 29 | 29 | netdev_features_t set_features; |
| 30 | 30 | enum macvlan_mode mode; |
| 31 | 31 | u16 flags; |
| 32 | − int nest_level; | |
| 33 | 32 | unsigned int macaddr_count; |
| 34 | 33 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 35 | 34 | struct netpoll *netpoll; |
| @@ -223,6 +223,7 @@ struct team { · 222 unmodified lines | ||
| 223 | 223 | atomic_t count_pending; |
| 224 | 224 | struct delayed_work dw; |
| 225 | 225 | } mcast_rejoin; |
| 226 | + struct lock_class_key team_lock_key; | |
| 226 | 227 | long mode_priv[TEAM_MODE_PRIV_LONGS]; |
| 227 | 228 | }; |
| 228 | 229 | |
| @@ -182,7 +182,6 @@ struct vlan_dev_priv { · 181 unmodified lines | ||
| 182 | 182 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 183 | 183 | struct netpoll *netpoll; |
| 184 | 184 | #endif |
| 185 | − unsigned int nest_level; | |
| 186 | 185 | }; |
| 187 | 186 | |
| 188 | 187 | static inline struct vlan_dev_priv *vlan_dev_priv(const struct net_device *dev) |
| @@ -221,11 +220,6 @@ extern void vlan_vids_del_by_dev(struct net_device *dev, · 32 unmodified lines | ||
| 221 | 220 | |
| 222 | 221 | extern bool vlan_uses_dev(const struct net_device *dev); |
| 223 | 222 | |
| 224 | −static inline int vlan_get_encap_level(struct net_device *dev) | |
| 225 | −{ | |
| 226 | − BUG_ON(!is_vlan_dev(dev)); | |
| 227 | − return vlan_dev_priv(dev)->nest_level; | |
| 228 | −} | |
| 229 | 223 | #else |
| 230 | 224 | static inline struct net_device * |
| 231 | 225 | __vlan_find_dev_deep_rcu(struct net_device *real_dev, |
| @@ -295,11 +289,6 @@ static inline bool vlan_uses_dev(const struct net_device *dev) · 63 unmodified lines | ||
| 295 | 289 | { |
| 296 | 290 | return false; |
| 297 | 291 | } |
| 298 | −static inline int vlan_get_encap_level(struct net_device *dev) | |
| 299 | −{ | |
| 300 | − BUG(); | |
| 301 | − return 0; | |
| 302 | −} | |
| 303 | 292 | #endif |
| 304 | 293 | |
| 305 | 294 | /** |
| @@ -336,7 +336,8 @@ enum { · 335 unmodified lines | ||
| 336 | 336 | #define QI_DEV_IOTLB_SID(sid) ((u64)((sid) & 0xffff) << 32) |
| 337 | 337 | #define QI_DEV_IOTLB_QDEP(qdep) (((qdep) & 0x1f) << 16) |
| 338 | 338 | #define QI_DEV_IOTLB_ADDR(addr) ((u64)(addr) & VTD_PAGE_MASK) |
| 339 | −#define QI_DEV_IOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52)) | |
| 339 | +#define QI_DEV_IOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | \ | |
| 340 | + ((u64)((pfsid >> 4) & 0xfff) << 52)) | |
| 340 | 341 | #define QI_DEV_IOTLB_SIZE 1 |
| 341 | 342 | #define QI_DEV_IOTLB_MAX_INVS 32 |
| 342 | 343 | |
| @@ -360,7 +361,8 @@ enum { · 17 unmodified lines | ||
| 360 | 361 | #define QI_DEV_EIOTLB_PASID(p) (((u64)p) << 32) |
| 361 | 362 | #define QI_DEV_EIOTLB_SID(sid) ((u64)((sid) & 0xffff) << 16) |
| 362 | 363 | #define QI_DEV_EIOTLB_QDEP(qd) ((u64)((qd) & 0x1f) << 4) |
| 363 | −#define QI_DEV_EIOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52)) | |
| 364 | +#define QI_DEV_EIOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | \ | |
| 365 | + ((u64)((pfsid >> 4) & 0xfff) << 52)) | |
| 364 | 366 | #define QI_DEV_EIOTLB_MAX_INVS 32 |
| 365 | 367 | |
| 366 | 368 | /* Page group response descriptor QW0 */ |
| @@ -966,6 +966,7 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); · 965 unmodified lines | ||
| 966 | 966 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); |
| 967 | 967 | |
| 968 | 968 | bool kvm_is_reserved_pfn(kvm_pfn_t pfn); |
| 969 | +bool kvm_is_zone_device_pfn(kvm_pfn_t pfn); | |
| 969 | 970 | |
| 970 | 971 | struct kvm_irq_ack_notifier { |
| 971 | 972 | struct hlist_node link; |
| @@ -1382,4 +1383,10 @@ static inline int kvm_arch_vcpu_run_pid_change(struct kvm_vcpu *vcpu) · 410 unmodified lines | ||
| 1382 | 1383 | } |
| 1383 | 1384 | #endif /* CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE */ |
| 1384 | 1385 | |
| 1386 | +typedef int (*kvm_vm_thread_fn_t)(struct kvm *kvm, uintptr_t data); | |
| 1387 | + | |
| 1388 | +int kvm_vm_create_worker_thread(struct kvm *kvm, kvm_vm_thread_fn_t thread_fn, | |
| 1389 | + uintptr_t data, const char *name, | |
| 1390 | + struct task_struct **thread_ptr); | |
| 1391 | + | |
| 1385 | 1392 | #endif |
| @@ -247,7 +247,7 @@ extern void led_set_brightness(struct led_classdev *led_cdev, · 246 unmodified lines | ||
| 247 | 247 | /** |
| 248 | 248 | * led_set_brightness_sync - set LED brightness synchronously |
| 249 | 249 | * @led_cdev: the LED to set |
| 250 | − * @brightness: the brightness to set it to | |
| 250 | + * @value: the brightness to set it to | |
| 251 | 251 | * |
| 252 | 252 | * Set an LED's brightness immediately. This function will block |
| 253 | 253 | * the caller for the time required for accessing device registers, |
| @@ -301,8 +301,7 @@ extern void led_sysfs_enable(struct led_classdev *led_cdev); · 47 unmodified lines | ||
| 301 | 301 | /** |
| 302 | 302 | * led_compose_name - compose LED class device name |
| 303 | 303 | * @dev: LED controller device object |
| 304 | − * @child: child fwnode_handle describing a LED or a group of synchronized LEDs; | |
| 305 | − * it must be provided only for fwnode based LEDs | |
| 304 | + * @init_data: the LED class device initialization data | |
| 306 | 305 | * @led_classdev_name: composed LED class device name |
| 307 | 306 | * |
| 308 | 307 | * Create LED class device name basing on the provided init_data argument. |
| @@ -356,6 +356,19 @@ static inline bool mem_cgroup_disabled(void) · 355 unmodified lines | ||
| 356 | 356 | return !cgroup_subsys_enabled(memory_cgrp_subsys); |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | +static inline unsigned long mem_cgroup_protection(struct mem_cgroup *memcg, | |
| 360 | + bool in_low_reclaim) | |
| 361 | +{ | |
| 362 | + if (mem_cgroup_disabled()) | |
| 363 | + return 0; | |
| 364 | + | |
| 365 | + if (in_low_reclaim) | |
| 366 | + return READ_ONCE(memcg->memory.emin); | |
| 367 | + | |
| 368 | + return max(READ_ONCE(memcg->memory.emin), | |
| 369 | + READ_ONCE(memcg->memory.elow)); | |
| 370 | +} | |
| 371 | + | |
| 359 | 372 | enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root, |
| 360 | 373 | struct mem_cgroup *memcg); |
| 361 | 374 | |
| @@ -537,6 +550,8 @@ void mem_cgroup_handle_over_high(void); · 175 unmodified lines | ||
| 537 | 550 | |
| 538 | 551 | unsigned long mem_cgroup_get_max(struct mem_cgroup *memcg); |
| 539 | 552 | |
| 553 | +unsigned long mem_cgroup_size(struct mem_cgroup *memcg); | |
| 554 | + | |
| 540 | 555 | void mem_cgroup_print_oom_context(struct mem_cgroup *memcg, |
| 541 | 556 | struct task_struct *p); |
| 542 | 557 | |
| @@ -829,6 +844,12 @@ static inline void memcg_memory_event_mm(struct mm_struct *mm, · 286 unmodified lines | ||
| 829 | 844 | { |
| 830 | 845 | } |
| 831 | 846 | |
| 847 | +static inline unsigned long mem_cgroup_protection(struct mem_cgroup *memcg, | |
| 848 | + bool in_low_reclaim) | |
| 849 | +{ | |
| 850 | + return 0; | |
| 851 | +} | |
| 852 | + | |
| 832 | 853 | static inline enum mem_cgroup_protection mem_cgroup_protected( |
| 833 | 854 | struct mem_cgroup *root, struct mem_cgroup *memcg) |
| 834 | 855 | { |
| @@ -968,6 +989,11 @@ static inline unsigned long mem_cgroup_get_max(struct mem_cgroup *memcg) · 133 unmodified lines | ||
| 968 | 989 | return 0; |
| 969 | 990 | } |
| 970 | 991 | |
| 992 | +static inline unsigned long mem_cgroup_size(struct mem_cgroup *memcg) | |
| 993 | +{ | |
| 994 | + return 0; | |
| 995 | +} | |
| 996 | + | |
| 971 | 997 | static inline void |
| 972 | 998 | mem_cgroup_print_oom_context(struct mem_cgroup *memcg, struct task_struct *p) |
| 973 | 999 | { |
| @@ -1264,6 +1290,9 @@ void mem_cgroup_track_foreign_dirty_slowpath(struct page *page, · 290 unmodified lines | ||
| 1264 | 1290 | static inline void mem_cgroup_track_foreign_dirty(struct page *page, |
| 1265 | 1291 | struct bdi_writeback *wb) |
| 1266 | 1292 | { |
| 1293 | + if (mem_cgroup_disabled()) | |
| 1294 | + return; | |
| 1295 | + | |
| 1267 | 1296 | if (unlikely(&page->mem_cgroup->css != wb->memcg_css)) |
| 1268 | 1297 | mem_cgroup_track_foreign_dirty_slowpath(page, wb); |
| 1269 | 1298 | } |
| @@ -119,6 +119,7 @@ extern struct memory_block *find_memory_block(struct mem_section *); · 118 unmodified lines | ||
| 119 | 119 | typedef int (*walk_memory_blocks_func_t)(struct memory_block *, void *); |
| 120 | 120 | extern int walk_memory_blocks(unsigned long start, unsigned long size, |
| 121 | 121 | void *arg, walk_memory_blocks_func_t func); |
| 122 | +extern int for_each_memory_block(void *arg, walk_memory_blocks_func_t func); | |
| 122 | 123 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) |
| 123 | 124 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ |
| 124 | 125 | |
| @@ -31,7 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | #define PHY_ID_KSZ886X 0x00221430 |
| 32 | 32 | #define PHY_ID_KSZ8863 0x00221435 |
| 33 | 33 | |
| 34 | −#define PHY_ID_KSZ8795 0x00221550 | |
| 34 | +#define PHY_ID_KSZ87XX 0x00221550 | |
| 35 | 35 | |
| 36 | 36 | #define PHY_ID_KSZ9477 0x00221631 |
| 37 | 37 | |
| @@ -1545,9 +1545,8 @@ struct mlx5_ifc_extended_dest_format_bits { · 1544 unmodified lines | ||
| 1545 | 1545 | }; |
| 1546 | 1546 | |
| 1547 | 1547 | union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits { |
| 1548 | − struct mlx5_ifc_dest_format_struct_bits dest_format_struct; | |
| 1548 | + struct mlx5_ifc_extended_dest_format_bits extended_dest_format; | |
| 1549 | 1549 | struct mlx5_ifc_flow_counter_list_bits flow_counter_list; |
| 1550 | − u8 reserved_at_0[0x40]; | |
| 1551 | 1550 | }; |
| 1552 | 1551 | |
| 1553 | 1552 | struct mlx5_ifc_fte_match_param_bits { |
| @@ -695,11 +695,6 @@ static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) · 694 unmodified lines | ||
| 695 | 695 | |
| 696 | 696 | extern void kvfree(const void *addr); |
| 697 | 697 | |
| 698 | −static inline atomic_t *compound_mapcount_ptr(struct page *page) | |
| 699 | −{ | |
| 700 | − return &page[1].compound_mapcount; | |
| 701 | −} | |
| 702 | − | |
| 703 | 698 | static inline int compound_mapcount(struct page *page) |
| 704 | 699 | { |
| 705 | 700 | VM_BUG_ON_PAGE(!PageCompound(page), page); |
| @@ -221,6 +221,11 @@ struct page { · 220 unmodified lines | ||
| 221 | 221 | #endif |
| 222 | 222 | } _struct_page_alignment; |
| 223 | 223 | |
| 224 | +static inline atomic_t *compound_mapcount_ptr(struct page *page) | |
| 225 | +{ | |
| 226 | + return &page[1].compound_mapcount; | |
| 227 | +} | |
| 228 | + | |
| 224 | 229 | /* |
| 225 | 230 | * Used for sizing the vmemmap region on some architectures |
| 226 | 231 | */ |
| @@ -925,6 +925,7 @@ struct dev_ifalias { · 924 unmodified lines | ||
| 925 | 925 | struct devlink; |
| 926 | 926 | struct tlsdev_ops; |
| 927 | 927 | |
| 928 | + | |
| 928 | 929 | /* |
| 929 | 930 | * This structure defines the management hooks for network devices. |
| 930 | 931 | * The following hooks can be defined; unless noted otherwise, they are |
| @@ -1421,7 +1422,6 @@ struct net_device_ops { · 490 unmodified lines | ||
| 1421 | 1422 | void (*ndo_dfwd_del_station)(struct net_device *pdev, |
| 1422 | 1423 | void *priv); |
| 1423 | 1424 | |
| 1424 | − int (*ndo_get_lock_subclass)(struct net_device *dev); | |
| 1425 | 1425 | int (*ndo_set_tx_maxrate)(struct net_device *dev, |
| 1426 | 1426 | int queue_index, |
| 1427 | 1427 | u32 maxrate); |
| @@ -1649,6 +1649,8 @@ enum netdev_priv_flags { · 221 unmodified lines | ||
| 1649 | 1649 | * @perm_addr: Permanent hw address |
| 1650 | 1650 | * @addr_assign_type: Hw address assignment type |
| 1651 | 1651 | * @addr_len: Hardware address length |
| 1652 | + * @upper_level: Maximum depth level of upper devices. | |
| 1653 | + * @lower_level: Maximum depth level of lower devices. | |
| 1652 | 1654 | * @neigh_priv_len: Used in neigh_alloc() |
| 1653 | 1655 | * @dev_id: Used to differentiate devices that share |
| 1654 | 1656 | * the same link layer address |
| @@ -1758,9 +1760,13 @@ enum netdev_priv_flags { · 103 unmodified lines | ||
| 1758 | 1760 | * @phydev: Physical device may attach itself |
| 1759 | 1761 | * for hardware timestamping |
| 1760 | 1762 | * @sfp_bus: attached &struct sfp_bus structure. |
| 1761 | − * | |
| 1762 | − * @qdisc_tx_busylock: lockdep class annotating Qdisc->busylock spinlock | |
| 1763 | − * @qdisc_running_key: lockdep class annotating Qdisc->running seqcount | |
| 1763 | + * @qdisc_tx_busylock_key: lockdep class annotating Qdisc->busylock | |
| 1764 | + spinlock | |
| 1765 | + * @qdisc_running_key: lockdep class annotating Qdisc->running seqcount | |
| 1766 | + * @qdisc_xmit_lock_key: lockdep class annotating | |
| 1767 | + * netdev_queue->_xmit_lock spinlock | |
| 1768 | + * @addr_list_lock_key: lockdep class annotating | |
| 1769 | + * net_device->addr_list_lock spinlock | |
| 1764 | 1770 | * |
| 1765 | 1771 | * @proto_down: protocol port state information can be sent to the |
| 1766 | 1772 | * switch driver and used to set the phys state of the |
| @@ -1875,6 +1881,8 @@ struct net_device { · 108 unmodified lines | ||
| 1875 | 1881 | unsigned char perm_addr[MAX_ADDR_LEN]; |
| 1876 | 1882 | unsigned char addr_assign_type; |
| 1877 | 1883 | unsigned char addr_len; |
| 1884 | + unsigned char upper_level; | |
| 1885 | + unsigned char lower_level; | |
| 1878 | 1886 | unsigned short neigh_priv_len; |
| 1879 | 1887 | unsigned short dev_id; |
| 1880 | 1888 | unsigned short dev_port; |
| @@ -2045,8 +2053,10 @@ struct net_device { · 164 unmodified lines | ||
| 2045 | 2053 | #endif |
| 2046 | 2054 | struct phy_device *phydev; |
| 2047 | 2055 | struct sfp_bus *sfp_bus; |
| 2048 | − struct lock_class_key *qdisc_tx_busylock; | |
| 2049 | − struct lock_class_key *qdisc_running_key; | |
| 2056 | + struct lock_class_key qdisc_tx_busylock_key; | |
| 2057 | + struct lock_class_key qdisc_running_key; | |
| 2058 | + struct lock_class_key qdisc_xmit_lock_key; | |
| 2059 | + struct lock_class_key addr_list_lock_key; | |
| 2050 | 2060 | bool proto_down; |
| 2051 | 2061 | unsigned wol_enabled:1; |
| 2052 | 2062 | }; |
| @@ -2124,23 +2134,6 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, · 71 unmodified lines | ||
| 2124 | 2134 | f(dev, &dev->_tx[i], arg); |
| 2125 | 2135 | } |
| 2126 | 2136 | |
| 2127 | −#define netdev_lockdep_set_classes(dev) \ | |
| 2128 | −{ \ | |
| 2129 | − static struct lock_class_key qdisc_tx_busylock_key; \ | |
| 2130 | − static struct lock_class_key qdisc_running_key; \ | |
| 2131 | − static struct lock_class_key qdisc_xmit_lock_key; \ | |
| 2132 | − static struct lock_class_key dev_addr_list_lock_key; \ | |
| 2133 | − unsigned int i; \ | |
| 2134 | − \ | |
| 2135 | − (dev)->qdisc_tx_busylock = &qdisc_tx_busylock_key; \ | |
| 2136 | − (dev)->qdisc_running_key = &qdisc_running_key; \ | |
| 2137 | − lockdep_set_class(&(dev)->addr_list_lock, \ | |
| 2138 | − &dev_addr_list_lock_key); \ | |
| 2139 | − for (i = 0; i < (dev)->num_tx_queues; i++) \ | |
| 2140 | − lockdep_set_class(&(dev)->_tx[i]._xmit_lock, \ | |
| 2141 | − &qdisc_xmit_lock_key); \ | |
| 2142 | −} | |
| 2143 | − | |
| 2144 | 2137 | u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb, |
| 2145 | 2138 | struct net_device *sb_dev); |
| 2146 | 2139 | struct netdev_queue *netdev_core_pick_tx(struct net_device *dev, |
| @@ -3139,6 +3132,7 @@ static inline void netif_stop_queue(struct net_device *dev) · 992 unmodified lines | ||
| 3139 | 3132 | } |
| 3140 | 3133 | |
| 3141 | 3134 | void netif_tx_stop_all_queues(struct net_device *dev); |
| 3135 | +void netdev_update_lockdep_key(struct net_device *dev); | |
| 3142 | 3136 | |
| 3143 | 3137 | static inline bool netif_tx_queue_stopped(const struct netdev_queue *dev_queue) |
| 3144 | 3138 | { |
| @@ -4056,16 +4050,6 @@ static inline void netif_addr_lock(struct net_device *dev) · 911 unmodified lines | ||
| 4056 | 4050 | spin_lock(&dev->addr_list_lock); |
| 4057 | 4051 | } |
| 4058 | 4052 | |
| 4059 | −static inline void netif_addr_lock_nested(struct net_device *dev) | |
| 4060 | −{ | |
| 4061 | − int subclass = SINGLE_DEPTH_NESTING; | |
| 4062 | − | |
| 4063 | − if (dev->netdev_ops->ndo_get_lock_subclass) | |
| 4064 | − subclass = dev->netdev_ops->ndo_get_lock_subclass(dev); | |
| 4065 | − | |
| 4066 | − spin_lock_nested(&dev->addr_list_lock, subclass); | |
| 4067 | −} | |
| 4068 | − | |
| 4069 | 4053 | static inline void netif_addr_lock_bh(struct net_device *dev) |
| 4070 | 4054 | { |
| 4071 | 4055 | spin_lock_bh(&dev->addr_list_lock); |
| @@ -4329,6 +4313,16 @@ int netdev_master_upper_dev_link(struct net_device *dev, · 257 unmodified lines | ||
| 4329 | 4313 | struct netlink_ext_ack *extack); |
| 4330 | 4314 | void netdev_upper_dev_unlink(struct net_device *dev, |
| 4331 | 4315 | struct net_device *upper_dev); |
| 4316 | +int netdev_adjacent_change_prepare(struct net_device *old_dev, | |
| 4317 | + struct net_device *new_dev, | |
| 4318 | + struct net_device *dev, | |
| 4319 | + struct netlink_ext_ack *extack); | |
| 4320 | +void netdev_adjacent_change_commit(struct net_device *old_dev, | |
| 4321 | + struct net_device *new_dev, | |
| 4322 | + struct net_device *dev); | |
| 4323 | +void netdev_adjacent_change_abort(struct net_device *old_dev, | |
| 4324 | + struct net_device *new_dev, | |
| 4325 | + struct net_device *dev); | |
| 4332 | 4326 | void netdev_adjacent_rename_links(struct net_device *dev, char *oldname); |
| 4333 | 4327 | void *netdev_lower_dev_get_private(struct net_device *dev, |
| 4334 | 4328 | struct net_device *lower_dev); |
| @@ -4340,7 +4334,6 @@ void netdev_lower_state_changed(struct net_device *lower_dev, · 5 unmodified lines | ||
| 4340 | 4334 | extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly; |
| 4341 | 4335 | void netdev_rss_key_fill(void *buffer, size_t len); |
| 4342 | 4336 | |
| 4343 | −int dev_get_nest_level(struct net_device *dev); | |
| 4344 | 4337 | int skb_checksum_help(struct sk_buff *skb); |
| 4345 | 4338 | int skb_crc32c_csum_help(struct sk_buff *skb); |
| 4346 | 4339 | int skb_csum_hwoffload_help(struct sk_buff *skb, |
| @@ -622,12 +622,28 @@ static inline int PageTransCompound(struct page *page) · 621 unmodified lines | ||
| 622 | 622 | * |
| 623 | 623 | * Unlike PageTransCompound, this is safe to be called only while |
| 624 | 624 | * split_huge_pmd() cannot run from under us, like if protected by the |
| 625 | − * MMU notifier, otherwise it may result in page->_mapcount < 0 false | |
| 625 | + * MMU notifier, otherwise it may result in page->_mapcount check false | |
| 626 | 626 | * positives. |
| 627 | + * | |
| 628 | + * We have to treat page cache THP differently since every subpage of it | |
| 629 | + * would get _mapcount inc'ed once it is PMD mapped. But, it may be PTE | |
| 630 | + * mapped in the current process so comparing subpage's _mapcount to | |
| 631 | + * compound_mapcount to filter out PTE mapped case. | |
| 627 | 632 | */ |
| 628 | 633 | static inline int PageTransCompoundMap(struct page *page) |
| 629 | 634 | { |
| 630 | − return PageTransCompound(page) && atomic_read(&page->_mapcount) < 0; | |
| 635 | + struct page *head; | |
| 636 | + | |
| 637 | + if (!PageTransCompound(page)) | |
| 638 | + return 0; | |
| 639 | + | |
| 640 | + if (PageAnon(page)) | |
| 641 | + return atomic_read(&page->_mapcount) < 0; | |
| 642 | + | |
| 643 | + head = compound_head(page); | |
| 644 | + /* File THP is PMD mapped and not PTE mapped */ | |
| 645 | + return atomic_read(&page->_mapcount) == | |
| 646 | + atomic_read(compound_mapcount_ptr(head)); | |
| 631 | 647 | } |
| 632 | 648 | |
| 633 | 649 | /* |
| @@ -18,7 +18,7 @@ struct page_ext_operations { · 17 unmodified lines | ||
| 18 | 18 | |
| 19 | 19 | enum page_ext_flags { |
| 20 | 20 | PAGE_EXT_OWNER, |
| 21 | − PAGE_EXT_OWNER_ACTIVE, | |
| 21 | + PAGE_EXT_OWNER_ALLOCATED, | |
| 22 | 22 | #if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT) |
| 23 | 23 | PAGE_EXT_YOUNG, |
| 24 | 24 | PAGE_EXT_IDLE, |
| @@ -36,6 +36,7 @@ struct page_ext { · 11 unmodified lines | ||
| 36 | 36 | unsigned long flags; |
| 37 | 37 | }; |
| 38 | 38 | |
| 39 | +extern unsigned long page_ext_size; | |
| 39 | 40 | extern void pgdat_page_ext_init(struct pglist_data *pgdat); |
| 40 | 41 | |
| 41 | 42 | #ifdef CONFIG_SPARSEMEM |
| @@ -52,6 +53,13 @@ static inline void page_ext_init(void) · 10 unmodified lines | ||
| 52 | 53 | |
| 53 | 54 | struct page_ext *lookup_page_ext(const struct page *page); |
| 54 | 55 | |
| 56 | +static inline struct page_ext *page_ext_next(struct page_ext *curr) | |
| 57 | +{ | |
| 58 | + void *next = curr; | |
| 59 | + next += page_ext_size; | |
| 60 | + return next; | |
| 61 | +} | |
| 62 | + | |
| 55 | 63 | #else /* !CONFIG_PAGE_EXTENSION */ |
| 56 | 64 | struct page_ext; |
| 57 | 65 | |
| @@ -292,7 +292,7 @@ struct pmu { · 291 unmodified lines | ||
| 292 | 292 | * -EBUSY -- @event is for this PMU but PMU temporarily unavailable |
| 293 | 293 | * -EINVAL -- @event is for this PMU but @event is not valid |
| 294 | 294 | * -EOPNOTSUPP -- @event is for this PMU, @event is valid, but not supported |
| 295 | − * -EACCESS -- @event is for this PMU, @event is valid, but no privilidges | |
| 295 | + * -EACCES -- @event is for this PMU, @event is valid, but no privileges | |
| 296 | 296 | * |
| 297 | 297 | * 0 -- @event is for this PMU and valid |
| 298 | 298 | * |
| @@ -51,7 +51,10 @@ struct sdma_script_start_addrs { · 50 unmodified lines | ||
| 51 | 51 | /* End of v2 array */ |
| 52 | 52 | s32 zcanfd_2_mcu_addr; |
| 53 | 53 | s32 zqspi_2_mcu_addr; |
| 54 | + s32 mcu_2_ecspi_addr; | |
| 54 | 55 | /* End of v3 array */ |
| 56 | + s32 mcu_2_zqspi_addr; | |
| 57 | + /* End of v4 array */ | |
| 55 | 58 | }; |
| 56 | 59 | |
| 57 | 60 | /** |
| @@ -64,6 +64,8 @@ extern struct resource *platform_get_resource_byname(struct platform_device *, · 63 unmodified lines | ||
| 64 | 64 | unsigned int, |
| 65 | 65 | const char *); |
| 66 | 66 | extern int platform_get_irq_byname(struct platform_device *, const char *); |
| 67 | +extern int platform_get_irq_byname_optional(struct platform_device *dev, | |
| 68 | + const char *name); | |
| 67 | 69 | extern int platform_add_devices(struct platform_device **, int); |
| 68 | 70 | |
| 69 | 71 | struct platform_device_info { |
| @@ -34,8 +34,6 @@ enum pm_qos_flags_status { · 33 unmodified lines | ||
| 34 | 34 | #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT PM_QOS_LATENCY_ANY |
| 35 | 35 | #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS PM_QOS_LATENCY_ANY_NS |
| 36 | 36 | #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 |
| 37 | −#define PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE 0 | |
| 38 | −#define PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE (-1) | |
| 39 | 37 | #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) |
| 40 | 38 | |
| 41 | 39 | #define PM_QOS_FLAG_NO_POWER_OFF (1 << 0) |
| @@ -54,8 +52,6 @@ struct pm_qos_flags_request { · 12 unmodified lines | ||
| 54 | 52 | enum dev_pm_qos_req_type { |
| 55 | 53 | DEV_PM_QOS_RESUME_LATENCY = 1, |
| 56 | 54 | DEV_PM_QOS_LATENCY_TOLERANCE, |
| 57 | − DEV_PM_QOS_MIN_FREQUENCY, | |
| 58 | − DEV_PM_QOS_MAX_FREQUENCY, | |
| 59 | 55 | DEV_PM_QOS_FLAGS, |
| 60 | 56 | }; |
| 61 | 57 | |
| @@ -97,14 +93,10 @@ struct pm_qos_flags { · 35 unmodified lines | ||
| 97 | 93 | struct dev_pm_qos { |
| 98 | 94 | struct pm_qos_constraints resume_latency; |
| 99 | 95 | struct pm_qos_constraints latency_tolerance; |
| 100 | − struct pm_qos_constraints min_frequency; | |
| 101 | − struct pm_qos_constraints max_frequency; | |
| 102 | 96 | struct pm_qos_flags flags; |
| 103 | 97 | struct dev_pm_qos_request *resume_latency_req; |
| 104 | 98 | struct dev_pm_qos_request *latency_tolerance_req; |
| 105 | 99 | struct dev_pm_qos_request *flags_req; |
| 106 | − struct dev_pm_qos_request *min_frequency_req; | |
| 107 | − struct dev_pm_qos_request *max_frequency_req; | |
| 108 | 100 | }; |
| 109 | 101 | |
| 110 | 102 | /* Action requested to pm_qos_update_target */ |
| @@ -199,10 +191,6 @@ static inline s32 dev_pm_qos_read_value(struct device *dev, · 88 unmodified lines | ||
| 199 | 191 | switch (type) { |
| 200 | 192 | case DEV_PM_QOS_RESUME_LATENCY: |
| 201 | 193 | return PM_QOS_RESUME_LATENCY_NO_CONSTRAINT; |
| 202 | − case DEV_PM_QOS_MIN_FREQUENCY: | |
| 203 | − return PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE; | |
| 204 | − case DEV_PM_QOS_MAX_FREQUENCY: | |
| 205 | − return PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE; | |
| 206 | 194 | default: |
| 207 | 195 | WARN_ON(1); |
| 208 | 196 | return 0; |
| @@ -267,4 +255,48 @@ static inline s32 dev_pm_qos_raw_resume_latency(struct device *dev) · 58 unmodified lines | ||
| 267 | 255 | } |
| 268 | 256 | #endif |
| 269 | 257 | |
| 258 | +#define FREQ_QOS_MIN_DEFAULT_VALUE 0 | |
| 259 | +#define FREQ_QOS_MAX_DEFAULT_VALUE (-1) | |
| 260 | + | |
| 261 | +enum freq_qos_req_type { | |
| 262 | + FREQ_QOS_MIN = 1, | |
| 263 | + FREQ_QOS_MAX, | |
| 264 | +}; | |
| 265 | + | |
| 266 | +struct freq_constraints { | |
| 267 | + struct pm_qos_constraints min_freq; | |
| 268 | + struct blocking_notifier_head min_freq_notifiers; | |
| 269 | + struct pm_qos_constraints max_freq; | |
| 270 | + struct blocking_notifier_head max_freq_notifiers; | |
| 271 | +}; | |
| 272 | + | |
| 273 | +struct freq_qos_request { | |
| 274 | + enum freq_qos_req_type type; | |
| 275 | + struct plist_node pnode; | |
| 276 | + struct freq_constraints *qos; | |
| 277 | +}; | |
| 278 | + | |
| 279 | +static inline int freq_qos_request_active(struct freq_qos_request *req) | |
| 280 | +{ | |
| 281 | + return !IS_ERR_OR_NULL(req->qos); | |
| 282 | +} | |
| 283 | + | |
| 284 | +void freq_constraints_init(struct freq_constraints *qos); | |
| 285 | + | |
| 286 | +s32 freq_qos_read_value(struct freq_constraints *qos, | |
| 287 | + enum freq_qos_req_type type); | |
| 288 | + | |
| 289 | +int freq_qos_add_request(struct freq_constraints *qos, | |
| 290 | + struct freq_qos_request *req, | |
| 291 | + enum freq_qos_req_type type, s32 value); | |
| 292 | +int freq_qos_update_request(struct freq_qos_request *req, s32 new_value); | |
| 293 | +int freq_qos_remove_request(struct freq_qos_request *req); | |
| 294 | + | |
| 295 | +int freq_qos_add_notifier(struct freq_constraints *qos, | |
| 296 | + enum freq_qos_req_type type, | |
| 297 | + struct notifier_block *notifier); | |
| 298 | +int freq_qos_remove_notifier(struct freq_constraints *qos, | |
| 299 | + enum freq_qos_req_type type, | |
| 300 | + struct notifier_block *notifier); | |
| 301 | + | |
| 270 | 302 | #endif |
| @@ -315,24 +315,6 @@ radix_tree_iter_lookup(const struct radix_tree_root *root, · 314 unmodified lines | ||
| 315 | 315 | return radix_tree_next_chunk(root, iter, RADIX_TREE_ITER_CONTIG); |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | −/** | |
| 319 | − * radix_tree_iter_find - find a present entry | |
| 320 | − * @root: radix tree root | |
| 321 | − * @iter: iterator state | |
| 322 | − * @index: start location | |
| 323 | − * | |
| 324 | − * This function returns the slot containing the entry with the lowest index | |
| 325 | − * which is at least @index. If @index is larger than any present entry, this | |
| 326 | − * function returns NULL. The @iter is updated to describe the entry found. | |
| 327 | − */ | |
| 328 | −static inline void __rcu ** | |
| 329 | −radix_tree_iter_find(const struct radix_tree_root *root, | |
| 330 | − struct radix_tree_iter *iter, unsigned long index) | |
| 331 | −{ | |
| 332 | − radix_tree_iter_init(iter, index); | |
| 333 | − return radix_tree_next_chunk(root, iter, 0); | |
| 334 | −} | |
| 335 | − | |
| 336 | 318 | /** |
| 337 | 319 | * radix_tree_iter_retry - retry this chunk of the iteration |
| 338 | 320 | * @iter: iterator state |
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | struct reset_controller_dev; |
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | − * struct reset_control_ops | |
| 10 | + * struct reset_control_ops - reset controller driver callbacks | |
| 11 | 11 | * |
| 12 | 12 | * @reset: for self-deasserting resets, does all necessary |
| 13 | 13 | * things to reset the device |
| @@ -33,7 +33,7 @@ struct of_phandle_args; · 19 unmodified lines | ||
| 33 | 33 | * @provider: name of the reset controller device controlling this reset line |
| 34 | 34 | * @index: ID of the reset controller in the reset controller device |
| 35 | 35 | * @dev_id: name of the device associated with this reset line |
| 36 | − * @con_id name of the reset line (can be NULL) | |
| 36 | + * @con_id: name of the reset line (can be NULL) | |
| 37 | 37 | */ |
| 38 | 38 | struct reset_control_lookup { |
| 39 | 39 | struct list_head list; |
| @@ -143,7 +143,7 @@ static inline int device_reset_optional(struct device *dev) · 142 unmodified lines | ||
| 143 | 143 | * If this function is called more than once for the same reset_control it will |
| 144 | 144 | * return -EBUSY. |
| 145 | 145 | * |
| 146 | − * See reset_control_get_shared for details on shared references to | |
| 146 | + * See reset_control_get_shared() for details on shared references to | |
| 147 | 147 | * reset-controls. |
| 148 | 148 | * |
| 149 | 149 | * Use of id names is optional. |
| @@ -223,6 +223,7 @@ extern long schedule_timeout_uninterruptible(long timeout); · 222 unmodified lines | ||
| 223 | 223 | extern long schedule_timeout_idle(long timeout); |
| 224 | 224 | asmlinkage void schedule(void); |
| 225 | 225 | extern void schedule_preempt_disabled(void); |
| 226 | +asmlinkage void preempt_schedule_irq(void); | |
| 226 | 227 | |
| 227 | 228 | extern int __must_check io_schedule_prepare(void); |
| 228 | 229 | extern void io_schedule_finish(int token); |
| @@ -105,6 +105,7 @@ enum lockdown_reason { · 104 unmodified lines | ||
| 105 | 105 | LOCKDOWN_NONE, |
| 106 | 106 | LOCKDOWN_MODULE_SIGNATURE, |
| 107 | 107 | LOCKDOWN_DEV_MEM, |
| 108 | + LOCKDOWN_EFI_TEST, | |
| 108 | 109 | LOCKDOWN_KEXEC, |
| 109 | 110 | LOCKDOWN_HIBERNATION, |
| 110 | 111 | LOCKDOWN_PCI_ACCESS, |
| @@ -1354,7 +1354,8 @@ static inline __u32 skb_get_hash_flowi6(struct sk_buff *skb, const struct flowi6 · 1353 unmodified lines | ||
| 1354 | 1354 | return skb->hash; |
| 1355 | 1355 | } |
| 1356 | 1356 | |
| 1357 | −__u32 skb_get_hash_perturb(const struct sk_buff *skb, u32 perturb); | |
| 1357 | +__u32 skb_get_hash_perturb(const struct sk_buff *skb, | |
| 1358 | + const siphash_key_t *perturb); | |
| 1358 | 1359 | |
| 1359 | 1360 | static inline __u32 skb_get_hash_raw(const struct sk_buff *skb) |
| 1360 | 1361 | { |
| @@ -1494,6 +1495,19 @@ static inline int skb_queue_empty(const struct sk_buff_head *list) · 133 unmodified lines | ||
| 1494 | 1495 | return list->next == (const struct sk_buff *) list; |
| 1495 | 1496 | } |
| 1496 | 1497 | |
| 1498 | +/** | |
| 1499 | + * skb_queue_empty_lockless - check if a queue is empty | |
| 1500 | + * @list: queue head | |
| 1501 | + * | |
| 1502 | + * Returns true if the queue is empty, false otherwise. | |
| 1503 | + * This variant can be used in lockless contexts. | |
| 1504 | + */ | |
| 1505 | +static inline bool skb_queue_empty_lockless(const struct sk_buff_head *list) | |
| 1506 | +{ | |
| 1507 | + return READ_ONCE(list->next) == (const struct sk_buff *) list; | |
| 1508 | +} | |
| 1509 | + | |
| 1510 | + | |
| 1497 | 1511 | /** |
| 1498 | 1512 | * skb_queue_is_last - check if skb is the last entry in the queue |
| 1499 | 1513 | * @list: queue head |
| @@ -1847,9 +1861,11 @@ static inline void __skb_insert(struct sk_buff *newsk, · 347 unmodified lines | ||
| 1847 | 1861 | struct sk_buff *prev, struct sk_buff *next, |
| 1848 | 1862 | struct sk_buff_head *list) |
| 1849 | 1863 | { |
| 1850 | − newsk->next = next; | |
| 1851 | − newsk->prev = prev; | |
| 1852 | − next->prev = prev->next = newsk; | |
| 1864 | + /* see skb_queue_empty_lockless() for the opposite READ_ONCE() */ | |
| 1865 | + WRITE_ONCE(newsk->next, next); | |
| 1866 | + WRITE_ONCE(newsk->prev, prev); | |
| 1867 | + WRITE_ONCE(next->prev, newsk); | |
| 1868 | + WRITE_ONCE(prev->next, newsk); | |
| 1853 | 1869 | list->qlen++; |
| 1854 | 1870 | } |
| 1855 | 1871 | |
| @@ -1860,11 +1876,11 @@ static inline void __skb_queue_splice(const struct sk_buff_head *list, · 4 unmodified lines | ||
| 1860 | 1876 | struct sk_buff *first = list->next; |
| 1861 | 1877 | struct sk_buff *last = list->prev; |
| 1862 | 1878 | |
| 1863 | − first->prev = prev; | |
| 1864 | − prev->next = first; | |
| 1879 | + WRITE_ONCE(first->prev, prev); | |
| 1880 | + WRITE_ONCE(prev->next, first); | |
| 1865 | 1881 | |
| 1866 | − last->next = next; | |
| 1867 | − next->prev = last; | |
| 1882 | + WRITE_ONCE(last->next, next); | |
| 1883 | + WRITE_ONCE(next->prev, last); | |
| 1868 | 1884 | } |
| 1869 | 1885 | |
| 1870 | 1886 | /** |
| @@ -2005,8 +2021,8 @@ static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) · 134 unmodified lines | ||
| 2005 | 2021 | next = skb->next; |
| 2006 | 2022 | prev = skb->prev; |
| 2007 | 2023 | skb->next = skb->prev = NULL; |
| 2008 | − next->prev = prev; | |
| 2009 | − prev->next = next; | |
| 2024 | + WRITE_ONCE(next->prev, prev); | |
| 2025 | + WRITE_ONCE(prev->next, next); | |
| 2010 | 2026 | } |
| 2011 | 2027 | |
| 2012 | 2028 | /** |
| @@ -3510,8 +3526,9 @@ int skb_ensure_writable(struct sk_buff *skb, int write_len); · 1497 unmodified lines | ||
| 3510 | 3526 | int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci); |
| 3511 | 3527 | int skb_vlan_pop(struct sk_buff *skb); |
| 3512 | 3528 | int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); |
| 3513 | −int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto); | |
| 3514 | −int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto); | |
| 3529 | +int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto, | |
| 3530 | + int mac_len); | |
| 3531 | +int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto, int mac_len); | |
| 3515 | 3532 | int skb_mpls_update_lse(struct sk_buff *skb, __be32 mpls_lse); |
| 3516 | 3533 | int skb_mpls_dec_ttl(struct sk_buff *skb); |
| 3517 | 3534 | struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy, |
| @@ -139,6 +139,11 @@ static inline void sk_msg_apply_bytes(struct sk_psock *psock, u32 bytes) · 138 unmodified lines | ||
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | +static inline u32 sk_msg_iter_dist(u32 start, u32 end) | |
| 143 | +{ | |
| 144 | + return end >= start ? end - start : end + (MAX_MSG_FRAGS - start); | |
| 145 | +} | |
| 146 | + | |
| 142 | 147 | #define sk_msg_iter_var_prev(var) \ |
| 143 | 148 | do { \ |
| 144 | 149 | if (var == 0) \ |
| @@ -198,9 +203,7 @@ static inline u32 sk_msg_elem_used(const struct sk_msg *msg) · 53 unmodified lines | ||
| 198 | 203 | if (sk_msg_full(msg)) |
| 199 | 204 | return MAX_MSG_FRAGS; |
| 200 | 205 | |
| 201 | − return msg->sg.end >= msg->sg.start ? | |
| 202 | − msg->sg.end - msg->sg.start : | |
| 203 | − msg->sg.end + (MAX_MSG_FRAGS - msg->sg.start); | |
| 206 | + return sk_msg_iter_dist(msg->sg.start, msg->sg.end); | |
| 204 | 207 | } |
| 205 | 208 | |
| 206 | 209 | static inline struct scatterlist *sk_msg_elem(struct sk_msg *msg, int which) |
| @@ -493,6 +493,10 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) · 492 unmodified lines | ||
| 493 | 493 | * kmalloc is the normal method of allocating memory |
| 494 | 494 | * for objects smaller than page size in the kernel. |
| 495 | 495 | * |
| 496 | + * The allocated object address is aligned to at least ARCH_KMALLOC_MINALIGN | |
| 497 | + * bytes. For @size of power of two bytes, the alignment is also guaranteed | |
| 498 | + * to be at least to the size. | |
| 499 | + * | |
| 496 | 500 | * The @flags argument may be one of the GFP flags defined at |
| 497 | 501 | * include/linux/gfp.h and described at |
| 498 | 502 | * :ref:`Documentation/core-api/mm-api.rst <mm-api-gfp-flags>` |
| @@ -263,7 +263,7 @@ struct ucred { · 262 unmodified lines | ||
| 263 | 263 | #define PF_MAX AF_MAX |
| 264 | 264 | |
| 265 | 265 | /* Maximum queue length specifiable by listen. */ |
| 266 | −#define SOMAXCONN 128 | |
| 266 | +#define SOMAXCONN 4096 | |
| 267 | 267 | |
| 268 | 268 | /* Flags we can use with send/ and recv. |
| 269 | 269 | Added those for 1003.1g not all are supported yet |
| @@ -227,7 +227,26 @@ static inline bool strstarts(const char *str, const char *prefix) · 226 unmodified lines | ||
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | size_t memweight(const void *ptr, size_t bytes); |
| 230 | −void memzero_explicit(void *s, size_t count); | |
| 230 | + | |
| 231 | +/** | |
| 232 | + * memzero_explicit - Fill a region of memory (e.g. sensitive | |
| 233 | + * keying data) with 0s. | |
| 234 | + * @s: Pointer to the start of the area. | |
| 235 | + * @count: The size of the area. | |
| 236 | + * | |
| 237 | + * Note: usually using memset() is just fine (!), but in cases | |
| 238 | + * where clearing out _local_ data at the end of a scope is | |
| 239 | + * necessary, memzero_explicit() should be used instead in | |
| 240 | + * order to prevent the compiler from optimising away zeroing. | |
| 241 | + * | |
| 242 | + * memzero_explicit() doesn't need an arch-specific version as | |
| 243 | + * it just invokes the one of memset() implicitly. | |
| 244 | + */ | |
| 245 | +static inline void memzero_explicit(void *s, size_t count) | |
| 246 | +{ | |
| 247 | + memset(s, 0, count); | |
| 248 | + barrier_data(s); | |
| 249 | +} | |
| 231 | 250 | |
| 232 | 251 | /** |
| 233 | 252 | * kbasename - return the last part of a pathname. |
| @@ -64,6 +64,11 @@ static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, · 63 unmodified lines | ||
| 64 | 64 | return 0; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | +static inline void xprt_destroy_backchannel(struct rpc_xprt *xprt, | |
| 68 | + unsigned int max_reqs) | |
| 69 | +{ | |
| 70 | +} | |
| 71 | + | |
| 67 | 72 | static inline bool svc_is_backchannel(const struct svc_rqst *rqstp) |
| 68 | 73 | { |
| 69 | 74 | return false; |
| @@ -61,6 +61,7 @@ struct sock_xprt { · 60 unmodified lines | ||
| 61 | 61 | struct mutex recv_mutex; |
| 62 | 62 | struct sockaddr_storage srcaddr; |
| 63 | 63 | unsigned short srcport; |
| 64 | + int xprt_err; | |
| 64 | 65 | |
| 65 | 66 | /* |
| 66 | 67 | * UDP socket buffer size parameters |
| @@ -196,9 +196,9 @@ struct bin_attribute { · 195 unmodified lines | ||
| 196 | 196 | .size = _size, \ |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | −#define __BIN_ATTR_WO(_name) { \ | |
| 199 | +#define __BIN_ATTR_WO(_name, _size) { \ | |
| 200 | 200 | .attr = { .name = __stringify(_name), .mode = 0200 }, \ |
| 201 | − .store = _name##_store, \ | |
| 201 | + .write = _name##_write, \ | |
| 202 | 202 | .size = _size, \ |
| 203 | 203 | } |
| 204 | 204 | |
| @@ -393,7 +393,7 @@ struct tcp_sock { · 392 unmodified lines | ||
| 393 | 393 | /* fastopen_rsk points to request_sock that resulted in this big |
| 394 | 394 | * socket. Used to retransmit SYNACKs etc. |
| 395 | 395 | */ |
| 396 | − struct request_sock *fastopen_rsk; | |
| 396 | + struct request_sock __rcu *fastopen_rsk; | |
| 397 | 397 | u32 *saved_syn; |
| 398 | 398 | }; |
| 399 | 399 | |
| @@ -447,8 +447,8 @@ static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) · 47 unmodified lines | ||
| 447 | 447 | |
| 448 | 448 | static inline bool tcp_passive_fastopen(const struct sock *sk) |
| 449 | 449 | { |
| 450 | − return (sk->sk_state == TCP_SYN_RECV && | |
| 451 | − tcp_sk(sk)->fastopen_rsk != NULL); | |
| 450 | + return sk->sk_state == TCP_SYN_RECV && | |
| 451 | + rcu_access_pointer(tcp_sk(sk)->fastopen_rsk) != NULL; | |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | 454 | static inline void fastopen_queue_tune(struct sock *sk, int backlog) |
| @@ -152,7 +152,7 @@ struct tcg_algorithm_info { · 151 unmodified lines | ||
| 152 | 152 | * total. Once we've done this we know the offset of the data length field, |
| 153 | 153 | * and can calculate the total size of the event. |
| 154 | 154 | * |
| 155 | − * Return: size of the event on success, <0 on failure | |
| 155 | + * Return: size of the event on success, 0 on failure | |
| 156 | 156 | */ |
| 157 | 157 | |
| 158 | 158 | static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, |
| @@ -170,6 +170,7 @@ static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, · 11 unmodified lines | ||
| 170 | 170 | u16 halg; |
| 171 | 171 | int i; |
| 172 | 172 | int j; |
| 173 | + u32 count, event_type; | |
| 173 | 174 | |
| 174 | 175 | marker = event; |
| 175 | 176 | marker_start = marker; |
| @@ -190,16 +191,22 @@ static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, · 14 unmodified lines | ||
| 190 | 191 | } |
| 191 | 192 | |
| 192 | 193 | event = (struct tcg_pcr_event2_head *)mapping; |
| 194 | + /* | |
| 195 | + * The loop below will unmap these fields if the log is larger than | |
| 196 | + * one page, so save them here for reference: | |
| 197 | + */ | |
| 198 | + count = READ_ONCE(event->count); | |
| 199 | + event_type = READ_ONCE(event->event_type); | |
| 193 | 200 | |
| 194 | 201 | efispecid = (struct tcg_efi_specid_event_head *)event_header->event; |
| 195 | 202 | |
| 196 | 203 | /* Check if event is malformed. */ |
| 197 | − if (event->count > efispecid->num_algs) { | |
| 204 | + if (count > efispecid->num_algs) { | |
| 198 | 205 | size = 0; |
| 199 | 206 | goto out; |
| 200 | 207 | } |
| 201 | 208 | |
| 202 | − for (i = 0; i < event->count; i++) { | |
| 209 | + for (i = 0; i < count; i++) { | |
| 203 | 210 | halg_size = sizeof(event->digests[i].alg_id); |
| 204 | 211 | |
| 205 | 212 | /* Map the digest's algorithm identifier */ |
| @@ -256,8 +263,9 @@ static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, · 50 unmodified lines | ||
| 256 | 263 | + event_field->event_size; |
| 257 | 264 | size = marker - marker_start; |
| 258 | 265 | |
| 259 | − if ((event->event_type == 0) && (event_field->event_size == 0)) | |
| 266 | + if (event_type == 0 && event_field->event_size == 0) | |
| 260 | 267 | size = 0; |
| 268 | + | |
| 261 | 269 | out: |
| 262 | 270 | if (do_mapping) |
| 263 | 271 | TPM_MEMUNMAP(mapping, mapping_size); |
| @@ -355,8 +355,10 @@ extern long strnlen_unsafe_user(const void __user *unsafe_addr, long count); · 354 unmodified lines | ||
| 355 | 355 | #ifndef user_access_begin |
| 356 | 356 | #define user_access_begin(ptr,len) access_ok(ptr, len) |
| 357 | 357 | #define user_access_end() do { } while (0) |
| 358 | −#define unsafe_get_user(x, ptr, err) do { if (unlikely(__get_user(x, ptr))) goto err; } while (0) | |
| 359 | −#define unsafe_put_user(x, ptr, err) do { if (unlikely(__put_user(x, ptr))) goto err; } while (0) | |
| 358 | +#define unsafe_op_wrap(op, err) do { if (unlikely(op)) goto err; } while (0) | |
| 359 | +#define unsafe_get_user(x,p,e) unsafe_op_wrap(__get_user(x,p),e) | |
| 360 | +#define unsafe_put_user(x,p,e) unsafe_op_wrap(__put_user(x,p),e) | |
| 361 | +#define unsafe_copy_to_user(d,s,l,e) unsafe_op_wrap(__copy_to_user(d,s,l),e) | |
| 360 | 362 | static inline unsigned long user_access_save(void) { return 0UL; } |
| 361 | 363 | static inline void user_access_restore(unsigned long flags) { } |
| 362 | 364 | #endif |
| @@ -48,7 +48,6 @@ struct virtio_vsock_sock { · 47 unmodified lines | ||
| 48 | 48 | |
| 49 | 49 | struct virtio_vsock_pkt { |
| 50 | 50 | struct virtio_vsock_hdr hdr; |
| 51 | − struct work_struct work; | |
| 52 | 51 | struct list_head list; |
| 53 | 52 | /* socket refcnt not held, only use for cancellation */ |
| 54 | 53 | struct vsock_sock *vsk; |
| @@ -230,8 +230,8 @@ static inline int xa_err(void *entry) · 229 unmodified lines | ||
| 230 | 230 | * This structure is used either directly or via the XA_LIMIT() macro |
| 231 | 231 | * to communicate the range of IDs that are valid for allocation. |
| 232 | 232 | * Two common ranges are predefined for you: |
| 233 | − * * xa_limit_32b - [0 - UINT_MAX] | |
| 234 | − * * xa_limit_31b - [0 - INT_MAX] | |
| 233 | + * * xa_limit_32b - [0 - UINT_MAX] | |
| 234 | + * * xa_limit_31b - [0 - INT_MAX] | |
| 235 | 235 | */ |
| 236 | 236 | struct xa_limit { |
| 237 | 237 | u32 max; |