History

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

Conflict resolution of af_smc.c from Stephen Rothwell.

David S. Miller committed 7 years ago

Commit 6b0a7f82 parents cea0aa9 fe5cdef350 files · +3831 −1901Browse files

Showing the changes to include/linux (12 of 350 files). Show all

Unified · Split

12 files
  1. include/linux/bio.h +12 −8
  2. include/linux/blk-mq.h +1 −0
  3. include/linux/bvec.h +10 −4
  4. include/linux/kernel.h +2 −2
  5. include/linux/kvm_host.h +6 −4
  6. include/linux/mm.h +14 −1
  7. include/linux/netdevice.h +3 −0
  8. include/linux/nvme.h +7 −2
  9. include/linux/pipe_fs_i.h +6 −4
  10. include/linux/platform_data/x86/clk-pmc-atom.h +3 −0
  11. include/linux/sunrpc/sched.h +0 −8
  12. include/linux/virtio_ring.h +1 −1
include/linux/bio.h+12−8
@@ -120,19 +120,23 @@ static inline bool bio_full(struct bio *bio) · 119 unmodified lines
120120 return bio->bi_vcnt >= bio->bi_max_vecs;
121121 }
122122
123−#define mp_bvec_for_each_segment(bv, bvl, i, iter_all) \
124− for (bv = bvec_init_iter_all(&iter_all); \
125− (iter_all.done < (bvl)->bv_len) && \
126− (mp_bvec_next_segment((bvl), &iter_all), 1); \
127− iter_all.done += bv->bv_len, i += 1)
123+static inline bool bio_next_segment(const struct bio *bio,
124+ struct bvec_iter_all *iter)
125+{
126+ if (iter->idx >= bio->bi_vcnt)
127+ return false;
128+
129+ bvec_advance(&bio->bi_io_vec[iter->idx], iter);
130+ return true;
131+}
128132
129133 /*
130134 * drivers should _never_ use the all version - the bio may have been split
131135 * before it got to the driver and the driver won't own all of it
132136 */
133−#define bio_for_each_segment_all(bvl, bio, i, iter_all) \
134− for (i = 0, iter_all.idx = 0; iter_all.idx < (bio)->bi_vcnt; iter_all.idx++) \
135− mp_bvec_for_each_segment(bvl, &((bio)->bi_io_vec[iter_all.idx]), i, iter_all)
137+#define bio_for_each_segment_all(bvl, bio, i, iter) \
138+ for (i = 0, bvl = bvec_init_iter_all(&iter); \
139+ bio_next_segment((bio), &iter); i++)
136140
137141 static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter,
138142 unsigned bytes)
include/linux/blk-mq.h+1−0
@@ -302,6 +302,7 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list); · 301 unmodified lines
302302 void blk_mq_kick_requeue_list(struct request_queue *q);
303303 void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs);
304304 bool blk_mq_complete_request(struct request *rq);
305+void blk_mq_complete_request_sync(struct request *rq);
305306 bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list,
306307 struct bio *bio);
307308 bool blk_mq_queue_stopped(struct request_queue *q);
include/linux/bvec.h+10−4
@@ -145,18 +145,18 @@ static inline bool bvec_iter_advance(const struct bio_vec *bv, · 144 unmodified lines
145145
146146 static inline struct bio_vec *bvec_init_iter_all(struct bvec_iter_all *iter_all)
147147 {
148− iter_all->bv.bv_page = NULL;
149148 iter_all->done = 0;
149+ iter_all->idx = 0;
150150
151151 return &iter_all->bv;
152152 }
153153
154−static inline void mp_bvec_next_segment(const struct bio_vec *bvec,
155− struct bvec_iter_all *iter_all)
154+static inline void bvec_advance(const struct bio_vec *bvec,
155+ struct bvec_iter_all *iter_all)
156156 {
157157 struct bio_vec *bv = &iter_all->bv;
158158
159− if (bv->bv_page) {
159+ if (iter_all->done) {
160160 bv->bv_page = nth_page(bv->bv_page, 1);
161161 bv->bv_offset = 0;
162162 } else {
@@ -165,6 +165,12 @@ static inline void mp_bvec_next_segment(const struct bio_vec *bvec, · 2 unmodified lines
165165 }
166166 bv->bv_len = min_t(unsigned int, PAGE_SIZE - bv->bv_offset,
167167 bvec->bv_len - iter_all->done);
168+ iter_all->done += bv->bv_len;
169+
170+ if (iter_all->done == bvec->bv_len) {
171+ iter_all->idx++;
172+ iter_all->done = 0;
173+ }
168174 }
169175
170176 /*
include/linux/kernel.h+2−2
@@ -47,8 +47,8 @@ · 46 unmodified lines
4747
4848 #define u64_to_user_ptr(x) ( \
4949 { \
50− typecheck(u64, x); \
51− (void __user *)(uintptr_t)x; \
50+ typecheck(u64, (x)); \
51+ (void __user *)(uintptr_t)(x); \
5252 } \
5353 )
5454
include/linux/kvm_host.h+6−4
@@ -28,6 +28,7 @@ · 27 unmodified lines
2828 #include <linux/irqbypass.h>
2929 #include <linux/swait.h>
3030 #include <linux/refcount.h>
31+#include <linux/nospec.h>
3132 #include <asm/signal.h>
3233
3334 #include <linux/kvm.h>
@@ -513,10 +514,10 @@ static inline struct kvm_io_bus *kvm_get_bus(struct kvm *kvm, enum kvm_bus idx) · 479 unmodified lines
513514
514515 static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
515516 {
516− /* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu, in case
517− * the caller has read kvm->online_vcpus before (as is the case
518− * for kvm_for_each_vcpu, for example).
519− */
517+ int num_vcpus = atomic_read(&kvm->online_vcpus);
518+ i = array_index_nospec(i, num_vcpus);
519+
520+ /* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu. */
520521 smp_rmb();
521522 return kvm->vcpus[i];
522523 }
@@ -600,6 +601,7 @@ void kvm_put_kvm(struct kvm *kvm); · 77 unmodified lines
600601
601602 static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id)
602603 {
604+ as_id = array_index_nospec(as_id, KVM_ADDRESS_SPACE_NUM);
603605 return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu,
604606 lockdep_is_held(&kvm->slots_lock) ||
605607 !refcount_read(&kvm->users_count));
include/linux/mm.h+14−1
@@ -966,6 +966,10 @@ static inline bool is_pci_p2pdma_page(const struct page *page) · 965 unmodified lines
966966 }
967967 #endif /* CONFIG_DEV_PAGEMAP_OPS */
968968
969+/* 127: arbitrary random number, small enough to assemble well */
970+#define page_ref_zero_or_close_to_overflow(page) \
971+ ((unsigned int) page_ref_count(page) + 127u <= 127u)
972+
969973 static inline void get_page(struct page *page)
970974 {
971975 page = compound_head(page);
@@ -973,8 +977,17 @@ static inline void get_page(struct page *page) · 1 unmodified line
973977 * Getting a normal page or the head of a compound page
974978 * requires to already have an elevated page->_refcount.
975979 */
976− VM_BUG_ON_PAGE(page_ref_count(page) <= 0, page);
980+ VM_BUG_ON_PAGE(page_ref_zero_or_close_to_overflow(page), page);
981+ page_ref_inc(page);
982+}
983+
984+static inline __must_check bool try_get_page(struct page *page)
985+{
986+ page = compound_head(page);
987+ if (WARN_ON_ONCE(page_ref_count(page) <= 0))
988+ return false;
977989 page_ref_inc(page);
990+ return true;
978991 }
979992
980993 static inline void put_page(struct page *page)
include/linux/netdevice.h+3−0
@@ -1498,6 +1498,7 @@ struct net_device_ops { · 1497 unmodified lines
14981498 * @IFF_FAILOVER: device is a failover master device
14991499 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device
15001500 * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device
1501+ * @IFF_LIVE_RENAME_OK: rename is allowed while device is up and running
15011502 */
15021503 enum netdev_priv_flags {
15031504 IFF_802_1Q_VLAN = 1<<0,
@@ -1530,6 +1531,7 @@ enum netdev_priv_flags { · 26 unmodified lines
15301531 IFF_FAILOVER = 1<<27,
15311532 IFF_FAILOVER_SLAVE = 1<<28,
15321533 IFF_L3MDEV_RX_HANDLER = 1<<29,
1534+ IFF_LIVE_RENAME_OK = 1<<30,
15331535 };
15341536
15351537 #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1561,6 +1563,7 @@ enum netdev_priv_flags { · 25 unmodified lines
15611563 #define IFF_FAILOVER IFF_FAILOVER
15621564 #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
15631565 #define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
1566+#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
15641567
15651568 /**
15661569 * struct net_device - The DEVICE structure.
include/linux/nvme.h+7−2
@@ -967,8 +967,13 @@ struct nvme_get_log_page_command { · 966 unmodified lines
967967 __le16 numdl;
968968 __le16 numdu;
969969 __u16 rsvd11;
970− __le32 lpol;
971− __le32 lpou;
970+ union {
971+ struct {
972+ __le32 lpol;
973+ __le32 lpou;
974+ };
975+ __le64 lpo;
976+ };
972977 __u32 rsvd14[2];
973978 };
974979
include/linux/pipe_fs_i.h+6−4
@@ -101,18 +101,20 @@ struct pipe_buf_operations { · 100 unmodified lines
101101 /*
102102 * Get a reference to the pipe buffer.
103103 */
104− void (*get)(struct pipe_inode_info *, struct pipe_buffer *);
104+ bool (*get)(struct pipe_inode_info *, struct pipe_buffer *);
105105 };
106106
107107 /**
108108 * pipe_buf_get - get a reference to a pipe_buffer
109109 * @pipe: the pipe that the buffer belongs to
110110 * @buf: the buffer to get a reference to
111+ *
112+ * Return: %true if the reference was successfully obtained.
111113 */
112−static inline void pipe_buf_get(struct pipe_inode_info *pipe,
114+static inline __must_check bool pipe_buf_get(struct pipe_inode_info *pipe,
113115 struct pipe_buffer *buf)
114116 {
115− buf->ops->get(pipe, buf);
117+ return buf->ops->get(pipe, buf);
116118 }
117119
118120 /**
@@ -171,7 +173,7 @@ struct pipe_inode_info *alloc_pipe_info(void); · 52 unmodified lines
171173 void free_pipe_info(struct pipe_inode_info *);
172174
173175 /* Generic pipe buffer ops functions */
174−void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);
176+bool generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);
175177 int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);
176178 int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *);
177179 void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *);
include/linux/platform_data/x86/clk-pmc-atom.h+3−0
@@ -35,10 +35,13 @@ struct pmc_clk { · 34 unmodified lines
3535 *
3636 * @base: PMC clock register base offset
3737 * @clks: pointer to set of registered clocks, typically 0..5
38+ * @critical: flag to indicate if firmware enabled pmc_plt_clks
39+ * should be marked as critial or not
3840 */
3941 struct pmc_clk_data {
4042 void __iomem *base;
4143 const struct pmc_clk *clks;
44+ bool critical;
4245 };
4346
4447 #endif /* __PLATFORM_DATA_X86_CLK_PMC_ATOM_H */
include/linux/sunrpc/sched.h+0−8
@@ -304,12 +304,4 @@ rpc_clnt_swap_deactivate(struct rpc_clnt *clnt) · 303 unmodified lines
304304 }
305305 #endif /* CONFIG_SUNRPC_SWAP */
306306
307−static inline bool
308−rpc_task_need_resched(const struct rpc_task *task)
309−{
310− if (RPC_IS_QUEUED(task) || task->tk_callback)
311− return true;
312− return false;
313−}
314−
315307 #endif /* _LINUX_SUNRPC_SCHED_H_ */
include/linux/virtio_ring.h+1−1
@@ -63,7 +63,7 @@ struct virtqueue; · 62 unmodified lines
6363 /*
6464 * Creates a virtqueue and allocates the descriptor ring. If
6565 * may_reduce_num is set, then this may allocate a smaller ring than
66− * expected. The caller should query virtqueue_get_ring_size to learn
66+ * expected. The caller should query virtqueue_get_vring_size to learn
6767 * the actual size of the ring.
6868 */
6969 struct virtqueue *vring_create_virtqueue(unsigned int index,

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