History

Merge branch 'perf/urgent' into perf/core, to pick up fixes

Ingo Molnar committed 7 years ago

Commit 65133032 parents 27a0a90 652521d585 files · +5323 −3247Browse files

Showing the changes to include/linux (13 of 585 files). Show all

Unified · Split

13 files
  1. include/linux/bitmap.h +2 −1
  2. include/linux/cpufreq.h +5 −2
  3. include/linux/export.h +5 −9
  4. include/linux/gpio/driver.h +8 −0
  5. include/linux/micrel_phy.h +1 −1
  6. include/linux/page_ext.h +9 −1
  7. include/linux/perf_event.h +1 −1
  8. include/linux/pm_qos.h +44 −12
  9. include/linux/sched.h +1 −0
  10. include/linux/skbuff.h +3 −2
  11. include/linux/sysfs.h +2 −2
  12. include/linux/tcp.h +3 −3
  13. include/linux/xarray.h +2 −2
include/linux/bitmap.h+2−1
@@ -326,10 +326,11 @@ static inline int bitmap_equal(const unsigned long *src1, · 325 unmodified lines
326326 }
327327
328328 /**
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
330330 * @src1: Pointer to bitmap 1
331331 * @src2: Pointer to bitmap 2 will be or'ed with bitmap 1
332332 * @src3: Pointer to bitmap 3. Compare to the result of *@src1 | *@src2
333+ * @nbits: number of bits in each of these bitmaps
333334 *
334335 * Returns: True if (*@src1 | *@src2) == *@src3, false otherwise
335336 */
include/linux/cpufreq.h+5−2
@@ -13,6 +13,7 @@ · 12 unmodified lines
1313 #include <linux/completion.h>
1414 #include <linux/kobject.h>
1515 #include <linux/notifier.h>
16+#include <linux/pm_qos.h>
1617 #include <linux/spinlock.h>
1718 #include <linux/sysfs.h>
1819
@@ -76,8 +77,10 @@ struct cpufreq_policy { · 57 unmodified lines
7677 struct work_struct update; /* if update_policy() needs to be
7778 * called, but you're in IRQ context */
7879
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+
8184 struct cpufreq_frequency_table *freq_table;
8285 enum cpufreq_table_sorting freq_table_sorted;
8386
include/linux/export.h+5−9
@@ -18,8 +18,6 @@ extern struct module __this_module; · 17 unmodified lines
1818 #define THIS_MODULE ((struct module *)0)
1919 #endif
2020
21−#define NS_SEPARATOR "."
22−
2321 #ifdef CONFIG_MODVERSIONS
2422 /* Mark the CRC weak since genksyms apparently decides not to
2523 * generate a checksums for some symbols */
@@ -48,11 +46,11 @@ extern struct module __this_module; · 22 unmodified lines
4846 * absolute relocations that require runtime processing on relocatable
4947 * kernels.
5048 */
51−#define __KSYMTAB_ENTRY_NS(sym, sec, ns) \
49+#define __KSYMTAB_ENTRY_NS(sym, sec) \
5250 __ADDRESSABLE(sym) \
5351 asm(" .section \"___ksymtab" sec "+" #sym "\", \"a\" \n" \
5452 " .balign 4 \n" \
55− "__ksymtab_" #ns NS_SEPARATOR #sym ": \n" \
53+ "__ksymtab_" #sym ": \n" \
5654 " .long " #sym "- . \n" \
5755 " .long __kstrtab_" #sym "- . \n" \
5856 " .long __kstrtabns_" #sym "- . \n" \
@@ -74,16 +72,14 @@ struct kernel_symbol { · 15 unmodified lines
7472 int namespace_offset;
7573 };
7674 #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 \
8077 __attribute__((section("___ksymtab" sec "+" #sym), used)) \
8178 __aligned(sizeof(void *)) \
8279 = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym }
8380
8481 #define __KSYMTAB_ENTRY(sym, sec) \
8582 static const struct kernel_symbol __ksymtab_##sym \
86− asm("__ksymtab_" #sym) \
8783 __attribute__((section("___ksymtab" sec "+" #sym), used)) \
8884 __aligned(sizeof(void *)) \
8985 = { (unsigned long)&sym, __kstrtab_##sym, NULL }
@@ -115,7 +111,7 @@ struct kernel_symbol { · 25 unmodified lines
115111 static const char __kstrtabns_##sym[] \
116112 __attribute__((section("__ksymtab_strings"), used, aligned(1))) \
117113 = #ns; \
118− __KSYMTAB_ENTRY_NS(sym, sec, ns)
114+ __KSYMTAB_ENTRY_NS(sym, sec)
119115
120116 #define ___EXPORT_SYMBOL(sym, sec) \
121117 ___export_symbol_common(sym, sec); \
include/linux/gpio/driver.h+8−0
@@ -201,6 +201,14 @@ struct gpio_irq_chip { · 200 unmodified lines
201201 */
202202 bool threaded;
203203
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+
204212 /**
205213 * @init_valid_mask: optional routine to initialize @valid_mask, to be
206214 * used if not all GPIO lines are valid interrupts. Sometimes some
include/linux/micrel_phy.h+1−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
3131 #define PHY_ID_KSZ886X 0x00221430
3232 #define PHY_ID_KSZ8863 0x00221435
3333
34−#define PHY_ID_KSZ8795 0x00221550
34+#define PHY_ID_KSZ87XX 0x00221550
3535
3636 #define PHY_ID_KSZ9477 0x00221631
3737
include/linux/page_ext.h+9−1
@@ -18,7 +18,7 @@ struct page_ext_operations { · 17 unmodified lines
1818
1919 enum page_ext_flags {
2020 PAGE_EXT_OWNER,
21− PAGE_EXT_OWNER_ACTIVE,
21+ PAGE_EXT_OWNER_ALLOCATED,
2222 #if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT)
2323 PAGE_EXT_YOUNG,
2424 PAGE_EXT_IDLE,
@@ -36,6 +36,7 @@ struct page_ext { · 11 unmodified lines
3636 unsigned long flags;
3737 };
3838
39+extern unsigned long page_ext_size;
3940 extern void pgdat_page_ext_init(struct pglist_data *pgdat);
4041
4142 #ifdef CONFIG_SPARSEMEM
@@ -52,6 +53,13 @@ static inline void page_ext_init(void) · 10 unmodified lines
5253
5354 struct page_ext *lookup_page_ext(const struct page *page);
5455
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+
5563 #else /* !CONFIG_PAGE_EXTENSION */
5664 struct page_ext;
5765
include/linux/perf_event.h+1−1
@@ -293,7 +293,7 @@ struct pmu { · 292 unmodified lines
293293 * -EBUSY -- @event is for this PMU but PMU temporarily unavailable
294294 * -EINVAL -- @event is for this PMU but @event is not valid
295295 * -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
297297 *
298298 * 0 -- @event is for this PMU and valid
299299 *
include/linux/pm_qos.h+44−12
@@ -34,8 +34,6 @@ enum pm_qos_flags_status { · 33 unmodified lines
3434 #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT PM_QOS_LATENCY_ANY
3535 #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS PM_QOS_LATENCY_ANY_NS
3636 #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)
3937 #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1)
4038
4139 #define PM_QOS_FLAG_NO_POWER_OFF (1 << 0)
@@ -54,8 +52,6 @@ struct pm_qos_flags_request { · 12 unmodified lines
5452 enum dev_pm_qos_req_type {
5553 DEV_PM_QOS_RESUME_LATENCY = 1,
5654 DEV_PM_QOS_LATENCY_TOLERANCE,
57− DEV_PM_QOS_MIN_FREQUENCY,
58− DEV_PM_QOS_MAX_FREQUENCY,
5955 DEV_PM_QOS_FLAGS,
6056 };
6157
@@ -97,14 +93,10 @@ struct pm_qos_flags { · 35 unmodified lines
9793 struct dev_pm_qos {
9894 struct pm_qos_constraints resume_latency;
9995 struct pm_qos_constraints latency_tolerance;
100− struct pm_qos_constraints min_frequency;
101− struct pm_qos_constraints max_frequency;
10296 struct pm_qos_flags flags;
10397 struct dev_pm_qos_request *resume_latency_req;
10498 struct dev_pm_qos_request *latency_tolerance_req;
10599 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;
108100 };
109101
110102 /* 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
199191 switch (type) {
200192 case DEV_PM_QOS_RESUME_LATENCY:
201193 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;
206194 default:
207195 WARN_ON(1);
208196 return 0;
@@ -267,4 +255,48 @@ static inline s32 dev_pm_qos_raw_resume_latency(struct device *dev) · 58 unmodified lines
267255 }
268256 #endif
269257
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+
270302 #endif
include/linux/sched.h+1−0
@@ -223,6 +223,7 @@ extern long schedule_timeout_uninterruptible(long timeout); · 222 unmodified lines
223223 extern long schedule_timeout_idle(long timeout);
224224 asmlinkage void schedule(void);
225225 extern void schedule_preempt_disabled(void);
226+asmlinkage void preempt_schedule_irq(void);
226227
227228 extern int __must_check io_schedule_prepare(void);
228229 extern void io_schedule_finish(int token);
include/linux/skbuff.h+3−2
@@ -3510,8 +3510,9 @@ int skb_ensure_writable(struct sk_buff *skb, int write_len); · 3509 unmodified lines
35103510 int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci);
35113511 int skb_vlan_pop(struct sk_buff *skb);
35123512 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);
35153516 int skb_mpls_update_lse(struct sk_buff *skb, __be32 mpls_lse);
35163517 int skb_mpls_dec_ttl(struct sk_buff *skb);
35173518 struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy,
include/linux/sysfs.h+2−2
@@ -196,9 +196,9 @@ struct bin_attribute { · 195 unmodified lines
196196 .size = _size, \
197197 }
198198
199−#define __BIN_ATTR_WO(_name) { \
199+#define __BIN_ATTR_WO(_name, _size) { \
200200 .attr = { .name = __stringify(_name), .mode = 0200 }, \
201− .store = _name##_store, \
201+ .write = _name##_write, \
202202 .size = _size, \
203203 }
204204
include/linux/tcp.h+3−3
@@ -393,7 +393,7 @@ struct tcp_sock { · 392 unmodified lines
393393 /* fastopen_rsk points to request_sock that resulted in this big
394394 * socket. Used to retransmit SYNACKs etc.
395395 */
396− struct request_sock *fastopen_rsk;
396+ struct request_sock __rcu *fastopen_rsk;
397397 u32 *saved_syn;
398398 };
399399
@@ -447,8 +447,8 @@ static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) · 47 unmodified lines
447447
448448 static inline bool tcp_passive_fastopen(const struct sock *sk)
449449 {
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;
452452 }
453453
454454 static inline void fastopen_queue_tune(struct sock *sk, int backlog)
include/linux/xarray.h+2−2
@@ -230,8 +230,8 @@ static inline int xa_err(void *entry) · 229 unmodified lines
230230 * This structure is used either directly or via the XA_LIMIT() macro
231231 * to communicate the range of IDs that are valid for allocation.
232232 * 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]
235235 */
236236 struct xa_limit {
237237 u32 max;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t