Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf02f5d2 authored by Al Viro's avatar Al Viro
Browse files

Merge commit '2c563880' into work.xattr

pick xattr_handler conversion from lustre tree
parents 4b899da5 2c563880
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -59,7 +59,6 @@ static struct dentry *binder_debugfs_dir_entry_proc;
static struct binder_node *binder_context_mgr_node;
static kuid_t binder_context_mgr_uid = INVALID_UID;
static int binder_last_id;
static struct workqueue_struct *binder_deferred_workqueue;

#define BINDER_DEBUG_ENTRY(name) \
static int binder_##name##_open(struct inode *inode, struct file *file) \
@@ -3227,7 +3226,7 @@ binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer)
	if (hlist_unhashed(&proc->deferred_work_node)) {
		hlist_add_head(&proc->deferred_work_node,
				&binder_deferred_list);
		queue_work(binder_deferred_workqueue, &binder_deferred_work);
		schedule_work(&binder_deferred_work);
	}
	mutex_unlock(&binder_deferred_lock);
}
@@ -3679,10 +3678,6 @@ static int __init binder_init(void)
{
	int ret;

	binder_deferred_workqueue = create_singlethread_workqueue("binder");
	if (!binder_deferred_workqueue)
		return -ENOMEM;

	binder_debugfs_dir_entry_root = debugfs_create_dir("binder", NULL);
	if (binder_debugfs_dir_entry_root)
		binder_debugfs_dir_entry_proc = debugfs_create_dir("proc",
+13 −0
Original line number Diff line number Diff line
@@ -17,4 +17,17 @@ config SYNC_FILE
	  Files fds, to the DRM driver for example. More details at
	  Documentation/sync_file.txt.

config SW_SYNC
	bool "Sync File Validation Framework"
	default n
	depends on SYNC_FILE
	depends on DEBUG_FS
	---help---
	  A sync object driver that uses a 32bit counter to coordinate
	  synchronization.  Useful when there is no hardware primitive backing
	  the synchronization.

	  WARNING: improper use of this can result in deadlocking kernel
	  drivers from userspace. Intended for test and debug only.

endmenu
+1 −0
Original line number Diff line number Diff line
obj-y := dma-buf.o fence.o reservation.o seqno-fence.o fence-array.o
obj-$(CONFIG_SYNC_FILE)		+= sync_file.o
obj-$(CONFIG_SW_SYNC)		+= sw_sync.o sync_debug.o
+34 −3
Original line number Diff line number Diff line
/*
 * drivers/dma-buf/sw_sync.c
 * Sync File validation framework
 *
 * Copyright (C) 2012 Google, Inc.
 *
@@ -23,8 +23,38 @@
#include "sync_debug.h"

#define CREATE_TRACE_POINTS
#include "trace/sync.h"
#include "sync_trace.h"

/*
 * SW SYNC validation framework
 *
 * A sync object driver that uses a 32bit counter to coordinate
 * synchronization.  Useful when there is no hardware primitive backing
 * the synchronization.
 *
 * To start the framework just open:
 *
 * <debugfs>/sync/sw_sync
 *
 * That will create a sync timeline, all fences created under this timeline
 * file descriptor will belong to the this timeline.
 *
 * The 'sw_sync' file can be opened many times as to create different
 * timelines.
 *
 * Fences can be created with SW_SYNC_IOC_CREATE_FENCE ioctl with struct
 * sw_sync_ioctl_create_fence as parameter.
 *
 * To increment the timeline counter, SW_SYNC_IOC_INC ioctl should be used
 * with the increment as u32. This will update the last signaled value
 * from the timeline and signal any fence that has a seqno smaller or equal
 * to it.
 *
 * struct sw_sync_ioctl_create_fence
 * @value:	the seqno to initialise the fence with
 * @name:	the name of the new sync point
 * @fence:	return the fd of the new sync_file with the created fence
 */
struct sw_sync_create_fence_data {
	__u32	value;
	char	name[32];
@@ -35,6 +65,7 @@ struct sw_sync_create_fence_data {

#define SW_SYNC_IOC_CREATE_FENCE	_IOWR(SW_SYNC_IOC_MAGIC, 0,\
		struct sw_sync_create_fence_data)

#define SW_SYNC_IOC_INC			_IOW(SW_SYNC_IOC_MAGIC, 1, __u32)

static const struct fence_ops timeline_fence_ops;
@@ -176,7 +207,7 @@ static void timeline_fence_release(struct fence *fence)

	spin_lock_irqsave(fence->lock, flags);
	list_del(&pt->child_list);
	if (WARN_ON_ONCE(!list_empty(&pt->active_list)))
	if (!list_empty(&pt->active_list))
		list_del(&pt->active_list);
	spin_unlock_irqrestore(fence->lock, flags);

+1 −1
Original line number Diff line number Diff line
/*
 * drivers/base/sync.c
 * Sync File validation framework and debug information
 *
 * Copyright (C) 2012 Google, Inc.
 *
Loading