diff options
author | Dave Airlie <airlied@redhat.com> | 2017-10-19 20:56:10 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-10-19 20:56:10 -0400 |
commit | 282dc8322a95b5c6a246fc781d89e5930821d486 (patch) | |
tree | 55ce320a8ccee6be53342670a007b3b31d69b122 /mm | |
parent | 6585d4274b0baf1d09318539c4a726a96b51af34 (diff) | |
parent | fa9caf0b6e69703ff8a4d4da17897008ec2f2dd3 (diff) |
Merge tag 'drm-intel-next-2017-10-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Last batch of drm/i915 features for v4.15:
- transparent huge pages support (Matthew)
- uapi: I915_PARAM_HAS_SCHEDULER into a capability bitmask (Chris)
- execlists: preemption (Chris)
- scheduler: user defined priorities (Chris)
- execlists optimization (MichaĆ)
- plenty of display fixes (Imre)
- has_ipc fix (Rodrigo)
- platform features definition refactoring (Rodrigo)
- legacy cursor update fix (Maarten)
- fix vblank waits for cursor updates (Maarten)
- reprogram dmc firmware on resume, dmc state fix (Imre)
- remove use_mmio_flip module parameter (Maarten)
- wa fixes (Oscar)
- huc/guc firmware refacoring (Sagar, Michal)
- push encoder specific code to encoder hooks (Jani)
- DP MST fixes (Dhinakaran)
- eDP power sequencing fixes (Manasi)
- selftest updates (Chris, Matthew)
- mmu notifier cpu hotplug deadlock fix (Daniel)
- more VBT parser refactoring (Jani)
- max pipe refactoring (Mika Kahola)
- rc6/rps refactoring and separation (Sagar)
- userptr lockdep fix (Chris)
- tracepoint fixes and defunct tracepoint removal (Chris)
- use rcu instead of abusing stop_machine (Daniel)
- plenty of other fixes all around (Everyone)
* tag 'drm-intel-next-2017-10-12' of git://anongit.freedesktop.org/drm/drm-intel: (145 commits)
drm/i915: Update DRIVER_DATE to 20171012
drm/i915: Simplify intel_sanitize_enable_ppgtt
drm/i915/userptr: Drop struct_mutex before cleanup
drm/i915/dp: limit sink rates based on rate
drm/i915/dp: centralize max source rate conditions more
drm/i915: Allow PCH platforms fall back to BIOS LVDS mode
drm/i915: Reuse normal state readout for LVDS/DVO fixed mode
drm/i915: Use rcu instead of stop_machine in set_wedged
drm/i915: Introduce separate status variable for RC6 and LLC ring frequency setup
drm/i915: Create generic functions to control RC6, RPS
drm/i915: Create generic function to setup LLC ring frequency table
drm/i915: Rename intel_enable_rc6 to intel_rc6_enabled
drm/i915: Name structure in dev_priv that contains RPS/RC6 state as "gt_pm"
drm/i915: Move rps.hw_lock to dev_priv and s/hw_lock/pcu_lock
drm/i915: Name i915_runtime_pm structure in dev_priv as "runtime_pm"
drm/i915: Separate RPS and RC6 handling for CHV
drm/i915: Separate RPS and RC6 handling for VLV
drm/i915: Separate RPS and RC6 handling for BDW
drm/i915: Remove superfluous IS_BDW checks and non-BDW changes from gen8_enable_rps
drm/i915: Separate RPS and RC6 handling for gen6+
...
Diffstat (limited to 'mm')
-rw-r--r-- | mm/shmem.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 07a1d22807be..3229d27503ec 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -4183,7 +4183,7 @@ static const struct dentry_operations anon_ops = { | |||
4183 | .d_dname = simple_dname | 4183 | .d_dname = simple_dname |
4184 | }; | 4184 | }; |
4185 | 4185 | ||
4186 | static struct file *__shmem_file_setup(const char *name, loff_t size, | 4186 | static struct file *__shmem_file_setup(struct vfsmount *mnt, const char *name, loff_t size, |
4187 | unsigned long flags, unsigned int i_flags) | 4187 | unsigned long flags, unsigned int i_flags) |
4188 | { | 4188 | { |
4189 | struct file *res; | 4189 | struct file *res; |
@@ -4192,8 +4192,8 @@ static struct file *__shmem_file_setup(const char *name, loff_t size, | |||
4192 | struct super_block *sb; | 4192 | struct super_block *sb; |
4193 | struct qstr this; | 4193 | struct qstr this; |
4194 | 4194 | ||
4195 | if (IS_ERR(shm_mnt)) | 4195 | if (IS_ERR(mnt)) |
4196 | return ERR_CAST(shm_mnt); | 4196 | return ERR_CAST(mnt); |
4197 | 4197 | ||
4198 | if (size < 0 || size > MAX_LFS_FILESIZE) | 4198 | if (size < 0 || size > MAX_LFS_FILESIZE) |
4199 | return ERR_PTR(-EINVAL); | 4199 | return ERR_PTR(-EINVAL); |
@@ -4205,8 +4205,8 @@ static struct file *__shmem_file_setup(const char *name, loff_t size, | |||
4205 | this.name = name; | 4205 | this.name = name; |
4206 | this.len = strlen(name); | 4206 | this.len = strlen(name); |
4207 | this.hash = 0; /* will go */ | 4207 | this.hash = 0; /* will go */ |
4208 | sb = shm_mnt->mnt_sb; | 4208 | sb = mnt->mnt_sb; |
4209 | path.mnt = mntget(shm_mnt); | 4209 | path.mnt = mntget(mnt); |
4210 | path.dentry = d_alloc_pseudo(sb, &this); | 4210 | path.dentry = d_alloc_pseudo(sb, &this); |
4211 | if (!path.dentry) | 4211 | if (!path.dentry) |
4212 | goto put_memory; | 4212 | goto put_memory; |
@@ -4251,7 +4251,7 @@ put_path: | |||
4251 | */ | 4251 | */ |
4252 | struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned long flags) | 4252 | struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned long flags) |
4253 | { | 4253 | { |
4254 | return __shmem_file_setup(name, size, flags, S_PRIVATE); | 4254 | return __shmem_file_setup(shm_mnt, name, size, flags, S_PRIVATE); |
4255 | } | 4255 | } |
4256 | 4256 | ||
4257 | /** | 4257 | /** |
@@ -4262,11 +4262,25 @@ struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned lon | |||
4262 | */ | 4262 | */ |
4263 | struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags) | 4263 | struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags) |
4264 | { | 4264 | { |
4265 | return __shmem_file_setup(name, size, flags, 0); | 4265 | return __shmem_file_setup(shm_mnt, name, size, flags, 0); |
4266 | } | 4266 | } |
4267 | EXPORT_SYMBOL_GPL(shmem_file_setup); | 4267 | EXPORT_SYMBOL_GPL(shmem_file_setup); |
4268 | 4268 | ||
4269 | /** | 4269 | /** |
4270 | * shmem_file_setup_with_mnt - get an unlinked file living in tmpfs | ||
4271 | * @mnt: the tmpfs mount where the file will be created | ||
4272 | * @name: name for dentry (to be seen in /proc/<pid>/maps | ||
4273 | * @size: size to be set for the file | ||
4274 | * @flags: VM_NORESERVE suppresses pre-accounting of the entire object size | ||
4275 | */ | ||
4276 | struct file *shmem_file_setup_with_mnt(struct vfsmount *mnt, const char *name, | ||
4277 | loff_t size, unsigned long flags) | ||
4278 | { | ||
4279 | return __shmem_file_setup(mnt, name, size, flags, 0); | ||
4280 | } | ||
4281 | EXPORT_SYMBOL_GPL(shmem_file_setup_with_mnt); | ||
4282 | |||
4283 | /** | ||
4270 | * shmem_zero_setup - setup a shared anonymous mapping | 4284 | * shmem_zero_setup - setup a shared anonymous mapping |
4271 | * @vma: the vma to be mmapped is prepared by do_mmap_pgoff | 4285 | * @vma: the vma to be mmapped is prepared by do_mmap_pgoff |
4272 | */ | 4286 | */ |
@@ -4281,7 +4295,7 @@ int shmem_zero_setup(struct vm_area_struct *vma) | |||
4281 | * accessible to the user through its mapping, use S_PRIVATE flag to | 4295 | * accessible to the user through its mapping, use S_PRIVATE flag to |
4282 | * bypass file security, in the same way as shmem_kernel_file_setup(). | 4296 | * bypass file security, in the same way as shmem_kernel_file_setup(). |
4283 | */ | 4297 | */ |
4284 | file = __shmem_file_setup("dev/zero", size, vma->vm_flags, S_PRIVATE); | 4298 | file = shmem_kernel_file_setup("dev/zero", size, vma->vm_flags); |
4285 | if (IS_ERR(file)) | 4299 | if (IS_ERR(file)) |
4286 | return PTR_ERR(file); | 4300 | return PTR_ERR(file); |
4287 | 4301 | ||