Skip to content

devfreq: add compatibility wrapper for moved governor.h - #1087

Closed
Salendarsingh Gaud (sgaud-quic) wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
sgaud-quic:fix/devfreq-governor-compat-wrapper
Closed

devfreq: add compatibility wrapper for moved governor.h#1087
Salendarsingh Gaud (sgaud-quic) wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
sgaud-quic:fix/devfreq-governor-compat-wrapper

Conversation

@sgaud-quic

Copy link
Copy Markdown
Contributor

devfreq: add compatibility wrapper for moved governor.h

Problem

All Yocto nightly builds against qcom-6.18.y tip are failing with:

governor_msm_adreno_tz.c:30:10: fatal error: governor.h: No such file or directory
governor_gpubw_mon.c:14:10: fatal error: governor.h: No such file or directory

Root Cause

Commit 6df46fd1d1b5 (FROMGIT: PM / devfreq: Move governor.h to a public header location) was backported into qcom-6.18.y, relocating
drivers/devfreq/governor.hinclude/linux/devfreq-governor.h.

Out-of-tree modules such as kgsl-dlkm build with:

ccflags-y += -I$(KERNEL_SRC)/drivers/devfreq

and include the header as:

#include "governor.h"

kgsl-dlkm v1.0.14 guards the new path behind KERNEL_VERSION(6, 19, 0)
(matching the upstream mainline target), so on qcom-6.18.y the old path
is taken — but the file is gone.

last-good:  11cf26cb7862   (governor.h still at drivers/devfreq/)
breaking:   6df46fd1d1b5   ← governor.h moved (backport into 6.18.y)
tip:        acbf23d72fa0

Fix

Add a compatibility wrapper at drivers/devfreq/governor.h that
transparently forwards to <linux/devfreq-governor.h>. This is the
standard Linux kernel pattern for header relocations (used widely across
subsystems) and avoids breaking existing out-of-tree consumers while they
migrate.

New drivers must use #include <linux/devfreq-governor.h> directly.
This shim can be dropped once all known consumers (kgsl-dlkm etc.) are
updated to use the new path.

Related

Fixes: 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public header location")

Commit 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public
header location") was backported into qcom-6.18.y, relocating
drivers/devfreq/governor.h to include/linux/devfreq-governor.h.

Out-of-tree kernel modules (e.g. kgsl-dlkm) that build against
qcom-6.18.y add drivers/devfreq/ to their include search path via

  ccflags-y += -I$(KERNEL_SRC)/drivers/devfreq

and use:

  #include "governor.h"

After the move that file is gone, causing a build failure for every
Yocto target that builds kgsl-dlkm:

  governor_msm_adreno_tz.c:30:10: fatal error: governor.h: No such file or directory
  governor_gpubw_mon.c:14:10: fatal error: governor.h: No such file or directory

Add a compatibility wrapper at the old location that transparently
redirects to the new public header. This is the standard Linux kernel
pattern for header relocations and avoids breaking existing out-of-tree
consumers while they migrate.

New in-tree and out-of-tree drivers must use
  #include <linux/devfreq-governor.h>
directly. This shim will be removed once all known consumers are updated.

Fixes: 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public header location")
Signed-off-by: Salendarsingh Gaud <sgaud@qti.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

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