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

Commit eece09ec authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar
Browse files

locking: Various static lock initializer fixes



The static lock initializers want to be fed the proper name of the
lock and not some random string. In mainline random strings are
obfuscating the readability of debug output, but for RT they prevent
the spinlock substitution. Fix it up.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent c0540606
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -445,7 +445,7 @@ static struct entropy_store input_pool = {
	.poolinfo = &poolinfo_table[0],
	.poolinfo = &poolinfo_table[0],
	.name = "input",
	.name = "input",
	.limit = 1,
	.limit = 1,
	.lock = __SPIN_LOCK_UNLOCKED(&input_pool.lock),
	.lock = __SPIN_LOCK_UNLOCKED(input_pool.lock),
	.pool = input_pool_data
	.pool = input_pool_data
};
};


@@ -454,7 +454,7 @@ static struct entropy_store blocking_pool = {
	.name = "blocking",
	.name = "blocking",
	.limit = 1,
	.limit = 1,
	.pull = &input_pool,
	.pull = &input_pool,
	.lock = __SPIN_LOCK_UNLOCKED(&blocking_pool.lock),
	.lock = __SPIN_LOCK_UNLOCKED(blocking_pool.lock),
	.pool = blocking_pool_data
	.pool = blocking_pool_data
};
};


@@ -462,7 +462,7 @@ static struct entropy_store nonblocking_pool = {
	.poolinfo = &poolinfo_table[1],
	.poolinfo = &poolinfo_table[1],
	.name = "nonblocking",
	.name = "nonblocking",
	.pull = &input_pool,
	.pull = &input_pool,
	.lock = __SPIN_LOCK_UNLOCKED(&nonblocking_pool.lock),
	.lock = __SPIN_LOCK_UNLOCKED(nonblocking_pool.lock),
	.pool = nonblocking_pool_data
	.pool = nonblocking_pool_data
};
};


+1 −1
Original line number Original line Diff line number Diff line
@@ -222,7 +222,7 @@ static struct {
} dbg_data = {
} dbg_data = {
	.idx = 0,
	.idx = 0,
	.tty = 0,
	.tty = 0,
	.lck = __RW_LOCK_UNLOCKED(lck)
	.lck = __RW_LOCK_UNLOCKED(dbg_data.lck)
};
};


/**
/**
+1 −1
Original line number Original line Diff line number Diff line
@@ -516,7 +516,7 @@ struct files_struct init_files = {
		.close_on_exec	= init_files.close_on_exec_init,
		.close_on_exec	= init_files.close_on_exec_init,
		.open_fds	= init_files.open_fds_init,
		.open_fds	= init_files.open_fds_init,
	},
	},
	.file_lock	= __SPIN_LOCK_UNLOCKED(init_task.file_lock),
	.file_lock	= __SPIN_LOCK_UNLOCKED(init_files.file_lock),
};
};


/*
/*
+1 −1
Original line number Original line Diff line number Diff line
@@ -136,7 +136,7 @@ struct ida {
	struct ida_bitmap	*free_bitmap;
	struct ida_bitmap	*free_bitmap;
};
};


#define IDA_INIT(name)		{ .idr = IDR_INIT(name), .free_bitmap = NULL, }
#define IDA_INIT(name)		{ .idr = IDR_INIT((name).idr), .free_bitmap = NULL, }
#define DEFINE_IDA(name)	struct ida name = IDA_INIT(name)
#define DEFINE_IDA(name)	struct ida name = IDA_INIT(name)


int ida_pre_get(struct ida *ida, gfp_t gfp_mask);
int ida_pre_get(struct ida *ida, gfp_t gfp_mask);