Re: GCC section alignment, and GCC-4.9 being a weird one

2020-10-22 Thread Peter Zijlstra
On Wed, Oct 21, 2020 at 10:42:01AM -0700, Nick Desaulniers wrote: > On Wed, Oct 21, 2020 at 6:45 AM Peter Zijlstra wrote: > > > > Ah, thanks! > > > > In that case something like the below ought to make it good. > > > > I'll go feed it to the robots, see if anything falls over. > > > > --- > >

Re: GCC section alignment, and GCC-4.9 being a weird one

2020-10-21 Thread Miguel Ojeda
On Wed, Oct 21, 2020 at 8:35 PM Joe Perches wrote: > > Perhaps something to add as a generic test in checkpatch. Agreed! It would be nice to check all of them. Even checking for `attribute` and `__attribute__` could be potentially reasonable (i.e. so that people are reminded to consider adding

Re: GCC section alignment, and GCC-4.9 being a weird one

2020-10-21 Thread Joe Perches
(adding cc's of kernel-mentees and a few checkpatch contributors) On Wed, 2020-10-21 at 19:54 +0200, Miguel Ojeda wrote: > On Wed, Oct 21, 2020 at 7:42 PM Nick Desaulniers > wrote: > > If you used some of the macros from > > include/linux/compiler_attributes.h like __section and __aligned, I > >

Re: GCC section alignment, and GCC-4.9 being a weird one

2020-10-21 Thread Miguel Ojeda
On Wed, Oct 21, 2020 at 7:42 PM Nick Desaulniers wrote: > > If you used some of the macros from > include/linux/compiler_attributes.h like __section and __aligned, I > would prefer it. Please consider spelling out __attribute__(()) an > antipattern. +1, the shorthands should be used unless

Re: GCC section alignment, and GCC-4.9 being a weird one

2020-10-21 Thread Nick Desaulniers
On Wed, Oct 21, 2020 at 6:45 AM Peter Zijlstra wrote: > > Ah, thanks! > > In that case something like the below ought to make it good. > > I'll go feed it to the robots, see if anything falls over. > > --- > kernel/sched/deadline.c | 4 +++- > kernel/sched/fair.c | 4 +++- >

Re: GCC section alignment, and GCC-4.9 being a weird one

2020-10-21 Thread Peter Zijlstra
On Wed, Oct 21, 2020 at 03:18:06PM +0200, Jakub Jelinek wrote: > As the aligned attribute is just on the type and not on the actual > variables, I don't consider it a bug, GCC only guarantees it when > the variable itself has user specified alignment. > Otherwise the compiler can choose to align

Re: GCC section alignment, and GCC-4.9 being a weird one

2020-10-21 Thread Jakub Jelinek
On Wed, Oct 21, 2020 at 10:00:31AM +0200, Peter Zijlstra wrote: > On Tue, Oct 20, 2020 at 04:39:38PM -0700, Florian Fainelli wrote: > > This patch causes all files under kernel/sched/* that include sched.h to > > be rebuilt whenever the value of CONFIG_BLK_DEV_INITRD. There are at > > least two

GCC section alignment, and GCC-4.9 being a weird one

2020-10-21 Thread Peter Zijlstra
On Tue, Oct 20, 2020 at 04:39:38PM -0700, Florian Fainelli wrote: > This patch causes all files under kernel/sched/* that include sched.h to > be rebuilt whenever the value of CONFIG_BLK_DEV_INITRD. There are at > least two build systems (buildroot and OpenWrt) that toggle this > configuration