linux-stable/arch
Maciej W. Rozycki d17af8b19d MIPS: Avoid DIVU in `__div64_32' is result would be zero
commit c1d337d45e upstream.

We already check the high part of the divident against zero to avoid the
costly DIVU instruction in that case, needed to reduce the high part of
the divident, so we may well check against the divisor instead and set
the high part of the quotient to zero right away.  We need to treat the
high part the divident in that case though as the remainder that would
be calculated by the DIVU instruction we avoided.

This has passed correctness verification with test_div64 and reduced the
module's average execution time down to 1.0445s and 0.2619s from 1.0668s
and 0.2629s respectively for an R3400 CPU @40MHz and a 5Kc CPU @160MHz.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 10:13:17 +02:00
..
alpha local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arc ARC: mm: Use max_high_pfn as a HIGHMEM zone border 2021-05-19 10:13:10 +02:00
arm ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook 2021-05-19 10:13:01 +02:00
arm64 arm64: Fix race condition on PG_dcache_clean in __sync_icache_dcache() 2021-05-19 10:13:11 +02:00
c6x
csky csky: change a Kconfig symbol name to fix e1000 build error 2021-04-28 13:40:02 +02:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-17 11:02:28 +01:00
hexagon local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
ia64 ia64: module: fix symbolizer crash on fdescr 2021-05-19 10:12:59 +02:00
m68k m68k: Add missing mmap_read_lock() to sys_cacheflush() 2021-05-14 09:50:19 +02:00
microblaze local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
mips MIPS: Avoid DIVU in `__div64_32' is result would be zero 2021-05-19 10:13:17 +02:00
nds32 nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff 2021-04-14 08:41:58 +02:00
nios2 nios2: fixed broken sys_clone syscall 2021-03-04 11:38:16 +01:00
openrisc sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
parisc parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers 2021-04-14 08:41:59 +02:00
powerpc powerpc/64s: Fix crashes when toggling entry flush barrier 2021-05-19 10:13:10 +02:00
riscv RISC-V: Fix error code returned by riscv_hartid_to_cpuid() 2021-05-19 10:13:06 +02:00
s390 KVM: s390: extend kvm_s390_shadow_fault to return entry pointer 2021-05-14 09:50:03 +02:00
sh sh: Remove unused HAVE_COPY_THREAD_TLS macro 2021-01-27 11:55:20 +01:00
sparc sparc64: Fix opcode filtering in handling of no fault loads 2021-03-30 14:31:50 +02:00
um um: defer killing userspace on page table update failures 2021-03-04 11:38:42 +01:00
x86 KVM: VMX: Disable preemption when probing user return MSRs 2021-05-19 10:13:16 +02:00
xtensa xtensa: move coprocessor_flush to the .text section 2021-04-07 15:00:09 +02:00
.gitignore
Kconfig fanotify: Fix sys_fanotify_mark() on native x86-32 2021-01-17 14:16:59 +01:00