lkml.org 
[lkml]   [2013]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectx86: Clean up asmlinkage use
Date
This patchkit makes the use of asmlinkage consistent in arch/x86
Originally arch/x86 was (mostly) fully annotated with asmlinkage, but
this has bitrotted over time.

These changes were originally part of my LTO patchkit. In the interest
of making it smaller, I'm posting them separately, as they can be
considered cleanups.

By itself they do not improve anything in the existing kernel,
except for making things more consistent.

They may be useful for other global compile time instrumentation tools
to indicate clearly that some function/variable can be changed
outside their view.

---

The goal is to mark every function or variable that can be called
from assembler. asmlinkage on 32bit includes regparm(0) so changes
semantics. Since I didn't want to audit every caller and make
this patchkit a nop by itself, I did not add new asmlinkage
to 32bit functions that take parameters. So no existing function
switches from regparm(3) to (0).

Instead every function with parameter (and variables) becomes
__visible. This is roughly equivalent now to the old "asmregparm"
(which was removed some time ago), except it also works for
variables.

So in summary the changes are:
- Mark every function without arguments (or 64bit only)
that is used by assembler asmlinkage
- Mark every function with parameters or variables
that is used by assembler __visible.

I also included a few related fixes with inline assembler
and a type fix for the syscall table.



\
 
 \ /
  Last update: 2013-08-06 00:21    [W:0.105 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site