Commit graph

14468 commits

Author SHA1 Message Date
Giovanni Ricca
6fd7609f90
arm64: Re-generate lahaina-qgki_defconfig
Change-Id: Id147e5c6f9fc90b07898b8a5db7252384fc5a946
2025-03-01 14:31:46 +01:00
Giovanni Ricca
a7d46f236b
Merge https://github.com/LineageOS/android_kernel_qcom_sm8350 into lineage-22.1
Change-Id: I1458bcb6fad952cf220e2ea27c853b15ff550b0d
2025-02-28 10:37:26 +01:00
Kalesh Singh
398cce17f8
UPSTREAM: arm64: mremap speedup - enable HAVE_MOVE_PUD
HAVE_MOVE_PUD enables remapping pages at the PUD level if both the source
and destination addresses are PUD-aligned.

With HAVE_MOVE_PUD enabled it can be inferred that there is approximately
a 19x improvement in performance on arm64.  (See data below).

------- Test Results ---------

The following results were obtained using a 5.4 kernel, by remapping a
PUD-aligned, 1GB sized region to a PUD-aligned destination.  The results
from 10 iterations of the test are given below:

Total mremap times for 1GB data on arm64. All times are in nanoseconds.

  Control          HAVE_MOVE_PUD

  1247761          74271
  1219896          46771
  1094792          59687
  1227760          48385
  1043698          76666
  1101771          50365
  1159896          52500
  1143594          75261
  1025833          61354
  1078125          48697

  1134312.6        59395.7    <-- Mean time in nanoseconds

A 1GB mremap completion time drops from ~1.1 milliseconds to ~59
microseconds on arm64.  (~19x speed up).

Link: https://lkml.kernel.org/r/20201014005320.2233162-5-kaleshsingh@google.com
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Geffon <bgeffon@google.com>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Gavin Shan <gshan@redhat.com>
Cc: Hassan Naveed <hnaveed@wavecomp.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jia He <justin.he@arm.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Lokesh Gidra <lokeshgidra@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Minchan Kim <minchan@google.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Sandipan Das <sandipan@linux.ibm.com>
Cc: SeongJae Park <sjpark@amazon.de>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Steven Price <steven.price@arm.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit f5308c896d5de211245a9dc73b4e530f75185dd5)

Bug: 151772539
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: I30590b7375dde84fe345f4920a06f6a2c0b5aa31
2025-02-20 04:17:48 +02:00
Kalesh Singh
ae867acb06
UPSTREAM: arm64: mremap speedup - Enable HAVE_MOVE_PMD
HAVE_MOVE_PMD enables remapping pages at the PMD level if both the
source and destination addresses are PMD-aligned.

HAVE_MOVE_PMD is already enabled on x86. The original patch [1] that
introduced this config did not enable it on arm64 at the time because
of performance issues with flushing the TLB on every PMD move. These
issues have since been addressed in more recent releases with
improvements to the arm64 TLB invalidation and core mmu_gather code as
Will Deacon mentioned in [2].

>From the data below, it can be inferred that there is approximately
8x improvement in performance when HAVE_MOVE_PMD is enabled on arm64.

--------- Test Results ----------

The following results were obtained on an arm64 device running a 5.4
kernel, by remapping a PMD-aligned, 1GB sized region to a PMD-aligned
destination. The results from 10 iterations of the test are given below.
All times are in nanoseconds.

Control    HAVE_MOVE_PMD

9220833    1247761
9002552    1219896
9254115    1094792
8725885    1227760
9308646    1043698
9001667    1101771
8793385    1159896
8774636    1143594
9553125    1025833
9374010    1078125

9100885.4  1134312.6    <-- Mean Time in nanoseconds

Total mremap time for a 1GB sized PMD-aligned region drops from
~9.1 milliseconds to ~1.1 milliseconds. (~8x speedup).

[1] https://lore.kernel.org/r/20181108181201.88826-3-joelaf@google.com
[2] https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg140837.html

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/r/20201014005320.2233162-3-kaleshsingh@google.com
Link: https://lore.kernel.org/kvmarm/20181029102840.GC13965@arm.com/
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 45544eee96065cf183fbb937fe1f45a172b06f4e)

