linux_dsm_epyc7002/drivers/gpu/drm/i915
Jérôme Glisse 5d6527a784 mm/mmu_notifier: use structure for invalidate_range_start/end callback
Patch series "mmu notifier contextual informations", v2.

This patchset adds contextual information, why an invalidation is
happening, to mmu notifier callback.  This is necessary for user of mmu
notifier that wish to maintains their own data structure without having to
add new fields to struct vm_area_struct (vma).

For instance device can have they own page table that mirror the process
address space.  When a vma is unmap (munmap() syscall) the device driver
can free the device page table for the range.

Today we do not have any information on why a mmu notifier call back is
happening and thus device driver have to assume that it is always an
munmap().  This is inefficient at it means that it needs to re-allocate
device page table on next page fault and rebuild the whole device driver
data structure for the range.

Other use case beside munmap() also exist, for instance it is pointless
for device driver to invalidate the device page table when the
invalidation is for the soft dirtyness tracking.  Or device driver can
optimize away mprotect() that change the page table permission access for
the range.

This patchset enables all this optimizations for device drivers.  I do not
include any of those in this series but another patchset I am posting will
leverage this.

The patchset is pretty simple from a code point of view.  The first two
patches consolidate all mmu notifier arguments into a struct so that it is
easier to add/change arguments.  The last patch adds the contextual
information (munmap, protection, soft dirty, clear, ...).

This patch (of 3):

To avoid having to change many callback definition everytime we want to
add a parameter use a structure to group all parameters for the
mmu_notifier invalidate_range_start/end callback.  No functional changes
with this patch.

