mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 21:05:02 -04:00
Backmerge tag 'v4.7-rc2' into drm-next
Daniel has a pull request that relies on stuff in fixes that are in rc2.
This commit is contained in:
@@ -279,6 +279,11 @@ struct ceph_osd_client {
|
||||
struct workqueue_struct *notify_wq;
|
||||
};
|
||||
|
||||
static inline bool ceph_osdmap_flag(struct ceph_osd_client *osdc, int flag)
|
||||
{
|
||||
return osdc->osdmap->flags & flag;
|
||||
}
|
||||
|
||||
extern int ceph_osdc_setup(void);
|
||||
extern void ceph_osdc_cleanup(void);
|
||||
|
||||
|
||||
@@ -189,11 +189,6 @@ static inline bool ceph_osd_is_down(struct ceph_osdmap *map, int osd)
|
||||
return !ceph_osd_is_up(map, osd);
|
||||
}
|
||||
|
||||
static inline bool ceph_osdmap_flag(struct ceph_osdmap *map, int flag)
|
||||
{
|
||||
return map && (map->flags & flag);
|
||||
}
|
||||
|
||||
extern char *ceph_osdmap_state_str(char *str, int len, int state);
|
||||
extern u32 ceph_get_primary_affinity(struct ceph_osdmap *map, int osd);
|
||||
|
||||
|
||||
@@ -15,13 +15,12 @@
|
||||
|
||||
#include <linux/errno.h>
|
||||
|
||||
struct pts_fs_info;
|
||||
|
||||
#ifdef CONFIG_UNIX98_PTYS
|
||||
|
||||
/* Look up a pts fs info and get a ref to it */
|
||||
struct pts_fs_info *devpts_get_ref(struct inode *, struct file *);
|
||||
void devpts_put_ref(struct pts_fs_info *);
|
||||
struct pts_fs_info;
|
||||
|
||||
struct pts_fs_info *devpts_acquire(struct file *);
|
||||
void devpts_release(struct pts_fs_info *);
|
||||
|
||||
int devpts_new_index(struct pts_fs_info *);
|
||||
void devpts_kill_index(struct pts_fs_info *, int);
|
||||
|
||||
@@ -112,19 +112,24 @@ struct dma_buf_ops {
|
||||
* @file: file pointer used for sharing buffers across, and for refcounting.
|
||||
* @attachments: list of dma_buf_attachment that denotes all devices attached.
|
||||
* @ops: dma_buf_ops associated with this buffer object.
|
||||
* @lock: used internally to serialize list manipulation, attach/detach and vmap/unmap
|
||||
* @vmapping_counter: used internally to refcnt the vmaps
|
||||
* @vmap_ptr: the current vmap ptr if vmapping_counter > 0
|
||||
* @exp_name: name of the exporter; useful for debugging.
|
||||
* @owner: pointer to exporter module; used for refcounting when exporter is a
|
||||
* kernel module.
|
||||
* @list_node: node for dma_buf accounting and debugging.
|
||||
* @priv: exporter specific private data for this buffer object.
|
||||
* @resv: reservation object linked to this dma-buf
|
||||
* @poll: for userspace poll support
|
||||
* @cb_excl: for userspace poll support
|
||||
* @cb_shared: for userspace poll support
|
||||
*/
|
||||
struct dma_buf {
|
||||
size_t size;
|
||||
struct file *file;
|
||||
struct list_head attachments;
|
||||
const struct dma_buf_ops *ops;
|
||||
/* mutex to serialize list manipulation, attach/detach and vmap/unmap */
|
||||
struct mutex lock;
|
||||
unsigned vmapping_counter;
|
||||
void *vmap_ptr;
|
||||
@@ -188,9 +193,11 @@ struct dma_buf_export_info {
|
||||
|
||||
/**
|
||||
* helper macro for exporters; zeros and fills in most common values
|
||||
*
|
||||
* @name: export-info name
|
||||
*/
|
||||
#define DEFINE_DMA_BUF_EXPORT_INFO(a) \
|
||||
struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME, \
|
||||
#define DEFINE_DMA_BUF_EXPORT_INFO(name) \
|
||||
struct dma_buf_export_info name = { .exp_name = KBUILD_MODNAME, \
|
||||
.owner = THIS_MODULE }
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,6 +49,8 @@ struct fence_cb;
|
||||
* @timestamp: Timestamp when the fence was signaled.
|
||||
* @status: Optional, only valid if < 0, must be set before calling
|
||||
* fence_signal, indicates that the fence has completed with an error.
|
||||
* @child_list: list of children fences
|
||||
* @active_list: list of active fences
|
||||
*
|
||||
* the flags member must be manipulated and read using the appropriate
|
||||
* atomic ops (bit_*), so taking the spinlock will not be needed most
|
||||
|
||||
@@ -241,7 +241,7 @@ struct fscache_cache_ops {
|
||||
|
||||
/* check the consistency between the backing cache and the FS-Cache
|
||||
* cookie */
|
||||
bool (*check_consistency)(struct fscache_operation *op);
|
||||
int (*check_consistency)(struct fscache_operation *op);
|
||||
|
||||
/* store the updated auxiliary data on an object */
|
||||
void (*update_object)(struct fscache_object *object);
|
||||
|
||||
@@ -305,12 +305,12 @@
|
||||
#define ICC_SGI1R_AFFINITY_1_SHIFT 16
|
||||
#define ICC_SGI1R_AFFINITY_1_MASK (0xff << ICC_SGI1R_AFFINITY_1_SHIFT)
|
||||
#define ICC_SGI1R_SGI_ID_SHIFT 24
|
||||
#define ICC_SGI1R_SGI_ID_MASK (0xff << ICC_SGI1R_SGI_ID_SHIFT)
|
||||
#define ICC_SGI1R_SGI_ID_MASK (0xfULL << ICC_SGI1R_SGI_ID_SHIFT)
|
||||
#define ICC_SGI1R_AFFINITY_2_SHIFT 32
|
||||
#define ICC_SGI1R_AFFINITY_2_MASK (0xffULL << ICC_SGI1R_AFFINITY_1_SHIFT)
|
||||
#define ICC_SGI1R_AFFINITY_2_MASK (0xffULL << ICC_SGI1R_AFFINITY_2_SHIFT)
|
||||
#define ICC_SGI1R_IRQ_ROUTING_MODE_BIT 40
|
||||
#define ICC_SGI1R_AFFINITY_3_SHIFT 48
|
||||
#define ICC_SGI1R_AFFINITY_3_MASK (0xffULL << ICC_SGI1R_AFFINITY_1_SHIFT)
|
||||
#define ICC_SGI1R_AFFINITY_3_MASK (0xffULL << ICC_SGI1R_AFFINITY_3_SHIFT)
|
||||
|
||||
#include <asm/arch_gicv3.h>
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
|
||||
#define LOOKUP_ROOT 0x2000
|
||||
#define LOOKUP_EMPTY 0x4000
|
||||
|
||||
extern int path_pts(struct path *path);
|
||||
|
||||
extern int user_path_at_empty(int, const char __user *, unsigned, struct path *, int *empty);
|
||||
|
||||
static inline int user_path_at(int dfd, const char __user *name, unsigned flags,
|
||||
|
||||
@@ -46,33 +46,62 @@ extern struct page_ext_operations page_idle_ops;
|
||||
|
||||
static inline bool page_is_young(struct page *page)
|
||||
{
|
||||
return test_bit(PAGE_EXT_YOUNG, &lookup_page_ext(page)->flags);
|
||||
struct page_ext *page_ext = lookup_page_ext(page);
|
||||
|
||||
if (unlikely(!page_ext))
|
||||
return false;
|
||||
|
||||
return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
|
||||
}
|
||||
|
||||
static inline void set_page_young(struct page *page)
|
||||
{
|
||||
set_bit(PAGE_EXT_YOUNG, &lookup_page_ext(page)->flags);
|
||||
struct page_ext *page_ext = lookup_page_ext(page);
|
||||
|
||||
if (unlikely(!page_ext))
|
||||
return;
|
||||
|
||||
set_bit(PAGE_EXT_YOUNG, &page_ext->flags);
|
||||
}
|
||||
|
||||
static inline bool test_and_clear_page_young(struct page *page)
|
||||
{
|
||||
return test_and_clear_bit(PAGE_EXT_YOUNG,
|
||||
&lookup_page_ext(page)->flags);
|
||||
struct page_ext *page_ext = lookup_page_ext(page);
|
||||
|
||||
if (unlikely(!page_ext))
|
||||
return false;
|
||||
|
||||
return test_and_clear_bit(PAGE_EXT_YOUNG, &page_ext->flags);
|
||||
}
|
||||
|
||||
static inline bool page_is_idle(struct page *page)
|
||||
{
|
||||
return test_bit(PAGE_EXT_IDLE, &lookup_page_ext(page)->flags);
|
||||
struct page_ext *page_ext = lookup_page_ext(page);
|
||||
|
||||
if (unlikely(!page_ext))
|
||||
return false;
|
||||
|
||||
return test_bit(PAGE_EXT_IDLE, &page_ext->flags);
|
||||
}
|
||||
|
||||
static inline void set_page_idle(struct page *page)
|
||||
{
|
||||
set_bit(PAGE_EXT_IDLE, &lookup_page_ext(page)->flags);
|
||||
struct page_ext *page_ext = lookup_page_ext(page);
|
||||
|
||||
if (unlikely(!page_ext))
|
||||
return;
|
||||
|
||||
set_bit(PAGE_EXT_IDLE, &page_ext->flags);
|
||||
}
|
||||
|
||||
static inline void clear_page_idle(struct page *page)
|
||||
{
|
||||
clear_bit(PAGE_EXT_IDLE, &lookup_page_ext(page)->flags);
|
||||
struct page_ext *page_ext = lookup_page_ext(page);
|
||||
|
||||
if (unlikely(!page_ext))
|
||||
return;
|
||||
|
||||
clear_bit(PAGE_EXT_IDLE, &page_ext->flags);
|
||||
}
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
|
||||
@@ -49,12 +49,27 @@ extern struct ww_class reservation_ww_class;
|
||||
extern struct lock_class_key reservation_seqcount_class;
|
||||
extern const char reservation_seqcount_string[];
|
||||
|
||||
/**
|
||||
* struct reservation_object_list - a list of shared fences
|
||||
* @rcu: for internal use
|
||||
* @shared_count: table of shared fences
|
||||
* @shared_max: for growing shared fence table
|
||||
* @shared: shared fence table
|
||||
*/
|
||||
struct reservation_object_list {
|
||||
struct rcu_head rcu;
|
||||
u32 shared_count, shared_max;
|
||||
struct fence __rcu *shared[];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct reservation_object - a reservation object manages fences for a buffer
|
||||
* @lock: update side lock
|
||||
* @seq: sequence count for managing RCU read-side synchronization
|
||||
* @fence_excl: the exclusive fence, if there is one currently
|
||||
* @fence: list of current shared fences
|
||||
* @staged: staged copy of shared fences for RCU updates
|
||||
*/
|
||||
struct reservation_object {
|
||||
struct ww_mutex lock;
|
||||
seqcount_t seq;
|
||||
@@ -68,6 +83,10 @@ struct reservation_object {
|
||||
#define reservation_object_assert_held(obj) \
|
||||
lockdep_assert_held(&(obj)->lock.base)
|
||||
|
||||
/**
|
||||
* reservation_object_init - initialize a reservation object
|
||||
* @obj: the reservation object
|
||||
*/
|
||||
static inline void
|
||||
reservation_object_init(struct reservation_object *obj)
|
||||
{
|
||||
@@ -79,6 +98,10 @@ reservation_object_init(struct reservation_object *obj)
|
||||
obj->staged = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* reservation_object_fini - destroys a reservation object
|
||||
* @obj: the reservation object
|
||||
*/
|
||||
static inline void
|
||||
reservation_object_fini(struct reservation_object *obj)
|
||||
{
|
||||
@@ -106,6 +129,14 @@ reservation_object_fini(struct reservation_object *obj)
|
||||
ww_mutex_destroy(&obj->lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* reservation_object_get_list - get the reservation object's
|
||||
* shared fence list, with update-side lock held
|
||||
* @obj: the reservation object
|
||||
*
|
||||
* Returns the shared fence list. Does NOT take references to
|
||||
* the fence. The obj->lock must be held.
|
||||
*/
|
||||
static inline struct reservation_object_list *
|
||||
reservation_object_get_list(struct reservation_object *obj)
|
||||
{
|
||||
@@ -113,6 +144,17 @@ reservation_object_get_list(struct reservation_object *obj)
|
||||
reservation_object_held(obj));
|
||||
}
|
||||
|
||||
/**
|
||||
* reservation_object_get_excl - get the reservation object's
|
||||
* exclusive fence, with update-side lock held
|
||||
* @obj: the reservation object
|
||||
*
|
||||
* Returns the exclusive fence (if any). Does NOT take a
|
||||
* reference. The obj->lock must be held.
|
||||
*
|
||||
* RETURNS
|
||||
* The exclusive fence or NULL
|
||||
*/
|
||||
static inline struct fence *
|
||||
reservation_object_get_excl(struct reservation_object *obj)
|
||||
{
|
||||
@@ -120,6 +162,17 @@ reservation_object_get_excl(struct reservation_object *obj)
|
||||
reservation_object_held(obj));
|
||||
}
|
||||
|
||||
/**
|
||||
* reservation_object_get_excl_rcu - get the reservation object's
|
||||
* exclusive fence, without lock held.
|
||||
* @obj: the reservation object
|
||||
*
|
||||
* If there is an exclusive fence, this atomically increments it's
|
||||
* reference count and returns it.
|
||||
*
|
||||
* RETURNS
|
||||
* The exclusive fence or NULL if none
|
||||
*/
|
||||
static inline struct fence *
|
||||
reservation_object_get_excl_rcu(struct reservation_object *obj)
|
||||
{
|
||||
|
||||
@@ -765,6 +765,8 @@ struct sctp_info {
|
||||
__u8 sctpi_s_disable_fragments;
|
||||
__u8 sctpi_s_v4mapped;
|
||||
__u8 sctpi_s_frag_interleave;
|
||||
__u32 sctpi_s_type;
|
||||
__u32 __reserved3;
|
||||
};
|
||||
|
||||
struct sctp_infox {
|
||||
|
||||
@@ -21,6 +21,9 @@ static inline int do_sys_settimeofday(const struct timespec *tv,
|
||||
struct timespec64 ts64;
|
||||
|
||||
if (!tv)
|
||||
return do_sys_settimeofday64(NULL, tz);
|
||||
|
||||
if (!timespec_valid(tv))
|
||||
return -EINVAL;
|
||||
|
||||
ts64 = timespec_to_timespec64(*tv);
|
||||
|
||||
Reference in New Issue
Block a user