lkml.org 
[lkml]   [2020]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC][PATCH 2/3] locking,entry: #PF vs TRACE_IRQFLAGS
Date
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)

\
 
 \ /
  Last update: 2020-08-10 14:07    [W:0.142 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site