public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	kernel test robot <lkp@intel.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<x86@kernel.org>, LKP <lkp@lists.01.org>,
	Kees Cook <keescook@chromium.org>,
	"H.J. Lu" <hjl.tools@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-toolchains@vger.kernel.org,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: Re: GCC section alignment, and GCC-4.9 being a weird one
Date: Thu, 22 Oct 2020 09:38:16 +0200	[thread overview]
Message-ID: <20201022073816.GQ2628@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKwvOd=qi63We=6rLapb565giCVe-8a6d=-=3VZL6RWzhwAeZg@mail.gmail.com>

On Wed, Oct 21, 2020 at 10:42:01AM -0700, Nick Desaulniers wrote:
> On Wed, Oct 21, 2020 at 6:45 AM Peter Zijlstra <peterz@infradead.org> 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 +++-
> >  kernel/sched/idle.c      | 4 +++-
> >  kernel/sched/rt.c        | 4 +++-
> >  kernel/sched/sched.h     | 3 +--
> >  kernel/sched/stop_task.c | 3 ++-
> >  6 files changed, 15 insertions(+), 7 deletions(-)
> >
> > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> > index 6d93f4518734..f4855203143d 100644
> > --- a/kernel/sched/deadline.c
> > +++ b/kernel/sched/deadline.c
> > @@ -2504,7 +2504,9 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p,
> >  }
> >
> >  const struct sched_class dl_sched_class
> > -       __attribute__((section("__dl_sched_class"))) = {
> > +       __attribute__((section("__dl_sched_class")))
> > +       __attribute__((aligned(__alignof__(struct sched_class)))) = {
> 
> 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.

Feh, and then suffer more patches because someone doesn't like how
__section uses # :/

      parent reply	other threads:[~2020-10-22  7:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29  0:31 [sched] c3a340f7e7: invalid_opcode:#[##] kernel test robot
2020-06-30 12:46 ` Peter Zijlstra
2020-06-30 13:55   ` Rasmus Villemoes
2020-06-30 14:02     ` Peter Zijlstra
2020-06-30 14:11       ` Peter Zijlstra
2020-06-30 14:35       ` Peter Zijlstra
2020-06-30 14:49   ` Peter Zijlstra
2020-07-09  8:45     ` [tip: sched/core] sched, vmlinux.lds: Increase STRUCT_ALIGNMENT to 64 bytes for GCC-4.9 tip-bot2 for Peter Zijlstra
2020-10-20 23:39     ` [sched] c3a340f7e7: invalid_opcode:#[##] Florian Fainelli
2020-10-21  8:00       ` GCC section alignment, and GCC-4.9 being a weird one Peter Zijlstra
2020-10-21 13:18         ` Jakub Jelinek
2020-10-21 13:44           ` Peter Zijlstra
2020-10-21 17:42             ` Nick Desaulniers
2020-10-21 17:54               ` Miguel Ojeda
2020-10-21 18:35                 ` Joe Perches
2020-10-21 19:27                   ` Miguel Ojeda
2020-10-22  7:38               ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022073816.GQ2628@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=f.fainelli@gmail.com \
    --cc=hjl.tools@gmail.com \
    --cc=jakub@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-toolchains@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=rostedt@goodmis.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox