Commit 3ccadbce authored by Matthew Auld's avatar Matthew Auld

drm/i915/gemfs: don't mark huge_opt as static

vfs_kernel_mount() modifies the passed in mount options, leaving us with
"huge", instead of "huge=within_size". Normally this shouldn't matter
with the usual module load/unload flow, however with the core_hotunplug
IGT we are hitting the following, when re-probing the memory regions:

i915 0000:00:02.0: [drm] Transparent Hugepage mode 'huge'
tmpfs: Bad value for 'huge'
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-22).

References: https://gitlab.freedesktop.org/drm/intel/-/issues/4651Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211126110843.2028582-1-matthew.auld@intel.com
parent 8b91cdd4
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
int i915_gemfs_init(struct drm_i915_private *i915) int i915_gemfs_init(struct drm_i915_private *i915)
{ {
char huge_opt[] = "huge=within_size"; /* r/w */
struct file_system_type *type; struct file_system_type *type;
struct vfsmount *gemfs; struct vfsmount *gemfs;
char *opts; char *opts;
...@@ -33,8 +34,6 @@ int i915_gemfs_init(struct drm_i915_private *i915) ...@@ -33,8 +34,6 @@ int i915_gemfs_init(struct drm_i915_private *i915)
opts = NULL; opts = NULL;
if (intel_vtd_active()) { if (intel_vtd_active()) {
if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
static char huge_opt[] = "huge=within_size"; /* r/w */
opts = huge_opt; opts = huge_opt;
drm_info(&i915->drm, drm_info(&i915->drm,
"Transparent Hugepage mode '%s'\n", "Transparent Hugepage mode '%s'\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment