diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-05-17 13:09:58 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-05-17 13:38:03 +0100 |
commit | 991bfc64db096cb924d5d216a9cb469590f00428 (patch) | |
tree | 834142f298410b00759f48197da53982b57ae467 /security/apparmor/policy_unpack.c | |
parent | 47624cc3301b6033d51b84a1381c2d69fda9b1a0 (diff) | |
download | linux-991bfc64db096cb924d5d216a9cb469590f00428.tar.bz2 |
drm/i915: Make ptr_unpack_bits() more function-like
ptr_unpack_bits() is a function-like macro, as such it is meant to be
replaceable by a function. In this case, we should be passing in the
out-param as a pointer.
Bizarrely this does affect code generation:
function old new delta
i915_gem_object_pin_map 409 389 -20
An improvement(?) in this case, but one can't help wonder what
strict-aliasing optimisations we are preventing.
The generated code looks identical in using ptr_unpack_bits (no extra
motions to stack, the pointer and bits appear to be kept in registers),
the difference appears to be code ordering and with a reorder it is able
to use smaller forward jumps.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170517121007.27224-3-chris@chris-wilson.co.uk
Diffstat (limited to 'security/apparmor/policy_unpack.c')
0 files changed, 0 insertions, 0 deletions