Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Nick Desaulniers 95573c0560 ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod
commit 3220022038b9a3845eea762af85f1c5694b9f861 upstream.

clang-15's ability to elide loops completely became more aggressive when
it can deduce how a variable is being updated in a loop. Counting down
one variable by an increment of another can be replaced by a modulo
operation.

For 64b variables on 32b ARM EABI targets, this can result in the
compiler generating calls to __aeabi_uldivmod, which it does for a do
while loop in float64_rem().

For the kernel, we'd generally prefer that developers not open code 64b
division via binary / operators and instead use the more explicit
helpers from div64.h. On arm-linux-gnuabi targets, failure to do so can
result in linkage failures due to undefined references to
__aeabi_uldivmod().

While developers can avoid open coding divisions on 64b variables, the
compiler doesn't know that the Linux kernel has a partial implementation
of a compiler runtime (--rtlib) to enforce this convention.

It's also undecidable for the compiler whether the code in question
would be faster to execute the loop vs elide it and do the 64b division.

While I actively avoid using the internal -mllvm command line flags, I
think we get better code than using barrier() here, which will force
reloads+spills in the loop for all toolchains.

Link: https://github.com/ClangBuiltLinux/linux/issues/1666

Reported-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-18 11:30:43 +01:00
arch ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod 2023-01-18 11:30:43 +01:00
block blk-mq: fix possible memleak when register 'hctx' failed 2023-01-18 11:30:37 +01:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-25 11:49:16 +02:00
crypto crypto: tcrypt - Fix multibuffer skcipher speed test mem leak 2023-01-18 11:30:22 +01:00
Documentation spi: Update reference to struct spi_controller 2023-01-18 11:30:10 +01:00
drivers dm cache: set needs_check flag after aborting metadata 2023-01-18 11:30:42 +01:00
firmware
fs binfmt: Fix error return code in load_elf_fdpic_binary() 2023-01-18 11:30:42 +01:00
include media: dvbdev: fix build warning due to comments 2023-01-18 11:30:39 +01:00
init random: handle latent entropy and command line from random_init() 2022-06-25 11:49:11 +02:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:18:35 +01:00
kernel tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line 2023-01-18 11:30:43 +01:00
lib test_firmware: fix memory leak in test_firmware_init() 2023-01-18 11:30:26 +01:00
LICENSES
mm mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths 2023-01-18 11:29:59 +01:00
net SUNRPC: Don't leak netobj memory when gss_read_proxy_verf() fails 2023-01-18 11:30:41 +01:00
samples samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() 2023-01-18 11:30:28 +01:00
scripts scripts/faddr2line: Fix regression in name resolution on ppc64le 2022-12-08 11:18:32 +01:00
security apparmor: Fix abi check to include v8 abi 2023-01-18 11:30:21 +01:00
sound ALSA: line6: fix stack overflow in line6_midi_transmit 2023-01-18 11:30:40 +01:00
tools selftests: Use optional USERCFLAGS and USERLDFLAGS 2023-01-18 11:30:42 +01:00
usr
virt KVM: arm64: vgic: Fix exit condition in scan_its_table() 2022-11-03 23:52:24 +09:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 4.19.269 2022-12-14 11:28:31 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.