Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflict resolution of af_smc.c from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
6b0a7f84ea
350 changed files with 3837 additions and 1907 deletions
|
|
@ -120,19 +120,23 @@ static inline bool bio_full(struct bio *bio)
|
|||
return bio->bi_vcnt >= bio->bi_max_vecs;
|
||||
}
|
||||
|
||||
#define mp_bvec_for_each_segment(bv, bvl, i, iter_all) \
|
||||
for (bv = bvec_init_iter_all(&iter_all); \
|
||||
(iter_all.done < (bvl)->bv_len) && \
|
||||
(mp_bvec_next_segment((bvl), &iter_all), 1); \
|
||||
iter_all.done += bv->bv_len, i += 1)
|
||||
static inline bool bio_next_segment(const struct bio *bio,
|
||||
struct bvec_iter_all *iter)
|
||||
{
|
||||
if (iter->idx >= bio->bi_vcnt)
|
||||
return false;
|
||||
|
||||
bvec_advance(&bio->bi_io_vec[iter->idx], iter);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* drivers should _never_ use the all version - the bio may have been split
|
||||
* before it got to the driver and the driver won't own all of it
|
||||
*/
|
||||
#define bio_for_each_segment_all(bvl, bio, i, iter_all) \
|
||||
for (i = 0, iter_all.idx = 0; iter_all.idx < (bio)->bi_vcnt; iter_all.idx++) \
|
||||
mp_bvec_for_each_segment(bvl, &((bio)->bi_io_vec[iter_all.idx]), i, iter_all)
|
||||
#define bio_for_each_segment_all(bvl, bio, i, iter) \
|
||||
for (i = 0, bvl = bvec_init_iter_all(&iter); \
|
||||
bio_next_segment((bio), &iter); i++)
|
||||
|
||||
static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter,
|
||||
unsigned bytes)
|
||||
|
|
|
|||
|
|
@ -302,6 +302,7 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list);
|
|||
void blk_mq_kick_requeue_list(struct request_queue *q);
|
||||
void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs);
|
||||
bool blk_mq_complete_request(struct request *rq);
|
||||
void blk_mq_complete_request_sync(struct request *rq);
|
||||
bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list,
|
||||
struct bio *bio);
|
||||
bool blk_mq_queue_stopped(struct request_queue *q);
|
||||
|
|
|
|||
|
|
@ -145,18 +145,18 @@ static inline bool bvec_iter_advance(const struct bio_vec *bv,
|
|||
|
||||
static inline struct bio_vec *bvec_init_iter_all(struct bvec_iter_all *iter_all)
|
||||
{
|
||||
iter_all->bv.bv_page = NULL;
|
||||
iter_all->done = 0;
|
||||
iter_all->idx = 0;
|
||||
|
||||
return &iter_all->bv;
|
||||
}
|
||||
|
||||
static inline void mp_bvec_next_segment(const struct bio_vec *bvec,
|
||||
struct bvec_iter_all *iter_all)
|
||||
static inline void bvec_advance(const struct bio_vec *bvec,
|
||||
struct bvec_iter_all *iter_all)
|
||||
{
|
||||
struct bio_vec *bv = &iter_all->bv;
|
||||
|
||||
if (bv->bv_page) {
|
||||
if (iter_all->done) {
|
||||
bv->bv_page = nth_page(bv->bv_page, 1);
|
||||
bv->bv_offset = 0;
|
||||
} else {
|
||||
|
|
@ -165,6 +165,12 @@ static inline void mp_bvec_next_segment(const struct bio_vec *bvec,
|
|||
}
|
||||
bv->bv_len = min_t(unsigned int, PAGE_SIZE - bv->bv_offset,
|
||||
bvec->bv_len - iter_all->done);
|
||||
iter_all->done += bv->bv_len;
|
||||
|
||||
if (iter_all->done == bvec->bv_len) {
|
||||
iter_all->idx++;
|
||||
iter_all->done = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@
|
|||
|
||||
#define u64_to_user_ptr(x) ( \
|
||||
{ \
|
||||
typecheck(u64, x); \
|
||||
(void __user *)(uintptr_t)x; \
|
||||
typecheck(u64, (x)); \
|
||||
(void __user *)(uintptr_t)(x); \
|
||||
} \
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <linux/irqbypass.h>
|
||||
#include <linux/swait.h>
|
||||
#include <linux/refcount.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <asm/signal.h>
|
||||
|
||||
#include <linux/kvm.h>
|
||||
|
|
@ -513,10 +514,10 @@ static inline struct kvm_io_bus *kvm_get_bus(struct kvm *kvm, enum kvm_bus idx)
|
|||
|
||||
static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
|
||||
{
|
||||
/* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu, in case
|
||||
* the caller has read kvm->online_vcpus before (as is the case
|
||||
* for kvm_for_each_vcpu, for example).
|
||||
*/
|
||||
int num_vcpus = atomic_read(&kvm->online_vcpus);
|
||||
i = array_index_nospec(i, num_vcpus);
|
||||
|
||||
/* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu. */
|
||||
smp_rmb();
|
||||
return kvm->vcpus[i];
|
||||
}
|
||||
|
|
@ -600,6 +601,7 @@ void kvm_put_kvm(struct kvm *kvm);
|
|||
|
||||
static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id)
|
||||
{
|
||||
as_id = array_index_nospec(as_id, KVM_ADDRESS_SPACE_NUM);
|
||||
return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu,
|
||||
lockdep_is_held(&kvm->slots_lock) ||
|
||||
!refcount_read(&kvm->users_count));
|
||||
|
|
|
|||
|
|
@ -966,6 +966,10 @@ static inline bool is_pci_p2pdma_page(const struct page *page)
|
|||
}
|
||||
#endif /* CONFIG_DEV_PAGEMAP_OPS */
|
||||
|
||||
/* 127: arbitrary random number, small enough to assemble well */
|
||||
#define page_ref_zero_or_close_to_overflow(page) \
|
||||
((unsigned int) page_ref_count(page) + 127u <= 127u)
|
||||
|
||||
static inline void get_page(struct page *page)
|
||||
{
|
||||
page = compound_head(page);
|
||||
|
|
@ -973,10 +977,19 @@ static inline void get_page(struct page *page)
|
|||
* Getting a normal page or the head of a compound page
|
||||
* requires to already have an elevated page->_refcount.
|
||||
*/
|
||||
VM_BUG_ON_PAGE(page_ref_count(page) <= 0, page);
|
||||
VM_BUG_ON_PAGE(page_ref_zero_or_close_to_overflow(page), page);
|
||||
page_ref_inc(page);
|
||||
}
|
||||
|
||||
static inline __must_check bool try_get_page(struct page *page)
|
||||
{
|
||||
page = compound_head(page);
|
||||
if (WARN_ON_ONCE(page_ref_count(page) <= 0))
|
||||
return false;
|
||||
page_ref_inc(page);
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void put_page(struct page *page)
|
||||
{
|
||||
page = compound_head(page);
|
||||
|
|
|
|||
|
|
@ -1498,6 +1498,7 @@ struct net_device_ops {
|
|||
* @IFF_FAILOVER: device is a failover master device
|
||||
* @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device
|
||||
* @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device
|
||||
* @IFF_LIVE_RENAME_OK: rename is allowed while device is up and running
|
||||
*/
|
||||
enum netdev_priv_flags {
|
||||
IFF_802_1Q_VLAN = 1<<0,
|
||||
|
|
@ -1530,6 +1531,7 @@ enum netdev_priv_flags {
|
|||
IFF_FAILOVER = 1<<27,
|
||||
IFF_FAILOVER_SLAVE = 1<<28,
|
||||
IFF_L3MDEV_RX_HANDLER = 1<<29,
|
||||
IFF_LIVE_RENAME_OK = 1<<30,
|
||||
};
|
||||
|
||||
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
|
||||
|
|
@ -1561,6 +1563,7 @@ enum netdev_priv_flags {
|
|||
#define IFF_FAILOVER IFF_FAILOVER
|
||||
#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
|
||||
#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
|
||||
#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
|
||||
|
||||
/**
|
||||
* struct net_device - The DEVICE structure.
|
||||
|
|
|
|||
|
|
@ -967,8 +967,13 @@ struct nvme_get_log_page_command {
|
|||
__le16 numdl;
|
||||
__le16 numdu;
|
||||
__u16 rsvd11;
|
||||
__le32 lpol;
|
||||
__le32 lpou;
|
||||
union {
|
||||
struct {
|
||||
__le32 lpol;
|
||||
__le32 lpou;
|
||||
};
|
||||
__le64 lpo;
|
||||
};
|
||||
__u32 rsvd14[2];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -101,18 +101,20 @@ struct pipe_buf_operations {
|
|||
/*
|
||||
* Get a reference to the pipe buffer.
|
||||
*/
|
||||
void (*get)(struct pipe_inode_info *, struct pipe_buffer *);
|
||||
bool (*get)(struct pipe_inode_info *, struct pipe_buffer *);
|
||||
};
|
||||
|
||||
/**
|
||||
* pipe_buf_get - get a reference to a pipe_buffer
|
||||
* @pipe: the pipe that the buffer belongs to
|
||||
* @buf: the buffer to get a reference to
|
||||
*
|
||||
* Return: %true if the reference was successfully obtained.
|
||||
*/
|
||||
static inline void pipe_buf_get(struct pipe_inode_info *pipe,
|
||||
static inline __must_check bool pipe_buf_get(struct pipe_inode_info *pipe,
|
||||
struct pipe_buffer *buf)
|
||||
{
|
||||
buf->ops->get(pipe, buf);
|
||||
return buf->ops->get(pipe, buf);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -171,7 +173,7 @@ struct pipe_inode_info *alloc_pipe_info(void);
|
|||
void free_pipe_info(struct pipe_inode_info *);
|
||||
|
||||
/* Generic pipe buffer ops functions */
|
||||
void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);
|
||||
bool generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);
|
||||
int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);
|
||||
int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *);
|
||||
void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *);
|
||||
|
|
|
|||
|
|
@ -35,10 +35,13 @@ struct pmc_clk {
|
|||
*
|
||||
* @base: PMC clock register base offset
|
||||
* @clks: pointer to set of registered clocks, typically 0..5
|
||||
* @critical: flag to indicate if firmware enabled pmc_plt_clks
|
||||
* should be marked as critial or not
|
||||
*/
|
||||
struct pmc_clk_data {
|
||||
void __iomem *base;
|
||||
const struct pmc_clk *clks;
|
||||
bool critical;
|
||||
};
|
||||
|
||||
#endif /* __PLATFORM_DATA_X86_CLK_PMC_ATOM_H */
|
||||
|
|
|
|||
|
|
@ -304,12 +304,4 @@ rpc_clnt_swap_deactivate(struct rpc_clnt *clnt)
|
|||
}
|
||||
#endif /* CONFIG_SUNRPC_SWAP */
|
||||
|
||||
static inline bool
|
||||
rpc_task_need_resched(const struct rpc_task *task)
|
||||
{
|
||||
if (RPC_IS_QUEUED(task) || task->tk_callback)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* _LINUX_SUNRPC_SCHED_H_ */
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ struct virtqueue;
|
|||
/*
|
||||
* Creates a virtqueue and allocates the descriptor ring. If
|
||||
* may_reduce_num is set, then this may allocate a smaller ring than
|
||||
* expected. The caller should query virtqueue_get_ring_size to learn
|
||||
* expected. The caller should query virtqueue_get_vring_size to learn
|
||||
* the actual size of the ring.
|
||||
*/
|
||||
struct virtqueue *vring_create_virtqueue(unsigned int index,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue