The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Refactor the unified vdso code to use the common headers.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-26-vincenzo.frascino@arm.com
(cherry picked from commit 8c59ab839f526437831ff6d1405c9a6d93f475eb)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Ic0890fed51d4e570e50da6c553bdcbce412d0683
Enable arm to use only the common headers in the implementation
of the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@armlinux.org.uk>
Link: https://lkml.kernel.org/r/20200320145351.32292-25-vincenzo.frascino@arm.com
(cherry picked from commit 78c8516141014cf6322ac899c3832f66612504bb)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I6a1aa15a3973253d9a158886785b07b343b4b014
Enable x86 to use only the common headers in the implementation
of the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-24-vincenzo.frascino@arm.com
(cherry picked from commit abc22418db02b986fc5623c035507b6357e191ed)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I05311771de9a6cf52a5b98812ac9ae0d933ac84a
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Refactor the vdso32 implementation to include common headers.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200320145351.32292-22-vincenzo.frascino@arm.com
(cherry picked from commit 5340e873576ee04186eca3c70844c576d714cc6a)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I7ab0a1b114185a609e522cfe77efd19599f117a5
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Refactor the vdso implementation to include common headers.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200320145351.32292-21-vincenzo.frascino@arm.com
(cherry picked from commit 60ad903e9477a832e4575734540db32023a605e9)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I875fe0854f7381ff62eb700701cf6e9428361b79
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Introduce asm/vdso/processor.h to contain all the arm64 specific
functions that are suitable for vDSO inclusion.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200320145351.32292-20-vincenzo.frascino@arm.com
(cherry picked from commit f511e079177a9b97175a9a3b0ee2374d55682403)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I9a291dc86b9c7c910331811c2f3c93db7406e956
The compat vdso library had some checks that are not anymore relevant.
Remove the unused code from the compat vDSO library.
Note: This patch is preparatory for a future one that will introduce
asm/vdso/processor.h on arm64.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/lkml/20200317122220.30393-19-vincenzo.frascino@arm.com
Link: https://lkml.kernel.org/r/20200320145351.32292-19-vincenzo.frascino@arm.com
(cherry picked from commit 94d0f5be885ce1e6ca2886af1543165c16745d13)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I4b86b4b1e636b5149183ff716382ef28bfbe166a
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Replace linux/elf.h with UAPI equivalent in elfnote.h to make the header
suitable for vDSO inclusion.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-18-vincenzo.frascino@arm.com
(cherry picked from commit b558051725c5f7caa1f390ab28f3ab9db085cbfc)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Ia80df895c00cf38e1d62231ca3f7700f557e1342
In the process of creating the source file of a module modpost injects a
set of includes that are not required if the compilation unit is
statically built into the kernel.
The order of inclusion of the headers can cause redefinition problems
(e.g.):
In file included from include/linux/elf.h:5:0,
from include/linux/module.h:18,
from crypto/arc4.mod.c:2:
#define ELF_OSABI ELFOSABI_LINUX
In file included from include/linux/elfnote.h:62:0,
from include/linux/build-salt.h:4,
from crypto/arc4.mod.c:1:
include/uapi/linux/elf.h:363:0: note: this is the location of
the previous definition
#define ELF_OSABI ELFOSABI_NONE
The issue was exposed during the development of the series [1].
[1] https://lore.kernel.org/lkml/20200306133242.26279-1-vincenzo.frascino@arm.com/
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>
Link: https://lkml.kernel.org/r/20200320145351.32292-17-vincenzo.frascino@arm.com
(cherry picked from commit f58dd03b1157bdf3b64c36e9525f8d7f69c25df2)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I4e1bd72315263f155f485431de5eb69824e2b398
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Introduce processor.h to contain all the processor specific functions
that are suitable for vDSO inclusion.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-16-vincenzo.frascino@arm.com
(cherry picked from commit d8bb6993d871f5d3cd6d65d3772e4b1f4ef17380)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Ibb70f49f4a711f4549d5a5efe8009b1903b144f3
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split ktime.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-15-vincenzo.frascino@arm.com
(cherry picked from commit cc56f32f00154ff3586e8346c91f5253882cd8a5)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Ic61901306ce17d5c73170cd8dc02ea50ba7d40e9
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split jiffies.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-14-vincenzo.frascino@arm.com
(cherry picked from commit 97b01d2eabd8c0fa650a9d513febeae35dbc6de4)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I68b8450986462838343cb3e1badcf58a5f739b26
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split time64.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-13-vincenzo.frascino@arm.com
(cherry picked from commit b72a9c5e023bf405e62b858eb5384eb34e2b7a74)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I1605b57089a74c4701e8aa0157eb38313e560634
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split time32.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-12-vincenzo.frascino@arm.com
(cherry picked from commit 9a4162316965818ea73701b611915deca97afece)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Ibdee6540c150092e67497e932d93d6ea1246f753
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split time.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-11-vincenzo.frascino@arm.com
(cherry picked from commit 639fff1cce0f7462bb4440deeffc1048ecfc6ebb)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Id860dccf0d8afea3d6f65a243ed8cdf1760ba789
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split math64.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-10-vincenzo.frascino@arm.com
(cherry picked from commit b874b8358c756f2503c55686af842d99f5b1f312)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I5d15f64ab32e1c9630d64dc5dc446d666bbf0bc1
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split clocksource.h into linux and common headers to make the latter
suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-9-vincenzo.frascino@arm.com
(cherry picked from commit 14ee2ac618e49e767c9af4aa007f951eb9e35153)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I685711da05a1fe1414b93064e9be8b7f9888d8c0
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Introduce asm/vdso/clocksource.h to contain all the arm64 specific
functions that are suitable for vDSO inclusion.
This header will be required by a future patch that will generalize
vdso/clocksource.h.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200320145351.32292-7-vincenzo.frascino@arm.com
(cherry picked from commit 31fdcac07f679848b5ba371500292b685fd39217)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I14a1ecd16f960d7b70388ee3587dc5abe63e2f6a
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Introduce asm/vdso/clocksource.h to contain all the arm64 specific
functions that are suitable for vDSO inclusion.
This header will be required by a future patch that will generalize
vdso/clocksource.h.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@armlinux.org.uk>
Link: https://lkml.kernel.org/r/20200320145351.32292-6-vincenzo.frascino@arm.com
(cherry picked from commit c16b270b171177d1a602b270aef9bff45585bfa2)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I0f3f58c95e64fbb706f49dc66e28562ca95f22d3
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Introduce asm/vdso/clocksource.h to contain all the arm64 specific
functions that are suitable for vDSO inclusion.
This header will be required by a future patch that will generalize
vdso/clocksource.h.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-5-vincenzo.frascino@arm.com
(cherry picked from commit 659a9faa3f3c89de4c34c30c3da676059864e0fe)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I43f978de32471f017fc1ed05f377ce52cdd7e7f4
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split limits.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-4-vincenzo.frascino@arm.com
(cherry picked from commit 3e0e9f8c6e3ca92154a74edc23a8872da921d2b6)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I44a17919f0155af9efcb514041c01350bb80c16f
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split bits.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-3-vincenzo.frascino@arm.com
(cherry picked from commit 3945ff37d2f48d39fd1751d282c80176654049e4)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I0c162a012e930398c657a0b6e32f15037130a7b3
The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.
Split const.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-2-vincenzo.frascino@arm.com
(cherry picked from commit 8165b57bca2167acc150b708a9a6b7322f235e91)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I8411963b53e307e1fa77aa58b54d4206dc382b13
If the architecture knows at compile time that there is no VDSO capable
clocksource supported it makes sense to optimize the guts of the high
resolution parts of the VDSO out at build time. Add a helper function to
check whether the VDSO should be high resolution capable and provide a stub
which can be overridden by an architecture.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lkml.kernel.org/r/20200207124402.530143168@linutronix.de
(cherry picked from commit 1dff4156d1f63b525c54aea7f097a657cbbbf837)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Ib024363345b8d75ffc78b3e5598a5720926f9358
Only perform READ_ONCE(vd[CS_HRES_COARSE].hrtimer_res) for
HRES and RAW clocks.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/7ac2f0d21652f95e2bbdfa6bd514ae6c7caf53ab.1579196675.git.christophe.leroy@c-s.fr
(cherry picked from commit 49a101d7169c7729c7bab6b2f896faae34bd6c3d)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I0441a793d4703755e8026f23c07e5c1f12544319
VDSO_HRES and VDSO_RAW clocks are handled the same way.
Avoid the code duplication.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/fdf1a968a8f7edd61456f1689ac44082ebb19c15.1577111367.git.christophe.leroy@c-s.fr
(cherry picked from commit cdb7c5a9c897ab2e5c56df647dd84c84e150e925)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I765c9ddf53427d970e8b186cf4d37623c9218f25
do_coarse() is similar to do_hres() except that it never fails.
Change its type to int instead of void and let it always return success (0)
to simplify the call site.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/21e8afa38c02ca8672c2690307383507fe63b454.1577111367.git.christophe.leroy@c-s.fr
(cherry picked from commit 8463cf80529d0fd80b84cd5ab8b9b952b01c7eb9)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Ia57b47a7ed90e102fa3323311d998b2f77989bda
Since all the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks it is not required
anymore to check the return value of __cvdso_clock_get*time32_common()
before updating the old_timespec fields.
Remove the related checks from the generic vdso library.
References: c60a32ea4f ("lib/vdso/32: Provide legacy syscall fallbacks")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20190830135902.20861-6-vincenzo.frascino@arm.com
(cherry picked from commit a279235ddbe975670afe2267162028ec0a312293)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I31637fcdac30262c1837b098345a2c057794ea17
clock_gettime32 and clock_getres_time32 should be compiled only with a
32 bit vdso library.
Exclude these symbols when BUILD_VDSO32 is not defined.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/20190830135902.20861-3-vincenzo.frascino@arm.com
(cherry picked from commit bf279849ad59538a1518c667c0795ec1fe9dbd66)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I4d3563ab9aaa839da2b314b3a1eb96d68f78e2c6
Fix the following sparse warning in the generic vDSO library:
linux/lib/vdso/gettimeofday.c:224:5: warning: symbol
'__cvdso_clock_getres' was not declared. Should it be static?
Make it static and also mark it __maybe_unsed.
Fixes: 502a590a17 ("lib/vdso: Move fallback invocation to the callers")
Reported-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191128111719.8282-1-vincenzo.frascino@arm.com
(cherry picked from commit ffd08731b2d632459428612431060cf902324a8d)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I9842a0811350fc325315b25ba3f41e4b626a97c0
clock_gettime32 and clock_getres_time32 should be compiled only with the
32 bit vdso library.
Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
indication to the generic library to include these symbols.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20190830135902.20861-2-vincenzo.frascino@arm.com
(cherry picked from commit 3b5584afeef05319ade0fbf5f634a64fd3e5772b)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: Ie4f5b438ef48a41b3f61e4868e5727176dcdb464
This feature is only used by arm/arm64 boards but it builds on x86 too
so enable it everywhere for build coverage.
Bug: 153699377
Bug: 154880035
Change-Id: I30c78c394c7d95a02d75d39101c414d37b824024
Signed-off-by: Alistair Delva <adelva@google.com>
If free blocks hole is smaller than discard_granularity,
TRIM to this range can be skipped.
Fix this by changing the granularity to 4kb at dm-bow layer,
not to skip TRIM to every tiny free blocks.
Bug: 154411183
Signed-off-by: hyeongseok.kim <hyeongseok@gmail.com>
Cc: hyeongseok.kim <hyeongseok.kim@lge.com>
Change-Id: Ic7c33d94a016d0ad5a75514eae1056c328c9c1ba
(cherry picked from commit ca986e448cf2f92f1bb672fe9bc0b651fa6b76c5)
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Remove one more VLA that was not caught.
Bug: 154930031
Change-Id: I2c6c1f6d5e6ef23769c117a47689e1539b85c882
Signed-off-by: Alistair Delva <adelva@google.com>
Enable inline encryption support in MMC core.
Leaf changes summary: 5 artifacts changed
Changed leaf types summary: 5 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
'struct hc_driver at hcd.h:255:1' changed:
type size changed from 3136 to 3264 (in bits)
1 data member insertion:
'unsigned long int hc_driver::android_vendor_data[2]', at offset 2880 (in bits) at hcd.h:419:1
there are data member changes:
'u64 hc_driver::android_kabi_reserved1' offset changed from 2880 to 3008 (in bits) (by +128 bits)
'u64 hc_driver::android_kabi_reserved2' offset changed from 2944 to 3072 (in bits) (by +128 bits)
'u64 hc_driver::android_kabi_reserved3' offset changed from 3008 to 3136 (in bits) (by +128 bits)
'u64 hc_driver::android_kabi_reserved4' offset changed from 3072 to 3200 (in bits) (by +128 bits)
16 impacted interfaces
'struct mmc_host at host.h:271:1' changed:
type size changed from 12288 to 13312 (in bits)
2 data member insertions:
'keyslot_manager* mmc_host::ksm', at offset 12288 (in bits) at host.h:467:1
'void* mmc_host::crypto_DO_NOT_USE[7]', at offset 12352 (in bits) at host.h:468:1
there are data member changes:
'bool mmc_host::hsq_enabled' offset changed from 12272 to 12800 (in bits) (by +528 bits)
'unsigned long int mmc_host::private[]' offset changed from 12288 to 13312 (in bits) (by +1024 bits)
87 impacted interfaces
'struct mmc_request at core.h:147:1' changed:
type size changed from 1024 to 1216 (in bits)
3 data member insertions:
'int mmc_request::crypto_key_slot', at offset 1024 (in bits) at core.h:169:1
'u64 mmc_request::data_unit_num', at offset 1088 (in bits) at core.h:170:1
'const blk_crypto_key* mmc_request::crypto_key', at offset 1152 (in bits) at core.h:171:1
87 impacted interfaces
'struct ufs_hba at ufshcd.h:589:1' changed:
type size changed from 29440 to 29952 (in bits)
1 data member insertion:
'void* ufs_hba::crypto_DO_NOT_USE[8]', at offset 29184 (in bits) at ufshcd.h:826:1
there are data member changes:
'u64 ufs_hba::android_kabi_reserved1' offset changed from 29184 to 29696 (in bits) (by +512 bits)
'u64 ufs_hba::android_kabi_reserved2' offset changed from 29248 to 29760 (in bits) (by +512 bits)
'u64 ufs_hba::android_kabi_reserved3' offset changed from 29312 to 29824 (in bits) (by +512 bits)
'u64 ufs_hba::android_kabi_reserved4' offset changed from 29376 to 29888 (in bits) (by +512 bits)
13 impacted interfaces
'struct ufs_hba_crypto_variant_ops at ufshcd.h:371:1' changed:
type size changed from 1024 to 1536 (in bits)
1 data member insertion:
'void* ufs_hba_crypto_variant_ops::crypto_DO_NOT_USE[8]', at offset 768 (in bits) at ufshcd.h:391:1
there are data member changes:
'u64 ufs_hba_crypto_variant_ops::android_kabi_reserved1' offset changed from 768 to 1280 (in bits) (by +512 bits)
'u64 ufs_hba_crypto_variant_ops::android_kabi_reserved2' offset changed from 832 to 1344 (in bits) (by +512 bits)
'u64 ufs_hba_crypto_variant_ops::android_kabi_reserved3' offset changed from 896 to 1408 (in bits) (by +512 bits)
'u64 ufs_hba_crypto_variant_ops::android_kabi_reserved4' offset changed from 960 to 1472 (in bits) (by +512 bits)
13 impacted interfaces
Bug: 153512828
Bug: 144046242
Change-Id: I1bdf922c2373c0d756864df2c329d7a8179fe09e
Signed-off-by: Satya Tangirala <satyat@google.com>
Add padding to ufshcd_host and ufshcd_hba_variant_ops UFS, and mmc_host
in MMC to allow expansions in future if necessary, while keeping the
ABI stable. These fields are only for the purposes of keeping the ABI
stable, and in particular are *NOT* for vendor use.
Bug: 153512828
Bug: 144046242
Bug: 137270441
Change-Id: I7b780680bf3e8a3121c6f77b35a2a16d41f3bea6
Signed-off-by: Satya Tangirala <satyat@google.com>
Make mmc core able to use the blk-crypto framework for inline
encryption. This patch introduces a pointer to struct keyslot_manager
to struct mmc_host, and handles setting up the request_queue for
devices using that keyslot_manager appropriately. It also inits struct
mmc_request's inline encryption fields before it's passed to
mmc_host::ops->request.
Users of the core code in host/ (e.g. cqhci.c) should initialize the
keyslot_manager in struct mmc_host appropriately, if they want to
support inline encryption. They should also handle any inline
encryption related work necessary when mmc_host::ops->request is
called.
This patch is only compile tested, as I don't have a device to
actually test these patches. Enable CONFIG_MMC_CRYPTO to test
Bug: 153512828
Bug: 144046242
Change-Id: I6f98ffadfa6e39d7fdc3752b069210ad97babd8b
Co-developed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Satya Tangirala <satyat@google.com>
These data is used by Android vendor for specific purpose.
Bug: 154693739
Change-Id: I6fa39d3e79168105103a1a5ed67d1e690a599c1b
Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
as the config of CONFIG_SDCARD_FS was disbaled in the gki_defconfig file
with the change here:
https://android-review.googlesource.com/c/kernel/common/+/1235239
and we need to enable the sdcardfs module to have the sdcard directories
created to install apk files and to push files
Test: adb push xxx /sdcard/sdcard/Music/xxx works
Fixes: f0212822fa ("ANDROID: gki_defconfig: Disable SDCARD_FS")
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Change-Id: I2ddd6a6ac383d55171fe842956f52b4e11775003
Leaf changes summary: 13 artifacts changed
Changed leaf types summary: 12 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 1 Changed, 0 Added variable
1 Changed variable:
[C] 'bio_set fs_bio_set' was changed at bio.c:47:1:
type of variable changed:
type size changed from 1920 to 2176 (in bits)
4 data member insertions:
'u64 bio_set::android_kabi_reserved1', at offset 1920 (in bits) at bio.h:729:1
'u64 bio_set::android_kabi_reserved2', at offset 1984 (in bits) at bio.h:730:1
'u64 bio_set::android_kabi_reserved3', at offset 2048 (in bits) at bio.h:731:1
'u64 bio_set::android_kabi_reserved4', at offset 2112 (in bits) at bio.h:732:1
126 impacted interfaces:
'struct bio_set at bio.h:704:1' changed:
details were reported earlier
'struct dentry at dcache.h:89:1' changed:
type size changed from 1536 to 1664 (in bits)
2 data member insertions:
'u64 dentry::android_kabi_reserved1', at offset 1536 (in bits) at dcache.h:123:1
'u64 dentry::android_kabi_reserved2', at offset 1600 (in bits) at dcache.h:124:1
2518 impacted interfaces:
'struct dentry_operations at dcache.h:135:1' changed:
type size changed from 1024 to 1536 (in bits)
4 data member insertions:
'u64 dentry_operations::android_kabi_reserved1', at offset 896 (in bits) at dcache.h:155:1
'u64 dentry_operations::android_kabi_reserved2', at offset 960 (in bits) at dcache.h:156:1
'u64 dentry_operations::android_kabi_reserved3', at offset 1024 (in bits) at dcache.h:157:1
'u64 dentry_operations::android_kabi_reserved4', at offset 1088 (in bits) at dcache.h:158:1
2518 impacted interfaces:
'struct elevator_mq_ops at elevator.h:29:1' changed:
type size changed from 1408 to 1664 (in bits)
4 data member insertions:
'u64 elevator_mq_ops::android_kabi_reserved1', at offset 1408 (in bits) at elevator.h:55:1
'u64 elevator_mq_ops::android_kabi_reserved2', at offset 1472 (in bits) at elevator.h:56:1
'u64 elevator_mq_ops::android_kabi_reserved3', at offset 1536 (in bits) at elevator.h:57:1
'u64 elevator_mq_ops::android_kabi_reserved4', at offset 1600 (in bits) at elevator.h:58:1
126 impacted interfaces:
'struct elevator_type at elevator.h:66:1' changed:
type size changed from 2240 to 2624 (in bits)
2 data member insertions:
'u64 elevator_type::android_kabi_reserved1', at offset 2496 (in bits) at elevator.h:96:1
'u64 elevator_type::android_kabi_reserved2', at offset 2560 (in bits) at elevator.h:97:1
there are data member changes:
type 'struct elevator_mq_ops' of 'elevator_type::ops' changed as reported earlier
and size changed from 1408 to 1664 (in bits) (by +256 bits)
'size_t elevator_type::icq_size' offset changed from 1472 to 1728 (in bits) (by +256 bits)
'size_t elevator_type::icq_align' offset changed from 1536 to 1792 (in bits) (by +256 bits)
'elv_fs_entry* elevator_type::elevator_attrs' offset changed from 1600 to 1856 (in bits) (by +256 bits)
'const char* elevator_type::elevator_name' offset changed from 1664 to 1920 (in bits) (by +256 bits)
'const char* elevator_type::elevator_alias' offset changed from 1728 to 1984 (in bits) (by +256 bits)
'const unsigned int elevator_type::elevator_features' offset changed from 1792 to 2048 (in bits) (by +256 bits)
'module* elevator_type::elevator_owner' offset changed from 1856 to 2112 (in bits) (by +256 bits)
'char elevator_type::icq_cache_name[22]' offset changed from 1920 to 2176 (in bits) (by +256 bits)
'list_head elevator_type::list' offset changed from 2112 to 2368 (in bits) (by +256 bits)
126 impacted interfaces:
'struct request_queue at blkdev.h:395:1' changed:
type size changed from 15488 to 15744 (in bits)
there are data member changes:
type 'struct bio_set' of 'request_queue::bio_split' changed as reported earlier
and size changed from 1920 to 2176 (in bits) (by +256 bits)
'bool request_queue::mq_sysfs_init_done' offset changed from 14656 to 14912 (in bits) (by +256 bits)
'size_t request_queue::cmd_size' offset changed from 14720 to 14976 (in bits) (by +256 bits)
'work_struct request_queue::release_work' offset changed from 14784 to 15040 (in bits) (by +256 bits)
'u64 request_queue::write_hints[5]' offset changed from 15168 to 15424 (in bits) (by +256 bits)
126 impacted interfaces:
'struct scsi_cmnd at scsi_cmnd.h:67:1' changed:
type size changed from 3520 to 3776 (in bits)
4 data member insertions:
'u64 scsi_cmnd::android_kabi_reserved1', at offset 3520 (in bits) at scsi_cmnd.h:146:1
'u64 scsi_cmnd::android_kabi_reserved2', at offset 3584 (in bits) at scsi_cmnd.h:147:1
'u64 scsi_cmnd::android_kabi_reserved3', at offset 3648 (in bits) at scsi_cmnd.h:148:1
'u64 scsi_cmnd::android_kabi_reserved4', at offset 3712 (in bits) at scsi_cmnd.h:149:1
32 impacted interfaces:
'struct scsi_device at scsi_device.h:101:1' changed:
type size changed from 18048 to 18304 (in bits)
4 data member insertions:
'u64 scsi_device::android_kabi_reserved1', at offset 18048 (in bits) at scsi_device.h:235:1
'u64 scsi_device::android_kabi_reserved2', at offset 18112 (in bits) at scsi_device.h:236:1
'u64 scsi_device::android_kabi_reserved3', at offset 18176 (in bits) at scsi_device.h:237:1
'u64 scsi_device::android_kabi_reserved4', at offset 18240 (in bits) at scsi_device.h:238:1
32 impacted interfaces:
'struct scsi_host_template at scsi_host.h:45:1' changed:
type size changed from 2752 to 3008 (in bits)
4 data member insertions:
'u64 scsi_host_template::android_kabi_reserved1', at offset 2752 (in bits) at scsi_host.h:494:1
'u64 scsi_host_template::android_kabi_reserved2', at offset 2816 (in bits) at scsi_host.h:495:1
'u64 scsi_host_template::android_kabi_reserved3', at offset 2880 (in bits) at scsi_host.h:496:1
'u64 scsi_host_template::android_kabi_reserved4', at offset 2944 (in bits) at scsi_host.h:497:1
32 impacted interfaces:
'struct ufs_hba at ufshcd.h:578:1' changed:
type size changed from 29184 to 29440 (in bits)
4 data member insertions:
'u64 ufs_hba::android_kabi_reserved1', at offset 29184 (in bits) at ufshcd.h:827:1
'u64 ufs_hba::android_kabi_reserved2', at offset 29248 (in bits) at ufshcd.h:828:1
'u64 ufs_hba::android_kabi_reserved3', at offset 29312 (in bits) at ufshcd.h:829:1
'u64 ufs_hba::android_kabi_reserved4', at offset 29376 (in bits) at ufshcd.h:830:1
13 impacted interfaces:
'struct ufs_hba_crypto_variant_ops at ufshcd.h:365:1' changed:
type size changed from 768 to 1024 (in bits)
4 data member insertions:
'u64 ufs_hba_crypto_variant_ops::android_kabi_reserved1', at offset 768 (in bits) at ufshcd.h:392:1
'u64 ufs_hba_crypto_variant_ops::android_kabi_reserved2', at offset 832 (in bits) at ufshcd.h:393:1
'u64 ufs_hba_crypto_variant_ops::android_kabi_reserved3', at offset 896 (in bits) at ufshcd.h:394:1
'u64 ufs_hba_crypto_variant_ops::android_kabi_reserved4', at offset 960 (in bits) at ufshcd.h:395:1
13 impacted interfaces:
'struct ufs_hba_variant_ops at ufshcd.h:329:1' changed:
type size changed from 1344 to 1600 (in bits)
4 data member insertions:
'u64 ufs_hba_variant_ops::android_kabi_reserved1', at offset 1344 (in bits) at ufshcd.h:364:1
'u64 ufs_hba_variant_ops::android_kabi_reserved2', at offset 1408 (in bits) at ufshcd.h:365:1
'u64 ufs_hba_variant_ops::android_kabi_reserved3', at offset 1472 (in bits) at ufshcd.h:366:1
'u64 ufs_hba_variant_ops::android_kabi_reserved4', at offset 1536 (in bits) at ufshcd.h:367:1
13 impacted interfaces:
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib8a5bd9c4917fc3cf93cf975718928c8027d583e