On Tue, Oct 1, 2019 at 10:55 AM Russell King - ARM Linux admin <linux@xxxxxxxxxxxxxxx> wrote: > > On Tue, Oct 01, 2019 at 10:44:43AM -0700, Nick Desaulniers wrote: > > I apologize; I don't mean to be difficult. I would just like to avoid > > surprises when code written with the assumption that it will be > > inlined is not. It sounds like we found one issue in arm32 and one in > > arm64 related to outlining. If we fix those two cases, I think we're > > close to proceeding with Masahiro's cleanup, which I view as a good > > thing for the health of the Linux kernel codebase. > > Except, using the C preprocessor for this turns the arm32 code into > yuck: > > 1. We'd need to turn get_domain() and set_domain() into multi-line > preprocessor macro definitions, using the GCC ({ }) extension > so that get_domain() can return a value. > > 2. uaccess_save_and_enable() and uaccess_restore() also need to > become preprocessor macro definitions too. > > So, we end up with multiple levels of nested preprocessor macros. > When something goes wrong, the compiler warning/error message is > going to be utterly _horrid_. That's why I preferred V1 of Masahiro's patch, that fixed the inline asm not to make use of caller saved registers before calling a function that might not be inlined. -- Thanks, ~Nick Desaulniers