Showing the changes to include/linux (89 of 2365 files). Show all
Unified · Split
| @@ -30,8 +30,6 @@ · 29 unmodified lines | ||
| 30 | 30 | #include <linux/agp_backend.h> |
| 31 | 31 | #include <uapi/linux/agpgart.h> |
| 32 | 32 | |
| 33 | −#define AGPGART_MINOR 175 | |
| 34 | − | |
| 35 | 33 | struct agp_info { |
| 36 | 34 | struct agp_version version; /* version of the driver */ |
| 37 | 35 | u32 bridge_id; /* bridge vendor/device */ |
| @@ -53,6 +53,7 @@ · 52 unmodified lines | ||
| 53 | 53 | * bitmap_find_next_zero_area_off(buf, len, pos, n, mask) as above |
| 54 | 54 | * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n |
| 55 | 55 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n |
| 56 | + * bitmap_replace(dst, old, new, mask, nbits) *dst = (*old & ~(*mask)) | (*new & *mask) | |
| 56 | 57 | * bitmap_remap(dst, src, old, new, nbits) *dst = map(old, new)(src) |
| 57 | 58 | * bitmap_bitremap(oldbit, old, new, nbits) newbit = map(old, new)(oldbit) |
| 58 | 59 | * bitmap_onto(dst, orig, relmap, nbits) *dst = orig relative to relmap |
| @@ -66,6 +67,8 @@ · 7 unmodified lines | ||
| 66 | 67 | * bitmap_allocate_region(bitmap, pos, order) Allocate specified bit region |
| 67 | 68 | * bitmap_from_arr32(dst, buf, nbits) Copy nbits from u32[] buf to dst |
| 68 | 69 | * bitmap_to_arr32(buf, src, nbits) Copy nbits from buf to u32[] dst |
| 70 | + * bitmap_get_value8(map, start) Get 8bit value from map at start | |
| 71 | + * bitmap_set_value8(map, value, start) Set 8bit value to map at start | |
| 69 | 72 | * |
| 70 | 73 | * Note, bitmap_zero() and bitmap_fill() operate over the region of |
| 71 | 74 | * unsigned longs, that is, bits behind bitmap till the unsigned long |
| @@ -138,6 +141,9 @@ extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, · 66 unmodified lines | ||
| 138 | 141 | const unsigned long *bitmap2, unsigned int nbits); |
| 139 | 142 | extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, |
| 140 | 143 | const unsigned long *bitmap2, unsigned int nbits); |
| 144 | +extern void __bitmap_replace(unsigned long *dst, | |
| 145 | + const unsigned long *old, const unsigned long *new, | |
| 146 | + const unsigned long *mask, unsigned int nbits); | |
| 141 | 147 | extern int __bitmap_intersects(const unsigned long *bitmap1, |
| 142 | 148 | const unsigned long *bitmap2, unsigned int nbits); |
| 143 | 149 | extern int __bitmap_subset(const unsigned long *bitmap1, |
| @@ -432,6 +438,18 @@ static inline void bitmap_shift_left(unsigned long *dst, const unsigned long *sr · 288 unmodified lines | ||
| 432 | 438 | __bitmap_shift_left(dst, src, shift, nbits); |
| 433 | 439 | } |
| 434 | 440 | |
| 441 | +static inline void bitmap_replace(unsigned long *dst, | |
| 442 | + const unsigned long *old, | |
| 443 | + const unsigned long *new, | |
| 444 | + const unsigned long *mask, | |
| 445 | + unsigned int nbits) | |
| 446 | +{ | |
| 447 | + if (small_const_nbits(nbits)) | |
| 448 | + *dst = (*old & ~(*mask)) | (*new & *mask); | |
| 449 | + else | |
| 450 | + __bitmap_replace(dst, old, new, mask, nbits); | |
| 451 | +} | |
| 452 | + | |
| 435 | 453 | static inline int bitmap_parse(const char *buf, unsigned int buflen, |
| 436 | 454 | unsigned long *maskp, int nmaskbits) |
| 437 | 455 | { |
| @@ -489,6 +507,39 @@ static inline void bitmap_from_u64(unsigned long *dst, u64 mask) · 51 unmodified lines | ||
| 489 | 507 | dst[1] = mask >> 32; |
| 490 | 508 | } |
| 491 | 509 | |
| 510 | +/** | |
| 511 | + * bitmap_get_value8 - get an 8-bit value within a memory region | |
| 512 | + * @map: address to the bitmap memory region | |
| 513 | + * @start: bit offset of the 8-bit value; must be a multiple of 8 | |
| 514 | + * | |
| 515 | + * Returns the 8-bit value located at the @start bit offset within the @src | |
| 516 | + * memory region. | |
| 517 | + */ | |
| 518 | +static inline unsigned long bitmap_get_value8(const unsigned long *map, | |
| 519 | + unsigned long start) | |
| 520 | +{ | |
| 521 | + const size_t index = BIT_WORD(start); | |
| 522 | + const unsigned long offset = start % BITS_PER_LONG; | |
| 523 | + | |
| 524 | + return (map[index] >> offset) & 0xFF; | |
| 525 | +} | |
| 526 | + | |
| 527 | +/** | |
| 528 | + * bitmap_set_value8 - set an 8-bit value within a memory region | |
| 529 | + * @map: address to the bitmap memory region | |
| 530 | + * @value: the 8-bit value; values wider than 8 bits may clobber bitmap | |
| 531 | + * @start: bit offset of the 8-bit value; must be a multiple of 8 | |
| 532 | + */ | |
| 533 | +static inline void bitmap_set_value8(unsigned long *map, unsigned long value, | |
| 534 | + unsigned long start) | |
| 535 | +{ | |
| 536 | + const size_t index = BIT_WORD(start); | |
| 537 | + const unsigned long offset = start % BITS_PER_LONG; | |
| 538 | + | |
| 539 | + map[index] &= ~(0xFFUL << offset); | |
| 540 | + map[index] |= value << offset; | |
| 541 | +} | |
| 542 | + | |
| 492 | 543 | #endif /* __ASSEMBLY__ */ |
| 493 | 544 | |
| 494 | 545 | #endif /* __LINUX_BITMAP_H */ |
| @@ -47,6 +47,18 @@ extern unsigned long __sw_hweight64(__u64 w); · 46 unmodified lines | ||
| 47 | 47 | (bit) < (size); \ |
| 48 | 48 | (bit) = find_next_zero_bit((addr), (size), (bit) + 1)) |
| 49 | 49 | |
| 50 | +/** | |
| 51 | + * for_each_set_clump8 - iterate over bitmap for each 8-bit clump with set bits | |
| 52 | + * @start: bit offset to start search and to store the current iteration offset | |
| 53 | + * @clump: location to store copy of current 8-bit clump | |
| 54 | + * @bits: bitmap address to base the search on | |
| 55 | + * @size: bitmap size in number of bits | |
| 56 | + */ | |
| 57 | +#define for_each_set_clump8(start, clump, bits, size) \ | |
| 58 | + for ((start) = find_first_clump8(&(clump), (bits), (size)); \ | |
| 59 | + (start) < (size); \ | |
| 60 | + (start) = find_next_clump8(&(clump), (bits), (size), (start) + 8)) | |
| 61 | + | |
| 50 | 62 | static inline int get_bitmask_order(unsigned int count) |
| 51 | 63 | { |
| 52 | 64 | int order; |
| @@ -188,7 +188,6 @@ struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg, · 187 unmodified lines | ||
| 188 | 188 | struct blkcg_gq *blkg_lookup_create(struct blkcg *blkcg, |
| 189 | 189 | struct request_queue *q); |
| 190 | 190 | int blkcg_init_queue(struct request_queue *q); |
| 191 | −void blkcg_drain_queue(struct request_queue *q); | |
| 192 | 191 | void blkcg_exit_queue(struct request_queue *q); |
| 193 | 192 | |
| 194 | 193 | /* Blkio controller policy registration */ |
| @@ -720,7 +719,6 @@ static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, void *key) { ret · 525 unmodified lines | ||
| 720 | 719 | static inline struct blkcg_gq *blk_queue_root_blkg(struct request_queue *q) |
| 721 | 720 | { return NULL; } |
| 722 | 721 | static inline int blkcg_init_queue(struct request_queue *q) { return 0; } |
| 723 | −static inline void blkcg_drain_queue(struct request_queue *q) { } | |
| 724 | 722 | static inline void blkcg_exit_queue(struct request_queue *q) { } |
| 725 | 723 | static inline int blkcg_policy_register(struct blkcg_policy *pol) { return 0; } |
| 726 | 724 | static inline void blkcg_policy_unregister(struct blkcg_policy *pol) { } |
| @@ -357,8 +357,7 @@ typedef int (*report_zones_cb)(struct blk_zone *zone, unsigned int idx, · 356 unmodified lines | ||
| 357 | 357 | #define BLK_ALL_ZONES ((unsigned int)-1) |
| 358 | 358 | int blkdev_report_zones(struct block_device *bdev, sector_t sector, |
| 359 | 359 | unsigned int nr_zones, report_zones_cb cb, void *data); |
| 360 | − | |
| 361 | −extern unsigned int blkdev_nr_zones(struct block_device *bdev); | |
| 360 | +unsigned int blkdev_nr_zones(struct gendisk *disk); | |
| 362 | 361 | extern int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op, |
| 363 | 362 | sector_t sectors, sector_t nr_sectors, |
| 364 | 363 | gfp_t gfp_mask); |
| @@ -371,12 +370,7 @@ extern int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode, · 6 unmodified lines | ||
| 371 | 370 | |
| 372 | 371 | #else /* CONFIG_BLK_DEV_ZONED */ |
| 373 | 372 | |
| 374 | −static inline unsigned int blkdev_nr_zones(struct block_device *bdev) | |
| 375 | −{ | |
| 376 | − return 0; | |
| 377 | −} | |
| 378 | − | |
| 379 | −static inline int blk_revalidate_disk_zones(struct gendisk *disk) | |
| 373 | +static inline unsigned int blkdev_nr_zones(struct gendisk *disk) | |
| 380 | 374 | { |
| 381 | 375 | return 0; |
| 382 | 376 | } |
| @@ -504,9 +498,9 @@ struct request_queue { · 121 unmodified lines | ||
| 504 | 498 | /* |
| 505 | 499 | * Zoned block device information for request dispatch control. |
| 506 | 500 | * nr_zones is the total number of zones of the device. This is always |
| 507 | − * 0 for regular block devices. seq_zones_bitmap is a bitmap of nr_zones | |
| 508 | − * bits which indicates if a zone is conventional (bit clear) or | |
| 509 | − * sequential (bit set). seq_zones_wlock is a bitmap of nr_zones | |
| 501 | + * 0 for regular block devices. conv_zones_bitmap is a bitmap of nr_zones | |
| 502 | + * bits which indicates if a zone is conventional (bit set) or | |
| 503 | + * sequential (bit clear). seq_zones_wlock is a bitmap of nr_zones | |
| 510 | 504 | * bits which indicates if a zone is write locked, that is, if a write |
| 511 | 505 | * request targeting the zone was dispatched. All three fields are |
| 512 | 506 | * initialized by the low level device driver (e.g. scsi/sd.c). |
| @@ -519,7 +513,7 @@ struct request_queue { · 6 unmodified lines | ||
| 519 | 513 | * blk_mq_unfreeze_queue(). |
| 520 | 514 | */ |
| 521 | 515 | unsigned int nr_zones; |
| 522 | − unsigned long *seq_zones_bitmap; | |
| 516 | + unsigned long *conv_zones_bitmap; | |
| 523 | 517 | unsigned long *seq_zones_wlock; |
| 524 | 518 | #endif /* CONFIG_BLK_DEV_ZONED */ |
| 525 | 519 | |
| @@ -724,9 +718,11 @@ static inline unsigned int blk_queue_zone_no(struct request_queue *q, · 198 unmodified lines | ||
| 724 | 718 | static inline bool blk_queue_zone_is_seq(struct request_queue *q, |
| 725 | 719 | sector_t sector) |
| 726 | 720 | { |
| 727 | − if (!blk_queue_is_zoned(q) || !q->seq_zones_bitmap) | |
| 721 | + if (!blk_queue_is_zoned(q)) | |
| 728 | 722 | return false; |
| 729 | − return test_bit(blk_queue_zone_no(q, sector), q->seq_zones_bitmap); | |
| 723 | + if (!q->conv_zones_bitmap) | |
| 724 | + return true; | |
| 725 | + return !test_bit(blk_queue_zone_no(q, sector), q->conv_zones_bitmap); | |
| 730 | 726 | } |
| 731 | 727 | #else /* CONFIG_BLK_DEV_ZONED */ |
| 732 | 728 | static inline unsigned int blk_queue_nr_zones(struct request_queue *q) |
| @@ -157,8 +157,8 @@ void bpf_cgroup_storage_link(struct bpf_cgroup_storage *storage, · 156 unmodified lines | ||
| 157 | 157 | struct cgroup *cgroup, |
| 158 | 158 | enum bpf_attach_type type); |
| 159 | 159 | void bpf_cgroup_storage_unlink(struct bpf_cgroup_storage *storage); |
| 160 | −int bpf_cgroup_storage_assign(struct bpf_prog *prog, struct bpf_map *map); | |
| 161 | −void bpf_cgroup_storage_release(struct bpf_prog *prog, struct bpf_map *map); | |
| 160 | +int bpf_cgroup_storage_assign(struct bpf_prog_aux *aux, struct bpf_map *map); | |
| 161 | +void bpf_cgroup_storage_release(struct bpf_prog_aux *aux, struct bpf_map *map); | |
| 162 | 162 | |
| 163 | 163 | int bpf_percpu_cgroup_storage_copy(struct bpf_map *map, void *key, void *value); |
| 164 | 164 | int bpf_percpu_cgroup_storage_update(struct bpf_map *map, void *key, |
| @@ -360,9 +360,9 @@ static inline int cgroup_bpf_prog_query(const union bpf_attr *attr, · 195 unmodified lines | ||
| 360 | 360 | |
| 361 | 361 | static inline void bpf_cgroup_storage_set( |
| 362 | 362 | struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE]) {} |
| 363 | −static inline int bpf_cgroup_storage_assign(struct bpf_prog *prog, | |
| 363 | +static inline int bpf_cgroup_storage_assign(struct bpf_prog_aux *aux, | |
| 364 | 364 | struct bpf_map *map) { return 0; } |
| 365 | −static inline void bpf_cgroup_storage_release(struct bpf_prog *prog, | |
| 365 | +static inline void bpf_cgroup_storage_release(struct bpf_prog_aux *aux, | |
| 366 | 366 | struct bpf_map *map) {} |
| 367 | 367 | static inline struct bpf_cgroup_storage *bpf_cgroup_storage_alloc( |
| 368 | 368 | struct bpf_prog *prog, enum bpf_cgroup_storage_type stype) { return NULL; } |
| @@ -461,6 +461,7 @@ struct bpf_trampoline { · 460 unmodified lines | ||
| 461 | 461 | struct { |
| 462 | 462 | struct btf_func_model model; |
| 463 | 463 | void *addr; |
| 464 | + bool ftrace_managed; | |
| 464 | 465 | } func; |
| 465 | 466 | /* list of BPF programs using this trampoline */ |
| 466 | 467 | struct hlist_head progs_hlist[BPF_TRAMP_MAX]; |
| @@ -817,6 +818,8 @@ struct bpf_prog * __must_check bpf_prog_inc_not_zero(struct bpf_prog *prog); · 350 unmodified lines | ||
| 817 | 818 | void bpf_prog_put(struct bpf_prog *prog); |
| 818 | 819 | int __bpf_prog_charge(struct user_struct *user, u32 pages); |
| 819 | 820 | void __bpf_prog_uncharge(struct user_struct *user, u32 pages); |
| 821 | +void __bpf_free_used_maps(struct bpf_prog_aux *aux, | |
| 822 | + struct bpf_map **used_maps, u32 len); | |
| 820 | 823 | |
| 821 | 824 | void bpf_prog_free_id(struct bpf_prog *prog, bool do_idr_lock); |
| 822 | 825 | void bpf_map_free_id(struct bpf_map *map, bool do_idr_lock); |
| @@ -9,11 +9,11 @@ · 8 unmodified lines | ||
| 9 | 9 | #else /* __CHECKER__ */ |
| 10 | 10 | /* |
| 11 | 11 | * Force a compilation error if condition is true, but also produce a |
| 12 | − * result (of value 0 and type size_t), so the expression can be used | |
| 12 | + * result (of value 0 and type int), so the expression can be used | |
| 13 | 13 | * e.g. in a structure initializer (or where-ever else comma expressions |
| 14 | 14 | * aren't permitted). |
| 15 | 15 | */ |
| 16 | −#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); })) | |
| 16 | +#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | |
| 17 | 17 | #endif /* __CHECKER__ */ |
| 18 | 18 | |
| 19 | 19 | /* Force a compilation error if a constant expression is not a power of 2 */ |
| @@ -87,26 +87,24 @@ struct bvec_iter_all { · 86 unmodified lines | ||
| 87 | 87 | static inline bool bvec_iter_advance(const struct bio_vec *bv, |
| 88 | 88 | struct bvec_iter *iter, unsigned bytes) |
| 89 | 89 | { |
| 90 | + unsigned int idx = iter->bi_idx; | |
| 91 | + | |
| 90 | 92 | if (WARN_ONCE(bytes > iter->bi_size, |
| 91 | 93 | "Attempted to advance past end of bvec iter\n")) { |
| 92 | 94 | iter->bi_size = 0; |
| 93 | 95 | return false; |
| 94 | 96 | } |
| 95 | 97 | |
| 96 | − while (bytes) { | |
| 97 | − const struct bio_vec *cur = bv + iter->bi_idx; | |
| 98 | − unsigned len = min3(bytes, iter->bi_size, | |
| 99 | − cur->bv_len - iter->bi_bvec_done); | |
| 100 | − | |
| 101 | − bytes -= len; | |
| 102 | − iter->bi_size -= len; | |
| 103 | − iter->bi_bvec_done += len; | |
| 98 | + iter->bi_size -= bytes; | |
| 99 | + bytes += iter->bi_bvec_done; | |
| 104 | 100 | |
| 105 | − if (iter->bi_bvec_done == cur->bv_len) { | |
| 106 | − iter->bi_bvec_done = 0; | |
| 107 | − iter->bi_idx++; | |
| 108 | − } | |
| 101 | + while (bytes && bytes >= bv[idx].bv_len) { | |
| 102 | + bytes -= bv[idx].bv_len; | |
| 103 | + idx++; | |
| 109 | 104 | } |
| 105 | + | |
| 106 | + iter->bi_idx = idx; | |
| 107 | + iter->bi_bvec_done = bytes; | |
| 110 | 108 | return true; |
| 111 | 109 | } |
| 112 | 110 | |
| @@ -280,10 +280,12 @@ extern const char *ceph_msg_type_name(int type); · 279 unmodified lines | ||
| 280 | 280 | extern int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid); |
| 281 | 281 | extern void *ceph_kvmalloc(size_t size, gfp_t flags); |
| 282 | 282 | |
| 283 | −extern struct ceph_options *ceph_parse_options(char *options, | |
| 284 | − const char *dev_name, const char *dev_name_end, | |
| 285 | − int (*parse_extra_token)(char *c, void *private), | |
| 286 | − void *private); | |
| 283 | +struct fs_parameter; | |
| 284 | +struct ceph_options *ceph_alloc_options(void); | |
| 285 | +int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, | |
| 286 | + struct fs_context *fc); | |
| 287 | +int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, | |
| 288 | + struct fs_context *fc); | |
| 287 | 289 | int ceph_print_client_options(struct seq_file *m, struct ceph_client *client, |
| 288 | 290 | bool show_all); |
| 289 | 291 | extern void ceph_destroy_options(struct ceph_options *opt); |
| @@ -33,6 +33,13 @@ cpufreq_cooling_register(struct cpufreq_policy *policy); · 32 unmodified lines | ||
| 33 | 33 | */ |
| 34 | 34 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); |
| 35 | 35 | |
| 36 | +/** | |
| 37 | + * of_cpufreq_cooling_register - create cpufreq cooling device based on DT. | |
| 38 | + * @policy: cpufreq policy. | |
| 39 | + */ | |
| 40 | +struct thermal_cooling_device * | |
| 41 | +of_cpufreq_cooling_register(struct cpufreq_policy *policy); | |
| 42 | + | |
| 36 | 43 | #else /* !CONFIG_CPU_THERMAL */ |
| 37 | 44 | static inline struct thermal_cooling_device * |
| 38 | 45 | cpufreq_cooling_register(struct cpufreq_policy *policy) |
| @@ -45,21 +52,12 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) · 6 unmodified lines | ||
| 45 | 52 | { |
| 46 | 53 | return; |
| 47 | 54 | } |
| 48 | −#endif /* CONFIG_CPU_THERMAL */ | |
| 49 | 55 | |
| 50 | −#if defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL) | |
| 51 | −/** | |
| 52 | − * of_cpufreq_cooling_register - create cpufreq cooling device based on DT. | |
| 53 | − * @policy: cpufreq policy. | |
| 54 | − */ | |
| 55 | −struct thermal_cooling_device * | |
| 56 | −of_cpufreq_cooling_register(struct cpufreq_policy *policy); | |
| 57 | −#else | |
| 58 | 56 | static inline struct thermal_cooling_device * |
| 59 | 57 | of_cpufreq_cooling_register(struct cpufreq_policy *policy) |
| 60 | 58 | { |
| 61 | 59 | return NULL; |
| 62 | 60 | } |
| 63 | −#endif /* defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL) */ | |
| 61 | +#endif /* CONFIG_CPU_THERMAL */ | |
| 64 | 62 | |
| 65 | 63 | #endif /* __CPU_COOLING_H__ */ |
| @@ -595,17 +595,6 @@ struct governor_attr { · 594 unmodified lines | ||
| 595 | 595 | size_t count); |
| 596 | 596 | }; |
| 597 | 597 | |
| 598 | −static inline bool cpufreq_this_cpu_can_update(struct cpufreq_policy *policy) | |
| 599 | −{ | |
| 600 | − /* | |
| 601 | − * Allow remote callbacks if: | |
| 602 | − * - dvfs_possible_from_any_cpu flag is set | |
| 603 | − * - the local and remote CPUs share cpufreq policy | |
| 604 | − */ | |
| 605 | − return policy->dvfs_possible_from_any_cpu || | |
| 606 | − cpumask_test_cpu(smp_processor_id(), policy->cpus); | |
| 607 | −} | |
| 608 | − | |
| 609 | 598 | /********************************************************************* |
| 610 | 599 | * FREQUENCY TABLE HELPERS * |
| 611 | 600 | *********************************************************************/ |
| @@ -54,7 +54,6 @@ struct cpuidle_state { · 53 unmodified lines | ||
| 54 | 54 | unsigned int exit_latency; /* in US */ |
| 55 | 55 | int power_usage; /* in mW */ |
| 56 | 56 | unsigned int target_residency; /* in US */ |
| 57 | − bool disabled; /* disabled on all CPUs */ | |
| 58 | 57 | |
| 59 | 58 | int (*enter) (struct cpuidle_device *dev, |
| 60 | 59 | struct cpuidle_driver *drv, |
| @@ -77,6 +76,7 @@ struct cpuidle_state { · 16 unmodified lines | ||
| 77 | 76 | #define CPUIDLE_FLAG_POLLING BIT(0) /* polling state */ |
| 78 | 77 | #define CPUIDLE_FLAG_COUPLED BIT(1) /* state applies to multiple cpus */ |
| 79 | 78 | #define CPUIDLE_FLAG_TIMER_STOP BIT(2) /* timer is stopped on this state */ |
| 79 | +#define CPUIDLE_FLAG_UNUSABLE BIT(3) /* avoid using this state */ | |
| 80 | 80 | |
| 81 | 81 | struct cpuidle_device_kobj; |
| 82 | 82 | struct cpuidle_state_kobj; |
| @@ -440,6 +440,11 @@ static inline bool d_is_negative(const struct dentry *dentry) · 439 unmodified lines | ||
| 440 | 440 | return d_is_miss(dentry); |
| 441 | 441 | } |
| 442 | 442 | |
| 443 | +static inline bool d_flags_negative(unsigned flags) | |
| 444 | +{ | |
| 445 | + return (flags & DCACHE_ENTRY_TYPE) == DCACHE_MISS_TYPE; | |
| 446 | +} | |
| 447 | + | |
| 443 | 448 | static inline bool d_is_positive(const struct dentry *dentry) |
| 444 | 449 | { |
| 445 | 450 | return !d_is_negative(dentry); |
| @@ -13,6 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <linux/device.h> |
| 14 | 14 | #include <linux/notifier.h> |
| 15 | 15 | #include <linux/pm_opp.h> |
| 16 | +#include <linux/pm_qos.h> | |
| 16 | 17 | |
| 17 | 18 | #define DEVFREQ_NAME_LEN 16 |
| 18 | 19 | |
| @@ -123,8 +124,8 @@ struct devfreq_dev_profile { · 104 unmodified lines | ||
| 123 | 124 | * @previous_freq: previously configured frequency value. |
| 124 | 125 | * @data: Private data of the governor. The devfreq framework does not |
| 125 | 126 | * touch this. |
| 126 | − * @min_freq: Limit minimum frequency requested by user (0: none) | |
| 127 | − * @max_freq: Limit maximum frequency requested by user (0: none) | |
| 127 | + * @user_min_freq_req: PM QoS minimum frequency request from user (via sysfs) | |
| 128 | + * @user_max_freq_req: PM QoS maximum frequency request from user (via sysfs) | |
| 128 | 129 | * @scaling_min_freq: Limit minimum frequency requested by OPP interface |
| 129 | 130 | * @scaling_max_freq: Limit maximum frequency requested by OPP interface |
| 130 | 131 | * @stop_polling: devfreq polling status of a device. |
| @@ -136,6 +137,8 @@ struct devfreq_dev_profile { · 5 unmodified lines | ||
| 136 | 137 | * @time_in_state: Statistics of devfreq states |
| 137 | 138 | * @last_stat_updated: The last time stat updated |
| 138 | 139 | * @transition_notifier_list: list head of DEVFREQ_TRANSITION_NOTIFIER notifier |
| 140 | + * @nb_min: Notifier block for DEV_PM_QOS_MIN_FREQUENCY | |
| 141 | + * @nb_max: Notifier block for DEV_PM_QOS_MAX_FREQUENCY | |
| 139 | 142 | * |
| 140 | 143 | * This structure stores the devfreq information for a give device. |
| 141 | 144 | * |
| @@ -161,8 +164,8 @@ struct devfreq { · 19 unmodified lines | ||
| 161 | 164 | |
| 162 | 165 | void *data; /* private data for governors */ |
| 163 | 166 | |
| 164 | − unsigned long min_freq; | |
| 165 | − unsigned long max_freq; | |
| 167 | + struct dev_pm_qos_request user_min_freq_req; | |
| 168 | + struct dev_pm_qos_request user_max_freq_req; | |
| 166 | 169 | unsigned long scaling_min_freq; |
| 167 | 170 | unsigned long scaling_max_freq; |
| 168 | 171 | bool stop_polling; |
| @@ -178,6 +181,9 @@ struct devfreq { · 9 unmodified lines | ||
| 178 | 181 | unsigned long last_stat_updated; |
| 179 | 182 | |
| 180 | 183 | struct srcu_notifier_head transition_notifier_list; |
| 184 | + | |
| 185 | + struct notifier_block nb_min; | |
| 186 | + struct notifier_block nb_max; | |
| 181 | 187 | }; |
| 182 | 188 | |
| 183 | 189 | struct devfreq_freqs { |
| @@ -1666,11 +1666,11 @@ extern bool kill_device(struct device *dev); · 1665 unmodified lines | ||
| 1666 | 1666 | #ifdef CONFIG_DEVTMPFS |
| 1667 | 1667 | extern int devtmpfs_create_node(struct device *dev); |
| 1668 | 1668 | extern int devtmpfs_delete_node(struct device *dev); |
| 1669 | −extern int devtmpfs_mount(const char *mntdir); | |
| 1669 | +extern int devtmpfs_mount(void); | |
| 1670 | 1670 | #else |
| 1671 | 1671 | static inline int devtmpfs_create_node(struct device *dev) { return 0; } |
| 1672 | 1672 | static inline int devtmpfs_delete_node(struct device *dev) { return 0; } |
| 1673 | −static inline int devtmpfs_mount(const char *mountpoint) { return 0; } | |
| 1673 | +static inline int devtmpfs_mount(void) { return 0; } | |
| 1674 | 1674 | #endif |
| 1675 | 1675 | |
| 1676 | 1676 | /* drivers/base/power/shutdown.c */ |
| @@ -824,7 +824,7 @@ typedef struct { · 823 unmodified lines | ||
| 824 | 824 | __aligned_u64 image_size; |
| 825 | 825 | unsigned int image_code_type; |
| 826 | 826 | unsigned int image_data_type; |
| 827 | − unsigned long unload; | |
| 827 | + u32 unload; | |
| 828 | 828 | } efi_loaded_image_32_t; |
| 829 | 829 | |
| 830 | 830 | typedef struct { |
| @@ -840,14 +840,14 @@ typedef struct { · 9 unmodified lines | ||
| 840 | 840 | __aligned_u64 image_size; |
| 841 | 841 | unsigned int image_code_type; |
| 842 | 842 | unsigned int image_data_type; |
| 843 | − unsigned long unload; | |
| 843 | + u64 unload; | |
| 844 | 844 | } efi_loaded_image_64_t; |
| 845 | 845 | |
| 846 | 846 | typedef struct { |
| 847 | 847 | u32 revision; |
| 848 | − void *parent_handle; | |
| 848 | + efi_handle_t parent_handle; | |
| 849 | 849 | efi_system_table_t *system_table; |
| 850 | − void *device_handle; | |
| 850 | + efi_handle_t device_handle; | |
| 851 | 851 | void *file_path; |
| 852 | 852 | void *reserved; |
| 853 | 853 | u32 load_options_size; |
| @@ -856,7 +856,7 @@ typedef struct { · 2 unmodified lines | ||
| 856 | 856 | __aligned_u64 image_size; |
| 857 | 857 | unsigned int image_code_type; |
| 858 | 858 | unsigned int image_data_type; |
| 859 | − unsigned long unload; | |
| 859 | + efi_status_t (*unload)(efi_handle_t image_handle); | |
| 860 | 860 | } efi_loaded_image_t; |
| 861 | 861 | |
| 862 | 862 | |
| @@ -9,7 +9,6 @@ · 8 unmodified lines | ||
| 9 | 9 | #include <linux/sched/topology.h> |
| 10 | 10 | #include <linux/types.h> |
| 11 | 11 | |
| 12 | −#ifdef CONFIG_ENERGY_MODEL | |
| 13 | 12 | /** |
| 14 | 13 | * em_cap_state - Capacity state of a performance domain |
| 15 | 14 | * @frequency: The CPU frequency in KHz, for consistency with CPUFreq |
| @@ -40,6 +39,7 @@ struct em_perf_domain { · 24 unmodified lines | ||
| 40 | 39 | unsigned long cpus[0]; |
| 41 | 40 | }; |
| 42 | 41 | |
| 42 | +#ifdef CONFIG_ENERGY_MODEL | |
| 43 | 43 | #define EM_CPU_MAX_POWER 0xFFFF |
| 44 | 44 | |
| 45 | 45 | struct em_data_callback { |
| @@ -160,7 +160,6 @@ static inline int em_pd_nr_cap_states(struct em_perf_domain *pd) · 114 unmodified lines | ||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | #else |
| 163 | −struct em_perf_domain {}; | |
| 164 | 163 | struct em_data_callback {}; |
| 165 | 164 | #define EM_DATA_CB(_active_power_cb) { } |
| 166 | 165 | |
| @@ -47,7 +47,7 @@ extern struct module __this_module; · 46 unmodified lines | ||
| 47 | 47 | * absolute relocations that require runtime processing on relocatable |
| 48 | 48 | * kernels. |
| 49 | 49 | */ |
| 50 | −#define __KSYMTAB_ENTRY_NS(sym, sec) \ | |
| 50 | +#define __KSYMTAB_ENTRY(sym, sec) \ | |
| 51 | 51 | __ADDRESSABLE(sym) \ |
| 52 | 52 | asm(" .section \"___ksymtab" sec "+" #sym "\", \"a\" \n" \ |
| 53 | 53 | " .balign 4 \n" \ |
| @@ -57,33 +57,17 @@ extern struct module __this_module; · 3 unmodified lines | ||
| 57 | 57 | " .long __kstrtabns_" #sym "- . \n" \ |
| 58 | 58 | " .previous \n") |
| 59 | 59 | |
| 60 | −#define __KSYMTAB_ENTRY(sym, sec) \ | |
| 61 | − __ADDRESSABLE(sym) \ | |
| 62 | − asm(" .section \"___ksymtab" sec "+" #sym "\", \"a\" \n" \ | |
| 63 | − " .balign 4 \n" \ | |
| 64 | − "__ksymtab_" #sym ": \n" \ | |
| 65 | − " .long " #sym "- . \n" \ | |
| 66 | − " .long __kstrtab_" #sym "- . \n" \ | |
| 67 | − " .long 0 \n" \ | |
| 68 | − " .previous \n") | |
| 69 | − | |
| 70 | 60 | struct kernel_symbol { |
| 71 | 61 | int value_offset; |
| 72 | 62 | int name_offset; |
| 73 | 63 | int namespace_offset; |
| 74 | 64 | }; |
| 75 | 65 | #else |
| 76 | −#define __KSYMTAB_ENTRY_NS(sym, sec) \ | |
| 77 | − static const struct kernel_symbol __ksymtab_##sym \ | |
| 78 | − __attribute__((section("___ksymtab" sec "+" #sym), used)) \ | |
| 79 | − __aligned(sizeof(void *)) \ | |
| 80 | − = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym } | |
| 81 | − | |
| 82 | 66 | #define __KSYMTAB_ENTRY(sym, sec) \ |
| 83 | 67 | static const struct kernel_symbol __ksymtab_##sym \ |
| 84 | 68 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ |
| 85 | 69 | __aligned(sizeof(void *)) \ |
| 86 | − = { (unsigned long)&sym, __kstrtab_##sym, NULL } | |
| 70 | + = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym } | |
| 87 | 71 | |
| 88 | 72 | struct kernel_symbol { |
| 89 | 73 | unsigned long value; |
| @@ -94,28 +78,20 @@ struct kernel_symbol { · 4 unmodified lines | ||
| 94 | 78 | |
| 95 | 79 | #ifdef __GENKSYMS__ |
| 96 | 80 | |
| 97 | −#define ___EXPORT_SYMBOL(sym,sec) __GENKSYMS_EXPORT_SYMBOL(sym) | |
| 98 | −#define ___EXPORT_SYMBOL_NS(sym,sec,ns) __GENKSYMS_EXPORT_SYMBOL(sym) | |
| 81 | +#define ___EXPORT_SYMBOL(sym, sec, ns) __GENKSYMS_EXPORT_SYMBOL(sym) | |
| 99 | 82 | |
| 100 | 83 | #else |
| 101 | 84 | |
| 102 | −#define ___export_symbol_common(sym, sec) \ | |
| 85 | +/* For every exported symbol, place a struct in the __ksymtab section */ | |
| 86 | +#define ___EXPORT_SYMBOL(sym, sec, ns) \ | |
| 103 | 87 | extern typeof(sym) sym; \ |
| 104 | 88 | __CRC_SYMBOL(sym, sec); \ |
| 105 | 89 | static const char __kstrtab_##sym[] \ |
| 106 | 90 | __attribute__((section("__ksymtab_strings"), used, aligned(1))) \ |
| 107 | − = #sym \ | |
| 108 | − | |
| 109 | −/* For every exported symbol, place a struct in the __ksymtab section */ | |
| 110 | −#define ___EXPORT_SYMBOL_NS(sym, sec, ns) \ | |
| 111 | − ___export_symbol_common(sym, sec); \ | |
| 91 | + = #sym; \ | |
| 112 | 92 | static const char __kstrtabns_##sym[] \ |
| 113 | 93 | __attribute__((section("__ksymtab_strings"), used, aligned(1))) \ |
| 114 | − = #ns; \ | |
| 115 | − __KSYMTAB_ENTRY_NS(sym, sec) | |
| 116 | − | |
| 117 | −#define ___EXPORT_SYMBOL(sym, sec) \ | |
| 118 | − ___export_symbol_common(sym, sec); \ | |
| 94 | + = ns; \ | |
| 119 | 95 | __KSYMTAB_ENTRY(sym, sec) |
| 120 | 96 | |
| 121 | 97 | #endif |
| @@ -127,8 +103,7 @@ struct kernel_symbol { · 5 unmodified lines | ||
| 127 | 103 | * be reused in other execution contexts such as the UEFI stub or the |
| 128 | 104 | * decompressor. |
| 129 | 105 | */ |
| 130 | −#define __EXPORT_SYMBOL_NS(sym, sec, ns) | |
| 131 | −#define __EXPORT_SYMBOL(sym, sec) | |
| 106 | +#define __EXPORT_SYMBOL(sym, sec, ns) | |
| 132 | 107 | |
| 133 | 108 | #elif defined(CONFIG_TRIM_UNUSED_KSYMS) |
| 134 | 109 | |
| @@ -144,48 +119,38 @@ struct kernel_symbol { · 9 unmodified lines | ||
| 144 | 119 | #define __ksym_marker(sym) \ |
| 145 | 120 | static int __ksym_marker_##sym[0] __section(".discard.ksym") __used |
| 146 | 121 | |
| 147 | −#define __EXPORT_SYMBOL(sym, sec) \ | |
| 148 | − __ksym_marker(sym); \ | |
| 149 | − __cond_export_sym(sym, sec, __is_defined(__KSYM_##sym)) | |
| 150 | −#define __cond_export_sym(sym, sec, conf) \ | |
| 151 | − ___cond_export_sym(sym, sec, conf) | |
| 152 | −#define ___cond_export_sym(sym, sec, enabled) \ | |
| 153 | − __cond_export_sym_##enabled(sym, sec) | |
| 154 | −#define __cond_export_sym_1(sym, sec) ___EXPORT_SYMBOL(sym, sec) | |
| 155 | −#define __cond_export_sym_0(sym, sec) /* nothing */ | |
| 156 | − | |
| 157 | −#define __EXPORT_SYMBOL_NS(sym, sec, ns) \ | |
| 122 | +#define __EXPORT_SYMBOL(sym, sec, ns) \ | |
| 158 | 123 | __ksym_marker(sym); \ |
| 159 | − __cond_export_ns_sym(sym, sec, ns, __is_defined(__KSYM_##sym)) | |
| 160 | −#define __cond_export_ns_sym(sym, sec, ns, conf) \ | |
| 161 | − ___cond_export_ns_sym(sym, sec, ns, conf) | |
| 162 | −#define ___cond_export_ns_sym(sym, sec, ns, enabled) \ | |
| 163 | − __cond_export_ns_sym_##enabled(sym, sec, ns) | |
| 164 | −#define __cond_export_ns_sym_1(sym, sec, ns) ___EXPORT_SYMBOL_NS(sym, sec, ns) | |
| 165 | −#define __cond_export_ns_sym_0(sym, sec, ns) /* nothing */ | |
| 124 | + __cond_export_sym(sym, sec, ns, __is_defined(__KSYM_##sym)) | |
| 125 | +#define __cond_export_sym(sym, sec, ns, conf) \ | |
| 126 | + ___cond_export_sym(sym, sec, ns, conf) | |
| 127 | +#define ___cond_export_sym(sym, sec, ns, enabled) \ | |
| 128 | + __cond_export_sym_##enabled(sym, sec, ns) | |
| 129 | +#define __cond_export_sym_1(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns) | |
| 130 | +#define __cond_export_sym_0(sym, sec, ns) /* nothing */ | |
| 166 | 131 | |
| 167 | 132 | #else |
| 168 | 133 | |
| 169 | −#define __EXPORT_SYMBOL_NS(sym,sec,ns) ___EXPORT_SYMBOL_NS(sym,sec,ns) | |
| 170 | −#define __EXPORT_SYMBOL(sym,sec) ___EXPORT_SYMBOL(sym,sec) | |
| 134 | +#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns) | |
| 171 | 135 | |
| 172 | 136 | #endif /* CONFIG_MODULES */ |
| 173 | 137 | |
| 174 | 138 | #ifdef DEFAULT_SYMBOL_NAMESPACE |
| 175 | −#undef __EXPORT_SYMBOL | |
| 176 | −#define __EXPORT_SYMBOL(sym, sec) \ | |
| 177 | − __EXPORT_SYMBOL_NS(sym, sec, DEFAULT_SYMBOL_NAMESPACE) | |
| 139 | +#include <linux/stringify.h> | |
| 140 | +#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, __stringify(DEFAULT_SYMBOL_NAMESPACE)) | |
| 141 | +#else | |
| 142 | +#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "") | |
| 178 | 143 | #endif |
| 179 | 144 | |
| 180 | −#define EXPORT_SYMBOL(sym) __EXPORT_SYMBOL(sym, "") | |
| 181 | −#define EXPORT_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_gpl") | |
| 182 | −#define EXPORT_SYMBOL_GPL_FUTURE(sym) __EXPORT_SYMBOL(sym, "_gpl_future") | |
| 183 | −#define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL_NS(sym, "", ns) | |
| 184 | −#define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL_NS(sym, "_gpl", ns) | |
| 145 | +#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "") | |
| 146 | +#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl") | |
| 147 | +#define EXPORT_SYMBOL_GPL_FUTURE(sym) _EXPORT_SYMBOL(sym, "_gpl_future") | |
| 148 | +#define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL(sym, "", #ns) | |
| 149 | +#define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL(sym, "_gpl", #ns) | |
| 185 | 150 | |
| 186 | 151 | #ifdef CONFIG_UNUSED_SYMBOLS |
| 187 | −#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused") | |
| 188 | −#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl") | |
| 152 | +#define EXPORT_UNUSED_SYMBOL(sym) _EXPORT_SYMBOL(sym, "_unused") | |
| 153 | +#define EXPORT_UNUSED_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_unused_gpl") | |
| 189 | 154 | #else |
| 190 | 155 | #define EXPORT_UNUSED_SYMBOL(sym) |
| 191 | 156 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) |
| @@ -420,7 +420,7 @@ static inline bool insn_is_zext(const struct bpf_insn *insn) · 419 unmodified lines | ||
| 420 | 420 | |
| 421 | 421 | #define BPF_FIELD_SIZEOF(type, field) \ |
| 422 | 422 | ({ \ |
| 423 | − const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \ | |
| 423 | + const int __size = bytes_to_bpf_size(sizeof_field(type, field)); \ | |
| 424 | 424 | BUILD_BUG_ON(__size < 0); \ |
| 425 | 425 | __size; \ |
| 426 | 426 | }) |
| @@ -497,7 +497,7 @@ static inline bool insn_is_zext(const struct bpf_insn *insn) · 70 unmodified lines | ||
| 497 | 497 | |
| 498 | 498 | #define bpf_target_off(TYPE, MEMBER, SIZE, PTR_SIZE) \ |
| 499 | 499 | ({ \ |
| 500 | − BUILD_BUG_ON(FIELD_SIZEOF(TYPE, MEMBER) != (SIZE)); \ | |
| 500 | + BUILD_BUG_ON(sizeof_field(TYPE, MEMBER) != (SIZE)); \ | |
| 501 | 501 | *(PTR_SIZE) = (SIZE); \ |
| 502 | 502 | offsetof(TYPE, MEMBER); \ |
| 503 | 503 | }) |
| @@ -608,7 +608,7 @@ static inline void bpf_compute_data_pointers(struct sk_buff *skb) · 104 unmodified lines | ||
| 608 | 608 | { |
| 609 | 609 | struct bpf_skb_data_end *cb = (struct bpf_skb_data_end *)skb->cb; |
| 610 | 610 | |
| 611 | − BUILD_BUG_ON(sizeof(*cb) > FIELD_SIZEOF(struct sk_buff, cb)); | |
| 611 | + BUILD_BUG_ON(sizeof(*cb) > sizeof_field(struct sk_buff, cb)); | |
| 612 | 612 | cb->data_meta = skb->data - skb_metadata_len(skb); |
| 613 | 613 | cb->data_end = skb->data + skb_headlen(skb); |
| 614 | 614 | } |
| @@ -646,9 +646,9 @@ static inline u8 *bpf_skb_cb(struct sk_buff *skb) · 31 unmodified lines | ||
| 646 | 646 | * attached to sockets, we need to clear the bpf_skb_cb() area |
| 647 | 647 | * to not leak previous contents to user space. |
| 648 | 648 | */ |
| 649 | − BUILD_BUG_ON(FIELD_SIZEOF(struct __sk_buff, cb) != BPF_SKB_CB_LEN); | |
| 650 | − BUILD_BUG_ON(FIELD_SIZEOF(struct __sk_buff, cb) != | |
| 651 | − FIELD_SIZEOF(struct qdisc_skb_cb, data)); | |
| 649 | + BUILD_BUG_ON(sizeof_field(struct __sk_buff, cb) != BPF_SKB_CB_LEN); | |
| 650 | + BUILD_BUG_ON(sizeof_field(struct __sk_buff, cb) != | |
| 651 | + sizeof_field(struct qdisc_skb_cb, data)); | |
| 652 | 652 | |
| 653 | 653 | return qdisc_skb_cb(skb)->data; |
| 654 | 654 | } |
| @@ -776,8 +776,12 @@ bpf_ctx_narrow_access_offset(u32 off, u32 size, u32 size_default) · 121 unmodified lines | ||
| 776 | 776 | |
| 777 | 777 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) |
| 778 | 778 | { |
| 779 | − set_vm_flush_reset_perms(fp); | |
| 780 | − set_memory_ro((unsigned long)fp, fp->pages); | |
| 779 | +#ifndef CONFIG_BPF_JIT_ALWAYS_ON | |
| 780 | + if (!fp->jited) { | |
| 781 | + set_vm_flush_reset_perms(fp); | |
| 782 | + set_memory_ro((unsigned long)fp, fp->pages); | |
| 783 | + } | |
| 784 | +#endif | |
| 781 | 785 | } |
| 782 | 786 | |
| 783 | 787 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) |
| @@ -16,11 +16,14 @@ enum { · 15 unmodified lines | ||
| 16 | 16 | |
| 17 | 17 | struct meson_sm_firmware; |
| 18 | 18 | |
| 19 | −int meson_sm_call(unsigned int cmd_index, u32 *ret, u32 arg0, u32 arg1, | |
| 20 | − u32 arg2, u32 arg3, u32 arg4); | |
| 21 | −int meson_sm_call_write(void *buffer, unsigned int b_size, unsigned int cmd_index, | |
| 22 | − u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4); | |
| 23 | −int meson_sm_call_read(void *buffer, unsigned int bsize, unsigned int cmd_index, | |
| 24 | − u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4); | |
| 19 | +int meson_sm_call(struct meson_sm_firmware *fw, unsigned int cmd_index, | |
| 20 | + u32 *ret, u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4); | |
| 21 | +int meson_sm_call_write(struct meson_sm_firmware *fw, void *buffer, | |
| 22 | + unsigned int b_size, unsigned int cmd_index, u32 arg0, | |
| 23 | + u32 arg1, u32 arg2, u32 arg3, u32 arg4); | |
| 24 | +int meson_sm_call_read(struct meson_sm_firmware *fw, void *buffer, | |
| 25 | + unsigned int bsize, unsigned int cmd_index, u32 arg0, | |
| 26 | + u32 arg1, u32 arg2, u32 arg3, u32 arg4); | |
| 27 | +struct meson_sm_firmware *meson_sm_get(struct device_node *firmware_node); | |
| 25 | 28 | |
| 26 | 29 | #endif /* _MESON_SM_FW_H_ */ |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | /* |
| 3 | 3 | * Xilinx Zynq MPSoC Firmware layer |
| 4 | 4 | * |
| 5 | − * Copyright (C) 2014-2018 Xilinx | |
| 5 | + * Copyright (C) 2014-2019 Xilinx | |
| 6 | 6 | * |
| 7 | 7 | * Michal Simek <michal.simek@xilinx.com> |
| 8 | 8 | * Davorin Mista <davorin.mista@aggios.com> |
| @@ -46,6 +46,7 @@ · 37 unmodified lines | ||
| 46 | 46 | #define ZYNQMP_PM_CAPABILITY_ACCESS 0x1U |
| 47 | 47 | #define ZYNQMP_PM_CAPABILITY_CONTEXT 0x2U |
| 48 | 48 | #define ZYNQMP_PM_CAPABILITY_WAKEUP 0x4U |
| 49 | +#define ZYNQMP_PM_CAPABILITY_UNUSABLE 0x8U | |
| 49 | 50 | |
| 50 | 51 | /* |
| 51 | 52 | * Firmware FPGA Manager flags |
| @@ -264,6 +264,7 @@ int ftrace_modify_direct_caller(struct ftrace_func_entry *entry, · 263 unmodified lines | ||
| 264 | 264 | struct dyn_ftrace *rec, |
| 265 | 265 | unsigned long old_addr, |
| 266 | 266 | unsigned long new_addr); |
| 267 | +unsigned long ftrace_find_rec_direct(unsigned long ip); | |
| 267 | 268 | #else |
| 268 | 269 | # define ftrace_direct_func_count 0 |
| 269 | 270 | static inline int register_ftrace_direct(unsigned long ip, unsigned long addr) |
| @@ -290,6 +291,10 @@ static inline int ftrace_modify_direct_caller(struct ftrace_func_entry *entry, · 20 unmodified lines | ||
| 290 | 291 | { |
| 291 | 292 | return -ENODEV; |
| 292 | 293 | } |
| 294 | +static inline unsigned long ftrace_find_rec_direct(unsigned long ip) | |
| 295 | +{ | |
| 296 | + return 0; | |
| 297 | +} | |
| 293 | 298 | #endif /* CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS */ |
| 294 | 299 | |
| 295 | 300 | #ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS |
| @@ -206,7 +206,7 @@ extern struct gen_pool *devm_gen_pool_create(struct device *dev, · 205 unmodified lines | ||
| 206 | 206 | int min_alloc_order, int nid, const char *name); |
| 207 | 207 | extern struct gen_pool *gen_pool_get(struct device *dev, const char *name); |
| 208 | 208 | |
| 209 | −bool addr_in_gen_pool(struct gen_pool *pool, unsigned long start, | |
| 209 | +extern bool gen_pool_has_addr(struct gen_pool *pool, unsigned long start, | |
| 210 | 210 | size_t size); |
| 211 | 211 | |
| 212 | 212 | #ifdef CONFIG_OF |
| @@ -300,6 +300,7 @@ struct i2c_driver { · 299 unmodified lines | ||
| 300 | 300 | * generic enough to hide second-sourcing and compatible revisions. |
| 301 | 301 | * @adapter: manages the bus segment hosting this I2C device |
| 302 | 302 | * @dev: Driver model device node for the slave. |
| 303 | + * @init_irq: IRQ that was set at initialization | |
| 303 | 304 | * @irq: indicates the IRQ generated by this device (if any) |
| 304 | 305 | * @detected: member of an i2c_driver.clients list or i2c-core's |
| 305 | 306 | * userspace_devices list |
| @@ -466,12 +467,6 @@ i2c_new_probed_device(struct i2c_adapter *adap, · 160 unmodified lines | ||
| 466 | 467 | /* Common custom probe functions */ |
| 467 | 468 | extern int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr); |
| 468 | 469 | |
| 469 | −/* For devices that use several addresses, use i2c_new_dummy() to make | |
| 470 | − * client handles for the extra addresses. | |
| 471 | − */ | |
| 472 | −extern struct i2c_client * | |
| 473 | −i2c_new_dummy(struct i2c_adapter *adap, u16 address); | |
| 474 | − | |
| 475 | 470 | extern struct i2c_client * |
| 476 | 471 | i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address); |
| 477 | 472 | |
| @@ -856,6 +851,11 @@ extern void i2c_del_driver(struct i2c_driver *driver); · 378 unmodified lines | ||
| 856 | 851 | #define i2c_add_driver(driver) \ |
| 857 | 852 | i2c_register_driver(THIS_MODULE, driver) |
| 858 | 853 | |
| 854 | +static inline bool i2c_client_has_driver(struct i2c_client *client) | |
| 855 | +{ | |
| 856 | + return !IS_ERR_OR_NULL(client) && client->dev.driver; | |
| 857 | +} | |
| 858 | + | |
| 859 | 859 | /* call the i2c_client->command() of all attached clients with |
| 860 | 860 | * the given arguments */ |
| 861 | 861 | extern void i2c_clients_command(struct i2c_adapter *adap, |
| @@ -28,3 +28,5 @@ extern unsigned int real_root_dev; · 27 unmodified lines | ||
| 28 | 28 | |
| 29 | 29 | extern char __initramfs_start[]; |
| 30 | 30 | extern unsigned long __initramfs_size; |
| 31 | + | |
| 32 | +void console_on_rootfs(void); | |
| @@ -457,7 +457,7 @@ struct jbd2_revoke_table_s; · 456 unmodified lines | ||
| 457 | 457 | * @h_journal: Which journal handle belongs to - used iff h_reserved set. |
| 458 | 458 | * @h_rsv_handle: Handle reserved for finishing the logical operation. |
| 459 | 459 | * @h_total_credits: Number of remaining buffers we are allowed to add to |
| 460 | − journal. These are dirty buffers and revoke descriptor blocks. | |
| 460 | + * journal. These are dirty buffers and revoke descriptor blocks. | |
| 461 | 461 | * @h_revoke_credits: Number of remaining revoke records available for handle |
| 462 | 462 | * @h_ref: Reference count on this handle. |
| 463 | 463 | * @h_err: Field for caller's use to track errors through large fs operations. |
| @@ -205,20 +205,23 @@ static inline void *kasan_reset_tag(const void *addr) · 204 unmodified lines | ||
| 205 | 205 | #endif /* CONFIG_KASAN_SW_TAGS */ |
| 206 | 206 | |
| 207 | 207 | #ifdef CONFIG_KASAN_VMALLOC |
| 208 | −int kasan_populate_vmalloc(unsigned long requested_size, | |
| 209 | − struct vm_struct *area); | |
| 210 | −void kasan_poison_vmalloc(void *start, unsigned long size); | |
| 208 | +int kasan_populate_vmalloc(unsigned long addr, unsigned long size); | |
| 209 | +void kasan_poison_vmalloc(const void *start, unsigned long size); | |
| 210 | +void kasan_unpoison_vmalloc(const void *start, unsigned long size); | |
| 211 | 211 | void kasan_release_vmalloc(unsigned long start, unsigned long end, |
| 212 | 212 | unsigned long free_region_start, |
| 213 | 213 | unsigned long free_region_end); |
| 214 | 214 | #else |
| 215 | −static inline int kasan_populate_vmalloc(unsigned long requested_size, | |
| 216 | − struct vm_struct *area) | |
| 215 | +static inline int kasan_populate_vmalloc(unsigned long start, | |
| 216 | + unsigned long size) | |
| 217 | 217 | { |
| 218 | 218 | return 0; |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | −static inline void kasan_poison_vmalloc(void *start, unsigned long size) {} | |
| 221 | +static inline void kasan_poison_vmalloc(const void *start, unsigned long size) | |
| 222 | +{ } | |
| 223 | +static inline void kasan_unpoison_vmalloc(const void *start, unsigned long size) | |
| 224 | +{ } | |
| 222 | 225 | static inline void kasan_release_vmalloc(unsigned long start, |
| 223 | 226 | unsigned long end, |
| 224 | 227 | unsigned long free_region_start, |
| @@ -37,12 +37,35 @@ do { \ · 36 unmodified lines | ||
| 37 | 37 | (t)->kcov_mode &= ~KCOV_IN_CTXSW; \ |
| 38 | 38 | } while (0) |
| 39 | 39 | |
| 40 | +/* See Documentation/dev-tools/kcov.rst for usage details. */ | |
| 41 | +void kcov_remote_start(u64 handle); | |
| 42 | +void kcov_remote_stop(void); | |
| 43 | +u64 kcov_common_handle(void); | |
| 44 | + | |
| 45 | +static inline void kcov_remote_start_common(u64 id) | |
| 46 | +{ | |
| 47 | + kcov_remote_start(kcov_remote_handle(KCOV_SUBSYSTEM_COMMON, id)); | |
| 48 | +} | |
| 49 | + | |
| 50 | +static inline void kcov_remote_start_usb(u64 id) | |
| 51 | +{ | |
| 52 | + kcov_remote_start(kcov_remote_handle(KCOV_SUBSYSTEM_USB, id)); | |
| 53 | +} | |
| 54 | + | |
| 40 | 55 | #else |
| 41 | 56 | |
| 42 | 57 | static inline void kcov_task_init(struct task_struct *t) {} |
| 43 | 58 | static inline void kcov_task_exit(struct task_struct *t) {} |
| 44 | 59 | static inline void kcov_prepare_switch(struct task_struct *t) {} |
| 45 | 60 | static inline void kcov_finish_switch(struct task_struct *t) {} |
| 61 | +static inline void kcov_remote_start(u64 handle) {} | |
| 62 | +static inline void kcov_remote_stop(void) {} | |
| 63 | +static inline u64 kcov_common_handle(void) | |
| 64 | +{ | |
| 65 | + return 0; | |
| 66 | +} | |
| 67 | +static inline void kcov_remote_start_common(u64 id) {} | |
| 68 | +static inline void kcov_remote_start_usb(u64 id) {} | |
| 46 | 69 | |
| 47 | 70 | #endif /* CONFIG_KCOV */ |
| 48 | 71 | #endif /* _LINUX_KCOV_H */ |
| @@ -348,8 +348,7 @@ int __must_check kstrtoll(const char *s, unsigned int base, long long *res); · 347 unmodified lines | ||
| 348 | 348 | * @res: Where to write the result of the conversion on success. |
| 349 | 349 | * |
| 350 | 350 | * Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing error. |
| 351 | − * Used as a replacement for the obsolete simple_strtoull. Return code must | |
| 352 | − * be checked. | |
| 351 | + * Used as a replacement for the simple_strtoull. Return code must be checked. | |
| 353 | 352 | */ |
| 354 | 353 | static inline int __must_check kstrtoul(const char *s, unsigned int base, unsigned long *res) |
| 355 | 354 | { |
| @@ -377,8 +376,7 @@ static inline int __must_check kstrtoul(const char *s, unsigned int base, unsign · 21 unmodified lines | ||
| 377 | 376 | * @res: Where to write the result of the conversion on success. |
| 378 | 377 | * |
| 379 | 378 | * Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing error. |
| 380 | − * Used as a replacement for the obsolete simple_strtoull. Return code must | |
| 381 | − * be checked. | |
| 379 | + * Used as a replacement for the simple_strtoull. Return code must be checked. | |
| 382 | 380 | */ |
| 383 | 381 | static inline int __must_check kstrtol(const char *s, unsigned int base, long *res) |
| 384 | 382 | { |
| @@ -454,7 +452,18 @@ static inline int __must_check kstrtos32_from_user(const char __user *s, size_t · 69 unmodified lines | ||
| 454 | 452 | return kstrtoint_from_user(s, count, base, res); |
| 455 | 453 | } |
| 456 | 454 | |
| 457 | −/* Obsolete, do not use. Use kstrto<foo> instead */ | |
| 455 | +/* | |
| 456 | + * Use kstrto<foo> instead. | |
| 457 | + * | |
| 458 | + * NOTE: simple_strto<foo> does not check for the range overflow and, | |
| 459 | + * depending on the input, may give interesting results. | |
| 460 | + * | |
| 461 | + * Use these functions if and only if you cannot use kstrto<foo>, because | |
| 462 | + * the conversion ends on the first non-digit character, which may be far | |
| 463 | + * beyond the supported range. It might be useful to parse the strings like | |
| 464 | + * 10x50 or 12:21 without altering original string or temporary buffer in use. | |
| 465 | + * Keep in mind above caveat. | |
| 466 | + */ | |
| 458 | 467 | |
| 459 | 468 | extern unsigned long simple_strtoul(const char *,char **,unsigned int); |
| 460 | 469 | extern long simple_strtol(const char *,char **,unsigned int); |
| @@ -149,7 +149,7 @@ static inline bool is_error_page(struct page *page) · 148 unmodified lines | ||
| 149 | 149 | #define KVM_REQUEST_ARCH_BASE 8 |
| 150 | 150 | |
| 151 | 151 | #define KVM_ARCH_REQ_FLAGS(nr, flags) ({ \ |
| 152 | − BUILD_BUG_ON((unsigned)(nr) >= (FIELD_SIZEOF(struct kvm_vcpu, requests) * 8) - KVM_REQUEST_ARCH_BASE); \ | |
| 152 | + BUILD_BUG_ON((unsigned)(nr) >= (sizeof_field(struct kvm_vcpu, requests) * 8) - KVM_REQUEST_ARCH_BASE); \ | |
| 153 | 153 | (unsigned)(((nr) + KVM_REQUEST_ARCH_BASE) | (flags)); \ |
| 154 | 154 | }) |
| 155 | 155 | #define KVM_ARCH_REQ(nr) KVM_ARCH_REQ_FLAGS(nr, 0) |
| @@ -10,8 +10,6 @@ · 9 unmodified lines | ||
| 10 | 10 | #ifndef LINUX_LOCKD_DEBUG_H |
| 11 | 11 | #define LINUX_LOCKD_DEBUG_H |
| 12 | 12 | |
| 13 | −#ifdef __KERNEL__ | |
| 14 | − | |
| 15 | 13 | #include <linux/sunrpc/debug.h> |
| 16 | 14 | |
| 17 | 15 | /* |
| @@ -25,8 +23,6 @@ · 7 unmodified lines | ||
| 25 | 23 | # define ifdebug(flag) if (0) |
| 26 | 24 | #endif |
| 27 | 25 | |
| 28 | −#endif /* __KERNEL__ */ | |
| 29 | − | |
| 30 | 26 | /* |
| 31 | 27 | * Debug flags |
| 32 | 28 | */ |
| @@ -10,8 +10,6 @@ · 9 unmodified lines | ||
| 10 | 10 | #ifndef LINUX_LOCKD_LOCKD_H |
| 11 | 11 | #define LINUX_LOCKD_LOCKD_H |
| 12 | 12 | |
| 13 | −#ifdef __KERNEL__ | |
| 14 | − | |
| 15 | 13 | #include <linux/in.h> |
| 16 | 14 | #include <linux/in6.h> |
| 17 | 15 | #include <net/ipv6.h> |
| @@ -373,6 +371,4 @@ static inline int nlm_compare_locks(const struct file_lock *fl1, · 355 unmodified lines | ||
| 373 | 371 | |
| 374 | 372 | extern const struct lock_manager_operations nlmsvc_lock_operations; |
| 375 | 373 | |
| 376 | −#endif /* __KERNEL__ */ | |
| 377 | − | |
| 378 | 374 | #endif /* LINUX_LOCKD_LOCKD_H */ |
| @@ -108,10 +108,10 @@ void logic_outsl(unsigned long addr, const void *buffer, unsigned int count); · 107 unmodified lines | ||
| 108 | 108 | * area by redefining the macro below. |
| 109 | 109 | */ |
| 110 | 110 | #define PIO_INDIRECT_SIZE 0x4000 |
| 111 | −#define MMIO_UPPER_LIMIT (IO_SPACE_LIMIT - PIO_INDIRECT_SIZE) | |
| 112 | 111 | #else |
| 113 | −#define MMIO_UPPER_LIMIT IO_SPACE_LIMIT | |
| 112 | +#define PIO_INDIRECT_SIZE 0 | |
| 114 | 113 | #endif /* CONFIG_INDIRECT_PIO */ |
| 114 | +#define MMIO_UPPER_LIMIT (IO_SPACE_LIMIT - PIO_INDIRECT_SIZE) | |
| 115 | 115 | |
| 116 | 116 | struct logic_pio_hwaddr *find_io_range_by_fwnode(struct fwnode_handle *fwnode); |
| 117 | 117 | unsigned long logic_pio_trans_hwaddr(struct fwnode_handle *fwnode, |
| @@ -70,14 +70,11 @@ · 69 unmodified lines | ||
| 70 | 70 | #define TIM_CCER_CC4E BIT(12) /* Capt/Comp 4 out Ena */ |
| 71 | 71 | #define TIM_CCER_CC4P BIT(13) /* Capt/Comp 4 Polarity */ |
| 72 | 72 | #define TIM_CCER_CCXE (BIT(0) | BIT(4) | BIT(8) | BIT(12)) |
| 73 | −#define TIM_BDTR_BKE BIT(12) /* Break input enable */ | |
| 74 | −#define TIM_BDTR_BKP BIT(13) /* Break input polarity */ | |
| 73 | +#define TIM_BDTR_BKE(x) BIT(12 + (x) * 12) /* Break input enable */ | |
| 74 | +#define TIM_BDTR_BKP(x) BIT(13 + (x) * 12) /* Break input polarity */ | |
| 75 | 75 | #define TIM_BDTR_AOE BIT(14) /* Automatic Output Enable */ |
| 76 | 76 | #define TIM_BDTR_MOE BIT(15) /* Main Output Enable */ |
| 77 | −#define TIM_BDTR_BKF (BIT(16) | BIT(17) | BIT(18) | BIT(19)) | |
| 78 | −#define TIM_BDTR_BK2F (BIT(20) | BIT(21) | BIT(22) | BIT(23)) | |
| 79 | −#define TIM_BDTR_BK2E BIT(24) /* Break 2 input enable */ | |
| 80 | −#define TIM_BDTR_BK2P BIT(25) /* Break 2 input polarity */ | |
| 77 | +#define TIM_BDTR_BKF(x) (0xf << (16 + (x) * 4)) | |
| 81 | 78 | #define TIM_DCR_DBA GENMASK(4, 0) /* DMA base addr */ |
| 82 | 79 | #define TIM_DCR_DBL GENMASK(12, 8) /* DMA burst len */ |
| 83 | 80 | |
| @@ -87,8 +84,7 @@ · 3 unmodified lines | ||
| 87 | 84 | #define TIM_CR2_MMS2_SHIFT 20 |
| 88 | 85 | #define TIM_SMCR_TS_SHIFT 4 |
| 89 | 86 | #define TIM_BDTR_BKF_MASK 0xF |
| 90 | −#define TIM_BDTR_BKF_SHIFT 16 | |
| 91 | −#define TIM_BDTR_BK2F_SHIFT 20 | |
| 87 | +#define TIM_BDTR_BKF_SHIFT(x) (16 + (x) * 4) | |
| 92 | 88 | |
| 93 | 89 | enum stm32_timers_dmas { |
| 94 | 90 | STM32_TIMERS_DMA_CH1, |
| @@ -106,7 +106,6 @@ · 105 unmodified lines | ||
| 106 | 106 | #define AT91_MATRIX_DDR_IOSR BIT(18) |
| 107 | 107 | #define AT91_MATRIX_NFD0_SELECT BIT(24) |
| 108 | 108 | #define AT91_MATRIX_DDR_MP_EN BIT(25) |
| 109 | −#define AT91_MATRIX_EBI_NUM_CS 8 | |
| 110 | 109 | |
| 111 | 110 | #define AT91_MATRIX_USBPUCR_PUON BIT(30) |
| 112 | 111 | |
| @@ -33,6 +33,7 @@ · 32 unmodified lines | ||
| 33 | 33 | #define SGI_MMTIMER 153 |
| 34 | 34 | #define STORE_QUEUE_MINOR 155 /* unused */ |
| 35 | 35 | #define I2O_MINOR 166 |
| 36 | +#define AGPGART_MINOR 175 | |
| 36 | 37 | #define HWRNG_MINOR 183 |
| 37 | 38 | #define MICROCODE_MINOR 184 |
| 38 | 39 | #define IRNET_MINOR 187 |
| @@ -1838,12 +1838,12 @@ static inline void mm_dec_nr_ptes(struct mm_struct *mm) {} · 1837 unmodified lines | ||
| 1838 | 1838 | int __pte_alloc(struct mm_struct *mm, pmd_t *pmd); |
| 1839 | 1839 | int __pte_alloc_kernel(pmd_t *pmd); |
| 1840 | 1840 | |
| 1841 | +#if defined(CONFIG_MMU) | |
| 1842 | + | |
| 1841 | 1843 | /* |
| 1842 | − * The following ifdef needed to get the 4level-fixup.h header to work. | |
| 1843 | − * Remove it when 4level-fixup.h has been removed. | |
| 1844 | + * The following ifdef needed to get the 5level-fixup.h header to work. | |
| 1845 | + * Remove it when 5level-fixup.h has been removed. | |
| 1844 | 1846 | */ |
| 1845 | −#if defined(CONFIG_MMU) && !defined(__ARCH_HAS_4LEVEL_HACK) | |
| 1846 | − | |
| 1847 | 1847 | #ifndef __ARCH_HAS_5LEVEL_HACK |
| 1848 | 1848 | static inline p4d_t *p4d_alloc(struct mm_struct *mm, pgd_t *pgd, |
| 1849 | 1849 | unsigned long address) |
| @@ -1865,7 +1865,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a · 15 unmodified lines | ||
| 1865 | 1865 | return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))? |
| 1866 | 1866 | NULL: pmd_offset(pud, address); |
| 1867 | 1867 | } |
| 1868 | −#endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */ | |
| 1868 | +#endif /* CONFIG_MMU */ | |
| 1869 | 1869 | |
| 1870 | 1870 | #if USE_SPLIT_PTE_PTLOCKS |
| 1871 | 1871 | #if ALLOC_SPLIT_PTLOCKS |
| @@ -2621,6 +2621,9 @@ static inline int vm_fault_to_errno(vm_fault_t vm_fault, int foll_flags) · 749 unmodified lines | ||
| 2621 | 2621 | typedef int (*pte_fn_t)(pte_t *pte, unsigned long addr, void *data); |
| 2622 | 2622 | extern int apply_to_page_range(struct mm_struct *mm, unsigned long address, |
| 2623 | 2623 | unsigned long size, pte_fn_t fn, void *data); |
| 2624 | +extern int apply_to_existing_page_range(struct mm_struct *mm, | |
| 2625 | + unsigned long address, unsigned long size, | |
| 2626 | + pte_fn_t fn, void *data); | |
| 2624 | 2627 | |
| 2625 | 2628 | #ifdef CONFIG_PAGE_POISONING |
| 2626 | 2629 | extern bool page_poisoning_enabled(void); |
| @@ -587,9 +587,9 @@ struct platform_device_id { · 586 unmodified lines | ||
| 587 | 587 | #define MDIO_NAME_SIZE 32 |
| 588 | 588 | #define MDIO_MODULE_PREFIX "mdio:" |
| 589 | 589 | |
| 590 | −#define MDIO_ID_FMT "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" | |
| 590 | +#define MDIO_ID_FMT "%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u" | |
| 591 | 591 | #define MDIO_ID_ARGS(_id) \ |
| 592 | − (_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \ | |
| 592 | + ((_id)>>31) & 1, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \ | |
| 593 | 593 | ((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \ |
| 594 | 594 | ((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \ |
| 595 | 595 | ((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \ |
| @@ -100,11 +100,11 @@ struct kparam_array · 99 unmodified lines | ||
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * module_param - typesafe helper for a module/cmdline parameter |
| 103 | − * @value: the variable to alter, and exposed parameter name. | |
| 103 | + * @name: the variable to alter, and exposed parameter name. | |
| 104 | 104 | * @type: the type of the parameter |
| 105 | 105 | * @perm: visibility in sysfs. |
| 106 | 106 | * |
| 107 | − * @value becomes the module parameter, or (prefixed by KBUILD_MODNAME and a | |
| 107 | + * @name becomes the module parameter, or (prefixed by KBUILD_MODNAME and a | |
| 108 | 108 | * ".") the kernel commandline parameter. Note that - is changed to _, so |
| 109 | 109 | * the user can use "foo-bar=1" even for variable "foo_bar". |
| 110 | 110 | * |
| @@ -60,6 +60,7 @@ extern int kern_path_mountpoint(int, const char *, struct path *, unsigned int); · 59 unmodified lines | ||
| 60 | 60 | extern struct dentry *try_lookup_one_len(const char *, struct dentry *, int); |
| 61 | 61 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); |
| 62 | 62 | extern struct dentry *lookup_one_len_unlocked(const char *, struct dentry *, int); |
| 63 | +extern struct dentry *lookup_positive_unlocked(const char *, struct dentry *, int); | |
| 63 | 64 | |
| 64 | 65 | extern int follow_down_one(struct path *); |
| 65 | 66 | extern int follow_down(struct path *); |
| @@ -1775,7 +1775,7 @@ enum netdev_priv_flags { · 1774 unmodified lines | ||
| 1775 | 1775 | * for hardware timestamping |
| 1776 | 1776 | * @sfp_bus: attached &struct sfp_bus structure. |
| 1777 | 1777 | * @qdisc_tx_busylock_key: lockdep class annotating Qdisc->busylock |
| 1778 | − spinlock | |
| 1778 | + * spinlock | |
| 1779 | 1779 | * @qdisc_running_key: lockdep class annotating Qdisc->running seqcount |
| 1780 | 1780 | * @qdisc_xmit_lock_key: lockdep class annotating |
| 1781 | 1781 | * netdev_queue->_xmit_lock spinlock |
| @@ -1881,6 +1881,11 @@ struct net_device { · 99 unmodified lines | ||
| 1881 | 1881 | unsigned char if_port; |
| 1882 | 1882 | unsigned char dma; |
| 1883 | 1883 | |
| 1884 | + /* Note : dev->mtu is often read without holding a lock. | |
| 1885 | + * Writers usually hold RTNL. | |
| 1886 | + * It is recommended to use READ_ONCE() to annotate the reads, | |
| 1887 | + * and to use WRITE_ONCE() to annotate the writes. | |
| 1888 | + */ | |
| 1884 | 1889 | unsigned int mtu; |
| 1885 | 1890 | unsigned int min_mtu; |
| 1886 | 1891 | unsigned int max_mtu; |
| @@ -16,6 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | #include <linux/list.h> |
| 17 | 17 | #include <linux/uidgid.h> |
| 18 | 18 | #include <uapi/linux/nfs4.h> |
| 19 | +#include <linux/sunrpc/msg_prot.h> | |
| 19 | 20 | |
| 20 | 21 | enum nfs4_acl_whotype { |
| 21 | 22 | NFS4_ACL_WHO_NAMED = 0, |
| @@ -539,6 +540,8 @@ enum { · 517 unmodified lines | ||
| 539 | 540 | |
| 540 | 541 | NFSPROC4_CLNT_LOOKUPP, |
| 541 | 542 | NFSPROC4_CLNT_LAYOUTERROR, |
| 543 | + | |
| 544 | + NFSPROC4_CLNT_COPY_NOTIFY, | |
| 542 | 545 | }; |
| 543 | 546 | |
| 544 | 547 | /* nfs41 types */ |
| @@ -674,4 +677,27 @@ struct nfs4_op_map { · 129 unmodified lines | ||
| 674 | 677 | } u; |
| 675 | 678 | }; |
| 676 | 679 | |
| 680 | +struct nfs42_netaddr { | |
| 681 | + char netid[RPCBIND_MAXNETIDLEN]; | |
| 682 | + char addr[RPCBIND_MAXUADDRLEN + 1]; | |
| 683 | + u32 netid_len; | |
| 684 | + u32 addr_len; | |
| 685 | +}; | |
| 686 | + | |
| 687 | +enum netloc_type4 { | |
| 688 | + NL4_NAME = 1, | |
| 689 | + NL4_URL = 2, | |
| 690 | + NL4_NETADDR = 3, | |
| 691 | +}; | |
| 692 | + | |
| 693 | +struct nl4_server { | |
| 694 | + enum netloc_type4 nl4_type; | |
| 695 | + union { | |
| 696 | + struct { /* NL4_NAME, NL4_URL */ | |
| 697 | + int nl4_str_sz; | |
| 698 | + char nl4_str[NFS4_OPAQUE_LIMIT + 1]; | |
| 699 | + }; | |
| 700 | + struct nfs42_netaddr nl4_addr; /* NL4_NETADDR */ | |
| 701 | + } u; | |
| 702 | +}; | |
| 677 | 703 | #endif |
| @@ -189,13 +189,15 @@ struct nfs_inode { · 188 unmodified lines | ||
| 189 | 189 | |
| 190 | 190 | struct nfs4_copy_state { |
| 191 | 191 | struct list_head copies; |
| 192 | + struct list_head src_copies; | |
| 192 | 193 | nfs4_stateid stateid; |
| 193 | 194 | struct completion completion; |
| 194 | 195 | uint64_t count; |
| 195 | 196 | struct nfs_writeverf verf; |
| 196 | 197 | int error; |
| 197 | 198 | int flags; |
| 198 | − struct nfs4_state *parent_state; | |
| 199 | + struct nfs4_state *parent_src_state; | |
| 200 | + struct nfs4_state *parent_dst_state; | |
| 199 | 201 | }; |
| 200 | 202 | |
| 201 | 203 | /* |
| @@ -45,6 +45,9 @@ struct nfs_client { · 44 unmodified lines | ||
| 45 | 45 | #define NFS_CS_INFINITE_SLOTS 3 /* - don't limit TCP slots */ |
| 46 | 46 | #define NFS_CS_NO_RETRANS_TIMEOUT 4 /* - Disable retransmit timeouts */ |
| 47 | 47 | #define NFS_CS_TSM_POSSIBLE 5 /* - Maybe state migration */ |
| 48 | +#define NFS_CS_NOPING 6 /* - don't ping on connect */ | |
| 49 | +#define NFS_CS_DS 7 /* - Server is a DS */ | |
| 50 | +#define NFS_CS_REUSEPORT 8 /* - reuse src port on reconnect */ | |
| 48 | 51 | struct sockaddr_storage cl_addr; /* server identifier */ |
| 49 | 52 | size_t cl_addrlen; |
| 50 | 53 | char * cl_hostname; /* hostname of server */ |
| @@ -171,7 +174,7 @@ struct nfs_server { · 120 unmodified lines | ||
| 171 | 174 | |
| 172 | 175 | struct nfs_fsid fsid; |
| 173 | 176 | __u64 maxfilesize; /* maximum file size */ |
| 174 | − struct timespec time_delta; /* smallest time granularity */ | |
| 177 | + struct timespec64 time_delta; /* smallest time granularity */ | |
| 175 | 178 | unsigned long mount_time; /* when this fs was mounted */ |
| 176 | 179 | struct super_block *super; /* VFS super block */ |
| 177 | 180 | dev_t s_dev; /* superblock dev numbers */ |
| @@ -276,5 +279,6 @@ struct nfs_server { · 98 unmodified lines | ||
| 276 | 279 | #define NFS_CAP_COPY (1U << 24) |
| 277 | 280 | #define NFS_CAP_OFFLOAD_CANCEL (1U << 25) |
| 278 | 281 | #define NFS_CAP_LAYOUTERROR (1U << 26) |
| 282 | +#define NFS_CAP_COPY_NOTIFY (1U << 27) | |
| 279 | 283 | |
| 280 | 284 | #endif |
| @@ -62,14 +62,14 @@ struct nfs_fattr { · 61 unmodified lines | ||
| 62 | 62 | struct nfs_fsid fsid; |
| 63 | 63 | __u64 fileid; |
| 64 | 64 | __u64 mounted_on_fileid; |
| 65 | − struct timespec atime; | |
| 66 | − struct timespec mtime; | |
| 67 | − struct timespec ctime; | |
| 65 | + struct timespec64 atime; | |
| 66 | + struct timespec64 mtime; | |
| 67 | + struct timespec64 ctime; | |
| 68 | 68 | __u64 change_attr; /* NFSv4 change attribute */ |
| 69 | 69 | __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ |
| 70 | 70 | __u64 pre_size; /* pre_op_attr.size */ |
| 71 | − struct timespec pre_mtime; /* pre_op_attr.mtime */ | |
| 72 | − struct timespec pre_ctime; /* pre_op_attr.ctime */ | |
| 71 | + struct timespec64 pre_mtime; /* pre_op_attr.mtime */ | |
| 72 | + struct timespec64 pre_ctime; /* pre_op_attr.ctime */ | |
| 73 | 73 | unsigned long time_start; |
| 74 | 74 | unsigned long gencount; |
| 75 | 75 | struct nfs4_string *owner_name; |
| @@ -143,7 +143,7 @@ struct nfs_fsinfo { · 67 unmodified lines | ||
| 143 | 143 | __u32 wtmult; /* writes should be multiple of this */ |
| 144 | 144 | __u32 dtpref; /* pref. readdir transfer size */ |
| 145 | 145 | __u64 maxfilesize; |
| 146 | − struct timespec time_delta; /* server time granularity */ | |
| 146 | + struct timespec64 time_delta; /* server time granularity */ | |
| 147 | 147 | __u32 lease_time; /* in seconds */ |
| 148 | 148 | __u32 nlayouttypes; /* number of layouttypes */ |
| 149 | 149 | __u32 layouttype[NFS_MAX_LAYOUT_TYPES]; /* supported pnfs layout driver */ |
| @@ -869,7 +869,7 @@ struct nfs3_sattrargs { · 719 unmodified lines | ||
| 869 | 869 | struct nfs_fh * fh; |
| 870 | 870 | struct iattr * sattr; |
| 871 | 871 | unsigned int guard; |
| 872 | − struct timespec guardtime; | |
| 872 | + struct timespec64 guardtime; | |
| 873 | 873 | }; |
| 874 | 874 | |
| 875 | 875 | struct nfs3_diropargs { |
| @@ -1435,6 +1435,7 @@ struct nfs42_copy_args { · 559 unmodified lines | ||
| 1435 | 1435 | |
| 1436 | 1436 | u64 count; |
| 1437 | 1437 | bool sync; |
| 1438 | + struct nl4_server *cp_src; | |
| 1438 | 1439 | }; |
| 1439 | 1440 | |
| 1440 | 1441 | struct nfs42_write_res { |
| @@ -1463,6 +1464,22 @@ struct nfs42_offload_status_res { · 22 unmodified lines | ||
| 1463 | 1464 | int osr_status; |
| 1464 | 1465 | }; |
| 1465 | 1466 | |
| 1467 | +struct nfs42_copy_notify_args { | |
| 1468 | + struct nfs4_sequence_args cna_seq_args; | |
| 1469 | + | |
| 1470 | + struct nfs_fh *cna_src_fh; | |
| 1471 | + nfs4_stateid cna_src_stateid; | |
| 1472 | + struct nl4_server cna_dst; | |
| 1473 | +}; | |
| 1474 | + | |
| 1475 | +struct nfs42_copy_notify_res { | |
| 1476 | + struct nfs4_sequence_res cnr_seq_res; | |
| 1477 | + | |
| 1478 | + struct nfstime4 cnr_lease_time; | |
| 1479 | + nfs4_stateid cnr_stateid; | |
| 1480 | + struct nl4_server cnr_src; | |
| 1481 | +}; | |
| 1482 | + | |
| 1466 | 1483 | struct nfs42_seek_args { |
| 1467 | 1484 | struct nfs4_sequence_args seq_args; |
| 1468 | 1485 | |
| @@ -150,10 +150,6 @@ extern int raw_notifier_chain_register(struct raw_notifier_head *nh, · 149 unmodified lines | ||
| 150 | 150 | extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh, |
| 151 | 151 | struct notifier_block *nb); |
| 152 | 152 | |
| 153 | −extern int blocking_notifier_chain_cond_register( | |
| 154 | − struct blocking_notifier_head *nh, | |
| 155 | − struct notifier_block *nb); | |
| 156 | − | |
| 157 | 153 | extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, |
| 158 | 154 | struct notifier_block *nb); |
| 159 | 155 | extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, |
| @@ -270,6 +270,8 @@ struct nvme_fc_remote_port { · 269 unmodified lines | ||
| 270 | 270 | * |
| 271 | 271 | * Host/Initiator Transport Entrypoints/Parameters: |
| 272 | 272 | * |
| 273 | + * @module: The LLDD module using the interface | |
| 274 | + * | |
| 273 | 275 | * @localport_delete: The LLDD initiates deletion of a localport via |
| 274 | 276 | * nvme_fc_deregister_localport(). However, the teardown is |
| 275 | 277 | * asynchronous. This routine is called upon the completion of the |
| @@ -383,6 +385,8 @@ struct nvme_fc_remote_port { · 107 unmodified lines | ||
| 383 | 385 | * Value is Mandatory. Allowed to be zero. |
| 384 | 386 | */ |
| 385 | 387 | struct nvme_fc_port_template { |
| 388 | + struct module *module; | |
| 389 | + | |
| 386 | 390 | /* initiator-based functions */ |
| 387 | 391 | void (*localport_delete)(struct nvme_fc_local_port *); |
| 388 | 392 | void (*remoteport_delete)(struct nvme_fc_remote_port *); |
| @@ -12,6 +12,7 @@ · 11 unmodified lines | ||
| 12 | 12 | #include <linux/of.h> |
| 13 | 13 | |
| 14 | 14 | #if IS_ENABLED(CONFIG_OF_MDIO) |
| 15 | +extern bool of_mdiobus_child_is_phy(struct device_node *child); | |
| 15 | 16 | extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np); |
| 16 | 17 | extern struct phy_device *of_phy_find_device(struct device_node *phy_np); |
| 17 | 18 | extern struct phy_device *of_phy_connect(struct net_device *dev, |
| @@ -54,6 +55,11 @@ static inline int of_mdio_parse_addr(struct device *dev, · 36 unmodified lines | ||
| 54 | 55 | } |
| 55 | 56 | |
| 56 | 57 | #else /* CONFIG_OF_MDIO */ |
| 58 | +static bool of_mdiobus_child_is_phy(struct device_node *child) | |
| 59 | +{ | |
| 60 | + return false; | |
| 61 | +} | |
| 62 | + | |
| 57 | 63 | static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) |
| 58 | 64 | { |
| 59 | 65 | /* |
| @@ -1000,7 +1000,7 @@ int phy_modify_paged_changed(struct phy_device *phydev, int page, u32 regnum, · 999 unmodified lines | ||
| 1000 | 1000 | int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum, |
| 1001 | 1001 | u16 mask, u16 set); |
| 1002 | 1002 | |
| 1003 | −struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, | |
| 1003 | +struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id, | |
| 1004 | 1004 | bool is_c45, |
| 1005 | 1005 | struct phy_c45_device_ids *c45_ids); |
| 1006 | 1006 | #if IS_ENABLED(CONFIG_PHYLIB) |
| @@ -14,7 +14,7 @@ struct phy_device; · 13 unmodified lines | ||
| 14 | 14 | #define PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE 11 |
| 15 | 15 | |
| 16 | 16 | #define PHY_LINK_LED_TRIGGER_NAME_SIZE (MII_BUS_ID_SIZE + \ |
| 17 | − FIELD_SIZEOF(struct mdio_device, addr)+\ | |
| 17 | + sizeof_field(struct mdio_device, addr)+\ | |
| 18 | 18 | PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE) |
| 19 | 19 | |
| 20 | 20 | struct phy_led_trigger { |
| @@ -38,7 +38,6 @@ struct pipe_buffer { · 37 unmodified lines | ||
| 38 | 38 | * @readers: number of current readers of this pipe |
| 39 | 39 | * @writers: number of current writers of this pipe |
| 40 | 40 | * @files: number of struct file referring this pipe (protected by ->i_lock) |
| 41 | − * @waiting_writers: number of writers blocked waiting for room | |
| 42 | 41 | * @r_counter: reader counter |
| 43 | 42 | * @w_counter: writer counter |
| 44 | 43 | * @fasync_readers: reader side fasync |
| @@ -56,7 +55,6 @@ struct pipe_inode_info { · 11 unmodified lines | ||
| 56 | 55 | unsigned int readers; |
| 57 | 56 | unsigned int writers; |
| 58 | 57 | unsigned int files; |
| 59 | − unsigned int waiting_writers; | |
| 60 | 58 | unsigned int r_counter; |
| 61 | 59 | unsigned int w_counter; |
| 62 | 60 | struct page *tmp_page; |
| @@ -0,0 +1,21 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ | |
| 2 | +/* | |
| 3 | + * TI PRM (Power & Reset Manager) platform data | |
| 4 | + * | |
| 5 | + * Copyright (C) 2019 Texas Instruments, Inc. | |
| 6 | + * | |
| 7 | + * Tero Kristo <t-kristo@ti.com> | |
| 8 | + */ | |
| 9 | + | |
| 10 | +#ifndef _LINUX_PLATFORM_DATA_TI_PRM_H | |
| 11 | +#define _LINUX_PLATFORM_DATA_TI_PRM_H | |
| 12 | + | |
| 13 | +struct clockdomain; | |
| 14 | + | |
| 15 | +struct ti_prm_platform_data { | |
| 16 | + void (*clkdm_deny_idle)(struct clockdomain *clkdm); | |
| 17 | + void (*clkdm_allow_idle)(struct clockdomain *clkdm); | |
| 18 | + struct clockdomain * (*clkdm_lookup)(const char *name); | |
| 19 | +}; | |
| 20 | + | |
| 21 | +#endif /* _LINUX_PLATFORM_DATA_TI_PRM_H */ | |
| @@ -49,6 +49,8 @@ struct sysc_regbits { · 48 unmodified lines | ||
| 49 | 49 | s8 emufree_shift; |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | +#define SYSC_QUIRK_FORCE_MSTANDBY BIT(20) | |
| 53 | +#define SYSC_MODULE_QUIRK_AESS BIT(19) | |
| 52 | 54 | #define SYSC_MODULE_QUIRK_SGX BIT(18) |
| 53 | 55 | #define SYSC_MODULE_QUIRK_HDQ1W BIT(17) |
| 54 | 56 | #define SYSC_MODULE_QUIRK_I2C BIT(16) |
| @@ -34,6 +34,8 @@ 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 FREQ_QOS_MAX_DEFAULT_VALUE | |
| 37 | 39 | #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) |
| 38 | 40 | |
| 39 | 41 | #define PM_QOS_FLAG_NO_POWER_OFF (1 << 0) |
| @@ -49,21 +51,6 @@ struct pm_qos_flags_request { · 9 unmodified lines | ||
| 49 | 51 | s32 flags; /* Do not change to 64 bit */ |
| 50 | 52 | }; |
| 51 | 53 | |
| 52 | −enum dev_pm_qos_req_type { | |
| 53 | − DEV_PM_QOS_RESUME_LATENCY = 1, | |
| 54 | − DEV_PM_QOS_LATENCY_TOLERANCE, | |
| 55 | − DEV_PM_QOS_FLAGS, | |
| 56 | −}; | |
| 57 | − | |
| 58 | −struct dev_pm_qos_request { | |
| 59 | − enum dev_pm_qos_req_type type; | |
| 60 | − union { | |
| 61 | − struct plist_node pnode; | |
| 62 | − struct pm_qos_flags_request flr; | |
| 63 | − } data; | |
| 64 | − struct device *dev; | |
| 65 | −}; | |
| 66 | − | |
| 67 | 54 | enum pm_qos_type { |
| 68 | 55 | PM_QOS_UNITIALIZED, |
| 69 | 56 | PM_QOS_MAX, /* return the largest value */ |
| @@ -90,9 +77,51 @@ struct pm_qos_flags { · 20 unmodified lines | ||
| 90 | 77 | s32 effective_flags; /* Do not change to 64 bit */ |
| 91 | 78 | }; |
| 92 | 79 | |
| 80 | + | |
| 81 | +#define FREQ_QOS_MIN_DEFAULT_VALUE 0 | |
| 82 | +#define FREQ_QOS_MAX_DEFAULT_VALUE S32_MAX | |
| 83 | + | |
| 84 | +enum freq_qos_req_type { | |
| 85 | + FREQ_QOS_MIN = 1, | |
| 86 | + FREQ_QOS_MAX, | |
| 87 | +}; | |
| 88 | + | |
| 89 | +struct freq_constraints { | |
| 90 | + struct pm_qos_constraints min_freq; | |
| 91 | + struct blocking_notifier_head min_freq_notifiers; | |
| 92 | + struct pm_qos_constraints max_freq; | |
| 93 | + struct blocking_notifier_head max_freq_notifiers; | |
| 94 | +}; | |
| 95 | + | |
| 96 | +struct freq_qos_request { | |
| 97 | + enum freq_qos_req_type type; | |
| 98 | + struct plist_node pnode; | |
| 99 | + struct freq_constraints *qos; | |
| 100 | +}; | |
| 101 | + | |
| 102 | + | |
| 103 | +enum dev_pm_qos_req_type { | |
| 104 | + DEV_PM_QOS_RESUME_LATENCY = 1, | |
| 105 | + DEV_PM_QOS_LATENCY_TOLERANCE, | |
| 106 | + DEV_PM_QOS_MIN_FREQUENCY, | |
| 107 | + DEV_PM_QOS_MAX_FREQUENCY, | |
| 108 | + DEV_PM_QOS_FLAGS, | |
| 109 | +}; | |
| 110 | + | |
| 111 | +struct dev_pm_qos_request { | |
| 112 | + enum dev_pm_qos_req_type type; | |
| 113 | + union { | |
| 114 | + struct plist_node pnode; | |
| 115 | + struct pm_qos_flags_request flr; | |
| 116 | + struct freq_qos_request freq; | |
| 117 | + } data; | |
| 118 | + struct device *dev; | |
| 119 | +}; | |
| 120 | + | |
| 93 | 121 | struct dev_pm_qos { |
| 94 | 122 | struct pm_qos_constraints resume_latency; |
| 95 | 123 | struct pm_qos_constraints latency_tolerance; |
| 124 | + struct freq_constraints freq; | |
| 96 | 125 | struct pm_qos_flags flags; |
| 97 | 126 | struct dev_pm_qos_request *resume_latency_req; |
| 98 | 127 | struct dev_pm_qos_request *latency_tolerance_req; |
| @@ -191,6 +220,10 @@ static inline s32 dev_pm_qos_read_value(struct device *dev, · 92 unmodified lines | ||
| 191 | 220 | switch (type) { |
| 192 | 221 | case DEV_PM_QOS_RESUME_LATENCY: |
| 193 | 222 | return PM_QOS_RESUME_LATENCY_NO_CONSTRAINT; |
| 223 | + case DEV_PM_QOS_MIN_FREQUENCY: | |
| 224 | + return PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE; | |
| 225 | + case DEV_PM_QOS_MAX_FREQUENCY: | |
| 226 | + return PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE; | |
| 194 | 227 | default: |
| 195 | 228 | WARN_ON(1); |
| 196 | 229 | return 0; |
| @@ -255,27 +288,6 @@ static inline s32 dev_pm_qos_raw_resume_latency(struct device *dev) · 58 unmodified lines | ||
| 255 | 288 | } |
| 256 | 289 | #endif |
| 257 | 290 | |
| 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 | 291 | static inline int freq_qos_request_active(struct freq_qos_request *req) |
| 280 | 292 | { |
| 281 | 293 | return !IS_ERR_OR_NULL(req->qos); |
| @@ -291,6 +303,8 @@ int freq_qos_add_request(struct freq_constraints *qos, · 9 unmodified lines | ||
| 291 | 303 | enum freq_qos_req_type type, s32 value); |
| 292 | 304 | int freq_qos_update_request(struct freq_qos_request *req, s32 new_value); |
| 293 | 305 | int freq_qos_remove_request(struct freq_qos_request *req); |
| 306 | +int freq_qos_apply(struct freq_qos_request *req, | |
| 307 | + enum pm_qos_req_action action, s32 value); | |
| 294 | 308 | |
| 295 | 309 | int freq_qos_add_notifier(struct freq_constraints *qos, |
| 296 | 310 | enum freq_qos_req_type type, |
| @@ -63,6 +63,11 @@ struct wakeup_source { · 62 unmodified lines | ||
| 63 | 63 | bool autosleep_enabled:1; |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | +#define for_each_wakeup_source(ws) \ | |
| 67 | + for ((ws) = wakeup_sources_walk_start(); \ | |
| 68 | + (ws); \ | |
| 69 | + (ws) = wakeup_sources_walk_next((ws))) | |
| 70 | + | |
| 66 | 71 | #ifdef CONFIG_PM_SLEEP |
| 67 | 72 | |
| 68 | 73 | /* |
| @@ -92,6 +97,10 @@ extern void wakeup_source_remove(struct wakeup_source *ws); · 23 unmodified lines | ||
| 92 | 97 | extern struct wakeup_source *wakeup_source_register(struct device *dev, |
| 93 | 98 | const char *name); |
| 94 | 99 | extern void wakeup_source_unregister(struct wakeup_source *ws); |
| 100 | +extern int wakeup_sources_read_lock(void); | |
| 101 | +extern void wakeup_sources_read_unlock(int idx); | |
| 102 | +extern struct wakeup_source *wakeup_sources_walk_start(void); | |
| 103 | +extern struct wakeup_source *wakeup_sources_walk_next(struct wakeup_source *ws); | |
| 95 | 104 | extern int device_wakeup_enable(struct device *dev); |
| 96 | 105 | extern int device_wakeup_disable(struct device *dev); |
| 97 | 106 | extern void device_set_wakeup_capable(struct device *dev, bool capable); |
| @@ -302,9 +302,8 @@ extern int kptr_restrict; · 301 unmodified lines | ||
| 302 | 302 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) |
| 303 | 303 | #define pr_err(fmt, ...) \ |
| 304 | 304 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) |
| 305 | −#define pr_warning(fmt, ...) \ | |
| 305 | +#define pr_warn(fmt, ...) \ | |
| 306 | 306 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) |
| 307 | −#define pr_warn pr_warning | |
| 308 | 307 | #define pr_notice(fmt, ...) \ |
| 309 | 308 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) |
| 310 | 309 | #define pr_info(fmt, ...) \ |
| @@ -58,8 +58,8 @@ extern int remove_proc_subtree(const char *, struct proc_dir_entry *); · 57 unmodified lines | ||
| 58 | 58 | struct proc_dir_entry *proc_create_net_data(const char *name, umode_t mode, |
| 59 | 59 | struct proc_dir_entry *parent, const struct seq_operations *ops, |
| 60 | 60 | unsigned int state_size, void *data); |
| 61 | −#define proc_create_net(name, mode, parent, state_size, ops) \ | |
| 62 | − proc_create_net_data(name, mode, parent, state_size, ops, NULL) | |
| 61 | +#define proc_create_net(name, mode, parent, ops, state_size) \ | |
| 62 | + proc_create_net_data(name, mode, parent, ops, state_size, NULL) | |
| 63 | 63 | struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode, |
| 64 | 64 | struct proc_dir_entry *parent, |
| 65 | 65 | int (*show)(struct seq_file *, void *), void *data); |
| @@ -243,10 +243,7 @@ pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle, · 242 unmodified lines | ||
| 243 | 243 | * @request: optional hook for requesting a PWM |
| 244 | 244 | * @free: optional hook for freeing a PWM |
| 245 | 245 | * @capture: capture and report PWM signal |
| 246 | − * @apply: atomically apply a new PWM config. The state argument | |
| 247 | − * should be adjusted with the real hardware config (if the | |
| 248 | − * approximate the period or duty_cycle value, state should | |
| 249 | − * reflect it) | |
| 246 | + * @apply: atomically apply a new PWM config | |
| 250 | 247 | * @get_state: get the current PWM state. This function is only |
| 251 | 248 | * called once per PWM device when the PWM chip is |
| 252 | 249 | * registered. |
| @@ -24,6 +24,26 @@ struct qcom_scm_vmperm { · 23 unmodified lines | ||
| 24 | 24 | int perm; |
| 25 | 25 | }; |
| 26 | 26 | |
| 27 | +enum qcom_scm_ocmem_client { | |
| 28 | + QCOM_SCM_OCMEM_UNUSED_ID = 0x0, | |
| 29 | + QCOM_SCM_OCMEM_GRAPHICS_ID, | |
| 30 | + QCOM_SCM_OCMEM_VIDEO_ID, | |
| 31 | + QCOM_SCM_OCMEM_LP_AUDIO_ID, | |
| 32 | + QCOM_SCM_OCMEM_SENSORS_ID, | |
| 33 | + QCOM_SCM_OCMEM_OTHER_OS_ID, | |
| 34 | + QCOM_SCM_OCMEM_DEBUG_ID, | |
| 35 | +}; | |
| 36 | + | |
| 37 | +enum qcom_scm_sec_dev_id { | |
| 38 | + QCOM_SCM_MDSS_DEV_ID = 1, | |
| 39 | + QCOM_SCM_OCMEM_DEV_ID = 5, | |
| 40 | + QCOM_SCM_PCIE0_DEV_ID = 11, | |
| 41 | + QCOM_SCM_PCIE1_DEV_ID = 12, | |
| 42 | + QCOM_SCM_GFX_DEV_ID = 18, | |
| 43 | + QCOM_SCM_UFS_DEV_ID = 19, | |
| 44 | + QCOM_SCM_ICE_DEV_ID = 20, | |
| 45 | +}; | |
| 46 | + | |
| 27 | 47 | #define QCOM_SCM_VMID_HLOS 0x3 |
| 28 | 48 | #define QCOM_SCM_VMID_MSS_MSA 0xF |
| 29 | 49 | #define QCOM_SCM_VMID_WLAN 0x18 |
| @@ -41,6 +61,11 @@ extern bool qcom_scm_is_available(void); · 11 unmodified lines | ||
| 41 | 61 | extern bool qcom_scm_hdcp_available(void); |
| 42 | 62 | extern int qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, |
| 43 | 63 | u32 *resp); |
| 64 | +extern bool qcom_scm_ocmem_lock_available(void); | |
| 65 | +extern int qcom_scm_ocmem_lock(enum qcom_scm_ocmem_client id, u32 offset, | |
| 66 | + u32 size, u32 mode); | |
| 67 | +extern int qcom_scm_ocmem_unlock(enum qcom_scm_ocmem_client id, u32 offset, | |
| 68 | + u32 size); | |
| 44 | 69 | extern bool qcom_scm_pas_supported(u32 peripheral); |
| 45 | 70 | extern int qcom_scm_pas_init_image(u32 peripheral, const void *metadata, |
| 46 | 71 | size_t size); |
| @@ -55,6 +80,7 @@ extern int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, · 8 unmodified lines | ||
| 55 | 80 | extern void qcom_scm_cpu_power_down(u32 flags); |
| 56 | 81 | extern u32 qcom_scm_get_version(void); |
| 57 | 82 | extern int qcom_scm_set_remote_state(u32 state, u32 id); |
| 83 | +extern bool qcom_scm_restore_sec_cfg_available(void); | |
| 58 | 84 | extern int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare); |
| 59 | 85 | extern int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size); |
| 60 | 86 | extern int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare); |
| @@ -283,14 +283,12 @@ __rb_erase_augmented(struct rb_node *node, struct rb_root *root, · 282 unmodified lines | ||
| 283 | 283 | __rb_change_child(node, successor, tmp, root); |
| 284 | 284 | |
| 285 | 285 | if (child2) { |
| 286 | − successor->__rb_parent_color = pc; | |
| 287 | 286 | rb_set_parent_color(child2, parent, RB_BLACK); |
| 288 | 287 | rebalance = NULL; |
| 289 | 288 | } else { |
| 290 | − unsigned long pc2 = successor->__rb_parent_color; | |
| 291 | − successor->__rb_parent_color = pc; | |
| 292 | − rebalance = __rb_is_black(pc2) ? parent : NULL; | |
| 289 | + rebalance = rb_is_black(successor) ? parent : NULL; | |
| 293 | 290 | } |
| 291 | + successor->__rb_parent_color = pc; | |
| 294 | 292 | tmp = successor; |
| 295 | 293 | } |
| 296 | 294 | |
| @@ -100,6 +100,43 @@ static inline void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n, · 99 unmodified lines | ||
| 100 | 100 | first->pprev = &n->next; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | +/** | |
| 104 | + * hlist_nulls_add_tail_rcu | |
| 105 | + * @n: the element to add to the hash list. | |
| 106 | + * @h: the list to add to. | |
| 107 | + * | |
| 108 | + * Description: | |
| 109 | + * Adds the specified element to the specified hlist_nulls, | |
| 110 | + * while permitting racing traversals. | |
| 111 | + * | |
| 112 | + * The caller must take whatever precautions are necessary | |
| 113 | + * (such as holding appropriate locks) to avoid racing | |
| 114 | + * with another list-mutation primitive, such as hlist_nulls_add_head_rcu() | |
| 115 | + * or hlist_nulls_del_rcu(), running on this same list. | |
| 116 | + * However, it is perfectly legal to run concurrently with | |
| 117 | + * the _rcu list-traversal primitives, such as | |
| 118 | + * hlist_nulls_for_each_entry_rcu(), used to prevent memory-consistency | |
| 119 | + * problems on Alpha CPUs. Regardless of the type of CPU, the | |
| 120 | + * list-traversal primitive must be guarded by rcu_read_lock(). | |
| 121 | + */ | |
| 122 | +static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n, | |
| 123 | + struct hlist_nulls_head *h) | |
| 124 | +{ | |
| 125 | + struct hlist_nulls_node *i, *last = NULL; | |
| 126 | + | |
| 127 | + /* Note: write side code, so rcu accessors are not needed. */ | |
| 128 | + for (i = h->first; !is_a_nulls(i); i = i->next) | |
| 129 | + last = i; | |
| 130 | + | |
| 131 | + if (last) { | |
| 132 | + n->next = last->next; | |
| 133 | + n->pprev = &last->next; | |
| 134 | + rcu_assign_pointer(hlist_next_rcu(last), n); | |
| 135 | + } else { | |
| 136 | + hlist_nulls_add_head_rcu(n, h); | |
| 137 | + } | |
| 138 | +} | |
| 139 | + | |
| 103 | 140 | /** |
| 104 | 141 | * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type |
| 105 | 142 | * @tpos: the type * to use as a loop cursor. |
| @@ -62,7 +62,8 @@ struct reset_control_lookup { · 61 unmodified lines | ||
| 62 | 62 | * @of_node: corresponding device tree node as phandle target |
| 63 | 63 | * @of_reset_n_cells: number of cells in reset line specifiers |
| 64 | 64 | * @of_xlate: translation function to translate from specifier as found in the |
| 65 | − * device tree to id as given to the reset control ops | |
| 65 | + * device tree to id as given to the reset control ops, defaults | |
| 66 | + * to :c:func:`of_reset_simple_xlate`. | |
| 66 | 67 | * @nr_resets: number of reset controls in this reset controller device |
| 67 | 68 | */ |
| 68 | 69 | struct reset_controller_dev { |
| @@ -203,12 +203,34 @@ static inline struct reset_control *reset_control_get_shared( · 202 unmodified lines | ||
| 203 | 203 | return __reset_control_get(dev, id, 0, true, false, false); |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | +/** | |
| 207 | + * reset_control_get_optional_exclusive - optional reset_control_get_exclusive() | |
| 208 | + * @dev: device to be reset by the controller | |
| 209 | + * @id: reset line name | |
| 210 | + * | |
| 211 | + * Optional variant of reset_control_get_exclusive(). If the requested reset | |
| 212 | + * is not specified in the device tree, this function returns NULL instead of | |
| 213 | + * an error. | |
| 214 | + * | |
| 215 | + * See reset_control_get_exclusive() for more information. | |
| 216 | + */ | |
| 206 | 217 | static inline struct reset_control *reset_control_get_optional_exclusive( |
| 207 | 218 | struct device *dev, const char *id) |
| 208 | 219 | { |
| 209 | 220 | return __reset_control_get(dev, id, 0, false, true, true); |
| 210 | 221 | } |
| 211 | 222 | |
| 223 | +/** | |
| 224 | + * reset_control_get_optional_shared - optional reset_control_get_shared() | |
| 225 | + * @dev: device to be reset by the controller | |
| 226 | + * @id: reset line name | |
| 227 | + * | |
| 228 | + * Optional variant of reset_control_get_shared(). If the requested reset | |
| 229 | + * is not specified in the device tree, this function returns NULL instead of | |
| 230 | + * an error. | |
| 231 | + * | |
| 232 | + * See reset_control_get_shared() for more information. | |
| 233 | + */ | |
| 212 | 234 | static inline struct reset_control *reset_control_get_optional_shared( |
| 213 | 235 | struct device *dev, const char *id) |
| 214 | 236 | { |
| @@ -354,12 +376,36 @@ static inline struct reset_control *devm_reset_control_get_shared( · 139 unmodified lines | ||
| 354 | 376 | return __devm_reset_control_get(dev, id, 0, true, false, false); |
| 355 | 377 | } |
| 356 | 378 | |
| 379 | +/** | |
| 380 | + * devm_reset_control_get_optional_exclusive - resource managed | |
| 381 | + * reset_control_get_optional_exclusive() | |
| 382 | + * @dev: device to be reset by the controller | |
| 383 | + * @id: reset line name | |
| 384 | + * | |
| 385 | + * Managed reset_control_get_optional_exclusive(). For reset controllers | |
| 386 | + * returned from this function, reset_control_put() is called automatically on | |
| 387 | + * driver detach. | |
| 388 | + * | |
| 389 | + * See reset_control_get_optional_exclusive() for more information. | |
| 390 | + */ | |
| 357 | 391 | static inline struct reset_control *devm_reset_control_get_optional_exclusive( |
| 358 | 392 | struct device *dev, const char *id) |
| 359 | 393 | { |
| 360 | 394 | return __devm_reset_control_get(dev, id, 0, false, true, true); |
| 361 | 395 | } |
| 362 | 396 | |
| 397 | +/** | |
| 398 | + * devm_reset_control_get_optional_shared - resource managed | |
| 399 | + * reset_control_get_optional_shared() | |
| 400 | + * @dev: device to be reset by the controller | |
| 401 | + * @id: reset line name | |
| 402 | + * | |
| 403 | + * Managed reset_control_get_optional_shared(). For reset controllers returned | |
| 404 | + * from this function, reset_control_put() is called automatically on driver | |
| 405 | + * detach. | |
| 406 | + * | |
| 407 | + * See reset_control_get_optional_shared() for more information. | |
| 408 | + */ | |
| 363 | 409 | static inline struct reset_control *devm_reset_control_get_optional_shared( |
| 364 | 410 | struct device *dev, const char *id) |
| 365 | 411 | { |
| @@ -1210,6 +1210,8 @@ struct task_struct { · 1209 unmodified lines | ||
| 1210 | 1210 | #endif /* CONFIG_TRACING */ |
| 1211 | 1211 | |
| 1212 | 1212 | #ifdef CONFIG_KCOV |
| 1213 | + /* See kernel/kcov.c for more details. */ | |
| 1214 | + | |
| 1213 | 1215 | /* Coverage collection mode enabled for this task (0 if disabled): */ |
| 1214 | 1216 | unsigned int kcov_mode; |
| 1215 | 1217 | |
| @@ -1221,6 +1223,12 @@ struct task_struct { · 5 unmodified lines | ||
| 1221 | 1223 | |
| 1222 | 1224 | /* KCOV descriptor wired with this task or NULL: */ |
| 1223 | 1225 | struct kcov *kcov; |
| 1226 | + | |
| 1227 | + /* KCOV common handle for remote coverage collection: */ | |
| 1228 | + u64 kcov_handle; | |
| 1229 | + | |
| 1230 | + /* KCOV sequence number: */ | |
| 1231 | + int kcov_sequence; | |
| 1224 | 1232 | #endif |
| 1225 | 1233 | |
| 1226 | 1234 | #ifdef CONFIG_MEMCG |
| @@ -12,6 +12,8 @@ · 11 unmodified lines | ||
| 12 | 12 | #define SCHED_CPUFREQ_MIGRATION (1U << 1) |
| 13 | 13 | |
| 14 | 14 | #ifdef CONFIG_CPU_FREQ |
| 15 | +struct cpufreq_policy; | |
| 16 | + | |
| 15 | 17 | struct update_util_data { |
| 16 | 18 | void (*func)(struct update_util_data *data, u64 time, unsigned int flags); |
| 17 | 19 | }; |
| @@ -20,6 +22,7 @@ void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data, · 2 unmodified lines | ||
| 20 | 22 | void (*func)(struct update_util_data *data, u64 time, |
| 21 | 23 | unsigned int flags)); |
| 22 | 24 | void cpufreq_remove_update_util_hook(int cpu); |
| 25 | +bool cpufreq_this_cpu_can_update(struct cpufreq_policy *policy); | |
| 23 | 26 | |
| 24 | 27 | static inline unsigned long map_util_freq(unsigned long util, |
| 25 | 28 | unsigned long freq, unsigned long cap) |
| @@ -3529,8 +3529,9 @@ int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci); · 3528 unmodified lines | ||
| 3529 | 3529 | int skb_vlan_pop(struct sk_buff *skb); |
| 3530 | 3530 | int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); |
| 3531 | 3531 | int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto, |
| 3532 | − int mac_len); | |
| 3533 | −int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto, int mac_len); | |
| 3532 | + int mac_len, bool ethernet); | |
| 3533 | +int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto, int mac_len, | |
| 3534 | + bool ethernet); | |
| 3534 | 3535 | int skb_mpls_update_lse(struct sk_buff *skb, __be32 mpls_lse); |
| 3535 | 3536 | int skb_mpls_dec_ttl(struct sk_buff *skb); |
| 3536 | 3537 | struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy, |
| @@ -0,0 +1,87 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | +#ifndef __ASM_MACH_CPUTYPE_H | |
| 3 | +#define __ASM_MACH_CPUTYPE_H | |
| 4 | + | |
| 5 | +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) | |
| 6 | +#include <asm/cputype.h> | |
| 7 | +#endif | |
| 8 | + | |
| 9 | +/* | |
| 10 | + * CPU Stepping CPU_ID CHIP_ID | |
| 11 | + * | |
| 12 | + * PXA168 S0 0x56158400 0x0000C910 | |
| 13 | + * PXA168 A0 0x56158400 0x00A0A168 | |
| 14 | + * PXA910 Y1 0x56158400 0x00F2C920 | |
| 15 | + * PXA910 A0 0x56158400 0x00F2C910 | |
| 16 | + * PXA910 A1 0x56158400 0x00A0C910 | |
| 17 | + * PXA920 Y0 0x56158400 0x00F2C920 | |
| 18 | + * PXA920 A0 0x56158400 0x00A0C920 | |
| 19 | + * PXA920 A1 0x56158400 0x00A1C920 | |
| 20 | + * MMP2 Z0 0x560f5811 0x00F00410 | |
| 21 | + * MMP2 Z1 0x560f5811 0x00E00410 | |
| 22 | + * MMP2 A0 0x560f5811 0x00A0A610 | |
| 23 | + * MMP3 A0 0x562f5842 0x00A02128 | |
| 24 | + * MMP3 B0 0x562f5842 0x00B02128 | |
| 25 | + */ | |
| 26 | + | |
| 27 | +extern unsigned int mmp_chip_id; | |
| 28 | + | |
| 29 | +#ifdef CONFIG_CPU_PXA168 | |
| 30 | +static inline int cpu_is_pxa168(void) | |
| 31 | +{ | |
| 32 | + return (((read_cpuid_id() >> 8) & 0xff) == 0x84) && | |
| 33 | + ((mmp_chip_id & 0xfff) == 0x168); | |
| 34 | +} | |
| 35 | +#else | |
| 36 | +#define cpu_is_pxa168() (0) | |
| 37 | +#endif | |
| 38 | + | |
| 39 | +/* cpu_is_pxa910() is shared on both pxa910 and pxa920 */ | |
| 40 | +#ifdef CONFIG_CPU_PXA910 | |
| 41 | +static inline int cpu_is_pxa910(void) | |
| 42 | +{ | |
| 43 | + return (((read_cpuid_id() >> 8) & 0xff) == 0x84) && | |
| 44 | + (((mmp_chip_id & 0xfff) == 0x910) || | |
| 45 | + ((mmp_chip_id & 0xfff) == 0x920)); | |
| 46 | +} | |
| 47 | +#else | |
| 48 | +#define cpu_is_pxa910() (0) | |
| 49 | +#endif | |
| 50 | + | |
| 51 | +#if defined(CONFIG_CPU_MMP2) || defined(CONFIG_MACH_MMP2_DT) | |
| 52 | +static inline int cpu_is_mmp2(void) | |
| 53 | +{ | |
| 54 | + return (((read_cpuid_id() >> 8) & 0xff) == 0x58) && | |
| 55 | + (((mmp_chip_id & 0xfff) == 0x410) || | |
| 56 | + ((mmp_chip_id & 0xfff) == 0x610)); | |
| 57 | +} | |
| 58 | +#else | |
| 59 | +#define cpu_is_mmp2() (0) | |
| 60 | +#endif | |
| 61 | + | |
| 62 | +#ifdef CONFIG_MACH_MMP3_DT | |
| 63 | +static inline int cpu_is_mmp3(void) | |
| 64 | +{ | |
| 65 | + return (((read_cpuid_id() >> 8) & 0xff) == 0x58) && | |
| 66 | + ((mmp_chip_id & 0xffff) == 0x2128); | |
| 67 | +} | |
| 68 | + | |
| 69 | +static inline int cpu_is_mmp3_a0(void) | |
| 70 | +{ | |
| 71 | + return (cpu_is_mmp3() && | |
| 72 | + ((mmp_chip_id & 0x00ff0000) == 0x00a00000)); | |
| 73 | +} | |
| 74 | + | |
| 75 | +static inline int cpu_is_mmp3_b0(void) | |
| 76 | +{ | |
| 77 | + return (cpu_is_mmp3() && | |
| 78 | + ((mmp_chip_id & 0x00ff0000) == 0x00b00000)); | |
| 79 | +} | |
| 80 | + | |
| 81 | +#else | |
| 82 | +#define cpu_is_mmp3() (0) | |
| 83 | +#define cpu_is_mmp3_a0() (0) | |
| 84 | +#define cpu_is_mmp3_b0() (0) | |
| 85 | +#endif | |
| 86 | + | |
| 87 | +#endif /* __ASM_MACH_CPUTYPE_H */ | |
| @@ -38,33 +38,27 @@ struct llcc_slice_desc { · 37 unmodified lines | ||
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | − * llcc_slice_config - Data associated with the llcc slice | |
| 42 | − * @usecase_id: usecase id for which the llcc slice is used | |
| 43 | − * @slice_id: llcc slice id assigned to each slice | |
| 44 | − * @max_cap: maximum capacity of the llcc slice | |
| 45 | − * @priority: priority of the llcc slice | |
| 46 | − * @fixed_size: whether the llcc slice can grow beyond its size | |
| 47 | − * @bonus_ways: bonus ways associated with llcc slice | |
| 48 | − * @res_ways: reserved ways associated with llcc slice | |
| 49 | − * @cache_mode: mode of the llcc slice | |
| 50 | − * @probe_target_ways: Probe only reserved and bonus ways on a cache miss | |
| 51 | − * @dis_cap_alloc: Disable capacity based allocation | |
| 52 | − * @retain_on_pc: Retain through power collapse | |
| 53 | − * @activate_on_init: activate the slice on init | |
| 41 | + * llcc_edac_reg_data - llcc edac registers data for each error type | |
| 42 | + * @name: Name of the error | |
| 43 | + * @synd_reg: Syndrome register address | |
| 44 | + * @count_status_reg: Status register address to read the error count | |
| 45 | + * @ways_status_reg: Status register address to read the error ways | |
| 46 | + * @reg_cnt: Number of registers | |
| 47 | + * @count_mask: Mask value to get the error count | |
| 48 | + * @ways_mask: Mask value to get the error ways | |
| 49 | + * @count_shift: Shift value to get the error count | |
| 50 | + * @ways_shift: Shift value to get the error ways | |
| 54 | 51 | */ |
| 55 | −struct llcc_slice_config { | |
| 56 | − u32 usecase_id; | |
| 57 | − u32 slice_id; | |
| 58 | − u32 max_cap; | |
| 59 | − u32 priority; | |
| 60 | − bool fixed_size; | |
| 61 | − u32 bonus_ways; | |
| 62 | − u32 res_ways; | |
| 63 | − u32 cache_mode; | |
| 64 | − u32 probe_target_ways; | |
| 65 | − bool dis_cap_alloc; | |
| 66 | − bool retain_on_pc; | |
| 67 | − bool activate_on_init; | |
| 52 | +struct llcc_edac_reg_data { | |
| 53 | + char *name; | |
| 54 | + u64 synd_reg; | |
| 55 | + u64 count_status_reg; | |
| 56 | + u64 ways_status_reg; | |
| 57 | + u32 reg_cnt; | |
| 58 | + u32 count_mask; | |
| 59 | + u32 ways_mask; | |
| 60 | + u8 count_shift; | |
| 61 | + u8 ways_shift; | |
| 68 | 62 | }; |
| 69 | 63 | |
| 70 | 64 | /** |
| @@ -93,30 +87,6 @@ struct llcc_drv_data { · 22 unmodified lines | ||
| 93 | 87 | int ecc_irq; |
| 94 | 88 | }; |
| 95 | 89 | |
| 96 | −/** | |
| 97 | − * llcc_edac_reg_data - llcc edac registers data for each error type | |
| 98 | − * @name: Name of the error | |
| 99 | − * @synd_reg: Syndrome register address | |
| 100 | − * @count_status_reg: Status register address to read the error count | |
| 101 | − * @ways_status_reg: Status register address to read the error ways | |
| 102 | − * @reg_cnt: Number of registers | |
| 103 | − * @count_mask: Mask value to get the error count | |
| 104 | − * @ways_mask: Mask value to get the error ways | |
| 105 | − * @count_shift: Shift value to get the error count | |
| 106 | − * @ways_shift: Shift value to get the error ways | |
| 107 | − */ | |
| 108 | −struct llcc_edac_reg_data { | |
| 109 | − char *name; | |
| 110 | − u64 synd_reg; | |
| 111 | − u64 count_status_reg; | |
| 112 | − u64 ways_status_reg; | |
| 113 | − u32 reg_cnt; | |
| 114 | − u32 count_mask; | |
| 115 | − u32 ways_mask; | |
| 116 | − u8 count_shift; | |
| 117 | − u8 ways_shift; | |
| 118 | −}; | |
| 119 | − | |
| 120 | 90 | #if IS_ENABLED(CONFIG_QCOM_LLCC) |
| 121 | 91 | /** |
| 122 | 92 | * llcc_slice_getd - get llcc slice descriptor |
| @@ -154,20 +124,6 @@ int llcc_slice_activate(struct llcc_slice_desc *desc); · 31 unmodified lines | ||
| 154 | 124 | */ |
| 155 | 125 | int llcc_slice_deactivate(struct llcc_slice_desc *desc); |
| 156 | 126 | |
| 157 | −/** | |
| 158 | − * qcom_llcc_probe - program the sct table | |
| 159 | − * @pdev: platform device pointer | |
| 160 | − * @table: soc sct table | |
| 161 | − * @sz: Size of the config table | |
| 162 | − */ | |
| 163 | −int qcom_llcc_probe(struct platform_device *pdev, | |
| 164 | − const struct llcc_slice_config *table, u32 sz); | |
| 165 | − | |
| 166 | −/** | |
| 167 | − * qcom_llcc_remove - remove the sct table | |
| 168 | − * @pdev: Platform device pointer | |
| 169 | − */ | |
| 170 | −int qcom_llcc_remove(struct platform_device *pdev); | |
| 171 | 127 | #else |
| 172 | 128 | static inline struct llcc_slice_desc *llcc_slice_getd(u32 uid) |
| 173 | 129 | { |
| @@ -197,16 +153,6 @@ static inline int llcc_slice_deactivate(struct llcc_slice_desc *desc) · 23 unmodified lines | ||
| 197 | 153 | { |
| 198 | 154 | return -EINVAL; |
| 199 | 155 | } |
| 200 | −static inline int qcom_llcc_probe(struct platform_device *pdev, | |
| 201 | − const struct llcc_slice_config *table, u32 sz) | |
| 202 | −{ | |
| 203 | − return -ENODEV; | |
| 204 | −} | |
| 205 | − | |
| 206 | −static inline int qcom_llcc_remove(struct platform_device *pdev) | |
| 207 | −{ | |
| 208 | − return -ENODEV; | |
| 209 | −} | |
| 210 | 156 | #endif |
| 211 | 157 | |
| 212 | 158 | #endif |
| @@ -378,12 +378,19 @@ extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, · 377 unmodified lines | ||
| 378 | 378 | extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, |
| 379 | 379 | unsigned int vlen, unsigned int flags, |
| 380 | 380 | bool forbid_cmsg_compat); |
| 381 | −extern long __sys_sendmsg_sock(struct socket *sock, | |
| 382 | − struct user_msghdr __user *msg, | |
| 381 | +extern long __sys_sendmsg_sock(struct socket *sock, struct msghdr *msg, | |
| 383 | 382 | unsigned int flags); |
| 384 | −extern long __sys_recvmsg_sock(struct socket *sock, | |
| 385 | − struct user_msghdr __user *msg, | |
| 383 | +extern long __sys_recvmsg_sock(struct socket *sock, struct msghdr *msg, | |
| 384 | + struct user_msghdr __user *umsg, | |
| 385 | + struct sockaddr __user *uaddr, | |
| 386 | 386 | unsigned int flags); |
| 387 | +extern int sendmsg_copy_msghdr(struct msghdr *msg, | |
| 388 | + struct user_msghdr __user *umsg, unsigned flags, | |
| 389 | + struct iovec **iov); | |
| 390 | +extern int recvmsg_copy_msghdr(struct msghdr *msg, | |
| 391 | + struct user_msghdr __user *umsg, unsigned flags, | |
| 392 | + struct sockaddr __user **uaddr, | |
| 393 | + struct iovec **iov); | |
| 387 | 394 | |
| 388 | 395 | /* helpers which do the actual work for syscalls */ |
| 389 | 396 | extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size, |
| @@ -399,9 +406,8 @@ extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, · 9 unmodified lines | ||
| 399 | 406 | int __user *upeer_addrlen, int flags); |
| 400 | 407 | extern int __sys_socket(int family, int type, int protocol); |
| 401 | 408 | extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen); |
| 402 | −extern int __sys_connect_file(struct file *file, | |
| 403 | − struct sockaddr __user *uservaddr, int addrlen, | |
| 404 | − int file_flags); | |
| 409 | +extern int __sys_connect_file(struct file *file, struct sockaddr_storage *addr, | |
| 410 | + int addrlen, int file_flags); | |
| 405 | 411 | extern int __sys_connect(int fd, struct sockaddr __user *uservaddr, |
| 406 | 412 | int addrlen); |
| 407 | 413 | extern int __sys_listen(int fd, int backlog); |
| @@ -10,8 +10,6 @@ · 9 unmodified lines | ||
| 10 | 10 | #ifndef _LINUX_SUNRPC_AUTH_H |
| 11 | 11 | #define _LINUX_SUNRPC_AUTH_H |
| 12 | 12 | |
| 13 | −#ifdef __KERNEL__ | |
| 14 | − | |
| 15 | 13 | #include <linux/sunrpc/sched.h> |
| 16 | 14 | #include <linux/sunrpc/msg_prot.h> |
| 17 | 15 | #include <linux/sunrpc/xdr.h> |
| @@ -194,5 +192,4 @@ struct rpc_cred *get_rpccred(struct rpc_cred *cred) · 176 unmodified lines | ||
| 194 | 192 | return NULL; |
| 195 | 193 | } |
| 196 | 194 | |
| 197 | −#endif /* __KERNEL__ */ | |
| 198 | 195 | #endif /* _LINUX_SUNRPC_AUTH_H */ |
| @@ -13,7 +13,6 @@ · 12 unmodified lines | ||
| 13 | 13 | #ifndef _LINUX_SUNRPC_AUTH_GSS_H |
| 14 | 14 | #define _LINUX_SUNRPC_AUTH_GSS_H |
| 15 | 15 | |
| 16 | −#ifdef __KERNEL__ | |
| 17 | 16 | #include <linux/refcount.h> |
| 18 | 17 | #include <linux/sunrpc/auth.h> |
| 19 | 18 | #include <linux/sunrpc/svc.h> |
| @@ -90,6 +89,5 @@ struct gss_cred { · 70 unmodified lines | ||
| 90 | 89 | unsigned long gc_upcall_timestamp; |
| 91 | 90 | }; |
| 92 | 91 | |
| 93 | −#endif /* __KERNEL__ */ | |
| 94 | 92 | #endif /* _LINUX_SUNRPC_AUTH_GSS_H */ |
| 95 | 93 | |
| @@ -109,8 +109,6 @@ struct rpc_procinfo { · 108 unmodified lines | ||
| 109 | 109 | const char * p_name; /* name of procedure */ |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | −#ifdef __KERNEL__ | |
| 113 | − | |
| 114 | 112 | struct rpc_create_args { |
| 115 | 113 | struct net *net; |
| 116 | 114 | int protocol; |
| @@ -149,6 +147,7 @@ struct rpc_add_xprt_test { · 32 unmodified lines | ||
| 149 | 147 | #define RPC_CLNT_CREATE_NO_IDLE_TIMEOUT (1UL << 8) |
| 150 | 148 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) |
| 151 | 149 | #define RPC_CLNT_CREATE_SOFTERR (1UL << 10) |
| 150 | +#define RPC_CLNT_CREATE_REUSEPORT (1UL << 11) | |
| 152 | 151 | |
| 153 | 152 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
| 154 | 153 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
| @@ -237,5 +236,4 @@ static inline int rpc_reply_expected(struct rpc_task *task) · 82 unmodified lines | ||
| 237 | 236 | (task->tk_msg.rpc_proc->p_decode != NULL); |
| 238 | 237 | } |
| 239 | 238 | |
| 240 | −#endif /* __KERNEL__ */ | |
| 241 | 239 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
| @@ -13,7 +13,6 @@ · 12 unmodified lines | ||
| 13 | 13 | #ifndef _LINUX_SUNRPC_GSS_API_H |
| 14 | 14 | #define _LINUX_SUNRPC_GSS_API_H |
| 15 | 15 | |
| 16 | −#ifdef __KERNEL__ | |
| 17 | 16 | #include <linux/sunrpc/xdr.h> |
| 18 | 17 | #include <linux/sunrpc/msg_prot.h> |
| 19 | 18 | #include <linux/uio.h> |
| @@ -160,6 +159,5 @@ struct gss_api_mech * gss_mech_get(struct gss_api_mech *); · 140 unmodified lines | ||
| 160 | 159 | * corresponding call to gss_mech_put. */ |
| 161 | 160 | void gss_mech_put(struct gss_api_mech *); |
| 162 | 161 | |
| 163 | −#endif /* __KERNEL__ */ | |
| 164 | 162 | #endif /* _LINUX_SUNRPC_GSS_API_H */ |
| 165 | 163 | |
| @@ -34,8 +34,6 @@ · 33 unmodified lines | ||
| 34 | 34 | #ifndef _LINUX_SUNRPC_GSS_ERR_H |
| 35 | 35 | #define _LINUX_SUNRPC_GSS_ERR_H |
| 36 | 36 | |
| 37 | −#ifdef __KERNEL__ | |
| 38 | − | |
| 39 | 37 | typedef unsigned int OM_uint32; |
| 40 | 38 | |
| 41 | 39 | /* |
| @@ -163,5 +161,4 @@ typedef unsigned int OM_uint32; · 121 unmodified lines | ||
| 163 | 161 | /* XXXX This is a necessary evil until the spec is fixed */ |
| 164 | 162 | #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE |
| 165 | 163 | |
| 166 | −#endif /* __KERNEL__ */ | |
| 167 | 164 | #endif /* __LINUX_SUNRPC_GSS_ERR_H */ |
| @@ -8,8 +8,6 @@ · 7 unmodified lines | ||
| 8 | 8 | #ifndef _LINUX_SUNRPC_MSGPROT_H_ |
| 9 | 9 | #define _LINUX_SUNRPC_MSGPROT_H_ |
| 10 | 10 | |
| 11 | −#ifdef __KERNEL__ /* user programs should get these from the rpc header files */ | |
| 12 | − | |
| 13 | 11 | #define RPC_VERSION 2 |
| 14 | 12 | |
| 15 | 13 | /* size of an XDR encoding unit in bytes, i.e. 32bit */ |
| @@ -217,5 +215,4 @@ typedef __be32 rpc_fraghdr; · 201 unmodified lines | ||
| 217 | 215 | /* Assume INET6_ADDRSTRLEN will always be larger than INET_ADDRSTRLEN... */ |
| 218 | 216 | #define RPCBIND_MAXUADDRLEN RPCBIND_MAXUADDR6LEN |
| 219 | 217 | |
| 220 | −#endif /* __KERNEL__ */ | |
| 221 | 218 | #endif /* _LINUX_SUNRPC_MSGPROT_H_ */ |
| @@ -2,8 +2,6 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H |
| 3 | 3 | #define _LINUX_SUNRPC_RPC_PIPE_FS_H |
| 4 | 4 | |
| 5 | −#ifdef __KERNEL__ | |
| 6 | − | |
| 7 | 5 | #include <linux/workqueue.h> |
| 8 | 6 | |
| 9 | 7 | struct rpc_pipe_dir_head { |
| @@ -133,4 +131,3 @@ extern void unregister_rpc_pipefs(void); · 123 unmodified lines | ||
| 133 | 131 | extern bool gssd_running(struct net *net); |
| 134 | 132 | |
| 135 | 133 | #endif |
| 136 | −#endif | |
| @@ -10,8 +10,6 @@ · 9 unmodified lines | ||
| 10 | 10 | #ifndef _LINUX_SUNRPC_SVCAUTH_H_ |
| 11 | 11 | #define _LINUX_SUNRPC_SVCAUTH_H_ |
| 12 | 12 | |
| 13 | −#ifdef __KERNEL__ | |
| 14 | − | |
| 15 | 13 | #include <linux/string.h> |
| 16 | 14 | #include <linux/sunrpc/msg_prot.h> |
| 17 | 15 | #include <linux/sunrpc/cache.h> |
| @@ -185,6 +183,4 @@ static inline unsigned long hash_mem(char const *buf, int length, int bits) · 167 unmodified lines | ||
| 185 | 183 | return full_name_hash(NULL, buf, length) >> (32 - bits); |
| 186 | 184 | } |
| 187 | 185 | |
| 188 | −#endif /* __KERNEL__ */ | |
| 189 | − | |
| 190 | 186 | #endif /* _LINUX_SUNRPC_SVCAUTH_H_ */ |
| @@ -9,7 +9,6 @@ · 8 unmodified lines | ||
| 9 | 9 | #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H |
| 10 | 10 | #define _LINUX_SUNRPC_SVCAUTH_GSS_H |
| 11 | 11 | |
| 12 | −#ifdef __KERNEL__ | |
| 13 | 12 | #include <linux/sched.h> |
| 14 | 13 | #include <linux/sunrpc/types.h> |
| 15 | 14 | #include <linux/sunrpc/xdr.h> |
| @@ -24,5 +23,4 @@ void gss_svc_shutdown_net(struct net *net); · 8 unmodified lines | ||
| 24 | 23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); |
| 25 | 24 | u32 svcauth_gss_flavor(struct auth_domain *dom); |
| 26 | 25 | |
| 27 | −#endif /* __KERNEL__ */ | |
| 28 | 26 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ |
| @@ -11,8 +11,6 @@ · 10 unmodified lines | ||
| 11 | 11 | #ifndef _SUNRPC_XDR_H_ |
| 12 | 12 | #define _SUNRPC_XDR_H_ |
| 13 | 13 | |
| 14 | −#ifdef __KERNEL__ | |
| 15 | − | |
| 16 | 14 | #include <linux/uio.h> |
| 17 | 15 | #include <asm/byteorder.h> |
| 18 | 16 | #include <asm/unaligned.h> |
| @@ -552,6 +550,5 @@ xdr_stream_decode_uint32_array(struct xdr_stream *xdr, · 533 unmodified lines | ||
| 552 | 550 | *array = be32_to_cpup(p); |
| 553 | 551 | return retval; |
| 554 | 552 | } |
| 555 | −#endif /* __KERNEL__ */ | |
| 556 | 553 | |
| 557 | 554 | #endif /* _SUNRPC_XDR_H_ */ |
| @@ -19,8 +19,6 @@ · 18 unmodified lines | ||
| 19 | 19 | #include <linux/sunrpc/xdr.h> |
| 20 | 20 | #include <linux/sunrpc/msg_prot.h> |
| 21 | 21 | |
| 22 | −#ifdef __KERNEL__ | |
| 23 | − | |
| 24 | 22 | #define RPC_MIN_SLOT_TABLE (2U) |
| 25 | 23 | #define RPC_DEF_SLOT_TABLE (16U) |
| 26 | 24 | #define RPC_MAX_SLOT_TABLE_LIMIT (65536U) |
| @@ -207,7 +205,8 @@ struct rpc_xprt { · 180 unmodified lines | ||
| 207 | 205 | unsigned int min_reqs; /* min number of slots */ |
| 208 | 206 | unsigned int num_reqs; /* total slots */ |
| 209 | 207 | unsigned long state; /* transport state */ |
| 210 | − unsigned char resvport : 1; /* use a reserved port */ | |
| 208 | + unsigned char resvport : 1, /* use a reserved port */ | |
| 209 | + reuseport : 1; /* reuse port on reconnect */ | |
| 211 | 210 | atomic_t swapper; /* we're swapping over this |
| 212 | 211 | transport */ |
| 213 | 212 | unsigned int bind_index; /* bind function index */ |
| @@ -505,6 +504,4 @@ static inline void xprt_inject_disconnect(struct rpc_xprt *xprt) · 291 unmodified lines | ||
| 505 | 504 | } |
| 506 | 505 | #endif |
| 507 | 506 | |
| 508 | −#endif /* __KERNEL__*/ | |
| 509 | − | |
| 510 | 507 | #endif /* _LINUX_SUNRPC_XPRT_H */ |
| @@ -8,8 +8,6 @@ · 7 unmodified lines | ||
| 8 | 8 | #ifndef _LINUX_SUNRPC_XPRTSOCK_H |
| 9 | 9 | #define _LINUX_SUNRPC_XPRTSOCK_H |
| 10 | 10 | |
| 11 | −#ifdef __KERNEL__ | |
| 12 | − | |
| 13 | 11 | int init_socket_xprt(void); |
| 14 | 12 | void cleanup_socket_xprt(void); |
| 15 | 13 | |
| @@ -91,6 +89,4 @@ struct sock_xprt { · 75 unmodified lines | ||
| 91 | 89 | #define XPRT_SOCK_WAKE_PENDING (6) |
| 92 | 90 | #define XPRT_SOCK_WAKE_DISCONNECT (7) |
| 93 | 91 | |
| 94 | −#endif /* __KERNEL__ */ | |
| 95 | − | |
| 96 | 92 | #endif /* _LINUX_SUNRPC_XPRTSOCK_H */ |
| @@ -1231,10 +1231,7 @@ asmlinkage long sys_ni_syscall(void); · 1230 unmodified lines | ||
| 1231 | 1231 | * the ksys_xyzyyz() functions prototyped below. |
| 1232 | 1232 | */ |
| 1233 | 1233 | |
| 1234 | −int ksys_mount(const char __user *dev_name, const char __user *dir_name, | |
| 1235 | − const char __user *type, unsigned long flags, void __user *data); | |
| 1236 | 1234 | int ksys_umount(char __user *name, int flags); |
| 1237 | −int ksys_dup(unsigned int fildes); | |
| 1238 | 1235 | int ksys_chroot(const char __user *filename); |
| 1239 | 1236 | ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count); |
| 1240 | 1237 | int ksys_chdir(const char __user *filename); |
| @@ -120,8 +120,7 @@ static inline void *proc_sys_poll_event(struct ctl_table_poll *poll) · 119 unmodified lines | ||
| 120 | 120 | struct ctl_table_poll name = __CTL_TABLE_POLL_INITIALIZER(name) |
| 121 | 121 | |
| 122 | 122 | /* A sysctl table is an array of struct ctl_table: */ |
| 123 | −struct ctl_table | |
| 124 | −{ | |
| 123 | +struct ctl_table { | |
| 125 | 124 | const char *procname; /* Text ID for /proc/sys, or zero */ |
| 126 | 125 | void *data; |
| 127 | 126 | int maxlen; |
| @@ -140,8 +139,7 @@ struct ctl_node { · 12 unmodified lines | ||
| 140 | 139 | |
| 141 | 140 | /* struct ctl_table_header is used to maintain dynamic lists of |
| 142 | 141 | struct ctl_table trees. */ |
| 143 | −struct ctl_table_header | |
| 144 | −{ | |
| 142 | +struct ctl_table_header { | |
| 145 | 143 | union { |
| 146 | 144 | struct { |
| 147 | 145 | struct ctl_table *ctl_table; |
| @@ -544,15 +544,4 @@ static inline void thermal_notify_framework(struct thermal_zone_device *tz, · 543 unmodified lines | ||
| 544 | 544 | { } |
| 545 | 545 | #endif /* CONFIG_THERMAL */ |
| 546 | 546 | |
| 547 | −#if defined(CONFIG_NET) && IS_ENABLED(CONFIG_THERMAL) | |
| 548 | −extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, | |
| 549 | − enum events event); | |
| 550 | −#else | |
| 551 | −static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz, | |
| 552 | − enum events event) | |
| 553 | −{ | |
| 554 | − return 0; | |
| 555 | −} | |
| 556 | −#endif | |
| 557 | − | |
| 558 | 547 | #endif /* __THERMAL_H__ */ |
| @@ -147,6 +147,8 @@ check_copy_size(const void *addr, size_t bytes, bool is_source) · 146 unmodified lines | ||
| 147 | 147 | __bad_copy_to(); |
| 148 | 148 | return false; |
| 149 | 149 | } |
| 150 | + if (WARN_ON_ONCE(bytes > INT_MAX)) | |
| 151 | + return false; | |
| 150 | 152 | check_object_size(addr, bytes, is_source); |
| 151 | 153 | return true; |
| 152 | 154 | } |
| @@ -97,4 +97,17 @@ static inline bool itimerspec64_valid(const struct itimerspec64 *its) · 96 unmodified lines | ||
| 97 | 97 | */ |
| 98 | 98 | #define time_after32(a, b) ((s32)((u32)(b) - (u32)(a)) < 0) |
| 99 | 99 | #define time_before32(b, a) time_after32(a, b) |
| 100 | + | |
| 101 | +/** | |
| 102 | + * time_between32 - check if a 32-bit timestamp is within a given time range | |
| 103 | + * @t: the time which may be within [l,h] | |
| 104 | + * @l: the lower bound of the range | |
| 105 | + * @h: the higher bound of the range | |
| 106 | + * | |
| 107 | + * time_before32(t, l, h) returns true if @l <= @t <= @h. All operands are | |
| 108 | + * treated as 32-bit integers. | |
| 109 | + * | |
| 110 | + * Equivalent to !(time_before32(@t, @l) || time_after32(@t, @h)). | |
| 111 | + */ | |
| 112 | +#define time_between32(t, l, h) ((u32)(h) - (u32)(l) >= (u32)(t) - (u32)(l)) | |
| 100 | 113 | #endif |
| @@ -403,6 +403,7 @@ extern int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, · 402 unmodified lines | ||
| 403 | 403 | extern int tpm_send(struct tpm_chip *chip, void *cmd, size_t buflen); |
| 404 | 404 | extern int tpm_get_random(struct tpm_chip *chip, u8 *data, size_t max); |
| 405 | 405 | extern struct tpm_chip *tpm_default_chip(void); |
| 406 | +void tpm2_flush_context(struct tpm_chip *chip, u32 handle); | |
| 406 | 407 | #else |
| 407 | 408 | static inline int tpm_is_tpm2(struct tpm_chip *chip) |
| 408 | 409 | { |
| @@ -31,6 +31,12 @@ struct reclaim_stat { · 30 unmodified lines | ||
| 31 | 31 | unsigned nr_unmap_fail; |
| 32 | 32 | }; |
| 33 | 33 | |
| 34 | +enum writeback_stat_item { | |
| 35 | + NR_DIRTY_THRESHOLD, | |
| 36 | + NR_DIRTY_BG_THRESHOLD, | |
| 37 | + NR_VM_WRITEBACK_STAT_ITEMS, | |
| 38 | +}; | |
| 39 | + | |
| 34 | 40 | #ifdef CONFIG_VM_EVENT_COUNTERS |
| 35 | 41 | /* |
| 36 | 42 | * Light weight per cpu counter implementation. |
| @@ -381,4 +387,48 @@ static inline void __mod_zone_freepage_state(struct zone *zone, int nr_pages, · 344 unmodified lines | ||
| 381 | 387 | |
| 382 | 388 | extern const char * const vmstat_text[]; |
| 383 | 389 | |
| 390 | +static inline const char *zone_stat_name(enum zone_stat_item item) | |
| 391 | +{ | |
| 392 | + return vmstat_text[item]; | |
| 393 | +} | |
| 394 | + | |
| 395 | +#ifdef CONFIG_NUMA | |
| 396 | +static inline const char *numa_stat_name(enum numa_stat_item item) | |
| 397 | +{ | |
| 398 | + return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | |
| 399 | + item]; | |
| 400 | +} | |
| 401 | +#endif /* CONFIG_NUMA */ | |
| 402 | + | |
| 403 | +static inline const char *node_stat_name(enum node_stat_item item) | |
| 404 | +{ | |
| 405 | + return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | |
| 406 | + NR_VM_NUMA_STAT_ITEMS + | |
| 407 | + item]; | |
| 408 | +} | |
| 409 | + | |
| 410 | +static inline const char *lru_list_name(enum lru_list lru) | |
| 411 | +{ | |
| 412 | + return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | |
| 413 | +} | |
| 414 | + | |
| 415 | +static inline const char *writeback_stat_name(enum writeback_stat_item item) | |
| 416 | +{ | |
| 417 | + return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | |
| 418 | + NR_VM_NUMA_STAT_ITEMS + | |
| 419 | + NR_VM_NODE_STAT_ITEMS + | |
| 420 | + item]; | |
| 421 | +} | |
| 422 | + | |
| 423 | +#if defined(CONFIG_VM_EVENT_COUNTERS) || defined(CONFIG_MEMCG) | |
| 424 | +static inline const char *vm_event_name(enum vm_event_item item) | |
| 425 | +{ | |
| 426 | + return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | |
| 427 | + NR_VM_NUMA_STAT_ITEMS + | |
| 428 | + NR_VM_NODE_STAT_ITEMS + | |
| 429 | + NR_VM_WRITEBACK_STAT_ITEMS + | |
| 430 | + item]; | |
| 431 | +} | |
| 432 | +#endif /* CONFIG_VM_EVENT_COUNTERS || CONFIG_MEMCG */ | |
| 433 | + | |
| 384 | 434 | #endif /* _LINUX_VMSTAT_H */ |