Skip to content

qcom: Reduce boot time by avoiding unnecessary initialization and probes - #128

Open
aswinm94 wants to merge 4 commits into
qualcomm-linux:qcom-nextfrom
aswinm94:kpi_v2
Open

qcom: Reduce boot time by avoiding unnecessary initialization and probes#128
aswinm94 wants to merge 4 commits into
qualcomm-linux:qcom-nextfrom
aswinm94:kpi_v2

Conversation

@aswinm94

Copy link
Copy Markdown

This PR contains a set of boot time optimizations for Qualcomm SoCs,
targeting unnecessary initialization and device probing paths observed
during boot.

The changes reduce time spent in memory initialization, filesystem
probing, and redundant SCSI rescans, resulting in measurable boot KPI
improvements across Qualcomm platforms

upstream-link: https://marc.info/?l=u-boot&m=178781570076393&w=2

qcom_configure_capsule_updates() unconditionally calls scsi_scan(),
re-scanning all SCSI children even when an earlier boot stage has
already bound them. Skip the rescan when UCLASS_SCSI already has
devices, keeping it as a fallback if none are bound yet.

~34ms saved on Qcom SoC bootup time.

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
efi_disk_add_dev() runs efi_fs_exists() on every GPT partition as
soon as its block device probes, even for raw partitions that are
never opened as a filesystem before boot. Only the ESP needs this
probe, so skip it for other GPT partitions.

~170ms saved on Qcom SoC bootup time.

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
CONFIG_SYS_MALLOC_CLEAR_ON_INIT zeroes the entire malloc pool at
init, costing measurable boot time on the 256MB pool used by Qcom
boards. Disabling it saves ~74ms on Qcom SoC bootup time.

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
qcom_load_fit_image() allocates the FAT-read buffer with malloc(),
which is not guaranteed to be cache-line aligned and is unsafe to
use with cache-line DMA. Use malloc_cache_aligned() instead.

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant