mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[PR #250] [MERGED] gpu_unlock: fix the two sparse type warnings #242
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#242
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Zagitta/gpu-unlock/pull/250
Author: @randomizedcoder
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @Zagitta
Base:
main← Head:upstream/sparse📝 Commits (2)
500e48cgpu_unlock: take gfp_t in diag_dma_alloc()ca78f02gpu_unlock: decode PMCSR D0 with a helper📊 Changes
3 files changed (+12 additions, -2 deletions)
View changed files
📝
kernel/gpu_unlock/gfw_eval.c(+5 -0)📝
kernel/gpu_unlock/gfw_eval.h(+5 -0)📝
kernel/gpu_unlock/unlock_610.c(+2 -2)📄 Description
Two small type fixes that make the module clean under sparse (
make C=2 CHECK=sparse). Neither changes behaviour at run time.incorrect type in argument (different base types), atdiag_dma_alloc()and both callersdiag_dma_alloc()takesgfp_t, the typedma_alloc_coherent()expects, instead ofunsigned int. Callers already passGFP_KERNEL.restricted pci_power_t degrades to integerunlock_transaction_claim()compared the PMCSR state field withPCI_D0, which is the kernel'spci_power_tand not a register value. Both happen to be 0. The newgpu_unlock_pmcsr_d0()ingfw_eval.ccompares the register bits with register constants.Testing
On 2.0 (
1fc6d62), with linux 7.3:KCFLAGS=-Werror.checkpatch.plreports 0 errors and 0 warnings on the code changes.gpu_unlock_pmcsr_d0()on the host againstgfw_eval.cfor D0, D1, D2 and D3hot, D0 with every other bit set, and0xffff. The table is in the commit message.gpu_unlock: unlocked, and BF16 GEMM went from 44 to 86 TFLOPS. I haven't booted them on 2.0.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.