Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/4651
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211126110843.2028582-1-matthew.auld@intel.com

+1 -2
+1 -2
drivers/gpu/drm/i915/gem/i915_gemfs.c
··· 12 12 13 13 int i915_gemfs_init(struct drm_i915_private *i915) 14 14 { 15 + char huge_opt[] = "huge=within_size"; /* r/w */ 15 16 struct file_system_type *type; 16 17 struct vfsmount *gemfs; 17 18 char *opts; ··· 34 33 opts = NULL; 35 34 if (intel_vtd_active()) { 36 35 if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { 37 - static char huge_opt[] = "huge=within_size"; /* r/w */ 38 - 39 36 opts = huge_opt; 40 37 drm_info(&i915->drm, 41 38 "Transparent Hugepage mode '%s'\n",