[akpm@linux-foundation.org: fix drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c kerneldoc]
Link: http://lkml.kernel.org/r/20181205053628.3210-2-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Jason Gunthorpe <jgg@mellanox.com>	[infiniband]
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <zwisler@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krcmar <rkrcmar@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Felix Kuehling <felix.kuehling@amd.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-12-28 12:11:50 -08:00
..
gvt drm pull request for 4.21-rc1 2018-12-25 11:48:26 -08:00
selftests mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
dvo_ch7xxx.c
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c
dvo_sil164.c
dvo_tfp410.c
dvo.h
i915_cmd_parser.c
i915_debugfs.c drm/i915: Fuse per-context workaround handling with the common framework 2018-12-04 12:23:22 +00:00
i915_drv.c drm/i915: Record GT workarounds in a list 2018-12-05 13:50:11 +02:00
i915_drv.h drm/i915: Allocate a common scratch page 2018-12-12 12:27:44 +02:00
i915_fixed.h drm/i915/fixed: cosmetic cleanup 2018-11-20 12:49:24 +02:00
i915_gem_batch_pool.c
i915_gem_batch_pool.h
i915_gem_clflush.c
i915_gem_clflush.h
i915_gem_context.c drm/i915: Fuse per-context workaround handling with the common framework 2018-12-04 12:23:22 +00:00
i915_gem_context.h drm/i915/execlists: Flush the CS events before unpinning 2018-10-03 14:27:16 +01:00
i915_gem_dmabuf.c
i915_gem_evict.c
i915_gem_execbuffer.c drm pull request for 4.21-rc1 2018-12-25 11:48:26 -08:00
i915_gem_fence_reg.c
i915_gem_fence_reg.h
i915_gem_gtt.c drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture 2018-11-20 10:09:27 +02:00
i915_gem_gtt.h drm/i915: Mark pin flags as u64 2018-11-06 17:17:50 +02:00
i915_gem_internal.c
i915_gem_object.c
i915_gem_object.h
i915_gem_render_state.c
i915_gem_render_state.h
i915_gem_shrinker.c
i915_gem_stolen.c drm/i915: pass dev_priv to i915_gem_cleanup_stolen 2018-09-20 16:43:17 +01:00
i915_gem_tiling.c
i915_gem_userptr.c mm/mmu_notifier: use structure for invalidate_range_start/end callback 2018-12-28 12:11:50 -08:00
i915_gem.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
i915_gem.h drm/i915: GEM_WARN_ON considered harmful 2018-10-18 10:10:12 +01:00
i915_gemfs.c
i915_gemfs.h
i915_gpu_error.c drm/i915: Allocate a common scratch page 2018-12-12 12:27:44 +02:00
i915_gpu_error.h drm/i915: Cache the error string 2018-11-23 13:55:19 +00:00
i915_ioc32.c
i915_irq.c drm/i915/icl: Reset PSR interruptions 2018-11-09 10:49:39 -08:00
i915_memcpy.c
i915_mm.c
i915_oa_bdw.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_bdw.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_bxt.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_bxt.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_cflgt2.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_cflgt2.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_cflgt3.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_cflgt3.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_chv.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_chv.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_cnl.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_cnl.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_glk.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_glk.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_hsw.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_hsw.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_icl.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_icl.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_kblgt2.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_kblgt2.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_kblgt3.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_kblgt3.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_sklgt2.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_sklgt2.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_sklgt3.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_sklgt3.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_sklgt4.c drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_oa_sklgt4.h drm/i915/perf: update generated files headers 2018-10-23 15:09:16 +01:00
i915_params.c drm/i915: Hide enable_gvt modparam when not compiled in 2018-11-19 13:19:04 +02:00
i915_params.h drm/i915: Remove i915.enable_ppgtt override 2018-09-27 12:05:31 +01:00
i915_pci.c drm/i915: Move display device info capabilities to its own struct 2018-12-03 14:55:41 -08:00
i915_perf.c Revert "drm/i915/perf: Fix warning in documentation" 2018-11-19 13:08:48 +02:00
i915_pmu.c
i915_pmu.h
i915_pvinfo.h
i915_query.c drm/i915/query: fix subslice length 2018-11-09 11:42:00 -08:00
i915_query.h
i915_reg.h drm/i915/icl: Define Panel power ctrl register 2018-12-03 15:54:49 +02:00
i915_request.c drm/i915: Skip engine serialisation for no-op seqno reset 2018-11-27 13:03:18 +00:00
i915_request.h drm/i915: Priority boost for waiting clients 2018-10-01 20:34:24 +01:00
i915_scheduler.c drm/i915: Priority boost for waiting clients 2018-10-01 20:34:24 +01:00
i915_scheduler.h drm/i915: Priority boost for waiting clients 2018-10-01 20:34:24 +01:00
i915_selftest.h
i915_suspend.c
i915_sw_fence.c drm/i915: change i915_sw_fence license to MIT 2018-12-04 12:13:48 +00:00
i915_sw_fence.h drm/i915: change i915_sw_fence license to MIT 2018-12-04 12:13:48 +00:00
i915_syncmap.c drm/i915: Convert to BITS_PER_TYPE 2018-09-26 13:32:03 +01:00
i915_syncmap.h
i915_sysfs.c drm/i915/sysfs: make attrs arrays const 2018-12-03 18:18:20 +02:00
i915_timeline.c
i915_timeline.h drm/i915/selftests: Workaround an issue with unused lockdep subclass 2018-11-16 08:38:21 +00:00
i915_trace_points.c
i915_trace.h
i915_utils.h drm/i915: Make sure fb gtt offsets stay within 32bits 2018-11-29 22:00:49 +02:00
i915_vgpu.c
i915_vgpu.h
i915_vma.c Merge drm/drm-next into drm-intel-next-queued 2018-11-20 13:14:08 +02:00
i915_vma.h
icl_dsi.c drm/i915/icl: add pll mapping for DSI 2018-12-03 15:55:27 +02:00
intel_acpi.c
intel_atomic_plane.c drm/i915: Commit skl+ planes in an order that avoids ddb overlaps 2018-11-28 21:51:51 +02:00
intel_atomic.c drm/i915: Introduce crtc_state->update_planes bitmask 2018-11-28 21:51:50 +02:00
intel_audio.c drm/i915/hdmi: Reorder structure to match specification 2018-11-15 16:02:47 +02:00
intel_bios.c drm/i915: Add HAS_DISPLAY() and use it 2018-12-03 14:55:39 -08:00
intel_bios.h
intel_breadcrumbs.c drm/i915/breadcrumbs: Reduce missed-breadcrumb false positive rate 2018-12-03 14:34:08 +00:00
intel_cdclk.c drm/i915: add ICP support to cnp_rawclk() and kill icp_rawclk() 2018-11-13 16:37:16 -08:00
intel_color.c drm/i915: Add CRTC output format YCBCR 4:4:4 2018-10-15 16:01:50 +03:00
intel_combo_phy.c drm/i915/icl: reverse uninit order 2018-11-15 16:36:58 -08:00
intel_connector.c drm/i915: rename and move intel_get_pipe_from_connector() 2018-10-17 09:36:43 +03:00
intel_crt.c drm/i915: Introduce CRTC output format 2018-10-15 16:01:49 +03:00
intel_csr.c drm/i915: Downgrade unknown CSR firmware warnings 2018-11-20 14:14:18 -08:00
intel_ddi.c drm/i915/icl: Add get config functionality for DSI 2018-12-03 15:54:16 +02:00
intel_device_info.c drm/i915: Move display device info capabilities to its own struct 2018-12-03 14:55:41 -08:00
intel_device_info.h drm/i915: Move display device info capabilities to its own struct 2018-12-03 14:55:41 -08:00
intel_display.c drm/i915/icl: fix transcoder state readout 2018-12-04 19:05:51 +02:00
intel_display.h drm/i915/dsc: Add a power domain for VDSC on eDP/MIPI DSI 2018-11-29 12:23:54 -08:00
intel_dp_aux_backlight.c
intel_dp_link_training.c drm/i915/dp: Link train Fallback on eDP only if fallback link BW can fit panel's native mode 2018-10-17 18:23:59 -07:00
intel_dp_mst.c drm/i915: Fix possible race in intel_dp_add_mst_connector() 2018-11-12 17:07:12 +02:00
intel_dp.c drm/i915/dp: Fix inconsistent indenting 2018-12-04 09:32:57 +00:00
intel_dpio_phy.c drm/i915: Get rid of crtc->config in chv_data_lane_soft_reset 2018-10-05 15:19:08 +02:00
intel_dpll_mgr.c drm/i915/icl: Calculate DPLL params for DSI 2018-12-03 15:53:42 +02:00
intel_dpll_mgr.h drm/i915/icl: Refactor icl pll functions 2018-10-16 09:00:58 -07:00
intel_drv.h drm/i915/icl: Add get config functionality for DSI 2018-12-03 15:54:16 +02:00
intel_dsi_dcs_backlight.c
intel_dsi_vbt.c drm/i915/icl: add dummy DSI GPIO element execution function 2018-12-03 15:55:01 +02:00
intel_dsi.c drm/i915: Determine DSI panel orientation from VBT 2018-11-13 17:20:32 +02:00
intel_dsi.h drm/i915/icl: Sanitize DDI port clock gating for DSI ports 2018-12-03 15:52:47 +02:00
intel_dvo.c drm/i915: Introduce CRTC output format 2018-10-15 16:01:49 +03:00
intel_engine_cs.c drm/i915: Allocate a common scratch page 2018-12-12 12:27:44 +02:00
intel_fbc.c drm/i915: Move display device info capabilities to its own struct 2018-12-03 14:55:41 -08:00
intel_fbdev.c drm/i915: Add HAS_DISPLAY() and use it 2018-12-03 14:55:39 -08:00
intel_fifo_underrun.c
intel_frontbuffer.c
intel_frontbuffer.h
intel_gpu_commands.h
intel_guc_ads.c
intel_guc_ads.h
intel_guc_ct.c
intel_guc_ct.h
intel_guc_fw.c drm/i915: Downgrade unknown firmware warnings 2018-11-16 15:35:36 +00:00
intel_guc_fw.h
intel_guc_fwif.h drm/i915/guc: doorbell checking cleanup 2018-10-23 09:42:25 +01:00
intel_guc_log.c
intel_guc_log.h
intel_guc_reg.h drm/i915/guc: doorbell checking cleanup 2018-10-23 09:42:25 +01:00
intel_guc_submission.c drm/i915/guc: doorbell checking cleanup 2018-10-23 09:42:25 +01:00
intel_guc_submission.h
intel_guc.c drm/i915/guc: Limit number of scratch registers used for H2G 2018-10-22 12:36:49 +01:00
intel_guc.h drm/i915/guc: init GuC descriptors after GuC load 2018-10-04 07:29:47 +01:00
intel_gvt.c
intel_gvt.h
intel_hangcheck.c
intel_hdcp.c drm/i915: Reassigning log level for HDCP failures 2018-10-29 16:14:58 +01:00
intel_hdmi.c drm/i915/dp: Use the existing write_infoframe() for DSC PPS SDPs 2018-11-29 12:29:54 -08:00
intel_hotplug.c drm/i915: Fix hpd handling for pins with two encoders 2018-11-12 17:07:12 +02:00
intel_huc_fw.c
intel_huc_fw.h
intel_huc.c drm/i915/huc: Normalize HuC status returned by I915_PARAM_HAS_HUC 2018-10-18 10:20:08 +01:00
intel_huc.h
intel_i2c.c drm/i915: Add HAS_DISPLAY() and use it 2018-12-03 14:55:39 -08:00
intel_lpe_audio.c drm/i915: Don't oops during modeset shutdown after lpe audio deinit 2018-11-06 17:18:01 +02:00
intel_lrc_reg.h
intel_lrc.c drm pull request for 4.21-rc1 2018-12-25 11:48:26 -08:00
intel_lrc.h
intel_lspcon.c drm/i915: Switch LSPCON to PCON mode if it's in LS mode 2018-11-13 15:22:27 +02:00
intel_lvds.c drm/i915: Introduce CRTC output format 2018-10-15 16:01:49 +03:00
intel_mocs.c
intel_mocs.h
intel_opregion.c drm/i915: Stop calling intel_opregion unregister/register in suspend/resume 2018-10-30 11:52:54 +00:00
intel_opregion.h drm/i915: Fixup stub definitions for intel_opregion_suspend|resume 2018-11-30 09:46:31 +00:00
intel_overlay.c drm/i915: Keep overlay functions naming consistent 2018-11-08 17:09:18 -08:00
intel_panel.c drm/i915: Use intel_panel_actually_set_backlight() to disable PWM backlight 2018-10-31 23:44:55 +02:00
intel_pipe_crc.c
intel_pm.c drm/i915: Rename the confusing 'plane_id' to 'color_plane' 2018-11-28 21:51:51 +02:00
intel_psr.c drm/i915/psr: Get pipe id following atomic guidelines 2018-11-30 09:58:02 -08:00
intel_quirks.c drm/i915/quirks: pass dev_priv instead of drm dev to quirk code 2018-10-18 13:40:13 +03:00
intel_renderstate_gen6.c
intel_renderstate_gen7.c
intel_renderstate_gen8.c
intel_renderstate_gen9.c
intel_renderstate.h
intel_ringbuffer.c drm pull request for 4.21-rc1 2018-12-25 11:48:26 -08:00
intel_ringbuffer.h drm/i915: Allocate a common scratch page 2018-12-12 12:27:44 +02:00
intel_runtime_pm.c drm/i915/dsc: Add a power domain for VDSC on eDP/MIPI DSI 2018-11-29 12:23:54 -08:00
intel_sdvo_regs.h
intel_sdvo.c drm/i915/sdvo: Utilize intel_panel for fixed_mode 2018-10-23 18:26:15 +03:00
intel_sideband.c
intel_sprite.c drm/i915: Pass the plane to icl_program_input_csc_coeff() 2018-11-28 21:51:51 +02:00
intel_tv.c drm/i915: Introduce CRTC output format 2018-10-15 16:01:49 +03:00
intel_uc_fw.c
intel_uc_fw.h drm/i915/guc: init GuC descriptors after GuC load 2018-10-04 07:29:47 +01:00
intel_uc.c drm/i915/guc: Fix Gen9 GuC loading workarounds 2018-10-17 09:08:00 +01:00
intel_uc.h
intel_uncore.c drm/i915: uncore_fw_domains_init sort platforms newer-to-older 2018-10-22 14:40:43 -07:00
intel_uncore.h
intel_vbt_defs.h drm/i915/bios: make the aux channel macros private to the vbt parser 2018-11-15 16:22:17 +02:00
intel_vdsc.c drm/i915/dsc: Enable and disable appropriate power wells for VDSC 2018-11-29 12:31:36 -08:00
intel_wopcm.c
intel_wopcm.h
intel_workarounds.c drm/i915: Introduce per-engine workarounds 2018-12-05 13:50:24 +02:00
intel_workarounds.h drm/i915: Introduce per-engine workarounds 2018-12-05 13:50:24 +02:00
Kconfig
Kconfig.debug
Makefile drm/i915/selftests: Add tests for GT and engine workaround verification 2018-12-04 12:23:19 +00:00
vlv_dsi_pll.c
vlv_dsi.c drm/i915: Determine DSI panel orientation from VBT 2018-11-13 17:20:32 +02:00