Messages in this thread | | | From | David Laight <> | Subject | RE: [RFC][PATCH 2/3] locking,entry: #PF vs TRACE_IRQFLAGS | Date | Mon, 10 Aug 2020 12:05:38 +0000 |
| |
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)
| |