Skip to content

Conversation

@Pradeep-pvk
Copy link

No description provided.

Pradeep-pvk and others added 4 commits November 19, 2025 15:58
Enable UFS on x1e80100 SoC.

Signed-off-by: Pradeep P V K <pragalla@qti.qualcomm.com>
Enable UFS for HAMOA-IOT-EVK board.

Signed-off-by: Pradeep P V K <pragalla@qti.qualcomm.com>
The nvme_pci_prp_iter_next function had a race condition where
dma_need_unmap() could return true indicating DMA unmapping is
needed, but iod->dma_vecs was NULL, causing a NULL pointer
dereference.

This occurred because:
1. dma_vecs allocation happens in nvme_pci_setup_data_prp()
2. nvme_pci_prp_iter_next() checks dma_need_unmap() but doesn't
   verify if dma_vecs allocation was successful
3. If allocation failed or race condition occurred, accessing
   dma_vecs[0] would cause kernel crash

The crash manifested as:
- dma_size:0 unmap:0 initially, then dma_size:0 unmap:1
- nr_dma_vecs:0 dma_vecs:0x0 (NULL pointer)
- Unable to handle kernel NULL pointer dereference at virtual
  address 0x0.

Fix by adding iod->dma_vecs NULL check to the condition in
nvme_pci_prp_iter_next(), ensuring DMA vector operations only
occur when the dma_vecs array has been successfully allocated.

Co-developed-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Signed-off-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
The current devfreq downdifferential threshold of 5% causes overly
aggressive frequency downscaling, leading to performance degradation
sometimes during sequential read workloads.

Update the UFS devfreq downdifferential threshold to 65.
This widens the hysteresis window and prevents overly aggressive
downscaling, ensuring that frequency is maintained for loads above 5%
and scaling down occurs only when utilization falls below this level,
while scale-up still triggers above the 70% threshold.

Signed-off-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
Link:
https://lore.kernel.org/all/20260122141331.239354-4-nitin.rawat@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