Bug: 151772539
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: If0d97276cf8de1a5893e97444f2d961db05abea5
2025-02-20 04:17:47 +02:00
Lokesh Gidra
38e508079d
ANDROID: GKI: Enable CONFIG_USERFAULTFD
Patches for SELinux support and kernel page-fault restriction in
userfaultfd have been backported. See references below.
So from security perspective it should be safe to enable it in Android.

1) https://android-review.googlesource.com/c/kernel/common/+/1576486
2) https://android-review.googlesource.com/c/kernel/common/+/1576704
3) https://android-review.googlesource.com/c/kernel/common/+/1612597
4) https://android-review.googlesource.com/c/kernel/common/+/1574667

Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Bug: 160737021
Bug: 169683130
Change-Id: Iac5143da76783de57dba229f5761aff9297c17ae
2025-02-20 04:17:47 +02:00
Yan Yan
b6f910c0f0
ANDROID: GKI: Enable XFRM_MIGRATE
To be able to update addresses of an IPsec SA, as required by
supporting MOBIKE

Bug: 169169084
Signed-off-by: Yan Yan <evitayan@google.com>
Change-Id: I5aa3f3556d615e4f0695bb78cd3cad9e83851df5
2025-02-20 03:40:37 +02:00
Michael Bestas
0ef9f95480
Reapply "ANDROID: GKI: Enable CHACHA20POLY1305 and XCBC"
This reverts commit e785a25f52.

Reason for revert: Required by FCM level 6

Change-Id: I29ecf7dadf31f65432da2fa4c738b16af3381512
2025-02-20 03:40:33 +02:00
Michael Bestas
b964d75b7e
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4:
  msm: eva: Validating the SFR buffer size before accessing
  msm: eva: Copy back the validated size to avoid security issue
  msm: npu: Fix use after free issue
  USB: dwc3: gadget: Add stop transfer request for isoc transfers
  arm64: defconfig: Enable uvc for QCM6490 IOT target
  firmware: qcom_scm: do not clear dump mode from shutdown
  msm: virtio_npu: Fix use-after-free issue in unmap_buf
  msm: virtio_npu: Fix use-after-free issue in virt_npu_map_buf
  i2c: i2c-master-msm-geni: add null pointer check in event call back
  firmware: qcom_scm: handle echo b > /proc/sysrq-trigger
  scripts: mod: replace with a safe function
  msm: ep_pcie: Disable hot reset and ignore linkdown
  coresight-tmc: Replace deprecated function
  USB: dwc3: gadget: Queue data for 16 micro frames ahead in future
  power: reset: Disable support of dynamic download mode (ramdump)

 Conflicts:
	arch/arm64/boot/dts/vendor/bindings/sound/rt5645.txt

Change-Id: I57c063465c2804c77c5a6f62acb6c7987a38bc7f
2025-02-14 02:42:56 +02:00
Michael Bestas
b9715311a2
Merge tag 'ASB-2025-02-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
https://source.android.com/docs/security/bulletin/2025-02-01
CVE-2024-53104
CVE-2025-0088

* tag 'ASB-2025-02-05_11-5.4' of https://android.googlesource.com/kernel/common: (449 commits)
  ANDROID: gki - change networking configuration
  ANDROID: kernelci build-break for 64-bit riscv clang builds (5.4 only)
  Revert "BACKPORT: RISC-V: Stop relying on GCC's register allocator's hueristics"
  Revert "ANDROID: declare sp_in_global outside of CONFIG_FRAME_POINTER"
  ANDROID: GKI: add Trimble symbol list
  UPSTREAM: selinux: ignore unknown extended permissions
  ANDROID: ABI: Update allowed list for galaxy
  Revert "netfilter: Replace zero-length array with flexible-array member"
  Revert "tracing: Constify string literal data member in struct trace_event_call"
  Revert "skb_expand_head() adjust skb->truesize incorrectly"
  Linux 5.4.289
  ftrace: use preempt_enable/disable notrace macros to avoid double fault
  mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim()
  drm: adv7511: Drop dsi single lane support
  net/sctp: Prevent autoclose integer overflow in sctp_association_init()
  sky2: Add device ID 11ab:4373 for Marvell 88E8075
  pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking
  RDMA/uverbs: Prevent integer overflow issue
  modpost: fix the missed iteration for the max bit in do_input()
  modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host
  ...

 Conflicts:
	arch/arm64/boot/dts/vendor/bindings/clock/adi,axi-clkgen.yaml
	arch/arm64/boot/dts/vendor/bindings/clock/axi-clkgen.txt
	drivers/rpmsg/qcom_glink_native.c
	drivers/soc/qcom/socinfo.c

