Commit 382e68666b ("ANDROID: core of xt_IDLETIMER send_nl_msg
support"), switched the allocation of info->timer in
idletimer_tg_create_v1() to use kzalloc() instead of plain kmalloc().
While this seems like a safer option it also creates merge conflicts
with multiple upstream patches that replace kmalloc() calls with their
new kmalloc_obj() equivalents (treewide).
Instead of using kzmalloc() align the allocation with upstream and
manually initialize suspend_time_valid (added downstream). This is
enough to guarantee timer->last_suspend_time is valid.
A switch to kzmalloc_obj() can be reapplied later if really needed or
even better it could be sent upstream but it seems unnecessary there.
Bug: 183485987
Cc: Maciej Żenczykowski <maze@google.com>
Change-Id: I6f55c3dafe6ae64b163cb807300f7c5dddf7a421
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Add zstd compressed kernel image to be built by default. Zstd compressed
kernel image is approximately 1.6 times smaller than lz4 which will improve
boot time on platforms with slower I/O (e.g. eMMC) though it shall be
carefully used and verified with BootPerf test as lz4 offers faster
decompression time in general than zstd.
Bug: 457429470
Test: tools/bazel run //common:kernel_aarch64_dist
Test: Verify that Image.zst is present in dist dir
Change-Id: Ia73cbd9fb12fccd30665490d1ceab1496e4b08d7
Signed-off-by: Hubert Mazur <hmazur@google.com>
Relying on the inline name is not correct, as it is possible for file
names to change, or for them to use a different and larger buffer
than the inline buffer for storing the file's name.
Therefore, use the [take|release]_dentry_name_snapshot() functions to
read the file names properly.
Bug: 498445098
Fixes: e433d83cab ("ANDROID: mm/memfd-ashmem-shim: Introduce shim layer")
Change-Id: Ie09684bee445f8d1f636f3b7c8e6228c857e9dc4
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
Android's bionic provides the 'union semun' definition via <sys/sem.h>
header (and glibc does not). A second definition was introduced in
commit b24335521d ("selftests/memfd: use IPC semaphore instead of
SIGSTOP/SIGCONT") breaking Android builds:
tools/testing/selftests/memfd/memfd_test.c:45:7: error: redefinition of 'semun'
45 | union semun {
| ^
toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/sys/sem.h:46:7: note: previous definition is here
46 | union semun {
| ^
I tried switching to <linux/sem.h> which provides this definition but
there are further conflicts with other headers. This is likely the
reason why the patch author used <sys/sem.h> instead.
While a better approach is fixed upstream, let's simply avoid the
definition for Android builds for now.
Bug: 504071052
Fixes: b24335521d ("selftests/memfd: use IPC semaphore instead of SIGSTOP/SIGCONT")
Change-Id: I6c14139986bb9e7f4fdf992e02c572f5af953b09
Signed-off-by: Carlos Llamas <cmllamas@google.com>
In commit 9ea35a25d5 ("mm: introduce VMA flags bitmap type") the flags
parameter in shmem_file_setup() was converted to the new vma_flags_t.
Match the same type with vma->flags, which was also added in the same
commit as a temporary solution.
Cc: Isaac J. Manjarres <isaacmanjarres@google.com>
Fixes: 9ea35a25d5 ("mm: introduce VMA flags bitmap type")
Change-Id: I75df61a1b1bc6ef0c5897fd4256a6bb3701120c6
Signed-off-by: Carlos Llamas <cmllamas@google.com>
In commit 9ea35a25d5 ("mm: introduce VMA flags bitmap type") the flags
parameter in shmem_file_setup() was converted to the new vma_flags_t.
This means the plubming in VmaNew needs to also be converted to handle
this new type. In the mean time, let's do the manual translation.
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Isaac J. Manjarres <isaacmanjarres@google.com>
Fixes: 9ea35a25d5 ("mm: introduce VMA flags bitmap type")
Change-Id: Ic344b1a3dcd1cda39c808c3ed913d1c42cfb2c9e
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Upstream drop the <linux/hex.h> header from <include/kernel.h> and
updated all users to directly #include <linux/hex.h>. This patch updates
the remaining Android OOT users.
Fixes: 24c776355f ("kernel.h: drop hex.h and update all hex.h users")
Change-Id: I9de9396e8667e44b94b92af2bc3e042bab619f7a
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Steps on the way to v7.0-rc1
Resolves trivial merge conflicts in:
mm/cma.c
Cc: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ifb7dc04f3ce279318b9c10525ef81b304201d7ae
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit a3654ae7c1.
It has merge conflicts with upstream patches in v7.0. It can be later
reapplied if needed.
Bug: 421065577
Cc: Richard Chang <richardycc@google.com>
Change-Id: I69cbdf92162a2c2c273331e00531aacd725d0b72
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 40c4d5553e.
It has merge conflicts with upstream patches in v7.0. It can be later
reapplied if needed.
Bug: 421065577
Cc: Richard Chang <richardycc@google.com>
Change-Id: If2d56b842adf435ce9a9a4f15a362228fcbbba06
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit ec3dda719e.
It has merge conflicts with upstream patches in v7.0. It can be later
reapplied if needed.
Bug: 421065577
Cc: Richard Chang <richardycc@google.com>
Change-Id: Icf3bee3d73eb49506806ada44e523a08afc21b31
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 3243013882.
It has merge conflicts with upstream patches in v7.0. It can be later
reapplied if needed.
Bug: 421065577
Cc: Richard Chang <richardycc@google.com>
Change-Id: I3ddd79895b388a81828d9ec3b5708c8afd048f7a
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit d4dc3d260d.
It has merge conflicts with upstream patches in v7.0. It can be later
reapplied if needed.
Bug: 421065577
Cc: Richard Chang <richardycc@google.com>
Change-Id: I069d1ea9b56f810b5a6553788d6b4e6fe290891e
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit a34dce73e1.
It has merge conflicts with upstream patches in v7.0. It can be later
reapplied if needed.
Bug: 421065577
Cc: Richard Chang <richardycc@google.com>
Change-Id: I7f946e58660a46b582dc4bc3a2e4b56a76f2b021
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 5559b861a3.
Upstream dropped __cma_alloc() in commit 9bda131c60 ("mm: cma: add
cma_alloc_frozen{_compound}()"), and replaced it with an alternative
__cma_alloc_frozen() but that doesn't increment the page's refcount.
Pixel should convert to use plain cma_alloc() instead.
Bug: 308881290
Cc: Juan Yescas <jyescas@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Change-Id: I27ea5d46481f46ff290737ef12bece6e01dbb990
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 0706332e2c.
It has a conflict with upstream commit 60b35af0a6 ("arm64: introduce
arch_zone_limits_init()"), and the resolution might not be as trivial as
max_zone_pfns[] is now initialized in arch_zone_limits_init().
Bug: 372371001
Cc: Suren Baghdasaryan <surenb@google.com>
Change-Id: I8a86834557a92b4a56c2c5f2f439884f5381c20e
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 4922a3cdd7.
The clean version from upstream will be pulled via v7.0-rc1 instead.
Bug: 278101072
Change-Id: Ib1da4441f62f41b57e6b15e5b67e0dcf402f2bba
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 40d1642f43.
The same version from upstream will be pulled via v7.0-rc1 instead.
Bug: 278101072
Change-Id: Ia0ce4cdaec0d11516eeae783ef3633198a8886dc
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 883e4d055a.
The clean version from upstream will be pulled via v7.0-rc1 instead.
Bug: 278101072
Change-Id: Iac508f94757951b7f454613f40f43b3510e33607
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This allows Bazel to natively resolve the external repository paths in
standalone workspaces which Bazel uses during tests. `package_name()`
approach only returns the path relative to the root of its own
workspace, which causes the include path to be set incorrectly for test
workspaces.
Bug: 477549297
Change-Id: Iab298c120acc5d29e5eb41b30ba145a3726b07a4
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
This change prevents bpf_86 include paths from polluting include paths
for downstream targets.
Bug: 477549297
Change-Id: Id36fc673d016bc4a73d63b515f145e1976425e4e
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
copt -I tools/lib/bpf is not required since all headers under this
directory are included with the hdrs attribute.
Bug: 477549297
Change-Id: I1e47f481034f4c3b5dc0308c016e55810ff2f455
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
It is used as prebuilt artifacts of x86_64 headers for ddk workspace.
Test: tools/bazel build //common:kernel_x86_64_ddk_headers_archive
Bug: 493138451
Change-Id: I467136525571acef2d443db6b5d5cbc93c74e982
Signed-off-by: Brandon Chen <brandon.chen@imgtec.com>
The wifi7-specific functionality was split out from the ath12k core into
a new ath12k_wifi7.ko module. This sill gets enabled via CONFIG_ATH12K,
so add it to the list of db845c module outs.
Cc: Amit Pundir <amit.pundir@linaro.org>
Fixes: a720270452 ("wifi: ath12k: Modularize driver into common and Wi-Fi 7 specific components")
Change-Id: I7178a05925c0004e434d7bcd25d5637861d6b49b
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Upstream has removed the ACPI dependency from PTP_1588_CLOCK_VMCLOCK
which means this option gets now implicitly enabled via PTP_1588_CLOCK.
It is not used in GKI, so let's keep it disabled.
Fixes: ac1e740492 ("ptp: ptp_vmclock: remove dependency on CONFIG_ACPI")
Change-Id: Ife2bb7594d6321b9e86f2f64c040d1c59363face
Signed-off-by: Carlos Llamas <cmllamas@google.com>
There is a trailing whitespace in this comment block that was likely
accidentally fixed during a merge conflict resolution. However, this
correction now triggers further merge conflicts with upstream patches.
Let's match the upstream "mistake". Note that netdev discourages from
sending simple clean-up patches, so it's unlikely this will get fixed
upstream anytime soon.
Fixes: a83342f977 ("Merge ca661c5e1d ("Merge tag 'selinux-pr-20240312' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux") into android-mainline")
Change-Id: I1387e0948263ef9a5ba5ef6d259b818ea06a2a14
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This symbol is needed in qcom vendor module. Export it.
Bug: 500772634
Change-Id: Ia3dc1151af6b349bd5a366032c53f1a18e1343d3
Signed-off-by: Sai Harshini Nimmala <snimmala@qti.qualcomm.com>
This reverts commit 695728b4bd.
Android has carried this revert for too long. The OOT drivers should
instead be updated to reflect the EXTRA_CFLAGS and similar removal.
There are other options such as KCFLAGS, CFLAGS_MODULE and ccflags-y
that should serve as a replacement depending on the specifics.
Bug: 412122604
Change-Id: I8512b6c20113af6ed6bfcc527898cad6c6fc4864
Signed-off-by: Carlos Llamas <cmllamas@google.com>
HUTRR119 introduces new usages for keys intended to invoke AI agents
based on the current context. These are useful with the increasing
number of operating systems with integrated Large Language Models
Add new key definitions for KEY_ACTION_ON_SELECTION,
KEY_CONTEXTUAL_INSERT and KEY_CONTEXTUAL_QUERY
Bug: 486130163
Change-Id: I810323f35044529fe55039cb76a9306b2b481ec9
(cherry picked from commit 45065a5095https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next)
Signed-off-by: Akshai Murari <akshaim@google.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
This change builds pahole from sources in external/dwarves with libbpf
library built from sources in the kernel tree.
Bug: 477549297
Change-Id: I79a921239f66238c435470b38f6337e1d4137107
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
* This is in favor of using --dynamic_partition_size
Bug: 466517442
Change-Id: If65ad6e711a95426ef2d5f4b43c57db50a305020
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>