public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'peterz@infradead.org'" <peterz@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"will@kernel.org" <will@kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"elver@google.com" <elver@google.com>,
	"paulmck@kernel.org" <paulmck@kernel.org>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>
Subject: RE: [RFC][PATCH 2/3] locking,entry: #PF vs TRACE_IRQFLAGS
Date: Mon, 10 Aug 2020 12:05:38 +0000	[thread overview]
Message-ID: <e948ccc6bdba4a789efecb73070d0bf2@AcuMS.aculab.com> (raw)
In-Reply-To: <20200810115743.GU2674@hirez.programming.kicks-ass.net>

From: peterz@infradead.org
> Sent: 10 August 2020 12:58
> 
...
> > > --- a/include/linux/entry-common.h
> > > +++ b/include/linux/entry-common.h
> > > @@ -310,6 +310,7 @@ void irqentry_exit_to_user_mode(struct p
> > >  #ifndef irqentry_state
> > >  typedef struct irqentry_state {
> > >  	bool	exit_rcu;
> > > +	bool	irqs_enabled;
> >
> > Instead of passing a structure around, should we look at converting
> > "irqentry_state" into a flags field?
> 
> Probably, on x86_64-linux sizeof(_Bool) == 1, so it's two bytes and that
> fits perfectly fine in a normal return value, but yeah, this is common
> code now and we can't rely on sizeof(_Bool) being sane.

I'd check the arm ABI(s).
IIRC 'sizeof bool' changed - but I can't remember which way :-)

There are probably other ABI where a 'struct' return value
is always implemented as a 'pass by reference' parameter
(Probably M68k?).

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2020-08-10 12:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 19:23 [RFC][PATCH 0/3] Tracing, Idle, RCU and such goodness Peter Zijlstra
2020-08-07 19:23 ` [RFC][PATCH 1/3] sched,idle,rcu: Push rcu_idle deeper into the idle path Peter Zijlstra
2020-08-07 19:23 ` [RFC][PATCH 2/3] locking,entry: #PF vs TRACE_IRQFLAGS Peter Zijlstra
2020-08-07 20:21   ` Steven Rostedt
2020-08-10 11:57     ` peterz
2020-08-10 12:05       ` David Laight [this message]
2020-08-10 13:49   ` peterz
2020-08-07 19:23 ` [RFC][PATCH 3/3] lockdep,trace: Expose tracepoints Peter Zijlstra
2020-08-07 20:34   ` Steven Rostedt
2020-08-10 12:26   ` [RFC][PATCH v1.1 " peterz
2020-08-10  9:55 ` [RFC][PATCH 0/3] Tracing, Idle, RCU and such goodness Marco Elver
2020-08-10 12:11   ` peterz
2020-08-11 16:08     ` Paul E. McKenney

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=e948ccc6bdba4a789efecb73070d0bf2@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=elver@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.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