mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
x86/fpu, sched: Introduce CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT and use it on x86
Don't burden architectures without dynamic task_struct sizing with the overhead of dynamic sizing. Also optimize the x86 code a bit by caching task_struct_size. Acked-and-Tested-by: Dave Hansen <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
0c8c0f03e3
commit
5aaeb5c01c
7 changed files with 27 additions and 18 deletions
|
|
@ -92,7 +92,7 @@ static size_t get_kcore_size(int *nphdr, size_t *elf_buflen)
|
|||
roundup(sizeof(CORE_STR), 4)) +
|
||||
roundup(sizeof(struct elf_prstatus), 4) +
|
||||
roundup(sizeof(struct elf_prpsinfo), 4) +
|
||||
roundup(arch_task_struct_size(), 4);
|
||||
roundup(arch_task_struct_size, 4);
|
||||
*elf_buflen = PAGE_ALIGN(*elf_buflen);
|
||||
return size + *elf_buflen;
|
||||
}
|
||||
|
|
@ -415,7 +415,7 @@ static void elf_kcore_store_hdr(char *bufp, int nphdr, int dataoff)
|
|||
/* set up the task structure */
|
||||
notes[2].name = CORE_STR;
|
||||
notes[2].type = NT_TASKSTRUCT;
|
||||
notes[2].datasz = arch_task_struct_size();
|
||||
notes[2].datasz = arch_task_struct_size;
|
||||
notes[2].data = current;
|
||||
|
||||
nhdr->p_filesz += notesize(¬es[2]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue