History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

No conflicts.

Jakub Kicinski committed 4 years ago

Commit 7cd28022 parents 0f473bb 6441998342 files · +3131 −1185Browse files

Showing the changes to include (8 of 342 files). Show all

Unified · Split

8 files
  1. include/linux/delay.h +13 −1
  2. include/linux/mhi.h +13 −0
  3. include/linux/percpu-refcount.h +1 −1
  4. include/linux/pm_runtime.h +1 −1
  5. include/linux/wait.h +26 −0
  6. include/uapi/asm-generic/poll.h +1 −1
  7. include/uapi/linux/mptcp.h +10 −8
  8. include/uapi/linux/resource.h +10 −3
include/linux/delay.h+13−1
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 */
2121
2222 #include <linux/math.h>
23+#include <linux/sched.h>
2324
2425 extern unsigned long loops_per_jiffy;
2526
@@ -58,7 +59,18 @@ void calibrate_delay(void); · 32 unmodified lines
5859 void __attribute__((weak)) calibration_delay_done(void);
5960 void msleep(unsigned int msecs);
6061 unsigned long msleep_interruptible(unsigned int msecs);
61−void usleep_range(unsigned long min, unsigned long max);
62+void usleep_range_state(unsigned long min, unsigned long max,
63+ unsigned int state);
64+
65+static inline void usleep_range(unsigned long min, unsigned long max)
66+{
67+ usleep_range_state(min, max, TASK_UNINTERRUPTIBLE);
68+}
69+
70+static inline void usleep_idle_range(unsigned long min, unsigned long max)
71+{
72+ usleep_range_state(min, max, TASK_IDLE);
73+}
6274
6375 static inline void ssleep(unsigned int seconds)
6476 {
include/linux/mhi.h+13−0
@@ -663,6 +663,19 @@ int mhi_pm_suspend(struct mhi_controller *mhi_cntrl); · 662 unmodified lines
663663 */
664664 int mhi_pm_resume(struct mhi_controller *mhi_cntrl);
665665
666+/**
667+ * mhi_pm_resume_force - Force resume MHI from suspended state
668+ * @mhi_cntrl: MHI controller
669+ *
670+ * Resume the device irrespective of its MHI state. As per the MHI spec, devices
671+ * has to be in M3 state during resume. But some devices seem to be in a
672+ * different MHI state other than M3 but they continue working fine if allowed.
673+ * This API is intented to be used for such devices.
674+ *
675+ * Return: 0 if the resume succeeds, a negative error code otherwise
676+ */
677+int mhi_pm_resume_force(struct mhi_controller *mhi_cntrl);
678+
666679 /**
667680 * mhi_download_rddm_image - Download ramdump image from device for
668681 * debugging purpose.
include/linux/percpu-refcount.h+1−1
@@ -51,9 +51,9 @@ · 50 unmodified lines
5151 #define _LINUX_PERCPU_REFCOUNT_H
5252
5353 #include <linux/atomic.h>
54−#include <linux/kernel.h>
5554 #include <linux/percpu.h>
5655 #include <linux/rcupdate.h>
56+#include <linux/types.h>
5757 #include <linux/gfp.h>
5858
5959 struct percpu_ref;
include/linux/pm_runtime.h+1−1
@@ -129,7 +129,7 @@ static inline bool pm_runtime_suspended(struct device *dev) · 128 unmodified lines
129129 * pm_runtime_active - Check whether or not a device is runtime-active.
130130 * @dev: Target device.
131131 *
132− * Return %true if runtime PM is enabled for @dev and its runtime PM status is
132+ * Return %true if runtime PM is disabled for @dev or its runtime PM status is
133133 * %RPM_ACTIVE, or %false otherwise.
134134 *
135135 * Note that the return value of this function can only be trusted if it is
include/linux/wait.h+26−0
@@ -217,6 +217,7 @@ void __wake_up_sync_key(struct wait_queue_head *wq_head, unsigned int mode, void · 216 unmodified lines
217217 void __wake_up_locked_sync_key(struct wait_queue_head *wq_head, unsigned int mode, void *key);
218218 void __wake_up_locked(struct wait_queue_head *wq_head, unsigned int mode, int nr);
219219 void __wake_up_sync(struct wait_queue_head *wq_head, unsigned int mode);
220+void __wake_up_pollfree(struct wait_queue_head *wq_head);
220221
221222 #define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL)
222223 #define wake_up_nr(x, nr) __wake_up(x, TASK_NORMAL, nr, NULL)
@@ -245,6 +246,31 @@ void __wake_up_sync(struct wait_queue_head *wq_head, unsigned int mode); · 22 unmodified lines
245246 #define wake_up_interruptible_sync_poll_locked(x, m) \
246247 __wake_up_locked_sync_key((x), TASK_INTERRUPTIBLE, poll_to_key(m))
247248
249+/**
250+ * wake_up_pollfree - signal that a polled waitqueue is going away
251+ * @wq_head: the wait queue head
252+ *
253+ * In the very rare cases where a ->poll() implementation uses a waitqueue whose
254+ * lifetime is tied to a task rather than to the 'struct file' being polled,
255+ * this function must be called before the waitqueue is freed so that
256+ * non-blocking polls (e.g. epoll) are notified that the queue is going away.
257+ *
258+ * The caller must also RCU-delay the freeing of the wait_queue_head, e.g. via
259+ * an explicit synchronize_rcu() or call_rcu(), or via SLAB_TYPESAFE_BY_RCU.
260+ */
261+static inline void wake_up_pollfree(struct wait_queue_head *wq_head)
262+{
263+ /*
264+ * For performance reasons, we don't always take the queue lock here.
265+ * Therefore, we might race with someone removing the last entry from
266+ * the queue, and proceed while they still hold the queue lock.
267+ * However, rcu_read_lock() is required to be held in such cases, so we
268+ * can safely proceed with an RCU-delayed free.
269+ */
270+ if (waitqueue_active(wq_head))
271+ __wake_up_pollfree(wq_head);
272+}
273+
248274 #define ___wait_cond_timeout(condition) \
249275 ({ \
250276 bool __cond = (condition); \
include/uapi/asm-generic/poll.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929 #define POLLRDHUP 0x2000
3030 #endif
3131
32−#define POLLFREE (__force __poll_t)0x4000 /* currently only for epoll */
32+#define POLLFREE (__force __poll_t)0x4000
3333
3434 #define POLL_BUSY_LOOP (__force __poll_t)0x8000
3535
include/uapi/linux/mptcp.h+10−8
@@ -136,19 +136,21 @@ struct mptcp_info { · 135 unmodified lines
136136 * MPTCP_EVENT_REMOVED: token, rem_id
137137 * An address has been lost by the peer.
138138 *
139− * MPTCP_EVENT_SUB_ESTABLISHED: token, family, saddr4 | saddr6,
140− * daddr4 | daddr6, sport, dport, backup,
141− * if_idx [, error]
139+ * MPTCP_EVENT_SUB_ESTABLISHED: token, family, loc_id, rem_id,
140+ * saddr4 | saddr6, daddr4 | daddr6, sport,
141+ * dport, backup, if_idx [, error]
142142 * A new subflow has been established. 'error' should not be set.
143143 *
144− * MPTCP_EVENT_SUB_CLOSED: token, family, saddr4 | saddr6, daddr4 | daddr6,
145− * sport, dport, backup, if_idx [, error]
144+ * MPTCP_EVENT_SUB_CLOSED: token, family, loc_id, rem_id, saddr4 | saddr6,
145+ * daddr4 | daddr6, sport, dport, backup, if_idx
146+ * [, error]
146147 * A subflow has been closed. An error (copy of sk_err) could be set if an
147148 * error has been detected for this subflow.
148149 *
149− * MPTCP_EVENT_SUB_PRIORITY: token, family, saddr4 | saddr6, daddr4 | daddr6,
150− * sport, dport, backup, if_idx [, error]
151− * The priority of a subflow has changed. 'error' should not be set.
150+ * MPTCP_EVENT_SUB_PRIORITY: token, family, loc_id, rem_id, saddr4 | saddr6,
151+ * daddr4 | daddr6, sport, dport, backup, if_idx
152+ * [, error]
153+ * The priority of a subflow has changed. 'error' should not be set.
152154 */
153155 enum mptcp_event_type {
154156 MPTCP_EVENT_UNSPEC = 0,
include/uapi/linux/resource.h+10−3
@@ -66,10 +66,17 @@ struct rlimit64 { · 65 unmodified lines
6666 #define _STK_LIM (8*1024*1024)
6767
6868 /*
69− * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
70− * and other sensitive information are never written to disk.
69+ * Limit the amount of locked memory by some sane default:
70+ * root can always increase this limit if needed.
71+ *
72+ * The main use-cases are (1) preventing sensitive memory
73+ * from being swapped; (2) real-time operations; (3) via
74+ * IOURING_REGISTER_BUFFERS.
75+ *
76+ * The first two don't need much. The latter will take as
77+ * much as it can get. 8MB is a reasonably sane default.
7178 */
72−#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
79+#define MLOCK_LIMIT (8*1024*1024)
7380
7481 /*
7582 * Due to binary compatibility, the actual resource numbers

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