Change-Id: I60727e0cdd974fda5ca71f938bc2f984a8bbf19a
2025-02-06 22:53:05 +02:00
Michael Bestas
1917162586
arm64: Only enable CC_HAVE_STACKPROTECTOR_SYSREG for GCC
When STACKPROTECTOR_PER_TASK is enabled, __stack_chk_guard is not
exported which breaks external modules due to missing symbols.

Change-Id: I633dcdd3343f63f6af34aab87e98cc81c6c56fe2
2025-02-04 21:35:49 +02:00
Maciej Żenczykowski
c1ccccc765 ANDROID: gki - change networking configuration
Make the following configuration changes:
  CONFIG_NET_CLS_MATCHALL=y
  CONFIG_NET_ACT_POLICE=y
  CONFIG_NET_ACT_BPF=y
  CONFIG_USB_RTL8150=y
  CONFIG_USB_NET_CDC_EEM=y
  CONFIG_USB_NET_CDC_NCM=y
  CONFIG_USB_NET_AQC111=y

Note: 4 of these are already enabled in android12-5.4,
and the remaining 3 will be enabled as well in
https://android-review.googlesource.com/c/kernel/common/+/3470489

Test: TreeHugger
Bug: 377436524
Bug: 391669319
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1737c1e18a072cac9dd50e4d21b52b220c2ec40c
2025-02-04 09:51:11 -08:00
Linux Build Service Account
59b19eff23 Merge 6ea403acf3 on remote branch
Change-Id: I56b796bf0bc3983711d547ef0bbf64b90dcd2c6b
2025-01-14 12:04:43 -08:00
QCTECMDR Service
6ea1e229e2 Merge "arm64: defconfig: Enable uvc for QCM6490 IOT target" 2024-12-31 02:31:07 -08:00
Sandeep Patil
72d8cd8a43
arm64: configs: xiaomi: Enable CONFIG_EXFAT_FS
Bug: 186473897
Test: build/build.sh

