[PATCH v3 5/5] Lib: sort.h: remove the size argument from the swap function

2019-04-02 Thread Andrey Abramov
Removes size argument from the swap function because: 1) It wasn't used. 2) Custom swap function knows what kind of objects it swaps, so it already knows their sizes. Signed-off-by: Andrey Abramov Reviewed by: George Spelvin --- arch/x86/kernel/unwind_orc.c | 2 +

[PATCH v3 4/5] ubifs: find.c: replace swap function with built-in one

2019-04-02 Thread Andrey Abramov
Replace swap_dirty_idx function with built-in one, because swap_dirty_idx does only a simple byte to byte swap. Since Spectre mitigations have made indirect function calls more expensive, and the default simple byte copies swap is implemented without them, an "optimized" custom swap function is no

[PATCH v3 3/5] ocfs2: dir, refcounttree, xattr: replace swap functions with built-in one

2019-04-02 Thread Andrey Abramov
Replace dx_leaf_sort_swap, swap_refcount_rec and swap_xe functions with built-in one, because they do only a simple byte to byte swap. Since Spectre mitigations have made indirect function calls more expensive, and the default simple byte copies swap is implemented without them, an "optimized" cus

[PATCH v3 2/5] powerpc: module_[32|64].c: replace swap function with built-in one

2019-04-02 Thread Andrey Abramov
Replace relaswap with built-in one, because relaswap does a simple byte to byte swap. Since Spectre mitigations have made indirect function calls more expensive, and the default simple byte copies swap is implemented without them, an "optimized" custom swap function is now a waste of time as well

[PATCH v3 1/5] arch/arc: unwind.c: replace swap function with built-in one

2019-04-02 Thread Andrey Abramov
Replace swap_eh_frame_hdr_table_entries with built-in one, because swap_eh_frame_hdr_table_entries does a simple byte to byte swap. Since Spectre mitigations have made indirect function calls more expensive, and the default simple byte copies swap is implemented without them, an "optimized" custom

[PATCH v3 0/5] simple sort swap function improvements

2019-04-02 Thread Andrey Abramov
This is the logical continuation of the "lib/sort & lib/list_sort: faster and smaller" series by George Spelvin (added to linux-next recently). Since Spectre mitigations have made indirect function calls more expensive, and the previous patch series implements the default simple byte copies withou

[PATCH] ARC: [hsdk] Make it easier to add PAE40 region to DTB

2019-04-02 Thread Vineet Gupta
1. Bump top level address-cells/size-cells nodes to 2 (to ensure all down stream addresses are 64-bits, unless explicitly specified otherwise (in "soc" bus with all peripherals) 2. "memory" also specified with address/size 2 3. Add a commented reference for PAE40 region beyond 4GB physical

[PATCH] [ARC] PR 88409: miscompilation due to missing cc clobber in longlong.h macros

2019-04-02 Thread Vineet Gupta
simple test such as below was failing. | void main(int argc, char *argv[]) | { |size_t total_time = 115424; // expected 115.424 |double secs = (double)total_time/(double)1000; |printf("%s %d %lf\n", "secs", total_time, secs); // prints 113.504 |printf("%d\n",