799073 Commits

Author SHA1 Message Date
Kyle Lin
6c89cf2d2c
ARM64: configs: surya: Enable CONFIG_COMPAT_VDSO
Test: build
Bug: 154245183
Change-Id: I7c32f542ed032de2cee298c982b4eabfd4ed0afe
Signed-off-by: Kyle Lin <kylelin@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:51 +00:00
Nathan Chancellor
8c060fc84a
arm64: vdso32: Fix '--prefix=' value for newer versions of clang
Newer versions of clang only look for $(COMPAT_GCC_TOOLCHAIN_DIR)as [1],
rather than $(COMPAT_GCC_TOOLCHAIN_DIR)$(CROSS_COMPILE_COMPAT)as,
resulting in the following build error:

$ make -skj"$(nproc)" ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
CROSS_COMPILE_COMPAT=arm-linux-gnueabi- LLVM=1 O=out/aarch64 distclean \
defconfig arch/arm64/kernel/vdso32/
...
/home/nathan/cbl/toolchains/llvm-binutils/bin/as: unrecognized option '-EL'
clang-12: error: assembler command failed with exit code 1 (use -v to see invocation)
make[3]: *** [arch/arm64/kernel/vdso32/Makefile:181: arch/arm64/kernel/vdso32/note.o] Error 1
...

Adding the value of CROSS_COMPILE_COMPAT (adding notdir to account for a
full path for CROSS_COMPILE_COMPAT) fixes this issue, which matches the
solution done for the main Makefile [2].

[1]: 3452a0d8c1
[2]: https://lore.kernel.org/lkml/20200721173125.1273884-1-maskray@google.com/

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: stable@vger.kernel.org
Link: https://github.com/ClangBuiltLinux/linux/issues/1099
Link: https://lore.kernel.org/r/20200723041509.400450-1-natechancellor@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
[dl: Backported to 4.14, depends on commit 38253a0ed057c49dde77588eef05fdcb4008ce0b
     ("vdso32: Invoke clang with correct path to GCC toolchain")
     from the Pixel 4 kernel]
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:51 +00:00
Peter Collingbourne
4c2f21a4f6
FROMLIST: arm64: Build vDSO with -ffixed-x18
The vDSO needs to be build with x18 reserved in order to accommodate
userspace platform ABIs built on top of Linux that use the register
to carry inter-procedural state, as provided for by the AAPCS.
An example of such a platform ABI is the one that will be used by an
upcoming version of Android.

Although this change is currently a no-op due to the fact that the vDSO
is currently implemented in pure assembly on arm64, it is necessary
in order to prepare for another change [1] that will add C code to
the vDSO.

[1] https://patchwork.kernel.org/patch/10044501/

Change-Id: Icaac4b1c9127d81d754d3b8688274e9afc781760
Signed-off-by: Peter Collingbourne <pcc@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Mark Salyzyn <salyzyn@google.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Khusika Dhamar Gusti <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:51 +00:00
Mark Salyzyn
b8846d48be
ANDROID: turn on VCT access from 32-bit applications
Deal with regression from 7b4edf240be4a86ede06af51caf056fb1e80682e
("clocksource: arch_timer: make virtual counter access configurable")
by selecting ARM_ARCH_TIMER_VCT_ACCESS if COMPAT_VDSO is selected.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 72417836
Change-Id: Ie11498880941977a8014adb8b8a3b07a6ef82e27
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:51 +00:00
Daniel Mentz
b6086f33cd
vdso32: Invoke clang with correct path to GCC toolchain
Clang needs to have access to a GCC toolchain which we advertise using
the command line option --gcc-toolchain=. Clang previously picked the
wrong toolchain which resulted in the following error message:

/..//bin/as: unrecognized option '-EL'

Bug: 123422077
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Change-Id: I3e339dd446b71e2c75eb9e2c186eba715b3771cd
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:51 +00:00
Nathan Chancellor
3af96c270b
FROMLIST: arm64: vdso32: Use full path to Clang instead of relying on PATH
Currently, in order to build the compat VDSO with Clang, this format
has to be used:

  PATH=${BIN_FOLDER}:${PATH} make CC=clang