Signed-off-by: Sandeep Patil <sspatil@google.com>
Change-Id: I6c97e858e8f1eac0658a46313a71dac73653d63c
2024-12-20 23:03:57 +01:00
FlowerSea0208
f0dbd5b51f
arm64: configs: xiaomi: Enable BQ 1S battery cell config for star
Change-Id: Ib5a5ddc459b3f7af3fb557d434b14a06a85723d6
2024-12-20 23:03:56 +01:00
TheStrechh
8e146b486a
arm64: configs: xiaomi: Enable redwood specific power config
Change-Id: I05cf1df0c7521224b6b74c87ef560334a3caa988
2024-12-20 23:03:55 +01:00
FlowerSea0208
29827af589
arm64: configs: xiaomi: Enable BQ 1S battery cell config for venus
Change-Id: Iac8af05ced1bacacd21825b8dcf895941ab0fa15
2024-12-20 23:03:54 +01:00
Ramii Ahmed
d5cdb77941
arm64: configs: xiaomi: Enable venus specific power config
Change-Id: Ic8afef2e85429ae6c892059507ac037949c0d2f2
2024-12-20 23:03:53 +01:00
Arian
02a276cb59
arm64: configs: xiaomi: Enable renoir specific power config
Change-Id: Idfd4c2e278b59510f98d4d5a5c2df8c23979dfd1
2024-12-20 23:03:52 +01:00
Arian
e8169036d2
arm64: configs: xiaomi: Enable mi wireless charging for odin star and venus
Change-Id: I0885eaf2265e89e8c93278c09e2e543244787ac3
2024-12-20 23:03:51 +01:00
Arian
e30965e762
arm64: configs: xiaomi: Enable ultra wideband for odin
Change-Id: Ic4636f515d766eced0eb604609cafd2cf090a2c1
2024-12-20 23:03:50 +01:00
Arian
5b85580e66
arm64: configs: xiaomi: Enable time of flight sensor for odin and star
Change-Id: I146697fccdc90723d4845cee5ddf1059db8009d5
2024-12-20 23:03:49 +01:00
Arian
1d2874f83e
arm64: configs: xiaomi: Enable image signal processor for cetus
Change-Id: Ieeaea581896af9797a090d20f84d45eab9da103f
2024-12-20 23:03:48 +01:00
Giovanni Ricca
d076e98ba3
arm64: configs: xiaomi: Enable pinctrl configs
Change-Id: Id0b57071eb6e47eff0fc7a2d0604f96375a482f8
2024-12-20 23:03:48 +01:00
Giovanni Ricca
cb37b42a95
arm64: configs: xiaomi: Enable haptics drivers
Change-Id: Ic2fb840d1d9d93413fe8503e221ebd2780584c0e
2024-12-20 23:03:47 +01:00
Giovanni Ricca
0560044037
arm64: configs: xiaomi: Enable fingerprint configs
Change-Id: I4812a104ac90e9e0017152f761f4e0d15a46f0a0
2024-12-20 23:03:46 +01:00
Giovanni Ricca
3fb1c04c10
arm64: configs: xiaomi: Enable MIUS proximity sensor
Change-Id: I77d23e33838823cc240d479ebcc8ebda7716d177
2024-12-20 23:03:45 +01:00
Giovanni Ricca
5db30421e1
arm64: configs: xiaomi: Enable bq fuel guage
Change-Id: I370d8b39679b17695a906e93d3f1ebc8f3c56276
2024-12-20 23:03:44 +01:00
Giovanni Ricca
52b87e0368
arm64: configs: xiaomi: Enable bq2597x
Change-Id: I99ba5074a226febdded6169c5bb34faa3cdce56b
2024-12-20 23:03:43 +01:00
Giovanni Ricca
f2527c5685
arm64: configs: xiaomi: Build qti charger as a module
Change-Id: Ie523761934e5f0a95953677658028a9eebd6872d
2024-12-20 23:03:42 +01:00
Arian
7d75d53eff
arm64: configs: xiaomi: Enable IR configs
Change-Id: I5acfe4d8fb2554f459ba6006e428a9b9b297f652
2024-12-20 23:03:41 +01:00
Giovanni Ricca
b91dad4e14
arm64: configs: xiaomi: Build icnss2 as module
Change-Id: I1e204a1b1af429d7f3ecd9a575b31d82afeb257e
2024-12-20 23:03:40 +01:00
Arian
bf5409cf6c
arm64: configs: xiaomi: Build cnss2 as module
Change-Id: I9443b032aafb483738b7a1c2812f12a6c3e9ccc5
2024-12-20 23:03:40 +01:00
Arian
2b09fda830
arm64: configs: xiaomi: Enable qca6490/qca6750
Co-authored-by: Giovanni Ricca <giovanniricca@proton.me>
Change-Id: I42fe7c7c89fbeb45243ebeac9cc4ae4242587bbd
2024-12-20 23:03:39 +01:00
Luca Stefani
b5426120d4
arm64: configs: xiaomi: Enable qcacld
Change-Id: I22b3d3adf31c95a91275d0c795403b4097201430
2024-12-20 23:03:38 +01:00
Giovanni Ricca
ecbe5bbf10
arm64: configs: xiaomi: Enable mi thermald interface
Change-Id: I068f338cba88b67df680e0b2027851c445c4c974
2024-12-20 23:03:37 +01:00
Arian
78879c4429
arm64: configs: xiaomi: Enable mi hwid driver
Change-Id: Ie9964a890f3cf8a1070c6b87e4e2949c553a9b2a
2024-12-20 23:03:36 +01:00
Arian
ac923e5c3f
arm64: configs: xiaomi: Disable unused touchscreen drivers
Change-Id: I19b8a9dc7aff6798d9654132c7b2f6b419814f79
2024-12-20 23:03:35 +01:00
Giovanni Ricca
21d4ce44a4
arm64: configs: xiaomi: Enable touchscreen drivers
Change-Id: I5d437e85adb64aa5b319e28f2fccb6f496bc09a8
2024-12-20 23:03:34 +01:00
Demon000
c35cce380c
arm64: configs: xiaomi: Enable CONFIG_BUILD_ARM64_DT_OVERLAY
Change-Id: Iec686950466642aecc13e92c5526261c3f55774a
2024-12-20 23:03:33 +01:00
Giovanni Ricca
f3c05cd5db
arm64: configs: Initial xiaomi stub fragmented configs
Change-Id: I8e704c19a6ca02932f556df455c5bd7578efa844
2024-12-20 23:03:32 +01:00
Arian
f359f348a3
arm64: Generate lahaina-qgki_defconfig
```
PATH="../../los21/prebuilts/tools-lineage/linux-x86/bin:../../los21/prebuilts/clang/host/linux-x86/clang-r487747c/bin:$PATH"

ARCH=arm64 \
    CROSS_COMPILE=aarch64-linux-gnu- \
    REAL_CC=clang \
    CLANG_TRIPLE=aarch64-linux-gnu- \
    LD=ld.lld \
    AR=llvm-ar \
    LLVM=1 \
    LLVM_IAS=1 \
    scripts/gki/generate_defconfig.sh \
    vendor/lahaina-qgki_defconfig
```

