Nikolay Borisov
69acbdbbef
RAS/AMD/ATL: Replace bitwise_xor_bits() with hweight16()
...
Doing hweight16() and checking whether the lsb is set is functionally
equivalent to what bitwise_xor_bits() does. In addition, it results in better
generated code as before gcc would inline the function 4 times. With hweight16(),
the resulting code boils down to 2 instructions - POPCNT and AND, and all
relevant CPUs support POPCNT.
An alternative would have been to use the __builtin_parity() function provided
by both Clang/GCC, however under some circumstances the compiler can choose not
to inline it but generate a library call which is unsupported in the kernel.
No functional changes.
[ bp: Massage commit message. ]
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com >
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
Link: https://patch.msgid.link/20251124142517.1708451-1-nik.borisov@suse.com
2025-11-24 17:00:37 +01:00
..
2025-09-25 09:14:45 +03:00
2025-10-27 15:45:22 +01:00
2025-09-19 09:40:46 +02:00
2025-10-02 18:18:33 -07:00
2025-10-07 09:39:51 -07:00
2025-10-10 10:37:13 -07:00
2025-09-27 11:37:02 -04:00
2025-10-04 16:26:32 -07:00
2025-10-04 16:26:32 -07:00
2025-10-10 08:21:45 +03:00
2025-10-07 09:28:37 -07:00
2025-10-07 08:40:15 -07:00
2025-10-01 13:59:28 +02:00
2025-09-20 13:08:54 +02:00
2025-10-08 09:38:31 -07:00
2025-09-18 14:34:51 -07:00
2025-09-26 15:10:59 -07:00
2025-10-06 10:37:06 -07:00
2025-09-29 18:57:41 -07:00
2025-09-30 11:41:03 -07:00
2025-10-01 12:52:43 -07:00
2025-10-05 12:08:14 -07:00
2025-09-22 10:33:10 -03:00
2025-10-10 09:37:19 +02:00
2025-10-10 14:02:14 -07:00
2025-10-07 08:40:15 -07:00
2025-10-01 00:00:45 +00:00
2025-10-01 11:34:12 -07:00
2025-10-04 16:26:32 -07:00
2025-10-11 23:57:33 +02:00
2025-09-29 00:17:22 +02:00
2025-09-23 14:15:25 +02:00
2025-10-03 18:35:22 -07:00
2025-10-08 09:44:38 -07:00
2025-10-03 18:18:48 -07:00
2025-10-07 10:23:22 +02:00
2025-10-08 11:44:21 -07:00
2025-10-03 18:48:02 -07:00
2025-10-04 16:07:08 -07:00
2025-10-02 18:18:33 -07:00
2025-10-01 17:32:51 -07:00
2025-10-11 11:19:16 -07:00
2025-10-02 18:18:33 -07:00
2025-10-04 15:50:37 -07:00
2025-10-09 11:13:08 -07:00
2025-09-22 09:35:21 -04:00
2025-10-06 11:17:18 -07:00
2025-10-02 10:16:56 -07:00
2025-10-07 12:13:26 -07:00
2025-10-10 13:05:40 -07:00
2025-10-08 18:51:00 -07:00
2025-10-07 08:59:25 -07:00
2025-10-06 10:34:22 -07:00
2025-10-06 10:41:03 -07:00
2025-10-04 15:28:18 -07:00
2025-10-01 17:32:51 -07:00
2025-10-01 13:02:59 -07:00
2025-10-01 10:14:49 +02:00
2025-10-01 11:34:12 -07:00
2025-11-24 17:00:37 +01:00
2025-10-01 12:04:12 -07:00
2025-10-04 15:45:17 -07:00
2025-10-01 17:32:51 -07:00
2025-09-20 21:29:48 -05:00
2025-10-11 11:56:47 -07:00
2025-10-09 10:51:43 -07:00
2025-10-11 11:49:00 -07:00
2025-10-05 10:09:55 -07:00
2025-10-06 10:32:22 -07:00
2025-10-01 17:32:51 -07:00
2025-10-07 11:41:06 -07:00
2025-10-11 11:49:00 -07:00
2025-10-01 17:32:51 -07:00
2025-10-02 10:41:58 +02:00
2025-09-23 17:16:38 +02:00
2025-10-07 11:36:01 -07:00
2025-10-11 11:49:00 -07:00
2025-10-07 08:40:15 -07:00
2025-10-04 16:07:08 -07:00
2025-10-01 07:24:55 -04:00
2025-10-06 11:22:48 -06:00
2025-10-01 07:24:43 -04:00
2025-10-10 09:36:23 -07:00
2025-09-29 18:48:39 -07:00
2025-10-04 08:48:16 -07:00
2025-10-06 11:00:30 -07:00
2025-10-03 17:41:12 -07:00
2025-10-07 08:40:15 -07:00