linux/arch/ia64
Linus Torvalds b235beea9e Clarify naming of thread info/stack allocators
We've had the thread info allocated together with the thread stack for
most architectures for a long time (since the thread_info was split off
from the task struct), but that is about to change.

But the patches that move the thread info to be off-stack (and a part of
the task struct instead) made it clear how confused the allocator and
freeing functions are.

Because the common case was that we share an allocation with the thread
stack and the thread_info, the two pointers were identical.  That
identity then meant that we would have things like

	ti = alloc_thread_info_node(tsk, node);
	...
	tsk->stack = ti;

which certainly _worked_ (since stack and thread_info have the same
value), but is rather confusing: why are we assigning a thread_info to
the stack? And if we move the thread_info away, the "confusing" code
just gets to be entirely bogus.

So remove all this confusion, and make it clear that we are doing the
stack allocation by renaming and clarifying the function names to be
about the stack.  The fact that the thread_info then shares the
allocation is an implementation detail, and not really about the
allocation itself.

This is a pure renaming and type fix: we pass in the same pointer, it's
just that we clarify what the pointer means.

The ia64 code that actually only has one single allocation (for all of
task_struct, thread_info and kernel thread stack) now looks a bit odd,
but since "tsk->stack" is actually not even used there, that oddity
doesn't matter.  It would be a separate thing to clean that up, I
intentionally left the ia64 changes as a pure brute-force renaming and
type change.

Acked-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-06-24 15:09:37 -07:00
..
configs [IA64] refresh arch/ia64/configs/* using "make savedefconfig" 2014-09-23 11:09:29 -07:00
dig
hp tty: Replace TTY_IO_ERROR bit tests with tty_io_error() 2016-04-30 09:26:55 -07:00
include Clarify naming of thread info/stack allocators 2016-06-24 15:09:37 -07:00
kernel exit_thread: accept a task parameter to be exited 2016-05-20 17:58:30 -07:00
lib Merge branch 'master' into for-next 2016-04-18 11:18:55 +02:00
mm ia64/extable: use generic search and sort routines 2016-03-22 15:36:02 -07:00
oprofile
pci PCI: Set ROM shadow location in arch code, not in PCI core 2016-03-08 12:14:31 -06:00
scripts ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
sn ia64: Reduce stack usage by iterating over nodemask 2016-05-05 10:29:14 -07:00
uv
install.sh
Kconfig Clarify naming of thread info/stack allocators 2016-06-24 15:09:37 -07:00
Kconfig.debug
Makefile kbuild: drop redundant "PHONY += FORCE" 2016-04-20 10:38:40 +02:00
module.lds