Change-Id: I564542c0e640fe2f3d338f4277551aa1f607c9e5
2024-12-20 23:03:32 +01:00
Arian
6fdd2c961f
arm64: dts: xiaomi: Move to upstream ir-spi-led driver
Change-Id: I464b1b955aa6301aed121d094555ee7d6714f48f
2024-12-20 23:03:31 +01:00
Giovanni Ricca
4a917182f7
arm64: dts: Import redwood device tree
Change-Id: Icecd568298c11b1beaa720ea483b1930f179a8e2
2024-12-20 23:03:30 +01:00
Giovanni Ricca
b5120bde7f
arm64: dts: Import zijin device tree
Change-Id: If462b025b917986ff06cfac543e4dbd08575453c
2024-12-20 23:03:29 +01:00
Arian
147be05755
arm64: dts: Use seperate mi2s rx and tx in taoyao overlay
Commit c7b6ffd "ARM: dts: qcom: Add separate cpu dai for mi2s rx and tx"
added a seperate cpu dai for mi2s rx and tx. Update taoyao
overlay to comply with the change

Change-Id: Id2c78ef774a30f806c746c81b17efe5901ab2863
2024-12-20 23:03:28 +01:00
Giovanni Ricca
604261a6cf
arm64: dts: Import taoyao device tree
Change-Id: I119ebd3cd9574f7f40af7181dd297b57ef00fa4b
2024-12-20 23:03:27 +01:00
Giovanni Ricca
cc7210f905
arm64: dts: Import mona device tree
Change-Id: Ib73d3254fed789fb76adb6ca6ebd0249a9475ca7
2024-12-20 23:03:26 +01:00
Giovanni Ricca
bb710edee7
arm64: dts: Import lisa device tree
Change-Id: I8a7741482de378b8076c30a7d1f230b74b992429
2024-12-20 23:03:25 +01:00
Giovanni Ricca
bf94f2a17c
arm64: dts: Import xiaomi-sm7325-common
Change-Id: I10cc4aaa1b943e1eb84cc233b9188f7bb565742b
2024-12-20 23:03:24 +01:00