aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2016-05-19Merge tag 'topic/drm-misc-2016-05-18' of ↵Dave Airlie3-10/+8
git://anongit.freedesktop.org/drm-intel into drm-next Update drm-misc pull with a few more fixes included, plus the two from Arnd for the fallout from the drm_gem_object_lookup() refactor that I failed to spot :( * tag 'topic/drm-misc-2016-05-18' of git://anongit.freedesktop.org/drm-intel: drm: remove unused dev variables drm: mediatek: fixup drm_gem_object_lookup API change drm/tegra: Fix crash caused by reference count imbalance drm: Fix error handling in drm_connector_register drm: Avoid connector reference imbalance on error path drm/fb_helper: Fix references to dev->mode_config.num_connector drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config() qxl: catch qxlfb_create_pinned_object failures drm/exynos/hdmi: add a missing tab drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs() drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument drm: Drop connector argument from __drm_atomic_helper_connector_destroy_state drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state drm: Remove unused drm_device from drm_gem_object_lookup()
2016-05-17drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs()Noralf Trønnes1-0/+3
Add drm_fb_cma_create_with_funcs() for drivers that need to set the dirty() callback. Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm/fb-cma-helper: Use const for drm_framebuffer_funcs argumentNoralf Trønnes1-1/+1
drm_framebuffer_init() uses const for the drm_framebuffer_funcs argument so use that on drm_fb_cma_alloc() and drm_fbdev_cma_create_with_funcs() as well. Cc: [email protected] Signed-off-by: Noralf Trønnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm: Drop connector argument from __drm_atomic_helper_connector_destroy_stateDaniel Vetter1-2/+1
It's unused, and really this helper should only look at the state structure and nothing else. Note that this conflicts with a patch from Dave that adds refcounting to drm_connectors. It's not yet clear whether the check Dave adds for connector != NULL is really needed or the right check. v2: Fix commmit message (Laurent). Cc: Dave Airlie <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm: Drop plane argument from __drm_atomic_helper_plane_destroy_stateDaniel Vetter1-2/+1
It's unused, and really this helper should only look at the state structure and nothing else. v2: Fix commit message (Laurent). v3: Rebase onto mtk driver merge. Cc: Maarten Lankhorst <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Inki Dae <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Mark Yao <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_stateDaniel Vetter1-2/+1
It's unused, and really this helper should only look at the state structure and nothing else. v2: Rebase on top of rockchip changes v3: Drop unrelated hunk, spotted by Laurent. v4: Rebase onto mtk driver merge. Cc: Maarten Lankhorst <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Mark Yao <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm: Remove unused drm_device from drm_gem_object_lookup()Chris Wilson1-3/+1
drm_gem_object_lookup() has never required the drm_device for its file local translation of the user handle to the GEM object. Let's remove the unused parameter and save some space. Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected] Cc: Dave Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> [danvet: Fixup kerneldoc too.] Signed-off-by: Daniel Vetter <[email protected]>
2016-05-17Merge branch 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux ↵Dave Airlie24-1/+202
into drm-next Not the biggest fan of doing it this way, but what the hell. * 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux: (22 commits) drm/vmwgfx: add extern C guard for the UAPI header drm/virgl: add extern C guard for the UAPI header drm/via: add extern C guard for the UAPI header drm/vc4: add extern C guard for the UAPI header drm/tegra: add extern C guard for the UAPI header drm/sis: add extern C guard for the UAPI header drm/savage: add extern C guard for the UAPI header drm/radeon: add extern C guard for the UAPI header drm/r128: add extern C guard for the UAPI header drm/qxl: add extern C guard for the UAPI header drm/omap: add extern C guard for the UAPI header drm/nouveau: drop drm/ prefix from include drm/nouveau: add extern C guard for the UAPI header drm/msm: add extern C guard for the UAPI header drm/mga: add extern C guard for the UAPI header drm/i915: add extern C guard for the UAPI header drm/i810: add extern C guard for the UAPI header drm/exynos: add extern C guard for the UAPI header drm/etnaviv: add extern C guard for the UAPI header drm: add extern C guard for the UAPI headers ...
2016-05-17Merge tag 'topic/drm-misc-2016-05-13' of ↵Dave Airlie1-0/+2
git://anongit.freedesktop.org/drm-intel into drm-next I kinda hoped that I could still sneak in Noralf's drm_simple_display_pipe, since there's intereset by others now (for tilcdc at least). But it wasn't ready by a hair. Oh well. Otherwise random stuff plus prep patches from Noralf. * tag 'topic/drm-misc-2016-05-13' of git://anongit.freedesktop.org/drm-intel: drm/atomic: Add drm_atomic_helper_best_encoder() drm/atomic: Don't skip drm_bridge_*() calls if !drm_encoder_helper_funcs drm/fb-cma-helper: Hook up to DocBook and fix some docs drm/fb-helper: Remove mention of CONFIG_FB_DEFERRED_IO in docs drm/sti: include linux/seq_file.h where needed drm/tegra: Use lockless gem BO free callback drm/exynos: Use lockless gem BO free callback drm: Make drm_encoder_helper_funcs optional
2016-05-13drm/vmwgfx: add extern C guard for the UAPI headerEmil Velikov1-0/+9
Cc: Thomas Hellstrom <[email protected]> Cc: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Sinclair Yeh <[email protected]>
2016-05-13drm/virgl: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Dave Airlie <[email protected]> Cc: Gerd Hoffmann <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/via: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/vc4: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Eric Anholt <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/tegra: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Erik Faye-Lund <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Thierry Reding <[email protected]>
2016-05-13drm/sis: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/savage: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/radeon: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/r128: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/qxl: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Gerd Hoffmann <[email protected]> Cc: Dave Airlie <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/omap: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Laurent Pinchart <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Tomi Valkeinen <[email protected]>
2016-05-13drm/nouveau: drop drm/ prefix from includeEmil Velikov1-1/+1
Similar to the rest of the DRM UAPI - these are to be imported unmodified into libdrm. In current form that's impossible. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Ben Skeggs <[email protected]>
2016-05-13drm/nouveau: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Ben Skeggs <[email protected]>
2016-05-13drm/msm: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]> (over irc)
2016-05-13drm/mga: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/i915: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Jani Nikula <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Daniel Vetter <[email protected]>
2016-05-13drm/i810: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Daniel Vetter <[email protected]>
2016-05-13drm/exynos: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Andrzej Hajda <[email protected]> Cc: Inki Dae <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/etnaviv: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Lucas Stach <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Christian Gmeiner <[email protected]> Acked-by: Russell King <[email protected]>
2016-05-13drm: add extern C guard for the UAPI headersEmil Velikov4-0/+40
Signed-off-by: Emil Velikov <[email protected]>
2016-05-13drm/armada: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Russell King <[email protected]>
2016-05-13drm/amdgpu: add extern C guard for the UAPI headerEmil Velikov1-0/+8
Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
2016-05-12drm/dp: Add define to set 0.5% down-spread in MAX_DOWNSPREAD registerEnric Balletbo i Serra1-0/+1
Support of 0.5% down-spread is required for DisplayPort Specification Version 1.1 Sink. Signed-off-by: Enric Balletbo i Serra <[email protected]> [[email protected]: rename to DP_MAX_DOWNSPREAD_0_5] Signed-off-by: Thierry Reding <[email protected]>
2016-05-11drm/atomic: Add drm_atomic_helper_best_encoder()Noralf Trønnes1-0/+2
Add (struct drm_connector_helper_funcs *)->best_encoder callback helper for connectors that support exactly 1 encoder, statically determined at driver init time. Signed-off-by: Noralf Trønnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-10Merge branch 'drm-etnaviv-next' of git://git.pengutronix.de:/git/lst/linux ↵Dave Airlie1-0/+2
into drm-next not much new stuff this time. A (micro-)optimization to allow the hangcheck timer to be coalesced with other wakeups in the system and a fix to handle mmaping of prime imported and userptr buffers correctly. I don't think we have seen any actual issues going back to this yet, so I figured it's safer to get this in via drm-next rather than smashing it into fixes. * 'drm-etnaviv-next' of git://git.pengutronix.de:/git/lst/linux: drm/etnaviv: fix mmap operations for userptr and dma-buf objects drm/etnaviv: take etnaviv_gem_obj in etnaviv_gem_mmap_obj drm/etnaviv: use deferrable timer for hangcheck handler timer: add setup_deferrable_timer macro
2016-05-10Merge tag 'mediatek-drm-2016-05-09' of ↵Dave Airlie1-1/+2
git://git.pengutronix.de/git/pza/linux into drm-next MT8173 DRM support - device tree binding documentation for all MT8173 display subsystem components - basic mediatek-drm driver for MT8173 with two optional, currently fixed output paths: - DSI encoder support for DSI and (via bridge) eDP panels - DPI encoder support for output to HDMI bridge - necessary clock tree changes for the DPI->HDMI path - export mtk-smi functions used by mediatek-drm * tag 'mediatek-drm-2016-05-09' of git://git.pengutronix.de/git/pza/linux: clk: mediatek: remove hdmitx_dig_cts from TOP clocks clk: mediatek: Add hdmi_ref HDMI PHY PLL reference clock output clk: mediatek: make dpi0_sel propagate rate changes drm/mediatek: Add DPI sub driver drm/mediatek: Add DSI sub driver drm/mediatek: Add DRM Driver for Mediatek SoC MT8173. dt-bindings: drm/mediatek: Add Mediatek display subsystem dts binding memory: mtk-smi: export mtk_smi_larb_get/put
2016-05-09Merge tag 'v4.6-rc7' into drm-nextDave Airlie52-242/+387
Merge this back as we've built up a fair few conflicts, and I have some newer trees to pull in.
2016-05-09Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into ↵Dave Airlie1-0/+18
drm-next Mostly cleanups, fixes, and 'struct fence' conversion this time around, with one reservation patch which is a-b Sumit (which the fence conversion patches depend on). * 'msm-next' of git://people.freedesktop.org/~robclark/linux: (25 commits) drm/msm: Drop load/unload drm_driver ops drm/msm: Centralize connector registration/unregistration drm/msm/hdmi: Prevent gpio_free related kernel warnings drm/msm: print offender task name on hangcheck recovery drm/msm: fix leak in failed submit path drm/msm: de-indent submit_create() drm/msm: drop return from gpu->submit() drm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver drm/msm/edp: Drop regulator_set_voltage call drm/msm/dsi: Fix regulator API abuse drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment drm/msm/mdp: Add support for more RGBX formats drm: msm: remove unused variable drm/msm: fix ->last_fence() after recover drm/msm: 'struct fence' conversion drm/msm: remove fence_cbs drm/msm: introduce msm_fence_context drm/msm: split locking and pinning BO's drm/msm/gpu: simplify tracking in-flight bo's drm/msm: split out timeout_to_jiffies helper ...
2016-05-09Merge tag 'topic/drm-misc-2016-05-08' of ↵Dave Airlie2-1/+60
git://anongit.freedesktop.org/drm-intel into drm-next Refcounting is hard, so here's a quick pull request with the one-liner to fix up i915. Otherwise just a few other small things I picked up. Plus the regression fix from Marten for rmfb behaviour that lingered around forever since no testers. Feel free to cherry-pick that over to drm-fixes, but given that there's not many who seemed to have cared, meh. * tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel: drm/i915: Correctly refcount connectors in hw state readou drm/panel: Flesh out kerneldoc drm: Add gpu.tmpl docbook to MAINTAINERS entry drm/core: Do not preserve framebuffer on rmfb, v4. drm: Fix up markup fumble drm/fb_helper: Fix a few typos
2016-05-08reservation: add reservation_object_get_excl_rcu()Rob Clark1-0/+18
In the atomic modesetting path, each driver simply wants to grab a ref to the exclusive fence from a reservation object to store in the incoming drm_plane_state, without doing the whole RCU dance. Since each driver will need to do this, lets make a helper. v2: rename to _rcu instead of _unlocked to be more consistent Signed-off-by: Rob Clark <[email protected]> Acked-by: Sumit Semwal <[email protected]>
2016-05-06Merge tag 'pm+acpi-4.6-rc7' of ↵Linus Torvalds2-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: "Fixes for problems introduced or discovered recently (intel_pstate, sti-cpufreq, ARM64 cpuidle, Operating Performance Points framework, generic device properties framework) and one fix for a hotplug-related deadlock in ACPICA that's been there forever, but is nasty enough. Specifics: - Fix for a recent regression in the intel_pstate driver causing it to fail to restore the HWP (HW-managed P-states) configuration of the boot CPU after suspend-to-RAM (Rafael Wysocki). - Fix for two recent regressions in the intel_pstate driver, one that can trigger a divide by zero if the driver is accessed via sysfs before it manages to take the first sample and one causing it to fail to update a structure field used in a trace point, so the information coming from it is less useful (Rafael Wysocki). - Fix for a problem in the sti-cpufreq driver introduced during the 4.5 cycle that causes it to break CPU PM in multi-platform kernels by registering cpufreq-dt (which subsequently doesn't work) unconditionally and preventing the driver that would actually work from registering (Sudeep Holla). - Stable-candidate fix for an ARM64 cpuidle issue causing idle state usage counters to be incorrectly updated for idle states that were not entered due to errors (James Morse). - Fix for a recently introduced issue in the OPP (Operating Performance Points) framework causing it to print bogus error messages for missing optional regulators (Viresh Kumar). - Fix for a recently introduced issue in the generic device properties framework that may cause it to attempt to dereferece and invalid pointer in some cases (Heikki Krogerus). - Fix for a deadlock in the ACPICA core that may be triggered by device (eg Thunderbolt) hotplug (Prarit Bhargava)" * tag 'pm+acpi-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / OPP: Remove useless check ACPICA: Dispatcher: Update thread ID for recursive method calls intel_pstate: Fix intel_pstate_get() cpufreq: intel_pstate: Fix HWP on boot CPU after system resume cpufreq: st: enable selective initialization based on the platform ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value device property: Avoid potential dereferences of invalid pointers
2016-05-06clk: mediatek: Add hdmi_ref HDMI PHY PLL reference clock outputPhilipp Zabel1-1/+2
The configurable hdmi_ref output of the PLL block is derived from the tvdpll_594m clock signal via a configurable PLL post-divider. It is used as the PLL reference input to the HDMI PHY module. Signed-off-by: Philipp Zabel <[email protected]> Acked-by: James Liao <[email protected]> Acked-by: Stephen Boyd <[email protected]>
2016-05-06drm/panel: Flesh out kerneldocThierry Reding1-0/+59
Write more complete kerneldoc comments for the DRM panel API and integrate the helpers in the DRM DocBook reference. Signed-off-by: Thierry Reding <[email protected]>drm/panel: Add helper for simple panel connector Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-06Merge branches 'acpica-fixes' and 'device-properties-fixes'Rafael J. Wysocki2-3/+3
* acpica-fixes: ACPICA: Dispatcher: Update thread ID for recursive method calls * device-properties-fixes: device property: Avoid potential dereferences of invalid pointers
2016-05-06timer: add setup_deferrable_timer macroLucas Stach1-0/+2
Add the trivial missing macro to setup a deferrable timer. Signed-off-by: Lucas Stach <[email protected]> Acked-by: Thomas Gleixner <[email protected]>
2016-05-06Merge branch 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu into ↵Dave Airlie1-0/+9
drm-next fsl-dcu pixel clock polarity support * 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: use bus_flags for pixel clock polarity drm: introduce bus_flags in drm_display_info
2016-05-06Merge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2-12/+21
into drm-next This is the first big radeon/amdgpu pull request for 4.7. Highlights: - Polaris support in amdgpu Current display stack on par with other asics, for advanced features DAL is required Power management support Support for GFX, Compute, SDMA, UVD, VCE - VCE and UVD init/fini cleanup in radeon - GPUVM improvements - Scheduler improvements - Clockgating improvements - Powerplay improvements - TTM changes to support driver specific LRU update mechanism - Radeon support for new Mesa features - ASYNC pageflip support for radeon - Lots of bug fixes and code cleanups * 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux: (180 commits) drm/amdgpu: Replace rcu_assign_pointer() with RCU_INIT_POINTER() drm/amdgpu: use drm_mode_vrefresh() rather than mode->vrefresh drm/amdgpu/uvd6: add bypass support for fiji (v3) drm/amdgpu/fiji: set UVD CG state when enabling UVD DPM (v2) drm/powerplay: add missing clockgating callback for tonga drm/amdgpu: Constify some tables drm/amd/powerplay: Delete dead struct declaration drm/amd/powerplay/hwmgr: don't add invalid voltage drm/amd/powerplay/hwmgr: prevent VDDC from exceeding 2V MAINTAINERS: Remove unneded wildcard for the Radeon/AMDGPU drivers drm/radeon: add cayman VM support for append packet. drm/amd/amdgpu: Add debugfs entries for smc/didt/pcie drm/amd/amdgpu: Drop print_status callbacks. drm/amd/powerplay: revise reading/writing pptable on Polaris10 drm/amd/powerplay: revise reading/writing pptable on Tonga drm/amd/powerplay: revise reading/writing pptable on Fiji drm/amd/powerplay: revise caching the soft pptable and add it's size drm/amd/powerplay: add dpm force multiple levels on cz/tonga/fiji/polaris (v2) drm/amd/powerplay: fix fan speed percent setting error on Polaris10 drm/amd/powerplay: fix bug dpm can't work when resume back on Polaris ...
2016-05-05Merge branch 'akpm' (patches from Andrew)Linus Torvalds4-78/+116
Merge fixes from Andrew Morton: "14 fixes" * emailed patches from Andrew Morton <[email protected]>: byteswap: try to avoid __builtin_constant_p gcc bug lib/stackdepot: avoid to return 0 handle mm: fix kcompactd hang during memory offlining modpost: fix module autoloading for OF devices with generic compatible property proc: prevent accessing /proc/<PID>/environ until it's ready mm/zswap: provide unique zpool name mm: thp: kvm: fix memory corruption in KVM with THP enabled MAINTAINERS: fix Rajendra Nayak's address mm, cma: prevent nr_isolated_* counters from going negative mm: update min_free_kbytes from khugepaged after core initialization huge pagecache: mmap_sem is unlocked when truncation splits pmd rapidio/mport_cdev: fix uapi type definitions mm: memcontrol: let v2 cgroups follow changes in system swappiness mm: thp: correct split_huge_pages file permission
2016-05-05byteswap: try to avoid __builtin_constant_p gcc bugArnd Bergmann1-9/+15
This is another attempt to avoid a regression in wwn_to_u64() after that started using get_unaligned_be64(), which in turn ran into a bug on gcc-4.9 through 6.1. The regression got introduced due to the combination of two separate workarounds (commits e3bde9568d99: "include/linux/unaligned: force inlining of byteswap operations" and ef3fb2422ffe: "scsi: fc: use get/put_unaligned64 for wwn access") that each try to sidestep distinct problems with gcc behavior (code growth and increased stack usage). Unfortunately after both have been applied, a more serious gcc bug has been uncovered, leading to incorrect object code that discards part of a function and causes undefined behavior. As part of this problem is how __builtin_constant_p gets evaluated on an argument passed by reference into an inline function, this avoids the use of __builtin_constant_p() for all architectures that set CONFIG_ARCH_USE_BUILTIN_BSWAP. Most architectures do not set ARCH_SUPPORTS_OPTIMIZED_INLINING, which means they probably do not suffer from the problem in the qla2xxx driver, but they might still run into it elsewhere. Both of the original workarounds were only merged in the 4.6 kernel, and the bug that is fixed by this patch should only appear if both are there, so we probably don't need to backport the fix. On the other hand, it works by simplifying the code path and should not have any negative effects. [[email protected]: fix older gcc warnings] (http://lkml.kernel.org/r/12243652.bxSxEgjgfk@wuerfel) Link: https://lkml.org/lkml/headers/2016/4/12/1103 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70232 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646 Fixes: e3bde9568d99 ("include/linux/unaligned: force inlining of byteswap operations") Fixes: ef3fb2422ffe ("scsi: fc: use get/put_unaligned64 for wwn access") Link: http://lkml.kernel.org/r/1780465.XdtPJpi8Tt@wuerfel Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Josh Poimboeuf <[email protected]> Tested-by: Josh Poimboeuf <[email protected]> # on gcc-5.3 Tested-by: Quinn Tran <[email protected]> Cc: Martin Jambor <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: James Bottomley <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: Thomas Graf <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: David Rientjes <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Himanshu Madhani <[email protected]> Cc: Jan Hubicka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-05-05mm: thp: kvm: fix memory corruption in KVM with THP enabledAndrea Arcangeli1-0/+22
After the THP refcounting change, obtaining a compound pages from get_user_pages() no longer allows us to assume the entire compound page is immediately mappable from a secondary MMU. A secondary MMU doesn't want to call get_user_pages() more than once for each compound page, in order to know if it can map the whole compound page. So a secondary MMU needs to know from a single get_user_pages() invocation when it can map immediately the entire compound page to avoid a flood of unnecessary secondary MMU faults and spurious atomic_inc()/atomic_dec() (pages don't have to be pinned by MMU notifier users). Ideally instead of the page->_mapcount < 1 check, get_user_pages() should return the granularity of the "page" mapping in the "mm" passed to get_user_pages(). However it's non trivial change to pass the "pmd" status belonging to the "mm" walked by get_user_pages up the stack (up to the caller of get_user_pages). So the fix just checks if there is not a single pte mapping on the page returned by get_user_pages, and in turn if the caller can assume that the whole compound page is mapped in the current "mm" (in a pmd_trans_huge()). In such case the entire compound page is safe to map into the secondary MMU without additional get_user_pages() calls on the surrounding tail/head pages. In addition of being faster, not having to run other get_user_pages() calls also reduces the memory footprint of the secondary MMU fault in case the pmd split happened as result of memory pressure. Without this fix after a MADV_DONTNEED (like invoked by QEMU during postcopy live migration or balloning) or after generic swapping (with a failure in split_huge_page() that would only result in pmd splitting and not a physical page split), KVM would map the whole compound page into the shadow pagetables, despite regular faults or userfaults (like UFFDIO_COPY) may map regular pages into the primary MMU as result of the pte faults, leading to the guest mode and userland mode going out of sync and not working on the same memory at all times. Any other secondary MMU notifier manager (KVM is just one of the many MMU notifier users) will need the same information if it doesn't want to run a flood of get_user_pages_fast and it can support multiple granularity in the secondary MMU mappings, so I think it is justified to be exposed not just to KVM. The other option would be to move transparent_hugepage_adjust to mm/huge_memory.c but that currently has all kind of KVM data structures in it, so it's definitely not a cut-and-paste work, so I couldn't do a fix as cleaner as this one for 4.6. Signed-off-by: Andrea Arcangeli <[email protected]> Cc: "Dr. David Alan Gilbert" <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: "Li, Liang Z" <[email protected]> Cc: Amit Shah <[email protected]> Cc: Paolo Bonzini <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-05-05rapidio/mport_cdev: fix uapi type definitionsAlexandre Bounine1-69/+75
Fix problems in uapi definitions reported by Gabriel Laskar: (see https://lkml.org/lkml/2016/4/5/205 for details) - move public header file rio_mport_cdev.h to include/uapi/linux directory - change types in data structures passed as IOCTL parameters - improve parameter checking in some IOCTL service routines Signed-off-by: Alexandre Bounine <[email protected]> Reported-by: Gabriel Laskar <[email protected]> Tested-by: Barry Wood <[email protected]> Cc: Gabriel Laskar <[email protected]> Cc: Matt Porter <[email protected]> Cc: Aurelien Jacquiot <[email protected]> Cc: Andre van Herk <[email protected]> Cc: Barry Wood <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>