Prior to the addition of this file, this format would also be
acceptable:

  make CC=${BIN_FOLDER}/clang

This is because the vdso32 Makefile uses cc-name instead of CC. After
this path, CC will still evaluate to clang for the first case as
expected but now the second case will use the specified Clang, rather
than the host's copy, which may not be compatible as shown below.

/usr/bin/as: unrecognized option '-mfloat-abi=soft'
clang-6.0: error: assembler command failed with exit code 1

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
(cherry picked from https://patchwork.kernel.org/patch/10419665)
Bug: 80184372
Change-Id: If90a5a4edbc2b5883b4c78161081ebeafbebdcde
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:51 +00:00
Mark Salyzyn
a63dbc5467
ANDROID: clock_gettime(CLOCK_BOOTTIME,) slows down >20x
clock_gettime(CLOCK_BOOTTIME,) slows down after significant
accumulation of suspend time creating a large offset between it and
CLOCK_MONOTONIC time.  The __iter_div_u64_rem() is only for the usage
of adding a few second+nanosecond times and saving cycles on more
expensive remainder and division operations, but iterates one second
at a time which quickly goes out of scale in CLOCK_BOOTTIME's case
since it was specified as nanoseconds only.

The fix is to split off seconds from the boot time and cap the
nanoseconds so that __iter_div_u64_rem does not iterate.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 72406285
Change-Id: Ia647ef1e76b7ba3b0c003028d4b3b955635adabb
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:51 +00:00
Mark Salyzyn
e9737f8418
ANDROID: CROSS_COMPILE_ARM32 must work if CONFIG_COMPAT_VDSO
Prevent surprise loss of vdso32 support.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 63737556
Bug: 20045882
Bug: 19198045
Change-Id: I8b381f7649b95b298ea9e1a99aa3794c7bc08d09
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:51 +00:00
Kevin Brodsky
346a16a9b2
FROMLIST: BACKPORT: [PATCH 6/6] arm64: Wire up and expose the new compat vDSO
(cherry pick from url https://patchwork.kernel.org/patch/10060447/)

Expose the new compat vDSO via the COMPAT_VDSO config option.

The option is not enabled in defconfig because we really need a 32-bit
compiler this time, and we rely on the user to provide it themselves
by setting CROSS_COMPILE_ARM32. Therefore enabling the option by
default would make little sense, since the user must explicitly set a
non-standard environment variable anyway.

CONFIG_COMPAT_VDSO is not directly used in the code, because we want
to ignore it (build as if it were not set) if the user didn't set
CROSS_COMPILE_ARM32. If the variable has been set to a valid prefix,
CONFIG_VDSO32 will be set; this is the option that the code and
Makefiles test.

For more flexibility, like CROSS_COMPILE, CROSS_COMPILE_ARM32 can also
be set via CONFIG_CROSS_COMPILE_ARM32 (the environment variable
overrides the config option, as expected).

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Bug: 63737556
Bug: 20045882
Change-Id: Ie8a7d6c2b5ba3edca591a9a953ce99ec792da882
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Kevin Brodsky
513e2c9015
FROMLIST: [PATCH 5/6] arm64: compat: 32-bit vDSO setup
(cherry pick from url https://patchwork.kernel.org/patch/10060459/)

If the compat vDSO is enabled, install it in compat processes. In this
case, the compat vDSO replaces the sigreturn page (it provides its own
sigreturn trampolines).

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Bug: 63737556
Bug: 20045882
Change-Id: Ia6acf4c3ffea636bc750ac00853ea762c182e5b5
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Kevin Brodsky
038285d32d
FROMLIST: [PATCH 4/6] arm64: compat: Add a 32-bit vDSO
(cherry pick from url https://patchwork.kernel.org/patch/10060445/)

Provide the files necessary for building a compat (AArch32) vDSO in
kernel/vdso32.

This is mostly an adaptation of the arm vDSO. The most significant
change in vgettimeofday.c is the use of the arm64 vdso_data struct,
allowing the vDSO data page to be shared between the 32 and 64-bit
vDSOs. Additionally, a different set of barrier macros is used (see
aarch32-barrier.h), as we want to support old 32-bit compilers that
may not support ARMv8 and its new barrier arguments (*ld).

In addition to the time functions, sigreturn trampolines are also
provided, aiming at replacing those in the sigreturn page as the
latter don't provide any unwinding information (and it's easier to
have just one "user code" page). arm-specific unwinding directives are
used, based on glibc's implementation. Symbol offsets are made
available to the kernel using the same method as the 64-bit vDSO.

There is unfortunately an important caveat: we cannot get away with
hand-coding 32-bit instructions like in kernel/kuser32.S, this time we
really need a 32-bit compiler. The compat vDSO Makefile relies on
CROSS_COMPILE_ARM32 to provide a 32-bit compiler, appropriate logic
will be added to the arm64 Makefile later on to ensure that an attempt
to build the compat vDSO is made only if this variable has been set
properly.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Bug: 63737556
Bug: 20045882
Change-Id: I3fb9d21b29bd9fec1408f2274d090e6def546b0d
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Kevin Brodsky
e835fbd7c1
FROMLIST: BACKPORT: [PATCH 3/6] arm64: Refactor vDSO init/setup
(cherry pick from url https://patchwork.kernel.org/patch/10060439/)

Move the logic for setting up mappings and pages for the vDSO into
static functions. This makes the vDSO setup code more consistent with
the compat side and will allow to reuse it for the future compat vDSO.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Bug: 63737556
Bug: 20045882
Change-Id: I13e84479591091669190360f2a7f4d04462e6344
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Kevin Brodsky
cc56c702c6
FROMLIST: [PATCH 2/6] arm64: elf: Set AT_SYSINFO_EHDR in compat processes
(cherry pick from url https://patchwork.kernel.org/patch/10060431/)

If the compat vDSO is enabled, we need to set AT_SYSINFO_EHDR in the
auxiliary vector of compat processes to the address of the vDSO code
page, so that the dynamic linker can find it (just like the regular vDSO).

Note that we cast context.vdso to Elf64_Off, instead of elf_addr_t,
because elf_addr_t is Elf32_Off in compat_binfmt_elf.c, and casting
context.vdso to u32 would trigger a pointer narrowing warning.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Bug: 63737556
Bug: 20045882
Change-Id: I5d0b191d3b2f4c0b2ec31fe9faef0246253635ce
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Kevin Brodsky
d0a27774ab
FROMLIST: [PATCH 1/6] arm64: compat: Use vDSO sigreturn trampolines if available
(cherry pick from url https://patchwork.kernel.org/patch/10060449/)

If the compat vDSO is enabled, it replaces the sigreturn page.
Therefore, we use the sigreturn trampolines the vDSO provides instead.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Bug: 63737556
Bug: 20045882
Change-Id: Ic0933741e321e1bf66409b7e190a776f12948024
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Mark Salyzyn
973725e4a5
FROMLIST: lib: vdso: add support for time
(cherry pick from url https://patchwork.kernel.org/patch/10053549/)

Add time() vdso support to match up with existing support in the x86's
vdso.  Currently benefitting arm and arm64 which uses the common
vgettimeofday.c implementation.  On arm provides about a ~14 fold
improvement in speed over the straight syscall, and about a ~5 fold
improvement in speed over an alternate library implementation that
relies on the vdso call to gettimeofday to fulfill the request.

We can provide __vdso_time even if we can not provide a speed
enhanced __vdso_gettimeofday.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Bug: 63737556
Bug: 20045882
Change-Id: I0bb3c6bafe57f9ed69350e2dd54edaae58316e8f
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Kevin Brodsky
0038a5bd2d
FROMLIST: [PATCH] arm64: compat: Expose offset to registers in sigframes
(cherry picked from url https://patchwork.kernel.org/patch/10006025/)

This will be needed to provide unwinding information in compat
sigreturn trampolines, part of the future compat vDSO. There is no
obvious header the compat_sig* struct's should be moved to, so let's
put them in signal32.h.

Also fix minor style issues reported by checkpatch.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Bug: 63737556
Bug: 20045882
Change-Id: I9c23dd6b56ca48c0953cbf78ccb7b49ded906052
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Mark Salyzyn
83d7832573
FROMLIST: [PATCH v5 12/12] lib: vdso: do not expose gettimeofday, if no arch supported timer
(cherry pick from url https://patchwork.kernel.org/patch/10044539/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

If ARCH_PROVIDES_TIMER is not defined, do not expose gettimeofday.
libc will default directly to syscall.  Also ifdef clock_gettime
switch cases and stubs if not supported and other unused components.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: I362a7114db0aac800e16eb90d14a8739e18f42e4
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Mark Salyzyn
4a24c84fed
FROMLIST: [PATCH v5 11/12] lib: vdso: Add support for CLOCK_BOOTTIME
(cherry pick from url https://patchwork.kernel.org/patch/10044503/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Add a case for CLOCK_BOOTTIME as it is popular for measuring
relative time on systems expected to suspend() or hibernate().

Android uses CLOCK_BOOTTIME for all relative time measurements
and timeouts. Switching to vdso reduced CPU utilization and improves
accuracy. There is also a desire by some partners to switch all
logging over to CLOCK_BOOTTIME, and thus this operation alone would
contribute to a near percentile CPU load.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: I76c26b054baf7f1100e03c65d6b16fe649b883b1
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:50 +00:00
Mark Salyzyn
0005f38a4e
FROMLIST: [PATCH v5 10/12] arm64: vdso: replace gettimeofday.S with global vgettimeofday.C
(cherry picked from url https://patchwork.kernel.org/patch/10044501/)

Take an effort from the previous 9 patches to recode the arm64 vdso
code from assembler to C previously submitted by
Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and
arm64, overlapping any optimizations for each architecture. But
instead of landing it in arm64, land the result into lib/vdso and
unify both implementations to simplify future maintenance.

apinski@cavium.com makes the following claims in the original patch:

This allows the compiler to optimize the divide by 1000 and remove
the other divides.

On ThunderX, gettimeofday improves by 32%.  On ThunderX 2,
gettimeofday improves by 18%.

Note I noticed a bug in the old (arm64) implementation of
__kernel_clock_getres; it was checking only the lower 32bits of the
pointer; this would work for most cases but could fail in a few.

<end of claim>

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: I71ff27ff5bfa323354fda6867b01ec908d8d6cbd
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
0d854b87e2
FROMLIST: [PATCH v5 09/12] arm: vdso: move vgettimeofday.c to lib/vdso/
(cherry pick from url https://patchwork.kernel.org/patch/10044497/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Declare arch/arm/vdso/vgettimeofday.c to be a candidate for a global
implementation of the vdso timer calls.  The hope is that new
architectures can take advantage of the current unification of
arm and arm64 implementations.

We urge future efforts to merge their implementations into the
global vgettimeofday.c file and thus provide functional parity.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: If7da1d8144684d52ed9520a581e6023c623df931
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
78e4b2a201
FROMLIST: [PATCH v5 08/12] arm: vdso: Add ARCH_CLOCK_FIXED_MASK
(cherry picked from url https://patchwork.kernel.org/patch/10044543/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Add ARCH_CLOCK_FIXED_MASK as an efficiency since arm64 has no
purpose for cs_mask vdso_data variable.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: Iadf94bed6166d2ee43bb46bdf54636618e4b8854
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
6efbf4532d
FROMLIST: [PATCH v5 07/12] arm: vdso: disable profiling
(cherry pick from url https://patchwork.kernel.org/patch/10044491/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Make sure kasan and ubsan profiling, and kcov instrumentation,
is turned off for VDSO code.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: I2b44c1edd81665b8bb235a65ba642767c35f1e61
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
b55abde92d
FROMLIST: [PATCH v5 06/12] arm: vdso: add support for clock_getres
(cherry picked from url https://patchwork.kernel.org/patch/10044545/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Add clock_getres vdso support to match up with existing support in
the arm64's vdso.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: Ie37bf76d2992027f06a2cdd001d8654a860d2aac
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
7404230dad
FROMLIST: [PATCH v6 05/12] arm: vdso: Add support for CLOCK_MONOTONIC_RAW
(cherry pick from url https://patchwork.kernel.org/patch/10052099/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Add a case for CLOCK_MONOTONIC_RAW to match up with support that
is available in arm64's vdso.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: If9c09d131e236ba4a483dbc122e6b876f471df72
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
5183b9c75c
FROMLIST: [PATCH v5 04/12] arm: vdso: do calculations outside reader loops
(cherry picked from url https://patchwork.kernel.org/patch/10044477/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

In variable timer reading loops, pick up just the values until all
are synchronized, then outside of loop pick up cntvct and perform
calculations to determine final offset, shifted and multiplied
output value.

This replaces get_ns with get_clock_shifted_nsec as cntvct reader.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: I8008197f08485ef89b267128e41624ff69c33f6b
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
38625c8131
FROMLIST: [PATCH v5 03/12] arm: vdso: inline assembler operations to compiler.h
(cherry picked from commit https://patchwork.kernel.org/patch/10044507/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Move compiler-specific code to a local compiler.h file:

- CONFIG_AEABI dependency check.
- System call fallback functions standardized into a
  DEFINE_FALLBACK macro.
- Replace arch_counter_get_cntvct() with arch_vdso_read_counter.
- Deal with architecture specific unresolved references emitted
  by GCC.
- Optimize handling of fallback calls in callers.
- For time functions that always return success, do not waste time
  checking return value for switch to fallback.
- Optimize unlikely nullptr checking in __vdso_gettimeofday,
  if tv null no need to proceed to fallback, as vdso is still
  capable of filling in the tv values.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: I468e4c32b5136d199982bf25df8967321e384d90
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
58d195fe34
FROMLIST: [PATCH v5 02/12] arm: vdso: add include file defining __get_datapage()
(cherry picked from url https://patchwork.kernel.org/patch/10044481/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Define the prototype for __get_datapage() in local datapage.h header.
Rename all vdata variable that point to the datapage shortened to vd
to relect a consistent and concise style. Make sure that all
references to the datapage in vdso operations are readonly (const).
Make sure datapage is first parameter to all subroutines to also
be consistent.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: I9512b49d36d53ca1b71d3ff82219a7c64e0fc613
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Mark Salyzyn
4d5e47ceb3
FROMLIST: [PATCH v5 01/12] arm: vdso: rename vdso_datapage variables
(cherry picked from url https://patchwork.kernel.org/patch/10044505/)

Take an effort to recode the arm64 vdso code from assembler to C
previously submitted by Andrew Pinski <apinski@cavium.com>, rework
it for use in both arm and arm64, overlapping any optimizations
for each architecture. But instead of landing it in arm64, land the
result into lib/vdso and unify both implementations to simplify
future maintenance.

Rename seq_count to tb_seq_count. Rename tk_is_cntvct to use_syscall.
Rename cs_mult to cs_mono_mult. All to align with the variables in the
arm64 vdso datapage. Rework vdso_read_begin() and vdso_read_retry()
functions to reflect modern access patterns for tb_seq_count field.

Update copyright message to reflect the start of the contributions in
this series.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Bug: 63737556
Bug: 20045882
Change-Id: I13f16e71b1ecba3d72b999caafef72e3c7f48dfe
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:49 +00:00
Kevin Brodsky
7e35b979d4
FROMLIST: [PATCH v3 3/3] arm64: compat: Add CONFIG_KUSER_HELPERS
(cherry picked from url http://lkml.iu.edu/hypermail/linux/kernel/1709.1/01903.html)

Make it possible to disable the kuser helpers by adding a KUSER_HELPERS
config option (enabled by default). When disabled, all kuser
helpers-related code is removed from the kernel and no mapping is done
at the fixed high address (0xffff0000); any attempt to use a kuser
helper from a 32-bit process will result in a segfault.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Bug: 9674955
Bug: 63737556
Bug: 20045882
Change-Id: Ie8c543301d39bfe88ef71fb6a669e571914b117b
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:48 +00:00
Kevin Brodsky
87bf45cd37
FROMLIST: [PATCH v3 2/3] arm64: compat: Split the sigreturn trampolines and kuser helpers (assembler sources)
(cherry picked from url http://lkml.iu.edu/hypermail/linux/kernel/1709.1/01902.html)

AArch32 processes are currently installed a special [vectors] page that
contains the sigreturn trampolines and the kuser helpers, at the fixed
address mandated by the kuser helpers ABI.

Having both functionalities in the same page has become problematic,
because:

* It makes it impossible to disable the kuser helpers (the sigreturn
  trampolines cannot be removed), which is possible on arm.

* A future 32-bit vDSO would provide the sigreturn trampolines itself,
  making those in [vectors] redundant.

This patch addresses the problem by moving the sigreturn trampolines
sources to its own file.  Wrapped the comments to reduce the wrath of
checkpatch.pl.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Bug: 9674955
Bug: 63737556
Bug: 20045882
Change-Id: I1d7b96e7cfbe979ecf4cb4996befd1f3ae0e64fd
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:48 +00:00
Kevin Brodsky
2f79d1562f
FROMLIST: [PATCH v3 1/3] arm64: compat: Split the sigreturn trampolines and kuser helpers (C sources)
(cherry picked from url http://lkml.iu.edu/hypermail/linux/kernel/1709.1/01901.html)

AArch32 processes are currently installed a special [vectors] page that
contains the sigreturn trampolines and the kuser helpers, at the fixed
address mandated by the kuser helpers ABI.

Having both functionalities in the same page has become problematic,
because:

* It makes it impossible to disable the kuser helpers (the sigreturn
  trampolines cannot be removed), which is possible on arm.

* A future 32-bit vDSO would provide the sigreturn trampolines itself,
  making those in [vectors] redundant.

This patch addresses the problem by moving the sigreturn trampolines to
a separate [sigpage] page, mirroring [sigpage] on arm.

Even though [vectors] has always been a misnomer on arm64/compat, as
there is no AArch32 vector there (and now only the kuser helpers),
its name has been left unchanged, for compatibility with arm (there
are reports of software relying on [vectors] being there as the last
mapping in /proc/maps).

mm->context.vdso used to point to the [vectors] page, which is
unnecessary (as its address is fixed). It now points to the [sigpage]
page (whose address is randomized like a vDSO).

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Bug: 9674955
Bug: 63737556
Bug: 20045882
Change-Id: I52a56ea71d7326df8c784f90eb73b5c324fe9d20
Signed-off-by: khusika <khusikadhamar@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:48 +00:00
Danny Lin
6e37209111
ARM64/configs: surya: Switch to fq_codel queue discipline
| pfifo_fast | fq_codel | cake + ack-filter | cake + ack-filter-aggressive
----------------+------------+----------+-------------------+-----------------------------
Download (mbps) | 144.67     | 171.33   | 162.33            | 149.33
Upload (mbps)   | 6.79       | 7.25     | 6.92              | 6.94

Speeds averaged across 3 runs of the official Speedtest.net app for
Android. The same server was selected manually on each run.
Wi-Fi setup: 802.11ac, 5 GHz, VHT80, channel 108 (DFS)

Full result spreadsheet: https://docs.google.com/spreadsheets/d/1YzZJkxgij-KARvgwpKd98UVEdgbAynWLq-Y3lxRLkBg/edit

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: I80a0a74c11d91906b30171b2b1451150fdc19824
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:30:48 +00:00
Arian
bb94be78a8
ARM64: configs: surya: Restore CONFIG_SECURITY_PERF_EVENTS_RESTRICT
Change-Id: If52880efd6f9f9afd67488b23e6c5b04b5b951f7
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:32 +00:00
Petri Gynther
45523fac26
ARM64: configs: surya: Simplify log buffer allocation
Switch to 1 MiB static log buffer in __log_buf[]:
  define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT)
  static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN);

instead of having the log buffer reallocated at boot by:
  setup_log_buf()
    log_buf_add_cpu()
      log_buf_len_update()
    new_log_buf = memblock_virt_alloc_nopanic()

There is no need to do this reallocation for the log buffer.

Change-Id: Ibe9cdef76ac654d9b176086a33baac7128746121
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:30 +00:00
Kyle Lin
cab6540b9c
ARM64: configs: surya: Remove lowmemorykiller
Bug: 143995940
Test: build, boot to home and check lowmemorykiller doesn't exist
Change-Id: I83847b5ed6172af65c8c31323f531c948096dfff
Signed-off-by: Kyle Lin <kylelin@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:30 +00:00
Martin Liu
3c753cda2b
ARM64: configs: surya: Disable BALANCE_ANON_FILE_RECLAIM
Disable QC customized config to align upstream behavior

Bug: 158449887
Test: boot
Signed-off-by: Martin Liu <liumartin@google.com>
Change-Id: I015219b9be587fd4bd89adc6f15450569b842074
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:30 +00:00
Subhajeet Muhuri
e0e3354bd5
ARM64: configs: surya: Disable MMC_PERF_PROFILING
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:30 +00:00
Park Ju Hyung
9d7c826efb
ARM64: configs: surya: Enable exFAT
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Change-Id: I2b362439afc303be1cec6c76e666091e8aec2613
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:29 +00:00
Jenhao Chen
6a9fc36467
ARM64: configs: surya: Enable zram writeback
Bug: 128889899
Change-Id: Ib2d16d6c969c213b79fa6a81fe55f36e6e2235d6
Signed-off-by: Jenhao Chen <jenhaochen@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:29 +00:00
YH_Lin
87694ab00e
ARM64: configs: surya: Enable LZ4 ZRAM
Set CONFIG_CRYPTO_LZ4 Kconfig.

Bug: 139846758
Test: build pass, boot to home

Change-Id: I501821dc7af3d63dac105e73ecae42075af2b953
Signed-off-by: YH_Lin <yhli@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:29 +00:00
Adithya R
db15906de1
ARM64: configs: surya: Enable device-specific configs
* haptics drivers
 * fingerprint drivers
 * custom longcheer LDO
 * charger drivers - BQ2597X, DS28E16
 * reverse charging support

Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@aosip.dev>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:29 +00:00
Cosmin Tanislav
7d02dd86fd
ARM64: configs: surya: Disable existing fingerprint drivers
Change-Id: I8fadd836d8b958de83fb0cc83c53ff595fde63f7
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:29 +00:00
Arian
0d3d589b3f
ARM64: configs: surya: Disable Sitronix, Himax and Synaptics touchscreen drivers
Change-Id: I8515efb6756057a673885d6862dfd65c175eba94
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:28 +00:00
Park Ju Hyung
bfb2e0b514
ARM64: configs: surya: Enable CONFIG_QCA_CLD_WLAN
Change-Id: I14d466953e9b0ff696afdecd5869901567e55111
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:28 +00:00
Danny Lin
cf8da79b47
ARM64: configs: surya: Enable power efficient workqueues
Offload workqueue scheduling work for WQ_POWER_EFFICIENT workqueues to
the scheduler, like it should be.

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: Ie2dbed8502d216778a5924b945cd8ff6e48d167c
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:28 +00:00
Demon Singur
dfb7e9d0dc
ARM64: configs: surya: Enable suspend sync
Change-Id: I7d439285752fa01a0d0ce5c3418f26a06b68131b
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:28 +00:00
Kyle Lin
67aae7a2da
ARM64: configs: surya: Enable CONFIG_JUMP_LABEL
Bug: 142550025
Test: build and boot to home
Change-Id: I499d24de004a0deee66fecc77f16cec73c312d32
Signed-off-by: Kyle Lin <kylelin@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:27 +00:00
Kyle Lin
42760c2526
ARM64: configs: surya: Enable CONFIG_HZ_300
Bug: 142550028
Test: Build and boot to home
Change-Id: Iff24f21052422bbc3fe932a0fd1f8137376c9300
Signed-off-by: Kyle Lin <kylelin@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:27 +00:00
josephjang
1053f2ae8a
ARM64: configs: surya: Enable pstore
Enable pstore logging.

Bug: 142620923
Change-Id: If2594dd85093cc75820a47541893da7a9e7ea7de
Signed-off-by: josephjang <josephjang@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:27 +00:00
Cyan_Hsieh
ba3d0379d1
ARM64: configs: surya: Build separated soc-dtb and board-dtbos
Bug: 138639911
Change-Id: I292fa68654e330d41be5b7ce0efde47cff866e0c
Signed-off-by: Cyan_Hsieh <cyanhsieh@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-03-19 07:13:27 +00:00