Rasmus Villemoes
48a270554a
include/linux: apply __malloc attribute
...
Attach the malloc attribute to a few allocation functions. This helps
gcc generate better code by telling it that the return value doesn't
alias any existing pointers (which is even more valuable given the
pessimizations implied by -fno-strict-aliasing).
A simple example of what this allows gcc to do can be seen by looking at
the last part of drm_atomic_helper_plane_reset:
plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL);
if (plane->state) {
plane->state->plane = plane;
plane->state->rotation = BIT(DRM_ROTATE_0);
}
which compiles to
e8 99 bf d6 ff callq ffffffff8116d540 <kmem_cache_alloc_trace>
48 85 c0 test %rax,%rax
48 89 83 40 02 00 00 mov %rax,0x240(%rbx)
74 11 je ffffffff814015c4 <drm_atomic_helper_plane_reset+0x64>
48 89 18 mov %rbx,(%rax)
48 8b 83 40 02 00 00 mov 0x240(%rbx),%rax [*]
c7 40 40 01 00 00 00 movl $0x1,0x40(%rax)
With this patch applied, the instruction at [*] is elided, since the
store to plane->state->plane is known to not alter the value of
plane->state.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-19 19:12:14 -07:00
..
2016-02-20 14:11:01 -08:00
2016-03-07 14:41:08 +02:00
2016-05-09 11:07:28 +02:00
2016-04-25 20:54:13 +02:00
2016-05-09 16:18:37 +02:00
2016-03-04 23:50:27 -06:00
2016-04-05 16:57:15 +02:00
2016-04-14 14:03:25 +02:00
2016-02-17 21:11:08 +00:00
2016-05-11 10:12:12 +01:00
2016-05-16 19:51:04 -07:00
2016-05-05 23:23:05 -04:00
2016-05-16 13:43:51 -04:00
2016-05-02 10:36:04 +02:00
2016-04-13 10:23:14 +02:00
2016-04-29 11:02:33 +02:00
2016-03-02 20:05:23 +01:00
2016-03-02 20:05:23 +01:00
2016-03-02 20:05:23 +01:00
2016-04-25 14:11:10 +01:00
2016-04-29 16:44:47 +02:00
2016-05-18 12:28:29 -07:00
2016-03-17 12:50:55 -07:00
2016-05-17 12:29:34 -04:00
2016-05-17 18:06:18 +01:00
2016-03-17 15:09:34 -07:00
2016-05-18 13:14:02 -07:00
2016-03-17 21:51:52 -07:00
2016-04-04 10:41:08 -07:00
2016-03-17 15:09:34 -07:00
2016-03-05 12:05:01 -08:00
2016-05-16 16:45:48 +02:00
2016-04-09 03:12:58 +02:00
2016-04-04 12:17:09 -04:00
2016-03-11 14:00:03 +02:00
2016-03-07 16:11:14 -08:00
2016-05-05 09:58:52 +02:00
2016-05-18 18:46:55 -07:00
2016-03-15 16:55:16 -07:00
2016-03-15 16:55:16 -07:00
2016-04-04 10:41:08 -07:00
2016-05-04 23:41:14 +02:00
2016-05-05 13:03:29 -06:00
2016-02-19 22:54:09 -05:00
2016-04-25 19:13:44 -06:00
2016-04-12 15:07:36 -06:00
2016-05-17 16:03:32 -07:00
2016-05-10 08:41:37 -06:00
2016-05-19 19:12:14 -07:00
2016-05-04 00:52:29 -04:00
2016-03-25 11:37:57 -04:00
2016-04-04 10:41:08 -07:00
2016-03-03 21:18:29 +11:00
2016-02-22 08:51:38 +01:00
2016-03-22 15:36:02 -07:00
2016-04-20 17:50:06 +08:00
2016-04-25 15:45:14 -04:00
2016-02-16 13:04:58 -05:00
2016-02-26 16:01:32 -08:00
2016-02-16 16:34:18 +00:00
2016-04-22 11:38:56 -07:00
2016-03-17 15:09:34 -07:00
2016-03-22 15:36:02 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-25 19:10:03 +01:00
2016-02-20 14:11:01 -08:00
2016-02-20 14:11:01 -08:00
2016-05-06 14:58:25 +02:00
2016-04-08 22:41:36 +02:00
2016-05-06 14:58:25 +02:00
2016-05-06 14:58:22 +02:00
2016-04-25 15:45:14 -04:00
2016-03-22 15:36:02 -07:00
2016-04-15 22:35:44 +08:00
2016-03-01 16:55:48 -08:00
2016-05-01 19:58:39 -04:00
2016-05-17 02:17:59 -04:00
2016-05-19 19:12:14 -07:00
2016-05-03 11:20:07 +09:00
2016-03-10 17:12:09 -05:00
2016-05-19 19:12:14 -07:00
2016-04-26 15:47:32 -07:00
2016-02-11 15:33:38 +00:00
2016-03-19 11:03:49 +01:00
2016-03-20 13:28:18 -07:00
2016-03-14 11:18:12 +05:30
2016-02-11 19:23:28 -08:00
2016-05-07 07:06:13 +02:00
2016-04-18 14:45:08 -04:00
2016-02-25 22:12:26 -08:00
2016-04-04 10:41:08 -07:00
2016-03-15 16:55:16 -07:00
2016-02-26 13:28:35 +02:00
2016-03-25 08:48:31 -07:00
2016-05-02 19:49:28 -04:00
2016-05-16 13:49:32 -04:00
2016-02-29 08:35:10 +01:00
2016-03-17 15:09:34 -07:00
2016-05-17 15:05:23 -07:00
2016-04-12 10:25:30 -07:00
2016-05-19 19:12:14 -07:00
2016-03-14 00:17:28 -04:00
2016-05-17 17:11:27 -07:00
2016-05-10 15:43:09 -04:00
2016-03-17 15:09:34 -07:00
2016-02-20 12:53:31 +01:00
2016-05-02 13:01:51 -07:00
2016-03-17 15:09:34 -07:00
2016-04-28 19:34:04 -07:00
2016-03-01 16:57:20 -08:00
2016-04-06 13:18:19 +02:00
2016-04-13 10:41:08 +02:00
2016-03-11 14:58:58 -05:00
2016-05-03 16:00:54 -04:00
2016-02-11 09:59:22 -05:00
2016-02-21 09:06:12 -05:00
2016-02-22 08:51:37 +01:00
2016-02-15 12:42:38 +00:00
2016-03-25 16:37:42 -07:00
2016-03-22 15:36:02 -07:00
2016-04-05 13:25:12 +02:00
2016-03-16 17:45:56 -07:00
2016-05-11 19:31:40 -04:00
2016-05-02 13:42:51 +02:00
2016-05-02 13:42:51 +02:00
2016-05-02 13:42:50 +02:00
2016-05-16 11:14:29 -04:00
2016-02-22 23:19:09 -05:00
2016-03-25 16:37:42 -07:00
2016-03-22 15:36:02 -07:00
2016-05-19 19:12:14 -07:00
2016-05-09 12:15:03 -04:00
2016-03-22 15:36:02 -07:00
2016-02-25 11:27:16 +01:00
2016-05-06 10:26:07 +02:00
2016-02-25 16:37:06 -05:00
2016-03-05 12:24:06 -08:00
2016-05-06 12:51:10 -06:00
2016-03-17 15:09:34 -07:00
2016-03-09 15:43:42 -08:00
2016-05-17 12:06:35 +02:00
2016-05-16 14:47:16 -07:00
2016-05-17 14:41:03 -07:00
2016-02-22 22:44:04 -05:00
2016-03-14 12:19:46 -04:00
2016-04-11 21:15:48 -04:00
2016-03-17 15:09:34 -07:00
2016-03-15 16:55:16 -07:00
2016-03-17 13:47:50 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 16:55:16 -07:00
2016-03-20 16:47:13 -04:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-02-18 19:46:30 +01:00
2016-03-15 16:55:16 -07:00
2016-04-28 11:44:19 +02:00
2016-03-17 15:09:34 -07:00
2016-04-01 15:00:10 +02:00
2016-05-10 23:56:28 -04:00
2016-03-05 12:24:06 -08:00
2016-05-04 00:52:29 -04:00
2016-04-21 14:14:58 -04:00
2016-05-16 13:49:31 -04:00
2016-03-02 20:05:26 +01:00
2016-02-18 11:42:22 -05:00
2016-03-17 14:57:16 -04:00
2016-05-17 15:05:23 -07:00
2016-04-04 10:41:08 -07:00
2016-05-09 11:39:45 -04:00
2016-04-04 10:41:08 -07:00
2016-04-25 15:09:11 -04:00
2016-03-23 12:34:17 +01:00
2016-03-01 20:36:58 +01:00
2016-02-16 13:04:58 -05:00
2016-03-21 19:30:06 -04:00
2016-05-02 09:13:35 -06:00
2016-03-01 16:55:48 -08:00
2016-05-16 17:17:24 -07:00
2016-03-25 16:37:42 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 16:55:16 -07:00
2016-03-15 16:55:16 -07:00
2016-05-19 19:12:14 -07:00
2016-03-17 15:09:34 -07:00
2016-05-05 17:38:53 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 08:52:28 -05:00
2016-03-07 11:39:16 -06:00
2016-04-15 13:00:11 -05:00
2016-05-17 16:26:30 -07:00
2016-02-11 18:35:48 -08:00
2016-02-11 18:35:48 -08:00
2016-03-14 15:43:11 -04:00
2016-05-10 15:06:19 -04:00
2016-02-18 19:46:33 +01:00
2016-04-09 03:10:50 +02:00
2016-03-17 02:32:04 +01:00
2016-04-22 02:29:17 +02:00
2016-05-05 01:38:44 +02:00
2016-04-22 01:32:37 +02:00
2016-04-22 01:32:37 +02:00
2016-04-14 09:01:47 -06:00
2016-04-22 10:29:05 +02:00
2016-03-15 16:55:16 -07:00
2016-05-19 19:12:14 -07:00
2016-03-31 00:30:26 -04:00
2016-03-02 16:44:27 +01:00
2016-02-15 07:02:32 +01:00
2016-03-02 17:13:02 -08:00
2016-02-16 13:04:58 -05:00
2016-04-09 03:10:50 +02:00
2016-04-25 23:47:44 +02:00
2016-03-10 09:43:36 -08:00
2016-03-03 14:23:43 -08:00
2016-05-03 13:44:37 +02:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-02-27 10:28:52 -08:00
2016-04-14 21:14:03 -04:00
2016-04-23 18:51:33 -04:00
2016-03-31 13:34:50 -07:00
2016-03-31 13:37:37 -07:00
2016-03-31 13:37:37 -07:00
2016-03-05 21:30:41 +09:00
2016-05-12 15:50:19 -07:00
2016-03-30 15:42:03 +02:00
2016-04-04 18:15:23 +02:00
2016-02-24 09:12:45 +01:00
2016-04-05 10:56:32 +02:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-17 15:09:34 -07:00
2016-03-10 16:04:24 -08:00
2016-05-06 11:09:00 -07:00
2016-03-14 17:08:15 +01:00
2016-04-13 10:42:20 +02:00
2016-04-22 08:58:33 +02:00
2016-04-15 16:53:14 -04:00
2016-05-16 19:17:22 -07:00
2016-02-16 09:26:27 +00:00
2016-04-15 17:29:35 -04:00
2016-05-17 14:41:03 -07:00
2016-04-14 12:56:09 -07:00
2016-05-03 08:37:59 +02:00
2016-05-03 00:22:19 -04:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-25 16:37:42 -07:00
2016-05-08 23:46:14 -04:00
2016-02-23 19:59:55 -08:00
2016-03-25 16:37:42 -07:00
2016-02-20 14:09:14 -08:00
2016-04-02 20:23:09 -04:00
2016-05-19 19:12:14 -07:00
2016-02-25 11:27:16 +01:00
2016-05-12 15:52:50 -07:00
2016-03-04 12:20:10 -05:00
2016-03-14 14:55:26 -04:00
2016-04-20 20:31:14 -07:00
2016-03-17 15:09:34 -07:00
2016-05-19 19:12:14 -07:00
2016-03-02 17:13:17 -08:00
2016-04-22 11:49:04 -07:00
2016-05-18 18:55:19 -07:00
2016-03-15 16:55:16 -07:00
2016-03-09 11:58:41 -05:00
2016-04-26 15:47:32 -07:00
2016-05-18 18:46:55 -07:00
2016-05-04 16:55:11 -04:00
2016-04-07 16:53:29 -04:00
2016-04-08 19:46:28 -04:00
2016-04-13 12:02:28 -07:00
2016-02-14 17:03:23 -08:00
2016-02-22 16:10:08 -07:00
2016-03-02 17:01:57 +02:00
2016-03-02 17:01:57 +02:00
2016-03-17 15:09:34 -07:00
2016-02-24 09:09:45 +01:00
2016-03-16 21:11:19 +01:00
2016-03-03 14:42:50 -07:00
2016-04-11 00:48:00 -04:00