Showing the changes to include/linux (13 of 585 files). Show all
Unified · Split
| @@ -326,10 +326,11 @@ static inline int bitmap_equal(const unsigned long *src1, · 325 unmodified lines | ||
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
| 329 | − * bitmap_or_equal - Check whether the or of two bitnaps is equal to a third | |
| 329 | + * bitmap_or_equal - Check whether the or of two bitmaps is equal to a third | |
| 330 | 330 | * @src1: Pointer to bitmap 1 |
| 331 | 331 | * @src2: Pointer to bitmap 2 will be or'ed with bitmap 1 |
| 332 | 332 | * @src3: Pointer to bitmap 3. Compare to the result of *@src1 | *@src2 |
| 333 | + * @nbits: number of bits in each of these bitmaps | |
| 333 | 334 | * |
| 334 | 335 | * Returns: True if (*@src1 | *@src2) == *@src3, false otherwise |
| 335 | 336 | */ |
| @@ -13,6 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <linux/completion.h> |
| 14 | 14 | #include <linux/kobject.h> |
| 15 | 15 | #include <linux/notifier.h> |
| 16 | +#include <linux/pm_qos.h> | |
| 16 | 17 | #include <linux/spinlock.h> |
| 17 | 18 | #include <linux/sysfs.h> |
| 18 | 19 | |
| @@ -76,8 +77,10 @@ struct cpufreq_policy { · 57 unmodified lines | ||
| 76 | 77 | struct work_struct update; /* if update_policy() needs to be |
| 77 | 78 | * called, but you're in IRQ context */ |
| 78 | 79 | |
| 79 | − struct dev_pm_qos_request *min_freq_req; | |
| 80 | − struct dev_pm_qos_request *max_freq_req; | |
| 80 | + struct freq_constraints constraints; | |
| 81 | + struct freq_qos_request *min_freq_req; | |
| 82 | + struct freq_qos_request *max_freq_req; | |
| 83 | + | |
| 81 | 84 | struct cpufreq_frequency_table *freq_table; |
| 82 | 85 | enum cpufreq_table_sorting freq_table_sorted; |
| 83 | 86 | |
| @@ -18,8 +18,6 @@ extern struct module __this_module; · 17 unmodified lines | ||
| 18 | 18 | #define THIS_MODULE ((struct module *)0) |
| 19 | 19 | #endif |
| 20 | 20 | |
| 21 | −#define NS_SEPARATOR "." | |
| 22 | − | |
| 23 | 21 | #ifdef CONFIG_MODVERSIONS |
| 24 | 22 | /* Mark the CRC weak since genksyms apparently decides not to |
| 25 | 23 | * generate a checksums for some symbols */ |
| @@ -48,11 +46,11 @@ extern struct module __this_module; · 22 unmodified lines | ||
| 48 | 46 | * absolute relocations that require runtime processing on relocatable |
| 49 | 47 | * kernels. |
| 50 | 48 | */ |
| 51 | −#define __KSYMTAB_ENTRY_NS(sym, sec, ns) \ | |
| 49 | +#define __KSYMTAB_ENTRY_NS(sym, sec) \ | |
| 52 | 50 | __ADDRESSABLE(sym) \ |
| 53 | 51 | asm(" .section \"___ksymtab" sec "+" #sym "\", \"a\" \n" \ |
| 54 | 52 | " .balign 4 \n" \ |
| 55 | − "__ksymtab_" #ns NS_SEPARATOR #sym ": \n" \ | |
| 53 | + "__ksymtab_" #sym ": \n" \ | |
| 56 | 54 | " .long " #sym "- . \n" \ |
| 57 | 55 | " .long __kstrtab_" #sym "- . \n" \ |
| 58 | 56 | " .long __kstrtabns_" #sym "- . \n" \ |
| @@ -74,16 +72,14 @@ struct kernel_symbol { · 15 unmodified lines | ||
| 74 | 72 | int namespace_offset; |
| 75 | 73 | }; |
| 76 | 74 | #else |
| 77 | −#define __KSYMTAB_ENTRY_NS(sym, sec, ns) \ | |
| 78 | − static const struct kernel_symbol __ksymtab_##sym##__##ns \ | |
| 79 | − asm("__ksymtab_" #ns NS_SEPARATOR #sym) \ | |
| 75 | +#define __KSYMTAB_ENTRY_NS(sym, sec) \ | |
| 76 | + static const struct kernel_symbol __ksymtab_##sym \ | |
| 80 | 77 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ |
| 81 | 78 | __aligned(sizeof(void *)) \ |
| 82 | 79 | = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym } |
| 83 | 80 | |
| 84 | 81 | #define __KSYMTAB_ENTRY(sym, sec) \ |
| 85 | 82 | static const struct kernel_symbol __ksymtab_##sym \ |
| 86 | − asm("__ksymtab_" #sym) \ | |
| 87 | 83 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ |
| 88 | 84 | __aligned(sizeof(void *)) \ |
| 89 | 85 | = { (unsigned long)&sym, __kstrtab_##sym, NULL } |
| @@ -115,7 +111,7 @@ struct kernel_symbol { · 25 unmodified lines | ||
| 115 | 111 | static const char __kstrtabns_##sym[] \ |
| 116 | 112 | __attribute__((section("__ksymtab_strings"), used, aligned(1))) \ |
| 117 | 113 | = #ns; \ |
| 118 | − __KSYMTAB_ENTRY_NS(sym, sec, ns) | |
| 114 | + __KSYMTAB_ENTRY_NS(sym, sec) | |
| 119 | 115 | |
| 120 | 116 | #define ___EXPORT_SYMBOL(sym, sec) \ |
| 121 | 117 | ___export_symbol_common(sym, sec); \ |
| @@ -201,6 +201,14 @@ struct gpio_irq_chip { · 200 unmodified lines | ||
| 201 | 201 | */ |
| 202 | 202 | bool threaded; |
| 203 | 203 | |
| 204 | + /** | |
| 205 | + * @init_hw: optional routine to initialize hardware before | |
| 206 | + * an IRQ chip will be added. This is quite useful when | |
| 207 | + * a particular driver wants to clear IRQ related registers | |
| 208 | + * in order to avoid undesired events. | |
| 209 | + */ | |
| 210 | + int (*init_hw)(struct gpio_chip *chip); | |
| 211 | + | |
| 204 | 212 | /** |
| 205 | 213 | * @init_valid_mask: optional routine to initialize @valid_mask, to be |
| 206 | 214 | * used if not all GPIO lines are valid interrupts. Sometimes some |
| @@ -31,7 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | #define PHY_ID_KSZ886X 0x00221430 |
| 32 | 32 | #define PHY_ID_KSZ8863 0x00221435 |
| 33 | 33 | |
| 34 | −#define PHY_ID_KSZ8795 0x00221550 | |
| 34 | +#define PHY_ID_KSZ87XX 0x00221550 | |
| 35 | 35 | |
| 36 | 36 | #define PHY_ID_KSZ9477 0x00221631 |
| 37 | 37 | |
| @@ -18,7 +18,7 @@ struct page_ext_operations { · 17 unmodified lines | ||
| 18 | 18 | |
| 19 | 19 | enum page_ext_flags { |
| 20 | 20 | PAGE_EXT_OWNER, |
| 21 | − PAGE_EXT_OWNER_ACTIVE, | |
| 21 | + PAGE_EXT_OWNER_ALLOCATED, | |
| 22 | 22 | #if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT) |
| 23 | 23 | PAGE_EXT_YOUNG, |
| 24 | 24 | PAGE_EXT_IDLE, |
| @@ -36,6 +36,7 @@ struct page_ext { · 11 unmodified lines | ||
| 36 | 36 | unsigned long flags; |
| 37 | 37 | }; |
| 38 | 38 | |
| 39 | +extern unsigned long page_ext_size; | |
| 39 | 40 | extern void pgdat_page_ext_init(struct pglist_data *pgdat); |
| 40 | 41 | |
| 41 | 42 | #ifdef CONFIG_SPARSEMEM |
| @@ -52,6 +53,13 @@ static inline void page_ext_init(void) · 10 unmodified lines | ||
| 52 | 53 | |
| 53 | 54 | struct page_ext *lookup_page_ext(const struct page *page); |
| 54 | 55 | |
| 56 | +static inline struct page_ext *page_ext_next(struct page_ext *curr) | |
| 57 | +{ | |
| 58 | + void *next = curr; | |
| 59 | + next += page_ext_size; | |
| 60 | + return next; | |
| 61 | +} | |
| 62 | + | |
| 55 | 63 | #else /* !CONFIG_PAGE_EXTENSION */ |
| 56 | 64 | struct page_ext; |
| 57 | 65 | |
| @@ -293,7 +293,7 @@ struct pmu { · 292 unmodified lines | ||
| 293 | 293 | * -EBUSY -- @event is for this PMU but PMU temporarily unavailable |
| 294 | 294 | * -EINVAL -- @event is for this PMU but @event is not valid |
| 295 | 295 | * -EOPNOTSUPP -- @event is for this PMU, @event is valid, but not supported |
| 296 | − * -EACCESS -- @event is for this PMU, @event is valid, but no privilidges | |
| 296 | + * -EACCES -- @event is for this PMU, @event is valid, but no privileges | |
| 297 | 297 | * |
| 298 | 298 | * 0 -- @event is for this PMU and valid |
| 299 | 299 | * |
| @@ -34,8 +34,6 @@ enum pm_qos_flags_status { · 33 unmodified lines | ||
| 34 | 34 | #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT PM_QOS_LATENCY_ANY |
| 35 | 35 | #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS PM_QOS_LATENCY_ANY_NS |
| 36 | 36 | #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 |
| 37 | −#define PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE 0 | |
| 38 | −#define PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE (-1) | |
| 39 | 37 | #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) |
| 40 | 38 | |
| 41 | 39 | #define PM_QOS_FLAG_NO_POWER_OFF (1 << 0) |
| @@ -54,8 +52,6 @@ struct pm_qos_flags_request { · 12 unmodified lines | ||
| 54 | 52 | enum dev_pm_qos_req_type { |
| 55 | 53 | DEV_PM_QOS_RESUME_LATENCY = 1, |
| 56 | 54 | DEV_PM_QOS_LATENCY_TOLERANCE, |
| 57 | − DEV_PM_QOS_MIN_FREQUENCY, | |
| 58 | − DEV_PM_QOS_MAX_FREQUENCY, | |
| 59 | 55 | DEV_PM_QOS_FLAGS, |
| 60 | 56 | }; |
| 61 | 57 | |
| @@ -97,14 +93,10 @@ struct pm_qos_flags { · 35 unmodified lines | ||
| 97 | 93 | struct dev_pm_qos { |
| 98 | 94 | struct pm_qos_constraints resume_latency; |
| 99 | 95 | struct pm_qos_constraints latency_tolerance; |
| 100 | − struct pm_qos_constraints min_frequency; | |
| 101 | − struct pm_qos_constraints max_frequency; | |
| 102 | 96 | struct pm_qos_flags flags; |
| 103 | 97 | struct dev_pm_qos_request *resume_latency_req; |
| 104 | 98 | struct dev_pm_qos_request *latency_tolerance_req; |
| 105 | 99 | struct dev_pm_qos_request *flags_req; |
| 106 | − struct dev_pm_qos_request *min_frequency_req; | |
| 107 | − struct dev_pm_qos_request *max_frequency_req; | |
| 108 | 100 | }; |
| 109 | 101 | |
| 110 | 102 | /* Action requested to pm_qos_update_target */ |
| @@ -199,10 +191,6 @@ static inline s32 dev_pm_qos_read_value(struct device *dev, · 88 unmodified lines | ||
| 199 | 191 | switch (type) { |
| 200 | 192 | case DEV_PM_QOS_RESUME_LATENCY: |
| 201 | 193 | return PM_QOS_RESUME_LATENCY_NO_CONSTRAINT; |
| 202 | − case DEV_PM_QOS_MIN_FREQUENCY: | |
| 203 | − return PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE; | |
| 204 | − case DEV_PM_QOS_MAX_FREQUENCY: | |
| 205 | − return PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE; | |
| 206 | 194 | default: |
| 207 | 195 | WARN_ON(1); |
| 208 | 196 | return 0; |
| @@ -267,4 +255,48 @@ static inline s32 dev_pm_qos_raw_resume_latency(struct device *dev) · 58 unmodified lines | ||
| 267 | 255 | } |
| 268 | 256 | #endif |
| 269 | 257 | |
| 258 | +#define FREQ_QOS_MIN_DEFAULT_VALUE 0 | |
| 259 | +#define FREQ_QOS_MAX_DEFAULT_VALUE (-1) | |
| 260 | + | |
| 261 | +enum freq_qos_req_type { | |
| 262 | + FREQ_QOS_MIN = 1, | |
| 263 | + FREQ_QOS_MAX, | |
| 264 | +}; | |
| 265 | + | |
| 266 | +struct freq_constraints { | |
| 267 | + struct pm_qos_constraints min_freq; | |
| 268 | + struct blocking_notifier_head min_freq_notifiers; | |
| 269 | + struct pm_qos_constraints max_freq; | |
| 270 | + struct blocking_notifier_head max_freq_notifiers; | |
| 271 | +}; | |
| 272 | + | |
| 273 | +struct freq_qos_request { | |
| 274 | + enum freq_qos_req_type type; | |
| 275 | + struct plist_node pnode; | |
| 276 | + struct freq_constraints *qos; | |
| 277 | +}; | |
| 278 | + | |
| 279 | +static inline int freq_qos_request_active(struct freq_qos_request *req) | |
| 280 | +{ | |
| 281 | + return !IS_ERR_OR_NULL(req->qos); | |
| 282 | +} | |
| 283 | + | |
| 284 | +void freq_constraints_init(struct freq_constraints *qos); | |
| 285 | + | |
| 286 | +s32 freq_qos_read_value(struct freq_constraints *qos, | |
| 287 | + enum freq_qos_req_type type); | |
| 288 | + | |
| 289 | +int freq_qos_add_request(struct freq_constraints *qos, | |
| 290 | + struct freq_qos_request *req, | |
| 291 | + enum freq_qos_req_type type, s32 value); | |
| 292 | +int freq_qos_update_request(struct freq_qos_request *req, s32 new_value); | |
| 293 | +int freq_qos_remove_request(struct freq_qos_request *req); | |
| 294 | + | |
| 295 | +int freq_qos_add_notifier(struct freq_constraints *qos, | |
| 296 | + enum freq_qos_req_type type, | |
| 297 | + struct notifier_block *notifier); | |
| 298 | +int freq_qos_remove_notifier(struct freq_constraints *qos, | |
| 299 | + enum freq_qos_req_type type, | |
| 300 | + struct notifier_block *notifier); | |
| 301 | + | |
| 270 | 302 | #endif |
| @@ -223,6 +223,7 @@ extern long schedule_timeout_uninterruptible(long timeout); · 222 unmodified lines | ||
| 223 | 223 | extern long schedule_timeout_idle(long timeout); |
| 224 | 224 | asmlinkage void schedule(void); |
| 225 | 225 | extern void schedule_preempt_disabled(void); |
| 226 | +asmlinkage void preempt_schedule_irq(void); | |
| 226 | 227 | |
| 227 | 228 | extern int __must_check io_schedule_prepare(void); |
| 228 | 229 | extern void io_schedule_finish(int token); |
| @@ -3510,8 +3510,9 @@ int skb_ensure_writable(struct sk_buff *skb, int write_len); · 3509 unmodified lines | ||
| 3510 | 3510 | int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci); |
| 3511 | 3511 | int skb_vlan_pop(struct sk_buff *skb); |
| 3512 | 3512 | int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); |
| 3513 | −int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto); | |
| 3514 | −int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto); | |
| 3513 | +int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto, | |
| 3514 | + int mac_len); | |
| 3515 | +int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto, int mac_len); | |
| 3515 | 3516 | int skb_mpls_update_lse(struct sk_buff *skb, __be32 mpls_lse); |
| 3516 | 3517 | int skb_mpls_dec_ttl(struct sk_buff *skb); |
| 3517 | 3518 | struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy, |
| @@ -196,9 +196,9 @@ struct bin_attribute { · 195 unmodified lines | ||
| 196 | 196 | .size = _size, \ |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | −#define __BIN_ATTR_WO(_name) { \ | |
| 199 | +#define __BIN_ATTR_WO(_name, _size) { \ | |
| 200 | 200 | .attr = { .name = __stringify(_name), .mode = 0200 }, \ |
| 201 | − .store = _name##_store, \ | |
| 201 | + .write = _name##_write, \ | |
| 202 | 202 | .size = _size, \ |
| 203 | 203 | } |
| 204 | 204 | |
| @@ -393,7 +393,7 @@ struct tcp_sock { · 392 unmodified lines | ||
| 393 | 393 | /* fastopen_rsk points to request_sock that resulted in this big |
| 394 | 394 | * socket. Used to retransmit SYNACKs etc. |
| 395 | 395 | */ |
| 396 | − struct request_sock *fastopen_rsk; | |
| 396 | + struct request_sock __rcu *fastopen_rsk; | |
| 397 | 397 | u32 *saved_syn; |
| 398 | 398 | }; |
| 399 | 399 | |
| @@ -447,8 +447,8 @@ static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) · 47 unmodified lines | ||
| 447 | 447 | |
| 448 | 448 | static inline bool tcp_passive_fastopen(const struct sock *sk) |
| 449 | 449 | { |
| 450 | − return (sk->sk_state == TCP_SYN_RECV && | |
| 451 | − tcp_sk(sk)->fastopen_rsk != NULL); | |
| 450 | + return sk->sk_state == TCP_SYN_RECV && | |
| 451 | + rcu_access_pointer(tcp_sk(sk)->fastopen_rsk) != NULL; | |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | 454 | static inline void fastopen_queue_tune(struct sock *sk, int backlog) |
| @@ -230,8 +230,8 @@ static inline int xa_err(void *entry) · 229 unmodified lines | ||
| 230 | 230 | * This structure is used either directly or via the XA_LIMIT() macro |
| 231 | 231 | * to communicate the range of IDs that are valid for allocation. |
| 232 | 232 | * Two common ranges are predefined for you: |
| 233 | − * * xa_limit_32b - [0 - UINT_MAX] | |
| 234 | − * * xa_limit_31b - [0 - INT_MAX] | |
| 233 | + * * xa_limit_32b - [0 - UINT_MAX] | |
| 234 | + * * xa_limit_31b - [0 - INT_MAX] | |
| 235 | 235 | */ |
| 236 | 236 | struct xa_limit { |
| 237 | 237 | u32 max; |