linux/arch/tile/kernel
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
..
vdso tile/vdso: emit a GNU hash as well 2015-08-06 20:22:40 -04:00
Makefile tile/jump_label: add jump label support for TILE-Gx 2016-01-04 15:09:31 -05:00
asm-offsets.c tile: check for correct compiler earlier in asm-offsets.c 2013-09-03 14:53:09 -04:00
backtrace.c arch/tile: big-endian: properly bswap instruction bundles when backtracing 2012-06-18 13:11:21 -04:00
compat.c tile: remove stray blank space 2013-09-16 15:47:32 -04:00
compat_signal.c signal: fix information leak in copy_siginfo_from_user32 2015-08-07 04:39:40 +03:00
early_printk.c printk: remove used-once early_vprintk 2014-12-10 17:41:10 -08:00
entry.S tile: improve stack backtrace 2015-05-11 11:22:40 -04:00
ftrace.c tile/jump_label: add jump label support for TILE-Gx 2016-01-04 15:09:31 -05:00
hardwall.c tile: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:37 -08:00
head_32.S tile: parameterize VA and PA space more cleanly 2013-09-03 14:47:34 -04:00
head_64.S tile: parameterize VA and PA space more cleanly 2013-09-03 14:47:34 -04:00
hvglue.S tile: support delivering NMIs for multicore backtrace 2015-05-11 11:22:31 -04:00
hvglue_trace.c tile: support delivering NMIs for multicore backtrace 2015-05-11 11:22:31 -04:00
intvec_32.S arch/tile: move user_exit() to early kernel entry sequence 2016-01-18 14:49:30 -05:00
intvec_64.S arch/tile: move user_exit() to early kernel entry sequence 2016-01-18 14:49:30 -05:00
irq.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
jump_label.c tile/jump_label: add jump label support for TILE-Gx 2016-01-04 15:09:31 -05:00
kgdb.c tile: Fix misspellings in comments. 2016-03-04 14:44:57 -05:00
kprobes.c tile: define a macro ktext_writable_addr to get writable kernel text address 2016-01-04 15:09:31 -05:00
machine_kexec.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
mcount_64.S tile: ftrace: fix function_graph tracer issues 2015-04-17 14:01:38 -04:00
messaging.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
module.c module: remove mod arg from module_free, rename module_memfree(). 2015-01-20 11:38:33 +10:30
pci-dma.c tile: uninline dma_set_mask 2016-01-20 17:09:18 -08:00
pci.c PCI: Assign resources before drivers claim devices (pci_scan_root_bus()) 2015-03-19 10:17:13 -05:00
pci_gx.c Fix typo 2016-05-23 12:17:22 -04:00
perf_event.c perf core: Pass max stack as a perf_callchain_entry context 2016-05-16 23:11:50 -03:00
pmc.c tile: Add support for handling PMC hardware 2014-03-07 11:19:47 -05:00
proc.c tile: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:37 -08:00
process.c Clarify naming of thread info/stack allocators 2016-06-24 15:09:37 -07:00
ptrace.c arch/tile: move user_exit() to early kernel entry sequence 2016-01-18 14:49:30 -05:00
reboot.c tile: various console improvements 2013-08-12 14:46:18 -04:00
regs_32.S tile: change <asm/system.h> to <asm/switch_to.h> in comments 2013-09-03 14:53:17 -04:00
regs_64.S tile: change <asm/system.h> to <asm/switch_to.h> in comments 2013-09-03 14:53:17 -04:00
relocate_kernel_32.S tile: remove support for TILE64 2013-09-03 14:53:29 -04:00
relocate_kernel_64.S tile: remove support for TILE64 2013-09-03 14:53:29 -04:00
setup.c include/linux/nodemask.h: create next_node_in() helper 2016-05-19 19:12:14 -07:00
signal.c tile: Remove signal translation and exec_domain 2015-04-12 21:03:27 +02:00
single_step.c arch/tile: move user_exit() to early kernel entry sequence 2016-01-18 14:49:30 -05:00
smp.c tile: support arch_irq_work_raise 2015-04-17 12:58:44 -04:00
smpboot.c arch/hotplug: Call into idle with a proper state 2016-03-01 20:36:57 +01:00
stack.c tile: include the syscall number in the backtrace 2016-01-18 14:49:16 -05:00
sys.c tile: support CONFIG_PREEMPT 2013-08-13 16:26:01 -04:00
sysfs.c bus: subsys: update return type of ->remove_dev() to void 2015-08-05 17:08:14 -07:00
tile-desc_32.c arch/tile: factor out <arch/opcode.h> header 2011-11-03 16:58:54 -04:00
tile-desc_64.c arch/tile: factor out <arch/opcode.h> header 2011-11-03 16:58:54 -04:00
time.c tile/time: Migrate to new 'set-state' interface 2015-07-30 12:32:15 -04:00
tlb.c tile: do less L1 I-cache eviction 2013-08-30 11:56:34 -04:00
traps.c arch/tile: move user_exit() to early kernel entry sequence 2016-01-18 14:49:30 -05:00
unaligned.c Fix typo 2016-05-23 12:17:22 -04:00
usb.c tile: fix build failure 2015-09-28 11:23:39 -04:00
vdso.c arm64,ia64,ppc,s390,sh,tile,um,x86,mm: remove default gate area 2014-08-08 15:57:27 -07:00
vmlinux.lds.S arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00