]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Remove relyance on STRUCT_ALIGNMENT
authorPeter Zijlstra <peterz@infradead.org>
Wed, 21 Oct 2020 13:45:33 +0000 (15:45 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 29 Oct 2020 10:00:32 +0000 (11:00 +0100)
commit8762ca0a658e9d0d7321d63fd00a76cc22007be9
tree44e9276309d8c428388a148ec5ce6c7a212dfecd
parent3b13d283218233373bc7dff23570fb1e0c3d38ba
sched: Remove relyance on STRUCT_ALIGNMENT

Florian reported that all of kernel/sched/ is rebuild when
CONFIG_BLK_DEV_INITRD is changed, which, while not a bug is
unexpected. This is due to us including vmlinux.lds.h.

Jakub explained that the problem is that we put the alignment
requirement on the type instead of on a variable. Type alignment is a
minimum, the compiler is free to pick any larger alignment for a
specific instance of the type (eg. the variable).

So force the type alignment on all individual variable definitions and
remove the undesired dependency on vmlinux.lds.h.

Fixes: cf198bbea4de ("sched, vmlinux.lds: Increase STRUCT_ALIGNMENT to 64 bytes for GCC-4.9")
Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Suggested-by: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
kernel/sched/deadline.c
kernel/sched/fair.c
kernel/sched/idle.c
kernel/sched/rt.c
kernel/sched/sched.h
kernel/sched/stop_task.c